gunnar: server/horde/fbview-horde .cvsignore, NONE, 1.1 ChangeLog, NONE, 1.1 Makefile, NONE, 1.1 conf.php, NONE, 1.1 fbview-horde-conf.template, NONE, 1.1 fbview-horde.spec, NONE, 1.1 hooks.php, NONE, 1.1 registry.php, NONE, 1.1

cvs at kolab.org cvs at kolab.org
Thu Aug 2 10:09:50 CEST 2007


Author: gunnar

Update of /kolabrepository/server/horde/fbview-horde
In directory doto:/tmp/cvs-serv23747/horde/fbview-horde

Added Files:
	.cvsignore ChangeLog Makefile conf.php 
	fbview-horde-conf.template fbview-horde.spec hooks.php 
	registry.php 
Log Message:
Add a first fbview component.

--- NEW FILE: .cvsignore ---
*.src.rpm

--- NEW FILE: ChangeLog ---
2007-08-02  Gunnar Wrobel  <p at rdus.de>

	* fbview-horde.spec: Added package to Kolab CVS.


--- NEW FILE: Makefile ---
ifeq "x$(RPM)" "x"
  RPM = $(HOME)/bin/openpkg rpm
endif
ifeq "x$(KOLABRPMSRC)" "x"
  KOLABRPMSRC = $(HOME)/RPM/SRC
endif
ifeq "x$(KOLABRPMPKG)" "x"
  KOLABRPMPKG = $(HOME)/RPM/PKG
endif
ifeq "x$(KOLABRPMTMP)" "x"
  KOLABRPMTMP = $(HOME)/RPM/TMP
endif

HORDE_NAME = $(shell grep "%define[ ]*V_horde_name" *.spec | sed -e "s/.*V_horde_name \([a-z-]*\).*/\1/")
YEAR = $(shell grep "%define[ ]*V_year" *.spec | sed -e "s/.*V_year\s*\([0-9]*\).*/\1/")
MONTH = $(shell grep "%define[ ]*V_month" *.spec | sed -e "s/.*V_month\s*\([0-9]*\).*/\1/")
DAY = $(shell grep "%define[ ]*V_day" *.spec | sed -e "s/.*V_day\s*\([0-9]*\).*/\1/")

DATE = ${YEAR}-${MONTH}-${DAY}

PACKAGE = fbview-$(HORDE_NAME)
VERSION = ${YEAR}${MONTH}${DAY}
RELEASE = $(shell grep "%define[ ]*V_release" *.spec | sed -e "s/.*V_release\s*\([0-9]*\).*/\1/")

PATCHES = $(shell find . -name "*.patch")
TEMPLATES = $(shell find . -name "*.template")
CONFIGS = $(shell find . -name "*.php")

PACKAGE_0=$(HORDE_NAME)-HEAD-$(DATE).tar.gz
SOURCE_0=http://ftp.horde.org/pub/snaps/${DATE}/$(PACKAGE_0)

.PHONY: all
all: $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm

.PHONY: dist
dist: all
	cp $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm ../../stage/

.PHONY: clean
clean:
	rm -rf /kolab/RPM/TMP/$(PACKAGE)
	rm -rf $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
	rm -rf *~

$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm: Makefile $(PACKAGE).spec $(PATCHES) $(TEMPLATES) $(CONFIGS) ChangeLog
	test -d $(KOLABRPMSRC)/$(PACKAGE) || mkdir $(KOLABRPMSRC)/$(PACKAGE)
	cd $(KOLABRPMSRC)/$(PACKAGE) && wget -c "$(SOURCE_0)"

	cp $(PACKAGE).spec $(KOLABRPMSRC)/$(PACKAGE)

	if [ -n "$(PATCHES)" ]; then              \
	  for PATCH in $(PATCHES);             \
	  do                                        \
	    cp $$PATCH $(KOLABRPMSRC)/$(PACKAGE);\
	  done;                                     \
	fi

	if [ -n "$(TEMPLATES)" ]; then              \
	  for TEMPLATE in $(TEMPLATES);             \
	  do                                        \
	    cp $$TEMPLATE $(KOLABRPMSRC)/$(PACKAGE);\
	  done;                                     \
	fi

	if [ -n "$(CONFIGS)" ]; then                \
	  for CONFIG in $(CONFIGS);                 \
	  do                                        \
	    cp $$CONFIG $(KOLABRPMSRC)/$(PACKAGE);  \
	  done;                                     \
	fi

	cd $(KOLABRPMSRC)/$(PACKAGE) && $(RPM) -ba $(PACKAGE).spec

	cp -p $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm .

