* ONLY be disabled by system scripts (cron jobs, etc.)
* and scripts that handle login.
* DEFAULT: true
- * 'init' - (boolean) Init the application (by either loading the
- * application's base.php file (deprecated) or calling init()
- * on the Application object)?
- * DEFAULT: false
+ * 'noinit' - (boolean) Do not init the application.
+ * DEFAULT: false
* 'logintasks' - (boolean) Perform login tasks? Only performed if
* 'check_perms' is also true. System tasks are always
* peformed if the user is authorized.
} catch (Horde_Exception_HookNotSet $e) {}
/* Initialize application. */
- if ($checkPerms || !empty($options['init'])) {
+ if ($checkPerms || empty($options['noinit'])) {
try {
if (file_exists($app_lib . '/base.php')) {
// TODO: Remove once there is no more base.php files
* @category Horde
*/
-require_once dirname(__FILE__) . '/../lib/core.php';
-
-$registry = Horde_Registry::singleton();
+require_once dirname(__FILE__) . '/../lib/Application.php';
+Horde_Registry::appInit('horde');
/* Figure out which application we're setting preferences for. */
$app = Horde_Util::getFormData('app', Horde_Prefs_Ui::getDefaultApp());
$chunk = Horde_Util::nonInputVar('chunk');
/* Load $app's base environment. */
-$registry->pushApp($app, array('init' => true));
+$registry->pushApp($app);
/* If a prefs notification status handler is set, activate it now. */
if (!empty($_SESSION['horde_prefs']['status'])) {
/* If we've gotten this far, we should have found enough of Horde to run
* tests. Create the testing object. */
if ($app != 'horde') {
- $registry->pushApp($app, array('check_perms' => false, 'init' => true));
+ $registry->pushApp($app, array('check_perms' => false));
}
$classname = ucfirst($app) . '_Test';
if (!class_exists($classname)) {