From: Ben Klang Date: Sun, 20 Dec 2009 18:31:15 +0000 (+0000) Subject: Convert to Horde 4 X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=bc1009df56f5fc38001c14fa22cfa7d5489a7226;p=horde.git Convert to Horde 4 git-svn-id: https://svn.alkaloid.net/gpl/shout/trunk@488 06cd67b6-e706-0410-b29e-9de616bca6e9 --- diff --git a/config/conf.xml b/config/conf.xml index 9162f711e..4ba17f0ce 100644 --- a/config/conf.xml +++ b/config/conf.xml @@ -1,39 +1,13 @@ - + - Shout Storage + Device Storage ldap - - localhost - - - - 3 - - 2 - 3 - - - - objectclass - - - - - - - - + diff --git a/dialplan.php b/dialplan.php index 196fbc333..883d2c1cd 100644 --- a/dialplan.php +++ b/dialplan.php @@ -21,7 +21,7 @@ $dialplan = &$shout->getDialplan($context); // Set up the tree. $dpgui = Shout_Dialplan::singleton('x', $dialplan); -//$action = Util::getFormData("action"); +//$action = Horde_Util::getFormData("action"); // $action = 'manager'; $title = _("Dialplan Manager"); diff --git a/lib/Shout.php b/lib/Shout.php index 199a03577..fcafdefb3 100644 --- a/lib/Shout.php +++ b/lib/Shout.php @@ -33,14 +33,14 @@ class Shout require_once 'Horde/Menu.php'; - $menu = &new Menu(HORDE_MENU_MASK_ALL); + $menu = new Horde_Menu(HORDE_MENU_MASK_ALL); $permprefix = "shout:contexts:$context"; if (isset($context) && $section == "usermgr" && Shout::checkRights("$permprefix:users", PERMS_EDIT, 1)) { $url = Horde::applicationUrl("index.php"); - $url = Util::addParameter($url, array('context' => $context, + $url = Horde_Util::addParameter($url, array('context' => $context, 'section' => $section, 'action' => 'add')); @@ -61,7 +61,7 @@ class Shout Shout::checkRights("$permprefix:dialplan", PERMS_EDIT, 1)) { $url = Horde::applicationUrl("dialplan.php"); - $url = Util::addParameter($url, array('context' => $context, + $url = Horde_Util::addParameter($url, array('context' => $context, 'section' => $section, 'action' => 'add')); @@ -95,16 +95,17 @@ class Shout function getTabs($context, &$vars) { global $shout; + $perms = Horde_Perms::singleton(); $permprefix = 'shout:contexts:' . $context; - $tabs = &new Horde_UI_Tabs('section', $vars); + $tabs = new Horde_UI_Tabs('section', $vars); if (Shout::checkRights($permprefix . ':users', null, 1) && $shout->checkContextType($context, 'users')) { $url = Horde::applicationUrl('usermgr.php'); - $url = Util::addParameter($url, 'context', $context); + $url = Horde_Util::addParameter($url, 'context', $context); $tabs->addTab(_("_User Manager"), $url, 'usermgr'); } @@ -112,7 +113,7 @@ class Shout $shout->checkContextType($context, 'dialplan')) { $url = Horde::applicationUrl('dialplan.php'); - $url = Util::addParameter($url, 'context', $context); + $url = Horde_Util::addParameter($url, 'context', $context); $tabs->addTab(_("_Dial Plan"), $url, 'dialplan'); } @@ -120,7 +121,7 @@ class Shout $shout->checkContextType($context, 'conference')) { $url = Horde::applicationUrl('conference.php'); - $url = Util::addParameter($url, 'context', $context); + $url = Horde_Util::addParameter($url, 'context', $context); $tabs->addTab(_("_Conference Rooms"), $url, 'conference'); } @@ -128,13 +129,13 @@ class Shout $shout->checkContextType($context, "moh")) { $url = Horde::applicationUrl('moh.php'); - $url = Util::addParameter($url, 'context', $context); + $url = Horde_Util::addParameter($url, 'context', $context); $tabs->addTab(_("_Music on Hold"), $url, 'moh'); } - if (Perms::hasPermission('shout:superadmin', Auth::getAuth(), PERMS_SHOW|PERMS_READ)) { + if ($perms->hasPermission('shout:superadmin', Horde_Auth::getAuth(), PERMS_SHOW|PERMS_READ)) { $url = Horde::applicationUrl('security.php'); - $url = Util::addParameter($url, 'context', $context); + $url = Horde_Util::addParameter($url, 'context', $context); $tabs->addTab(_("_Security"), $url, 'security'); } @@ -157,9 +158,9 @@ class Shout */ function checkRights($permname, $permmask = null, $numparents = 0) { - if (Auth::isAdmin()) { return true; } + if (Horde_Auth::isAdmin()) { return true; } - $perms = Perms::singleton(); + $perms = Horde_Perms::singleton(); if ($permmask === null) { $permmask = PERMS_SHOW|PERMS_READ; } @@ -169,11 +170,11 @@ class Shout $superadmin = 0; $superadmin = $perms->hasPermission('shout:superadmin', - Auth::getAuth(), $permmask); + Horde_Auth::getAuth(), $permmask); while ($numparents >= 0) { $tmpuser = $perms->hasPermission($permname, - Auth::getAuth(), $permmask); + Horde_Auth::getAuth(), $permmask); $user = $user | $tmpuser; if ($numparents > 0) { diff --git a/lib/base.php b/lib/base.php index bdfd9a354..3ff31aa92 100644 --- a/lib/base.php +++ b/lib/base.php @@ -17,8 +17,7 @@ if (!defined('HORDE_BASE')) { // Load the Horde Framework core, and set up inclusion paths. require_once HORDE_BASE . '/lib/core.php'; -// Registry. -$registry = &Registry::singleton(); +$registry = &Horde_Registry::singleton(); if (is_a(($pushed = $registry->pushApp('shout', !defined('AUTH_HANDLER'))), 'PEAR_Error')) { if ($pushed->getCode() == 'permission_denied') { @@ -44,8 +43,7 @@ if (!$shout_configured) { #, 'prefs.php')); } -// Notification system. -$notification = &Notification::singleton(); +$notification = &Horde_Notification::singleton(); $notification->attach('status'); // Shout base libraries. @@ -68,8 +66,8 @@ $shout = Shout_Driver::singleton(); // Horde libraries. require_once 'Horde/Help.php'; -$context = Util::getFormData('context'); -$section = Util::getFormData('section'); +$context = Horde_Util::getFormData('context'); +$section = Horde_Util::getFormData('section'); $contexts = $shout->getContexts(); diff --git a/templates/common-header.inc b/templates/common-header.inc index 35f14f6fd..0d033523f 100644 --- a/templates/common-header.inc +++ b/templates/common-header.inc @@ -1,6 +1,6 @@ @@ -25,8 +25,8 @@ ?> <?php echo $page_title ?> - + -> diff --git a/templates/menu.inc b/templates/menu.inc index 12de29a53..1740cf19e 100644 --- a/templates/menu.inc +++ b/templates/menu.inc @@ -10,7 +10,7 @@ $menu_view = $prefs->getValue('menu_view');
- +