--- NEW FILE: conf.php ---
<?php
/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */
// $Horde: horde/config/conf.xml,v 1.183 2007/05/21 15:17:40 slusarz Exp $
$conf['vhosts'] = false;
$conf['debug_level'] = E_ALL;
$conf['max_exec_time'] = 0;
$conf['compress_pages'] = true;
$conf['umask'] = 077;
$conf['use_ssl'] = 2;
$conf['server']['name'] = $_SERVER['SERVER_NAME'];
$conf['server']['port'] = $_SERVER['SERVER_PORT'];
$conf['session']['name'] = 'Horde';
$conf['session']['use_only_cookies'] = false;
$conf['session']['cache_limiter'] = 'nocache';
$conf['session']['timeout'] = 3600;
$conf['cookie']['domain'] = $_SERVER['SERVER_NAME'];
$conf['cookie']['path'] = '/horde';
$conf['sql']['phptype'] = false;
$conf['auth']['admins'] = array('manager');
$conf['auth']['checkip'] = true;
$conf['auth']['checkbrowser'] = true;
$conf['auth']['alternate_login'] = false;
$conf['auth']['redirect_on_logout'] = false;
$conf['auth']['params']['login_block'] = true;
$conf['auth']['params']['login_block_count'] = 3;
$conf['auth']['params']['login_block_time'] = 5;
$conf['auth']['driver'] = 'kolab';
$conf['signup']['allow'] = false;
$conf['log']['priority'] = PEAR_LOG_NOTICE;
$conf['log']['ident'] = 'HORDE';
$conf['log']['params'] = array();
$conf['log']['name'] = '/tmp/horde.log';
$conf['log']['params']['append'] = true;
$conf['log']['type'] = 'file';
$conf['log']['enabled'] = true;
$conf['log_accesskeys'] = false;
$conf['prefs']['driver'] = 'kolab';
$conf['alarms']['driver'] = false;
$conf['datatree']['driver'] = 'null';
$conf['group']['driver'] = 'datatree';
$conf['group']['cache'] = false;
$conf['share']['cache'] = false;
$conf['share']['driver'] = 'kolab';
$conf['cache']['default_lifetime'] = 1800;
$conf['cache']['params']['dir'] = Horde::getTempDir();
$conf['cache']['params']['sub'] = 0;
$conf['cache']['params']['gc'] = 86400;
$conf['cache']['driver'] = 'file';
$conf['token']['driver'] = 'none';
$conf['mailer']['params']['auth'] = '0';
$conf['mailer']['type'] = 'smtp';
$conf['vfs']['params']['vfsroot'] = '/tmp';
$conf['vfs']['type'] = 'file';
$conf['sessionhandler']['type'] = 'none';
$conf['image']['convert'] = '/usr/bin/convert';
$conf['mime']['magic_db'] = '/etc/mime.types';
$conf['problems']['email'] = 'webmaster at example.com';
$conf['problems']['maildomain'] = 'example.com';
$conf['problems']['tickets'] = false;
$conf['menu']['apps'] = array();
$conf['menu']['always'] = false;
$conf['menu']['links']['help'] = 'all';
$conf['menu']['links']['help_about'] = true;
$conf['menu']['links']['options'] = 'authenticated';
$conf['menu']['links']['problem'] = 'all';
$conf['menu']['links']['login'] = 'all';
$conf['menu']['links']['logout'] = 'authenticated';
$conf['hooks']['permsdenied'] = false;
$conf['hooks']['username'] = false;
$conf['hooks']['preauthenticate'] = false;
$conf['hooks']['postauthenticate'] = false;
$conf['hooks']['authldap'] = false;
$conf['hooks']['groupldap'] = false;
$conf['portal']['fixed_blocks'] = array();
$conf['accounts']['driver'] = 'null';
$conf['user']['verify_from_addr'] = false;
$conf['imsp']['enabled'] = false;
$conf['kolab']['ldap']['server'] = 'localhost';
$conf['kolab']['ldap']['port'] = 389;
$conf['kolab']['ldap']['basedn'] = 'dc=example,dc=com';
$conf['kolab']['ldap']['phpdn'] = 'cn=nobody,cn=internal,dc=example,dc=com';
$conf['kolab']['ldap']['phppw'] = '';
$conf['kolab']['imap']['server'] = 'localhost';
$conf['kolab']['imap']['port'] = 143;
$conf['kolab']['imap']['sieveport'] = 2000;
$conf['kolab']['imap']['virtdomains'] = true;
$conf['kolab']['imap']['maildomain'] = 'example.com';
$conf['kolab']['smtp']['server'] = 'localhost';
$conf['kolab']['smtp']['port'] = 25;
$conf['kolab']['misc']['multidomain'] = false;
$conf['kolab']['enabled'] = true;
/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */
if (file_exists(dirname(__FILE__) . '/kolab.php')) {
  require_once(dirname(__FILE__) . '/kolab.php');
}

