// This preference group will only be displayed if the configured
// Ingo_Script:: driver can create script files.
-if (!isset($_SESSION['ingo']['script_generate']) ||
- $_SESSION['ingo']['script_generate']) {
- $prefGroups['script'] = array(
- 'column' => _("Other Preferences"),
- 'label' => _("Script Updating"),
- 'desc' => _("Preferences about script updating."),
- 'members' => array('auto_update'));
-}
+$prefGroups['script'] = array(
+ 'column' => _("Other Preferences"),
+ 'label' => _("Script Updating"),
+ 'desc' => _("Preferences about script updating."),
+ 'members' => array('auto_update'));
// The following preferences are only used for Horde_Script:: drivers that use
// scripts.
}
}
+ /**
+ * Code to run on init when viewing prefs for this application.
+ *
+ * @param Horde_Core_Prefs_Ui $ui The UI object.
+ */
+ public function prefsInit($ui)
+ {
+ if (!isset($GLOBALS['session']['ingo:script_generate']) ||
+ $GLOBALS['session']['ingo:script_generate']) {
+ $ui->suppressGroups[] = 'script';
+ }
+ }
+
}