<?php
/**
- * registry.php -- Horde application registry.
+ * Horde application registry.
*
* This configuration file is used by Horde to determine which Horde
* applications are installed and where, as well as how they interact.
*
- * General Configuration Information
- * ---------------------------------
- * The __FILE__ constant used below is the filsystem path to the current file.
- * dirname() strips off the filename and turns it into just a directory.
- * By default, locations are relative to this configuration file - which is
- * almost always what is desired.
- *
- * _() is an alias for gettext(), which translates the string into other
- * languages.
+ * NOTE: _() is an alias for gettext(), which translates the string into
+ * other languages.
*
* Application registry
* --------------------
- * The following settings register installed Horde applications.
- * By default, Horde assumes that the application directories live
- * inside the horde directory.
+ * These settings are OPTIONAL:
*
* fileroot: (string) The base filesystem path for the module's files.
-
- * name: (string) The human-readable name used in menus and descriptions for
- * a module.
-
+ * DEFAULT: Auto-determined based on this file's location.
* initial_page: (string) The initial page for the module.
-
+ * DEFAULT: index.php
* menu_parent: (string) The name of the 'heading' group that this app should
- * show up under. This can be left out or set to null for
- * top-level items.
-
+ * show up under. Not-needed for top-level items.
+ * DEFAULT: null
+ * name: (string) The human-readable name used in menus and descriptions for
+ * a module.
+ * DEFAULT: None (any publicly viewable element SHOULD have this entry
+ * defined).
* status: (string) One of the following:
- * active: Activate application.
- * admin: Activate application, but only for admins.
- * heading: Header label for application groups.
- * hidden: Enable application, but hide.
- * inactive: Disable application
- * notoolbar: TODO
- * sidebar: Show in sidebar only.
-
+ * active: Activate application.
+ * admin: Activate application, but only for admins.
+ * heading: Header label for application groups.
+ * hidden: Enable application, but hide.
+ * inactive: Disable application
+ * notoolbar: TODO
+ * sidebar: Show in sidebar only.
+ * DEFAULT: 'active'
* webroot: (string) The base URI path for the module.
- * Usually the default should be fine (applications will occur one
- * level below the horde directory). However, this setting is useful
- * if you want to give an application its own domain.
+ * DEFAULT: Applications live one level below the base horde
+ * directory.
*
- * Settings that probably should not be changed from the defaults unless you
- * REALLY know what you are doing:
+ * These settings should not be changed from the defaults unless you *REALLY*
+ * know what you are doing:
*
* icon: (string) The URI for an icon to show in menus for the module.
* Setting this will override the default theme-based logic in
* $Id$
*/
-// We try to automatically determine the proper webroot for Horde here. This
-// still assumes that applications live under horde/. If this results in
-// incorrect results for you, simply change the 'webroot' setting in the
-// 'horde' stanza below.
-
-$this->applications['horde'] = array(
- 'fileroot' => dirname(__FILE__) . '/..',
- 'webroot' => _detect_webroot(),
- 'initial_page' => 'services/portal/index.php',
- 'name' => _("Horde"),
- 'status' => 'active',
- 'templates' => dirname(__FILE__) . '/../templates',
- 'provides' => 'horde',
-);
-
-$this->applications['imp'] = array(
- 'fileroot' => $this->applications['horde']['fileroot'] . '/imp',
- 'webroot' => $this->applications['horde']['webroot'] . '/imp',
- 'name' => _("Mail"),
- 'status' => 'active',
- 'provides' => array('mail', 'contacts/favouriteRecipients')
-);
-
-$this->applications['ingo'] = array(
- 'fileroot' => $this->applications['horde']['fileroot'] . '/ingo',
- 'webroot' => $this->applications['horde']['webroot'] . '/ingo',
- 'name' => _("Filters"),
- 'status' => 'active',
- 'provides' => array('filter', 'mail/blacklistFrom', 'mail/showBlacklist', 'mail/whitelistFrom', 'mail/showWhitelist', 'mail/applyFilters', 'mail/canApplyFilters', 'mail/showFilters'),
- 'menu_parent' => 'imp'
-);
-
-$this->applications['sam'] = array(
- 'fileroot' => $this->applications['horde']['fileroot'] . '/sam',
- 'webroot' => $this->applications['horde']['webroot'] . '/sam',
- 'name' => _("Spam"),
- 'status' => 'active',
- // Uncomment this line if you want Sam to handle the blacklist filter
- // instead of Ingo:
- // 'provides' => array('mail/blacklistFrom', 'mail/showBlacklist', 'mail/whitelistFrom', 'mail/showWhitelist'),
- 'menu_parent' => 'imp'
-);
-
-$this->applications['forwards'] = array(
- 'fileroot' => $this->applications['horde']['fileroot'] . '/forwards',
- 'webroot' => $this->applications['horde']['webroot'] . '/forwards',
- 'name' => _("Forwards"),
- 'status' => 'active',
- 'provides' => 'forwards',
- 'menu_parent' => 'imp',
-);
+// By default, applications are assumed to live within the base Horde
+// directory (e.g. their fileroot/webroot will be automatically determined
+// by appending the application name to Horde's 'fileroot'/'webroot' setting.
+// If your applications live in a different base directory, defining these
+// variables will change the default directory without the need to change
+// every application's 'fileroot'/'webroot' settings.
+// $app_fileroot = dirname(__FILE__) . '../';
+// $app_webroot = $this->_detectWebroot();
+
+$this->applications = array(
+ 'horde' => array(
+ 'initial_page' => 'services/portal/index.php',
+ 'name' => _("Horde"),
+ 'provides' => 'horde',
+ ),
-$this->applications['vacation'] = array(
- 'fileroot' => $this->applications['horde']['fileroot'] . '/vacation',
- 'webroot' => $this->applications['horde']['webroot'] . '/vacation',
- 'name' => _("Vacation"),
- 'status' => 'active',
- 'provides' => 'vacation',
- 'menu_parent' => 'imp'
-);
+ 'imp' => array(
+ 'name' => _("Mail"),
+ 'provides' => array(
+ 'mail',
+ 'contacts/favouriteRecipients'
+ )
+ ),
-$this->applications['imp-menu'] = array(
- 'status' => 'sidebar',
- 'app' => 'imp',
- 'menu_parent' => 'imp',
-);
+ 'ingo' => array(
+ 'name' => _("Filters"),
+ 'provides' => array(
+ 'filter',
+ 'mail/blacklistFrom',
+ 'mail/showBlacklist',
+ 'mail/whitelistFrom',
+ 'mail/showWhitelist',
+ 'mail/applyFilters',
+ 'mail/canApplyFilters',
+ 'mail/showFilters'
+ ),
+ 'menu_parent' => 'imp'
+ ),
-$this->applications['organizing'] = array(
- 'name' => _("Organizing"),
- 'status' => 'heading',
-);
+ 'imp-menu' => array(
+ 'app' => 'imp',
+ 'menu_parent' => 'imp',
+ 'status' => 'sidebar',
+ ),
-$this->applications['turba'] = array(
- 'fileroot' => $this->applications['horde']['fileroot'] . '/turba',
- 'webroot' => $this->applications['horde']['webroot'] . '/turba',
- 'name' => _("Address Book"),
- 'status' => 'active',
- 'provides' => array('contacts', 'clients/getClientSource', 'clients/clientFields', 'clients/getClient', 'clients/getClients', 'clients/addClient', 'clients/updateClient', 'clients/deleteClient', 'clients/searchClients'),
- 'menu_parent' => 'organizing'
-);
+ 'organizing' => array(
+ 'name' => _("Organizing"),
+ 'status' => 'heading',
+ ),
-$this->applications['turba-menu'] = array(
- 'status' => 'sidebar',
- 'app' => 'turba',
- 'menu_parent' => 'turba',
-);
+ 'turba' => array(
+ 'name' => _("Address Book"),
+ 'provides' => array(
+ 'contacts',
+ 'clients/getClientSource',
+ 'clients/clientFields',
+ 'clients/getClient',
+ 'clients/getClients',
+ 'clients/addClient',
+ 'clients/updateClient',
+ 'clients/deleteClient',
+ 'clients/searchClients'
+ ),
+ 'menu_parent' => 'organizing'
+ ),
-$this->applications['kronolith'] = array(
- 'fileroot' => $this->applications['horde']['fileroot'] . '/kronolith',
- 'webroot' => $this->applications['horde']['webroot'] . '/kronolith',
- 'name' => _("Calendar"),
- 'status' => 'active',
- 'provides' => 'calendar',
- 'menu_parent' => 'organizing'
-);
+ 'turba-menu' => array(
+ 'app' => 'turba',
+ 'menu_parent' => 'turba',
+ 'status' => 'sidebar',
+ ),
-$this->applications['kronolith-alarms'] = array(
- 'status' => 'sidebar',
- 'app' => 'kronolith',
- 'sidebar_params' => array(
- 'id' => 'alarms'
+ 'kronolith' => array(
+ 'name' => _("Calendar"),
+ 'provides' => 'calendar',
+ 'menu_parent' => 'organizing'
),
- 'menu_parent' => 'kronolith',
-);
-$this->applications['kronolith-menu'] = array(
- 'status' => 'sidebar',
- 'app' => 'kronolith',
- 'sidebar_params' => array(
- 'id' => 'menu'
+ 'kronolith-alarms' => array(
+ 'status' => 'sidebar',
+ 'app' => 'kronolith',
+ 'sidebar_params' => array(
+ 'id' => 'alarms'
+ ),
+ 'menu_parent' => 'kronolith',
),
- 'menu_parent' => 'kronolith',
-);
-$this->applications['nag'] = array(
- 'fileroot' => $this->applications['horde']['fileroot'] . '/nag',
- 'webroot' => $this->applications['horde']['webroot'] . '/nag',
- 'name' => _("Tasks"),
- 'status' => 'active',
- 'provides' => 'tasks',
- 'menu_parent' => 'organizing'
-);
+ 'kronolith-menu' => array(
+ 'status' => 'sidebar',
+ 'app' => 'kronolith',
+ 'sidebar_params' => array(
+ 'id' => 'menu'
+ ),
+ 'menu_parent' => 'kronolith',
+ ),
-$this->applications['nag-alarms'] = array(
- 'status' => 'sidebar',
- 'app' => 'nag',
- 'sidebar_params' => array(
- 'id' => 'alarms'
+ 'nag' => array(
+ 'name' => _("Tasks"),
+ 'provides' => 'tasks',
+ 'menu_parent' => 'organizing'
),
- 'menu_parent' => 'nag',
-);
-$this->applications['nag-menu'] = array(
- 'status' => 'sidebar',
- 'app' => 'nag',
- 'sidebar_params' => array(
- 'id' => 'menu'
+ 'nag-alarms' => array(
+ 'status' => 'sidebar',
+ 'app' => 'nag',
+ 'sidebar_params' => array(
+ 'id' => 'alarms'
+ ),
+ 'menu_parent' => 'nag',
),
- 'menu_parent' => 'nag',
-);
-$this->applications['mnemo'] = array(
- 'fileroot' => $this->applications['horde']['fileroot'] . '/mnemo',
- 'webroot' => $this->applications['horde']['webroot'] . '/mnemo',
- 'name' => _("Notes"),
- 'status' => 'active',
- 'provides' => 'notes',
- 'menu_parent' => 'organizing'
-);
+ 'nag-menu' => array(
+ 'status' => 'sidebar',
+ 'app' => 'nag',
+ 'sidebar_params' => array(
+ 'id' => 'menu'
+ ),
+ 'menu_parent' => 'nag',
+ ),
-$this->applications['mnemo-menu'] = array(
- 'status' => 'sidebar',
- 'app' => 'mnemo',
- 'menu_parent' => 'mnemo',
-);
+ 'mnemo' => array(
+ 'name' => _("Notes"),
+ 'provides' => 'notes',
+ 'menu_parent' => 'organizing'
+ ),
-$this->applications['trean'] = array(
- 'fileroot' => $this->applications['horde']['fileroot'] . '/trean',
- 'webroot' => $this->applications['horde']['webroot'] . '/trean',
- 'name' => _("Bookmarks"),
- 'status' => 'active',
- 'provides' => 'bookmarks',
- 'menu_parent' => 'organizing'
-);
+ 'mnemo-menu' => array(
+ 'status' => 'sidebar',
+ 'app' => 'mnemo',
+ 'menu_parent' => 'mnemo',
+ ),
-$this->applications['trean-menu'] = array(
- 'status' => 'sidebar',
- 'app' => 'trean',
- 'menu_parent' => 'trean',
-);
+ 'trean' => array(
+ 'name' => _("Bookmarks"),
+ 'provides' => 'bookmarks',
+ 'menu_parent' => 'organizing'
+ ),
-$this->applications['devel'] = array(
- 'name' => _("Development"),
- 'status' => 'heading',
-);
+ 'trean-menu' => array(
+ 'status' => 'sidebar',
+ 'app' => 'trean',
+ 'menu_parent' => 'trean',
+ ),
-$this->applications['chora'] = array(
- 'fileroot' => $this->applications['horde']['fileroot'] . '/chora',
- 'webroot' => $this->applications['horde']['webroot'] . '/chora',
- 'name' => _("Version Control"),
- 'status' => 'active',
- 'menu_parent' => 'devel'
-);
+ 'devel' => array(
+ 'name' => _("Development"),
+ 'status' => 'heading',
+ ),
-$this->applications['chora-menu'] = array(
- 'status' => 'sidebar',
- 'app' => 'chora',
- 'menu_parent' => 'chora',
-);
+ 'chora' => array(
+ 'name' => _("Version Control"),
+ 'menu_parent' => 'devel'
+ ),
-$this->applications['whups'] = array(
- 'fileroot' => $this->applications['horde']['fileroot'] . '/whups',
- 'webroot' => $this->applications['horde']['webroot'] . '/whups',
- 'name' => _("Tickets"),
- 'status' => 'active',
- 'provides' => 'tickets',
- 'menu_parent' => 'devel',
-);
+ 'chora-menu' => array(
+ 'status' => 'sidebar',
+ 'app' => 'chora',
+ 'menu_parent' => 'chora',
+ ),
-$this->applications['whups-menu'] = array(
- 'status' => 'sidebar',
- 'app' => 'whups',
- 'menu_parent' => 'whups',
-);
+ 'whups' => array(
+ 'name' => _("Tickets"),
+ 'provides' => 'tickets',
+ 'menu_parent' => 'devel',
+ ),
-$this->applications['luxor'] = array(
- 'fileroot' => $this->applications['horde']['fileroot'] . '/luxor',
- 'webroot' => $this->applications['horde']['webroot'] . '/luxor',
- 'name' => _("X-Ref"),
- 'status' => 'active',
- 'menu_parent' => 'devel'
-);
+ 'whups-menu' => array(
+ 'status' => 'sidebar',
+ 'app' => 'whups',
+ 'menu_parent' => 'whups',
+ ),
-$this->applications['info'] = array(
- 'name' => _("Information"),
- 'status' => 'heading',
-);
+ 'luxor' => array(
+ 'name' => _("X-Ref"),
+ 'menu_parent' => 'devel'
+ ),
-$this->applications['jonah'] = array(
- 'fileroot' => $this->applications['horde']['fileroot'] . '/jonah',
- 'webroot' => $this->applications['horde']['webroot'] . '/jonah',
- 'name' => _("News"),
- 'status' => 'active',
- 'provides' => 'news',
- 'menu_parent' => 'info'
-);
+ 'info' => array(
+ 'name' => _("Information"),
+ 'status' => 'heading',
+ ),
-$this->applications['jonah-menu'] = array(
- 'status' => 'sidebar',
- 'app' => 'jonah',
- 'menu_parent' => 'jonah',
-);
+ 'jonah' => array(
+ 'name' => _("News"),
+ 'provides' => 'news',
+ 'menu_parent' => 'info'
+ ),
-$this->applications['office'] = array(
- 'name' => _("Office"),
- 'status' => 'heading',
-);
+ 'jonah-menu' => array(
+ 'status' => 'sidebar',
+ 'app' => 'jonah',
+ 'menu_parent' => 'jonah',
+ ),
-$this->applications['hermes'] = array(
- 'fileroot' => $this->applications['horde']['fileroot'] . '/hermes',
- 'webroot' => $this->applications['horde']['webroot'] . '/hermes',
- 'name' => _("Time Tracking"),
- 'status' => 'active',
- 'menu_parent' => 'office',
- 'provides' => 'time'
-);
+ 'office' => array(
+ 'name' => _("Office"),
+ 'status' => 'heading',
+ ),
-$this->applications['hermes-stopwatch'] = array(
- 'status' => 'sidebar',
- 'app' => 'hermes',
- 'sidebar_params' => array(
- 'id' => 'stopwatch',
+ 'hermes' => array(
+ 'name' => _("Time Tracking"),
+ 'menu_parent' => 'office',
+ 'provides' => 'time'
),
- 'menu_parent' => 'hermes',
-);
-$this->applications['hermes-menu'] = array(
- 'status' => 'sidebar',
- 'app' => 'hermes',
- 'sidebar_params' => array(
- 'id' => 'menu'
+ 'hermes-stopwatch' => array(
+ 'status' => 'sidebar',
+ 'app' => 'hermes',
+ 'sidebar_params' => array(
+ 'id' => 'stopwatch',
+ ),
+ 'menu_parent' => 'hermes',
),
- 'menu_parent' => 'hermes',
-);
-$this->applications['myaccount'] = array(
- 'name' => _("My Account"),
- 'status' => 'heading',
-);
+ 'hermes-menu' => array(
+ 'status' => 'sidebar',
+ 'app' => 'hermes',
+ 'sidebar_params' => array(
+ 'id' => 'menu'
+ ),
+ 'menu_parent' => 'hermes',
+ ),
-$this->applications['gollem'] = array(
- 'fileroot' => $this->applications['horde']['fileroot'] . '/gollem',
- 'webroot' => $this->applications['horde']['webroot'] . '/gollem',
- 'name' => _("File Manager"),
- 'status' => 'active',
- 'menu_parent' => 'myaccount',
- 'provides' => 'files',
-);
+ 'myaccount' => array(
+ 'name' => _("My Account"),
+ 'status' => 'heading',
+ ),
-$this->applications['gollem-menu'] = array(
- 'status' => 'sidebar',
- 'app' => 'gollem',
- 'menu_parent' => 'gollem',
-);
+ 'gollem' => array(
+ 'name' => _("File Manager"),
+ 'menu_parent' => 'myaccount',
+ 'provides' => 'files',
+ ),
-$this->applications['passwd'] = array(
- 'fileroot' => $this->applications['horde']['fileroot'] . '/passwd',
- 'webroot' => $this->applications['horde']['webroot'] . '/passwd',
- 'name' => _("Password"),
- 'status' => 'active',
- 'menu_parent' => 'myaccount'
-);
+ 'gollem-menu' => array(
+ 'status' => 'sidebar',
+ 'app' => 'gollem',
+ 'menu_parent' => 'gollem',
+ ),
-$this->applications['jeta'] = array(
- 'fileroot' => $this->applications['horde']['fileroot'] . '/jeta',
- 'webroot' => $this->applications['horde']['webroot'] . '/jeta',
- 'name' => _("SSH"),
- 'status' => 'active',
- 'menu_parent' => 'myaccount'
-);
+ 'passwd' => array(
+ 'name' => _("Password"),
+ 'menu_parent' => 'myaccount'
+ ),
-$this->applications['website'] = array(
- 'name' => _("Web Site"),
- 'status' => 'heading',
-);
+ 'website' => array(
+ 'name' => _("Web Site"),
+ 'status' => 'heading',
+ ),
-$this->applications['agora'] = array(
- 'fileroot' => $this->applications['horde']['fileroot'] . '/agora',
- 'webroot' => $this->applications['horde']['webroot'] . '/agora',
- 'name' => _("Forums"),
- 'status' => 'active',
- 'provides' => 'forums',
- 'menu_parent' => 'website'
-);
+ 'agora' => array(
+ 'name' => _("Forums"),
+ 'provides' => 'forums',
+ 'menu_parent' => 'website'
+ ),
-$this->applications['ansel'] = array(
- 'fileroot' => $this->applications['horde']['fileroot'] . '/ansel',
- 'webroot' => $this->applications['horde']['webroot'] . '/ansel',
- 'name' => _("Photos"),
- 'status' => 'active',
- 'provides' => 'images',
- 'menu_parent' => 'website'
-);
+ 'ansel' => array(
+ 'name' => _("Photos"),
+ 'provides' => 'images',
+ 'menu_parent' => 'website'
+ ),
-$this->applications['wicked'] = array(
- 'fileroot' => $this->applications['horde']['fileroot'] . '/wicked',
- 'webroot' => $this->applications['horde']['webroot'] . '/wicked',
- 'name' => _("Wiki"),
- 'status' => 'active',
- 'provides' => 'wiki',
- 'menu_parent' => 'website'
-);
+ 'wicked' => array(
+ 'name' => _("Wiki"),
+ 'provides' => 'wiki',
+ 'menu_parent' => 'website'
+ ),
-$this->applications['vilma'] = array(
- 'fileroot' => $this->applications['horde']['fileroot'] . '/vilma',
- 'webroot' => $this->applications['horde']['webroot'] . '/vilma',
- 'name' => _("Mail Admin"),
- 'status' => 'active',
- 'menu_parent' => 'administration'
-);
+ 'vilma' => array(
+ 'name' => _("Mail Admin"),
+ 'menu_parent' => 'administration'
+ ),
-$this->applications['content'] = array(
- 'fileroot' => $this->applications['horde']['fileroot'] . '/content',
- 'status' => 'hidden'
-);
+ 'content' => array(
+ 'status' => 'hidden'
+ ),
-$this->applications['timeobjects'] = array(
- 'fileroot' => $this->applications['horde']['fileroot'] . '/timeobjects',
- 'status' => 'hidden'
+ 'timeobjects' => array(
+ 'status' => 'hidden'
+ )
);
-
-function _detect_webroot()
-{
- // Note for Windows users: the below assumes that your PHP_SELF variable
- // uses forward slashes. If it does not, you'll have to tweak this.
- if (isset($_SERVER['SCRIPT_URL']) || isset($_SERVER['SCRIPT_NAME'])) {
- $path = empty($_SERVER['SCRIPT_URL']) ?
- $_SERVER['SCRIPT_NAME'] :
- $_SERVER['SCRIPT_URL'];
- $hordedir = str_replace(DIRECTORY_SEPARATOR, '/', __FILE__);
- $hordedir = basename(preg_replace(';/config/registry.php$;', '', $hordedir));
- if (preg_match(';/' . $hordedir . ';', $path)) {
- $webroot = preg_replace(';/' . $hordedir . '.*;', '/' . $hordedir, $path);
- } else {
- $webroot = '';
- }
- } elseif (isset($_SERVER['PHP_SELF'])) {
- $webroot = preg_split(';/;', $_SERVER['PHP_SELF'], 2, PREG_SPLIT_NO_EMPTY);
- $webroot = strstr(dirname(__FILE__), DIRECTORY_SEPARATOR . array_shift($webroot));
- if ($webroot !== false) {
- $webroot = preg_replace(array('/\\\\/', ';/config$;'), array('/', ''), $webroot);
- } elseif ($webroot === false) {
- $webroot = '';
- } else {
- $webroot = '/horde';
- }
- } else {
- $webroot = '/horde';
- }
-
- return $webroot;
-}