--- NEW FILE: fbview-horde-conf.template ---
KOLAB_META_START
TARGET=/kolab/var/kolab/www/horde/config/kolab.php
PERMISSIONS=0600
OWNERSHIP=kolab-n:kolab-n
KOLAB_META_END
<?php
$conf['cookie']['domain'] = @@@fqdnhostname@@@;
$conf['problems']['email'] = 'postmaster@@@@postfix-mydomain@@@';
$conf['problems']['maildomain'] = '@@@postfix-mydomain@@@';
$conf['kolab']['ldap']['basedn'] = '@@@base_dn@@@';
$conf['kolab']['ldap']['binddn'] = 'cn=manager,cn=internal,@@@base_dn@@@';
$conf['kolab']['ldap']['bindpw'] = '@@@bind_pw@@@';
$conf['kolab']['ldap']['phpdn'] = '@@@php_dn@@@';
$conf['kolab']['ldap']['phppw'] = '@@@php_pw@@@';
$conf['kolab']['imap']['server'] = '@@@fqdnhostname@@@';
$conf['kolab']['imap']['maildomain'] = '@@@postfix-mydomain@@@';
$conf['kolab']['imap']['adminpw'] = '@@@bind_pw@@@';
?>

--- NEW FILE: fbview-horde.spec ---
# Versions
%define         V_horde_name horde
%define         V_package fbview-%{V_horde_name}
%define         V_year  2007
%define         V_month 08
%define         V_day   01
%define		V_version %{V_year}%{V_month}%{V_day}
%define		V_date %{V_year}-%{V_month}-%{V_day}
%define         V_release 1

# Package Information
Name:		%{V_package}
Summary:	The Horde Application Framework
URL:		http://www.horde.org/
Packager:	Gunnar Wrobel <wrobel at pardus.de> (p at rdus)
Version:	%{V_version}
Release:	%{V_release}
Class:		JUNK
License:	GPL
Group:		MAIL
Distribution:	OpenPKG

# List of Sources
Source0:	http://ftp.horde.org/pub/snaps/%{V_date}/%{V_horde_name}-HEAD-%{V_date}.tar.gz
Source1:        fbview-horde-conf.template
Source2:        hooks.php
Source3:        conf.php
Source4:        registry.php

# Build Info
Prefix:		%{l_prefix}
BuildRoot:	%{l_buildroot}

#Pre requisites
BuildPreReq:  OpenPKG, openpkg >= 20070603
BuildPreReq:  php, php::with_pear = yes
PreReq:       php, php::with_pear = yes
PreReq:	      PEAR-Mail_Mime >= 1.3.1
PreReq:	      PEAR-Mail >= 1.1.14
PreReq:	      horde-framework-kolab >= %{V_version}

AutoReq:      no
AutoReqProv:  no
#BuildArch:    noarch

%description 
The Horde Framework is the glue that all Horde applications have in
common. It is many things, including some coding standards, common
code, and inter-application communication. The shared code provides
common ways of handling things like preferences, permissions, browser
detection, user help, and more.

%prep
	%setup -c -q

%build

%install
	rm -rf $RPM_BUILD_ROOT

	%{l_shtool} install -d $RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/fbview
	%{l_shtool} install -d $RPM_BUILD_ROOT%{l_prefix}/etc/kolab/templates	

	cd horde/config && for fl in *.dist;do cp $fl ${fl/.dist/};done; cd ../..
	cp -r horde $RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/fbview

	%{l_shtool} install -c -m 644 %{l_value -s -a} %{S:1} \
	  $RPM_BUILD_ROOT%{l_prefix}/etc/kolab/templates	

	%{l_shtool} install -c -m 644 %{l_value -s -a} %{S:2} %{S:3} %{S:4}   \
	  $RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/fbview/config/

	%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
	    '%config(noreplace) %{l_prefix}/etc/kolab/templates/fbview-kolab-conf.template'\
	    '%defattr(-,%{l_nusr},%{l_ngrp}) %{l_prefix}/var/kolab/www/fbview/config/conf.php'    \
	    '%config(noreplace) %{l_prefix}/var/kolab/www/fbview/config/conf.php'    \
	    '%config(noreplace) %{l_prefix}/var/kolab/www/fbview/config/hooks.php'   \
	    '%config(noreplace) %{l_prefix}/var/kolab/www/fbview/config/registry.php'

%clean
	rm -rf $RPM_BUILD_ROOT

%files -f files

