<?php /** * registry.php -- Horde application registry. * * $Horde: horde/config/registry.php.dist,v 1.255.2.27 2009-07-24 08:58:06 jan Exp $ * * This configuration file is used by Horde to determine which Horde * applications are installed and where, as well as how they interact. * * Application registry * -------------------- * The following settings register installed Horde applications. * By default, Horde assumes that the application directories live * inside the horde directory. * * Attribute Type Description * --------- ---- ----------- * fileroot string The base filesystem path for the module's files. * webroot string The base URI for the module. * jsuri string The base URI for static javascript files. * jsfs string The base filesystem path for static javascript files. * themesuri string The base URI for the themes. This can be used to * serve all icons and style sheets from a separate * server. * themesfs string The base file system directory for the themes. * icon string The URI for an icon to show in menus for the module. * Setting this will override the default theme-based * logic in the code. * name string The name used in menus and descriptions for a module * status string 'inactive', 'hidden', 'notoolbar', 'heading', * 'block', 'admin', or 'active'. * provides string Service types the module provides. * initial_page string The initial (default) page (filename) for the module. * templates string The filesystem path to the templates directory. * menu_parent string The name of the 'heading' group that this app should * show up under. * target string The (optional) target frame for the link. * url string The (optional) URL of 'heading' entries. */ // 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' => '/usr/share/horde', 'webroot' => '/horde', 'initial_page' => 'login.php', 'name' => _("Horde"), 'status' => 'active', 'templates' => '/usr/share/horde/templates', 'provides' => 'horde', ); // // hack to make registering of modules easier (stolen from Debian) // if ($d = opendir(dirname(__FILE__) . '/registry.d')) { while ($f = readdir($d)) { if (ereg(".php$", $f)) { include_once dirname(__FILE__) . '/registry.d/' . $f; } } closedir($d); } 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; }