--- NEW FILE: hooks.php ---
<?php
/**
 * Horde Hooks configuration file.
 *
 * THE HOOKS PROVIDED IN THIS FILE ARE EXAMPLES ONLY.  DO NOT ENABLE THEM
 * BLINDLY IF YOU DO NOT KNOW WHAT YOU ARE DOING.  YOU HAVE TO CUSTOMIZE THEM
 * TO MATCH YOUR SPECIFIC NEEDS AND SYSTEM ENVIRONMENT.
 *
 * This file is where you define any hooks, for preferences or general Horde
 * use, that your installation uses. The functions in this file can vastly
 * change how your installation behaves, so make sure to test out any changes
 * here before doing them in a production environment.
 *
 * Hook function names are automatically determined. The format of the name
 * is:
 *
 * _<type of hook>_hook_<name of hook>.
 *
 * Types of hooks that are defined in this file are 'prefs' (hooks to set the
 * value of preferences), 'horde' (hooks for the Horde Framework scripts) and
 * 'app' (where app is any Horde application name, like 'imp') hooks that are
 * application specific.
 *
 * So, a hook to set the preference 'theme' would be named
 * "_prefs_hook_theme".
 *
 * NOTE 1: Having a hook function in this file does NOT mean that the hook
 * will automatically be used. YOU MUST enable the hook. For preferences, set
 * 'hook' => true in that preferences attributes; for other hooks, there will
 * be a configuration option in each application's conf.php file such as
 * $conf['hooks']['hookname'] which must be set to true.
 *
 * NOTE 2: Preferences hooks are ONLY executed on login. Preferences are
 * cached during a users session and, to avoid unnecessary overhead every time
 * a preference is accessed, the results of hooks are cached as well. This
 * leads to ...
 *
 * NOTE 3: Any preference that is NOT LOCKED, that is set by a hook, WILL BE
 * SAVED WITH THAT VALUE. This means several things:
 * 1) Users will get the results of the hook set for them in their
 *    preferences.
 * 2) By virtue of this, the next time they log in and load their
 *    preferences, the hook will NOT be called, because in their last session,
 *    we saved the results of the hook for them. However, if the preference is
 *    locked, the result of the hook will never be saved.
 *
 * $Horde: horde/config/hooks.php.dist,v 1.109 2007/01/03 06:26:08 slusarz Exp $
 */

// Default Kolab hooks:
if (!empty($GLOBALS['conf']['kolab']['enabled'])) {
    require_once 'Horde/Kolab.php';
    if (!function_exists('_username_hook_frombackend')) {
        function _username_hook_frombackend($userID)
        {
            // Connect to the LDAP server.
            $ds = ldap_connect(
                $GLOBALS['conf']['kolab']['ldap']['server'],
                $GLOBALS['conf']['kolab']['ldap']['port']
            );
            if (!$ds) {
                return $userID;
            }
            ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
            // Bind anonymously.
            $result = @ldap_bind($ds);
            if (!$result) {
                return $userID;
            }
            // Find the user's DN.
            $result = ldap_search(
                $ds,
                $GLOBALS['conf']['kolab']['ldap']['basedn'],
                'uid=' . $userID
            );
            $entry = ldap_first_entry($ds, $result);
            if ($entry === false) {
                // The user already authenticated with his email address.
                return $userID;
            }
            $email = ldap_get_values($ds, $entry, 'mail');
            return $email[0];
        }
        function _imp_hook_mbox_redirect($mailbox)
        {
            switch (Kolab::getMailboxType($mailbox)) {
            case 'event':
                return $GLOBALS['registry']->get('webroot', 'kronolith');

            case 'task':
                return $GLOBALS['registry']->get('webroot', 'nag');

            case 'note':
                return $GLOBALS['registry']->get('webroot', 'mnemo');

            case 'contact':
                return $GLOBALS['registry']->get('webroot', 'turba');

            default:
                return '';
            }
        }
        function _imp_hook_mbox_icons()
        {
            static $icons;

            if (!empty($icons)) {
                return $icons;
            }

            $folders = Kolab::listFolders();

            $icons = array();

            foreach ($folders as $folder) {
                $name = preg_replace('/^{[^}]+}/', '', $folder[0]);

                switch ($folder[1]) {
                case 'event':
		    $icons[$name] = array(
                        'icon' => 'kronolith.png',
                        'icondir' => $GLOBALS['registry']->getImageDir('kronolith'),
                        'alt' => _("Calendar")
                    );
                    break;

                case 'task':
		    $icons[$name] = array(
                        'icon' => 'nag.png',
                        'icondir' => $GLOBALS['registry']->getImageDir('nag'),
                        'alt' => _("Tasks")
                    );
                    break;

                case 'note':
                    $icons[$name] = array(
                        'icon' => 'mnemo.png',
                        'icondir' => $GLOBALS['registry']->getImageDir('mnemo'),
                        'alt' => _("Notes")
                    );
                    break;

                case 'contact':
                    $icons[$name] = array(
                        'icon' => 'turba.png',
                        'icondir' => $GLOBALS['registry']->getImageDir('turba'),
                        'alt' => _("Contacts")
                    );
                    break;
                }
            }
            return $icons;
        }
    }

    if (!function_exists('_horde_hook_preauthenticate')) {
        function _horde_hook_preauthenticate($userID, $credential, $realm)
        {
            /**
             * In multidomain mode we authenticate against the home server
             * of the user, so first we have to query the global ldap server
             * for the users 'kolabHomeserver' entry and then we modify the
             * PHP session variables to use the home server.
             */

            $ds = ldap_connect(
               $GLOBALS['conf']['kolab']['ldap']['server'],
               $GLOBALS['conf']['kolab']['ldap']['port']
            );
            if (!$ds) {
                return false;
            }

            // Bind anonymously.
            $result = @ldap_bind($ds,
               $GLOBALS['conf']['kolab']['ldap']['binddn'],
               $GLOBALS['conf']['kolab']['ldap']['bindpw']
            );
            if (!$result) {
                return false;
            }

            // Find the user's DN.
            $result = ldap_search(
               $ds,
               $GLOBALS['conf']['kolab']['ldap']['basedn'],
               "uid=$userID"
            );

            $entry = ldap_first_entry($ds, $result);
            if ($entry === false) {
                return false;
            }

            $result = ldap_get_values($ds, $entry, 'kolabHomeserver');
            if (!$result) {
                // 'manager' has no 'kolabHomserver' set, so don't treat it as error
                $homeserver = $GLOBALS['conf']['kolab']['imap']['server'];
            } else {
                // We found a valid homeserver
                $homeserver = $result[0];
            }

            $_SESSION['kolabHomeserver'] = $homeserver;
            return true;
       }
   }
}


--- NEW FILE: registry.php ---
<?php
/**
 * registry.php -- Horde application registry.
 *
 * $Horde: horde/config/registry.php.dist,v 1.294 2006/11/24 10:39:09 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' => dirname(__FILE__) . '/..',
    'webroot' => _detect_webroot(),
    'initial_page' => 'login.php',
    'name' => _("Horde"),
    'status' => 'active',
    'templates' => dirname(__FILE__) . '/../templates',
    'provides' => 'horde',
);

$this->applications['mimp'] = array(
    'fileroot' => dirname(__FILE__) . '/../mimp',
    'webroot' => $this->applications['horde']['webroot'] . '/mimp',
    'name' => _("Mobile Mail"),
    'status' => 'notoolbar',
);

$this->applications['dimp'] = array(
    'fileroot' => dirname(__FILE__) . '/../dimp',
    'webroot' => $this->applications['horde']['webroot'] . '/dimp',
    'name' => _("Dynamic Mail"),
    'status' => 'notoolbar',
);

$this->applications['imp'] = array(
    'fileroot' => dirname(__FILE__) . '/../imp',
    'webroot' => $this->applications['horde']['webroot'] . '/imp',
    'name' => _("Mail"),
    'status' => 'active',
    'provides' => array('mail', 'contacts/favouriteRecipients')
);

$this->applications['ingo'] = array(
    'fileroot' => dirname(__FILE__) . '/../ingo',
    'webroot' => $this->applications['horde']['webroot'] . '/ingo',
    'name' => _("Filters"),
    'status' => 'active',
    'provides' => array('mail/blacklistFrom', 'mail/showBlacklist', 'mail/whitelistFrom', 'mail/showWhitelist', 'mail/applyFilters', 'mail/canApplyFilters', 'mail/showFilters'),
    'menu_parent' => 'imp'
);

$this->applications['sam'] = array(
    'fileroot' => dirname(__FILE__) . '/../sam',
    'webroot' => $this->applications['horde']['webroot'] . '/sam',
    'name' => _("Spam"),
    'status' => 'inactive',
    // 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' => dirname(__FILE__) . '/../forwards',
    'webroot' => $this->applications['horde']['webroot'] . '/forwards',
    'name' => _("Forwards"),
    'status' => 'inactive',
    'provides' => 'forwards',
    'menu_parent' => 'imp',
);

$this->applications['vacation'] = array(
    'fileroot' => dirname(__FILE__) . '/../vacation',
    'webroot' => $this->applications['horde']['webroot'] . '/vacation',
    'name' => _("Vacation"),
    'status' => 'inactive',
    'provides' => 'vacation',
    'menu_parent' => 'imp'
);

$this->applications['imp-folders'] = array(
    'status' => 'block',
    'app' => 'imp',
    'blockname' => 'tree_folders',
    'menu_parent' => 'imp',
);

$this->applications['organizing'] = array(
    'name' => _("Organizing"),
    'status' => 'heading',
);

$this->applications['turba'] = array(
    'fileroot' => dirname(__FILE__) . '/../turba',
    'webroot' => $this->applications['horde']['webroot'] . '/turba',
    'name' => _("Address Book"),
    'status' => 'active',
    'provides' => array('contacts', 'clients'),
    'menu_parent' => 'organizing'
);

$this->applications['turba-menu'] = array(
    'status' => 'block',
    'app' => 'turba',
    'blockname' => 'tree_menu',
    'menu_parent' => 'turba',
);

$this->applications['kronolith'] = array(
    'fileroot' => dirname(__FILE__) . '/../kronolith',
    'webroot' => $this->applications['horde']['webroot'] . '/kronolith',
    'name' => _("Calendar"),
    'status' => 'active',
    'provides' => 'calendar',
    'menu_parent' => 'organizing'
);

$this->applications['kronolith-alarms'] = array(
    'status' => 'block',
    'app' => 'kronolith',
    'blockname' => 'tree_alarms',
    'menu_parent' => 'kronolith',
);

$this->applications['kronolith-menu'] = array(
    'status' => 'block',
    'app' => 'kronolith',
    'blockname' => 'tree_menu',
    'menu_parent' => 'kronolith',
);

$this->applications['nag'] = array(
    'fileroot' => dirname(__FILE__) . '/../nag',
    'webroot' => $this->applications['horde']['webroot'] . '/nag',
    'name' => _("Tasks"),
    'status' => 'active',
    'provides' => 'tasks',
    'menu_parent' => 'organizing'
);

$this->applications['nag-alarms'] = array(
    'status' => 'block',
    'app' => 'nag',
    'blockname' => 'tree_alarms',
    'menu_parent' => 'nag',
);

$this->applications['nag-menu'] = array(
    'status' => 'block',
    'app' => 'nag',
    'blockname' => 'tree_menu',
    'menu_parent' => 'nag',
);

$this->applications['mnemo'] = array(
    'fileroot' => dirname(__FILE__) . '/../mnemo',
    'webroot' => $this->applications['horde']['webroot'] . '/mnemo',
    'name' => _("Notes"),
    'status' => 'active',
    'provides' => 'notes',
    'menu_parent' => 'organizing'
);

$this->applications['mnemo-menu'] = array(
    'status' => 'block',
    'app' => 'mnemo',
    'blockname' => 'tree_menu',
    'menu_parent' => 'mnemo',
);

$this->applications['genie'] = array(
    'fileroot' => dirname(__FILE__) . '/../genie',
    'webroot' => $this->applications['horde']['webroot'] . '/genie',
    'name' => _("Wishlist"),
    'status' => 'inactive',
    'provides' => 'wishlist',
    'menu_parent' => 'organizing'
);

$this->applications['trean'] = array(
    'fileroot' => dirname(__FILE__) . '/../trean',
    'webroot' => $this->applications['horde']['webroot'] . '/trean',
    'name' => _("Bookmarks"),
    'status' => 'inactive',
    'provides' => 'bookmarks',
    'menu_parent' => 'organizing'
);

$this->applications['trean-menu'] = array(
    'status' => 'block',
    'app' => 'trean',
    'blockname' => 'tree_menu',
    'menu_parent' => 'trean',
);

$this->applications['devel'] = array(
    'name' => _("Development"),
    'status' => 'heading',
);

$this->applications['chora'] = array(
    'fileroot' => dirname(__FILE__) . '/../chora',
    'webroot' => $this->applications['horde']['webroot'] . '/chora',
    'name' => _("Version Control"),
    'status' => 'active',
    'menu_parent' => 'devel'
);

$this->applications['chora-menu'] = array(
    'status' => 'block',
    'app' => 'chora',
    'blockname' => 'tree_menu',
    'menu_parent' => 'chora',
);

$this->applications['whups'] = array(
    'fileroot' => dirname(__FILE__) . '/../whups',
    'webroot' => $this->applications['horde']['webroot'] . '/whups',
    'name' => _("Tickets"),
    'status' => 'inactive',
    'provides' => 'tickets',
    'menu_parent' => 'devel'
);

$this->applications['luxor'] = array(
    'fileroot' => dirname(__FILE__) . '/../luxor',
    'webroot' => $this->applications['horde']['webroot'] . '/luxor',
    'name' => _("X-Ref"),
    'status' => 'inactive',
    'menu_parent' => 'devel'
);

$this->applications['info'] = array(
    'name' => _("Information"),
    'status' => 'heading',
);

$this->applications['klutz'] = array(
    'fileroot' => dirname(__FILE__) . '/../klutz',
    'webroot' => $this->applications['horde']['webroot'] . '/klutz',
    'name' => _("Comics"),
    'status' => 'inactive',
    'provides' => 'comics',
    'menu_parent' => 'info'
);

$this->applications['occam'] = array(
    'fileroot' => dirname(__FILE__) . '/../occam',
    'webroot' => $this->applications['horde']['webroot'] . '/occam',
    'name' => _("Courses"),
    'status' => 'inactive',
    'menu_parent' => 'info'
);

$this->applications['mottle'] = array(
    'fileroot' => dirname(__FILE__) . '/../mottle',
    'webroot' => $this->applications['horde']['webroot'] . '/mottle',
    'name' => _("MOTD"),
    'status' => 'inactive',
    'menu_parent' => 'info'
);

$this->applications['jonah'] = array(
    'fileroot' => dirname(__FILE__) . '/../jonah',
    'webroot' => $this->applications['horde']['webroot'] . '/jonah',
    'name' => _("News"),
    'status' => 'inactive',
    'provides' => 'news',
    'menu_parent' => 'info'
);

$this->applications['jonah-menu'] = array(
    'status' => 'block',
    'app' => 'jonah',
    'blockname' => 'tree_menu',
    'menu_parent' => 'jonah',
);

$this->applications['goops'] = array(
    'fileroot' => dirname(__FILE__) . '/../goops',
    'webroot' => $this->applications['horde']['webroot'] . '/goops',
    'name' => _("Search Engines"),
    'status' => 'inactive',
    'menu_parent' => 'info'
);

$this->applications['office'] = array(
    'name' => _("Office"),
    'status' => 'heading',
);

$this->applications['juno'] = array(
    'fileroot' => dirname(__FILE__) . '/../juno',
    'webroot' => $this->applications['horde']['webroot'] . '/juno',
    'name' => _("Accounting"),
    'status' => 'inactive',
    'menu_parent' => 'office'
);

$this->applications['midas'] = array(
    'fileroot' => dirname(__FILE__) . '/../midas',
    'webroot' => $this->applications['horde']['webroot'] . '/midas',
    'name' => _("Ads"),
    'status' => 'inactive',
    'menu_parent' => 'office'
);

$this->applications['hylax'] = array(
    'fileroot' => dirname(__FILE__) . '/../hylax',
    'webroot' => $this->applications['horde']['webroot'] . '/hylax',
    'name' => _("Faxes"),
    'status' => 'inactive',
    'menu_parent' => 'office',
);

$this->applications['sesha'] = array(
    'fileroot' => dirname(__FILE__) . '/../sesha',
    'webroot' => $this->applications['horde']['webroot'] . '/sesha',
    'name' => _("Inventory"),
    'status' => 'inactive',

    // Uncomment this line if you want Sesha to provide queue and version
    // names instead of Whups:
    // 'provides' => array('tickets/listQueues', 'tickets/getQueueDetails', 'tickets/listVersions', 'tickets/getVersionDetails'),
    'menu_parent' => 'office',
);

$this->applications['thor'] = array(
    'fileroot' => dirname(__FILE__) . '/../thor',
    'webroot' => $this->applications['horde']['webroot'] . '/thor',
    'name' => _("Projects"),
    'status' => 'inactive',
    'provides' => 'projects',
    'menu_parent' => 'office'
);

$this->applications['rakim'] = array(
    'fileroot' => dirname(__FILE__) . '/../rakim',
    'webroot' => $this->applications['horde']['webroot'] . '/rakim',
    'name' => _("Support"),
    'status' => 'inactive',
    'menu_parent' => 'office'
);

$this->applications['hermes'] = array(
    'fileroot' => dirname(__FILE__) . '/../hermes',
    'webroot' => $this->applications['horde']['webroot'] . '/hermes',
    'name' => _("Time Tracking"),
    'status' => 'inactive',
    'menu_parent' => 'office',
    'provides' => 'time'
);

$this->applications['hermes-stopwatch'] = array(
    'status' => 'block',
    'app' => 'hermes',
    'blockname' => 'tree_stopwatch',
    'menu_parent' => 'hermes',
);

$this->applications['hermes-menu'] = array(
    'status' => 'block',
    'app' => 'hermes',
    'blockname' => 'tree_menu',
    'menu_parent' => 'hermes',
);

$this->applications['myaccount'] = array(
    'name' => _("My Account"),
    'status' => 'heading',
);

$this->applications['gollem'] = array(
    'fileroot' => dirname(__FILE__) . '/../gollem',
    'webroot' => $this->applications['horde']['webroot'] . '/gollem',
    'name' => _("File Manager"),
    'status' => 'active',
    'menu_parent' => 'myaccount',
    'provides' => 'files',
);

$this->applications['gollem-menu'] = array(
    'status' => 'block',
    'app' => 'gollem',
    'blockname' => 'tree_menu',
    'menu_parent' => 'gollem',
);

$this->applications['passwd'] = array(
    'fileroot' => dirname(__FILE__) . '/../passwd',
    'webroot' => $this->applications['horde']['webroot'] . '/passwd',
    'name' => _("Password"),
    'status' => 'active',
    'menu_parent' => 'myaccount'
);

$this->applications['jeta'] = array(
    'fileroot' => dirname(__FILE__) . '/../jeta',
    'webroot' => $this->applications['horde']['webroot'] . '/jeta',
    'name' => _("SSH"),
    'status' => 'inactive',
    'menu_parent' => 'myaccount'
);

$this->applications['website'] = array(
    'name' => _("Web Site"),
    'status' => 'heading',
);

$this->applications['giapeto'] = array(
    'fileroot' => dirname(__FILE__) . '/../giapeto',
    'webroot' => $this->applications['horde']['webroot'] . '/giapeto',
    'name' => _("CMS"),
    'status' => 'inactive',
    'provides' => 'cms',
    'menu_parent' => 'website'
);

$this->applications['agora'] = array(
    'fileroot' => dirname(__FILE__) . '/../agora',
    'webroot' => $this->applications['horde']['webroot'] . '/agora',
    'name' => _("Forums"),
    'status' => 'inactive',
    'provides' => 'forums',
    'menu_parent' => 'website'
);

$this->applications['ulaform'] = array(
    'fileroot' => dirname(__FILE__) . '/../ulaform',
    'webroot' => $this->applications['horde']['webroot'] . '/ulaform',
    'name' => _("Forms"),
    'status' => 'inactive',
    'menu_parent' => 'website'
);

$this->applications['volos'] = array(
    'fileroot' => dirname(__FILE__) . '/../volos',
    'webroot' => $this->applications['horde']['webroot'] . '/volos',
    'name' => _("Guestbook"),
    'status' => 'inactive',
    'menu_parent' => 'website'
);

$this->applications['ansel'] = array(
    'fileroot' => dirname(__FILE__) . '/../ansel',
    'webroot' => $this->applications['horde']['webroot'] . '/ansel',
    'name' => _("Photos"),
    'status' => 'inactive',
    'provides' => 'images',
    'menu_parent' => 'website'
);

$this->applications['scry'] = array(
    'fileroot' => dirname(__FILE__) . '/../scry',
    'webroot' => $this->applications['horde']['webroot'] . '/scry',
    'name' => _("Polls"),
    'status' => 'inactive',
    'provides' => 'polls',
    'menu_parent' => 'website'
);

$this->applications['merk'] = array(
    'fileroot' => dirname(__FILE__) . '/../merk',
    'webroot' => $this->applications['horde']['webroot'] . '/merk',
    'name' => _("Shopping"),
    'status' => 'inactive',
    'provides' => 'shop',
    'menu_parent' => 'website'
);

$this->applications['swoosh'] = array(
    'fileroot' => dirname(__FILE__) . '/../swoosh',
    'webroot' => $this->applications['horde']['webroot'] . '/swoosh',
    'name' => _("SMS Messaging"),
    'status' => 'inactive',
    'provides' => 'sms',
    'menu_parent' => 'website'
);

$this->applications['wicked'] = array(
    'fileroot' => dirname(__FILE__) . '/../wicked',
    'webroot' => $this->applications['horde']['webroot'] . '/wicked',
    'name' => _("Wiki"),
    'status' => 'inactive',
    'provides' => 'wiki',
    'menu_parent' => 'website'
);

$this->applications['vilma'] = array(
    'fileroot' => dirname(__FILE__) . '/../vilma',
    'webroot' => $this->applications['horde']['webroot'] . '/vilma',
    'name' => _("Mail Admin"),
    'status' => 'inactive',
    'menu_parent' => 'administration'
);

$this->applications['nic'] = array(
    'fileroot' => dirname(__FILE__) . '/../nic',
    'webroot' => $this->applications['horde']['webroot'] . '/nic',
    'name' => _("Network Tools"),
    'status' => 'active',
    'menu_parent' => 'administration'
);

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;
}





More information about the commits mailing list