From: Michael M Slusarz Date: Wed, 8 Jul 2009 00:20:26 +0000 (-0600) Subject: Auth:: -> Horde_Auth:: X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=9ce0efd60fe3c67658b828cb41a36f332b7918c1;p=horde.git Auth:: -> Horde_Auth:: --- diff --git a/babel/lib/Babel.php b/babel/lib/Babel.php index 08d7c61f2..cee2459ad 100644 --- a/babel/lib/Babel.php +++ b/babel/lib/Babel.php @@ -164,7 +164,7 @@ class Babel { { global $perms; - $userId = Auth::getAuth(); + $userId = Horde_Auth::getAuth(); $admin = ($userId == 'admin') ? true : false; if ($admin || !$perms->exists('babel:' . $permission)) { @@ -176,7 +176,7 @@ class Babel { switch ($filter) { case 'tabs': if ($perm) { - $allowed = $perms->hasPermission('babel:' . $permission, Auth::getAuth(), $perm); + $allowed = $perms->hasPermission('babel:' . $permission, Horde_Auth::getAuth(), $perm); } break; } diff --git a/babel/view.php b/babel/view.php index f05b15aea..3ed8e6ae5 100644 --- a/babel/view.php +++ b/babel/view.php @@ -341,7 +341,7 @@ if (!$app) { if ($editmode && $cstring == $encstr) { // Lock the current item for 5 minutes - $locks->setLock(Auth::getAuth(), md5($encstr), $lockscope, 300); + $locks->setLock(Horde_Auth::getAuth(), md5($encstr), $lockscope, 300); echo '
'; echo ''; diff --git a/chora/lib/Chora.php b/chora/lib/Chora.php index e20a5b850..b2084dc15 100644 --- a/chora/lib/Chora.php +++ b/chora/lib/Chora.php @@ -318,7 +318,7 @@ class Chora static public function checkPerms($key) { return (!$GLOBALS['perms']->exists('chora:sourceroots:' . $key) || - $GLOBALS['perms']->hasPermission('chora:sourceroots:' . $key, Auth::getAuth(), PERMS_READ | PERMS_SHOW)); + $GLOBALS['perms']->hasPermission('chora:sourceroots:' . $key, Horde_Auth::getAuth(), PERMS_READ | PERMS_SHOW)); } /** diff --git a/drag_n_drop_portal/index.php b/drag_n_drop_portal/index.php index 7bfb3def6..db2068dcd 100644 --- a/drag_n_drop_portal/index.php +++ b/drag_n_drop_portal/index.php @@ -15,7 +15,7 @@ require_once HORDE_BASE . '/lib/base.php'; require_once 'Horde/Loader.php'; require_once './lib/Block/Layout/View/js.php'; -if (!Auth::isAuthenticated()) { +if (!Horde_Auth::isAuthenticated()) { Horde::authenticationFailureRedirect(); } diff --git a/drag_n_drop_portal/save.php b/drag_n_drop_portal/save.php index 46b6cbf4a..8ae30ed8f 100644 --- a/drag_n_drop_portal/save.php +++ b/drag_n_drop_portal/save.php @@ -14,7 +14,7 @@ define('HORDE_BASE', dirname(__FILE__) . '/..'); require_once HORDE_BASE . '/lib/base.php'; require_once 'Horde/Loader.php'; -if (!Auth::isAuthenticated()) { +if (!Horde_Auth::isAuthenticated()) { Horde::authenticationFailureRedirect(); } diff --git a/fima/account.php b/fima/account.php index cdfb05087..c336e5b07 100644 --- a/fima/account.php +++ b/fima/account.php @@ -69,7 +69,7 @@ case 'add_account': case 'modify_account': $account_id = $vars->get('account'); - if (!$share->hasPermission(Auth::getAuth(), PERMS_EDIT)) { + if (!$share->hasPermission(Horde_Auth::getAuth(), PERMS_EDIT)) { $notification->push(_("Access denied editing account."), 'horde.error'); } else { $account = Fima::getAccount($account_id); @@ -79,7 +79,7 @@ case 'modify_account': $vars = new Horde_Variables($account); $vars->set('actionID', 'save_account'); $vars->set('number_new', $vars->get('number')); - $form = new Fima_AccountForm($vars, sprintf(_("Edit: %s"), trim($account['number'] . ' ' . $account['name'])), $share->hasPermission(Auth::getAuth(), PERMS_DELETE)); + $form = new Fima_AccountForm($vars, sprintf(_("Edit: %s"), trim($account['number'] . ' ' . $account['name'])), $share->hasPermission(Horde_Auth::getAuth(), PERMS_DELETE)); break; } } @@ -102,7 +102,7 @@ case 'save_account': } $form->getInfo($vars, $info); - if (!$share->hasPermission(Auth::getAuth(), PERMS_EDIT)) { + if (!$share->hasPermission(Horde_Auth::getAuth(), PERMS_EDIT)) { $notification->push(sprintf(_("Access denied saving account to %s."), $share->get('name')), 'horde.error'); header('Location: ' . Horde::applicationUrl('accounts.php', true)); exit; @@ -171,7 +171,7 @@ case 'save_account': case 'delete_account': $account_id = $vars->get('account'); - if (!$share->hasPermission(Auth::getAuth(), PERMS_DELETE)) { + if (!$share->hasPermission(Horde_Auth::getAuth(), PERMS_DELETE)) { $notification->push(_("Access denied deleting account."), 'horde.error'); } else { $account = Fima::getAccount($account_id); @@ -182,7 +182,7 @@ case 'delete_account': $vars->set('actionID', 'purge_account'); $vars->set('dssubaccounts', array('type' => 'none', 'account' => $account_id)); $vars->set('dspostings', array('type' => 'delete', 'account' => $account_id)); - $form = new Fima_AccountDeleteForm($vars, sprintf(_("Delete: %s"), trim($account['number'] . ' ' . $account['name'])), $share->hasPermission(Auth::getAuth(), PERMS_EDIT)); + $form = new Fima_AccountDeleteForm($vars, sprintf(_("Delete: %s"), trim($account['number'] . ' ' . $account['name'])), $share->hasPermission(Horde_Auth::getAuth(), PERMS_EDIT)); break; } } @@ -205,7 +205,7 @@ case 'purge_account': } $form->getInfo($vars, $info); - if (!$share->hasPermission(Auth::getAuth(), PERMS_DELETE)) { + if (!$share->hasPermission(Horde_Auth::getAuth(), PERMS_DELETE)) { $notification->push(sprintf(_("Access denied deleting account from %s."), $share->get('name')), 'horde.error'); header('Location: ' . Horde::applicationUrl('accounts.php', true)); exit; diff --git a/fima/accounts.php b/fima/accounts.php index 011aa0604..5ecad29e0 100644 --- a/fima/accounts.php +++ b/fima/accounts.php @@ -25,7 +25,7 @@ if (is_a($share, 'PEAR_Error')) { $actionID = Horde_Util::getFormData('actionID'); switch ($actionID) { case 'delete_all': - if (!$share->hasPermission(Auth::getAuth(), PERMS_DELETE)) { + if (!$share->hasPermission(Horde_Auth::getAuth(), PERMS_DELETE)) { $notification->push(_("Access denied deleting all accounts and postings."), 'horde.error'); } else { $storage = &Fima_Driver::singleton($ledger); diff --git a/fima/config/prefs.php.dist b/fima/config/prefs.php.dist index 59fc274bb..2b46ea29c 100644 --- a/fima/config/prefs.php.dist +++ b/fima/config/prefs.php.dist @@ -29,7 +29,7 @@ $_prefs['ledgerselect'] = array('type' => 'special'); // active ledger // Set locked to true if you don't want users to have multiple ledgers. $_prefs['active_ledger'] = array( - 'value' => Auth::getAuth() ? Auth::getAuth() : 0, + 'value' => Horde_Auth::getAuth() ? Horde_Auth::getAuth() : 0, 'locked' => false, 'shared' => true, 'type' => 'implicit' diff --git a/fima/ledgers/create.php b/fima/ledgers/create.php index 2a61d93b9..fabfff275 100644 --- a/fima/ledgers/create.php +++ b/fima/ledgers/create.php @@ -14,7 +14,7 @@ require_once FIMA_BASE . '/lib/Forms/CreateLedger.php'; // Exit if this isn't an authenticated user or if the user can't // create new task lists (default share is locked). -if (!Auth::getAuth() || $prefs->isLocked('active_ledger')) { +if (!Horde_Auth::getAuth() || $prefs->isLocked('active_ledger')) { header('Location: ' . Horde::applicationUrl('postings.php', true)); exit; } diff --git a/fima/ledgers/delete.php b/fima/ledgers/delete.php index e561d6110..85268ee8b 100644 --- a/fima/ledgers/delete.php +++ b/fima/ledgers/delete.php @@ -13,14 +13,14 @@ require_once FIMA_BASE . '/lib/base.php'; require_once FIMA_BASE . '/lib/Forms/DeleteLedger.php'; // Exit if this isn't an authenticated user. -if (!Auth::getAuth()) { +if (!Horde_Auth::getAuth()) { header('Location: ' . Horde::applicationUrl('postings.php', true)); exit; } $vars = Horde_Variables::getDefaultVariables(); $ledger_id = $vars->get('l'); -if ($ledger_id == Auth::getAuth()) { +if ($ledger_id == Horde_Auth::getAuth()) { $notification->push(_("This ledger cannot be deleted."), 'horde.warning'); header('Location: ' . Horde::applicationUrl('ledgers/', true)); exit; @@ -31,7 +31,7 @@ if (is_a($ledger, 'PEAR_Error')) { $notification->push($ledger, 'horde.error'); header('Location: ' . Horde::applicationUrl('ledgers/', true)); exit; -} elseif ($ledger->get('owner') != Auth::getAuth()) { +} elseif ($ledger->get('owner') != Horde_Auth::getAuth()) { $notification->push(_("You are not allowed to delete this ledger."), 'horde.error'); header('Location: ' . Horde::applicationUrl('ledgers/', true)); exit; diff --git a/fima/ledgers/edit.php b/fima/ledgers/edit.php index d7b2ddd83..f2ce3721f 100644 --- a/fima/ledgers/edit.php +++ b/fima/ledgers/edit.php @@ -13,7 +13,7 @@ require_once FIMA_BASE . '/lib/base.php'; require_once FIMA_BASE . '/lib/Forms/EditLedger.php'; // Exit if this isn't an authenticated user. -if (!Auth::getAuth()) { +if (!Horde_Auth::getAuth()) { header('Location: ' . Horde::applicationUrl('postings.php', true)); exit; } @@ -24,7 +24,7 @@ if (is_a($ledger, 'PEAR_Error')) { $notification->push($ledger, 'horde.error'); header('Location: ' . Horde::applicationUrl('ledgers/', true)); exit; -} elseif ($ledger->get('owner') != Auth::getAuth()) { +} elseif ($ledger->get('owner') != Horde_Auth::getAuth()) { $notification->push(_("You are not allowed to change this ledger."), 'horde.error'); header('Location: ' . Horde::applicationUrl('ledgers/', true)); exit; diff --git a/fima/ledgers/index.php b/fima/ledgers/index.php index 14848d785..b8bb9e35c 100644 --- a/fima/ledgers/index.php +++ b/fima/ledgers/index.php @@ -12,7 +12,7 @@ require_once FIMA_BASE . '/lib/base.php'; /* Exit if this isn't an authenticated user. */ -if (!Auth::getAuth()) { +if (!Horde_Auth::getAuth()) { require FIMA_BASE . '/postings.php'; exit; } diff --git a/fima/lib/Block/summary.php b/fima/lib/Block/summary.php index dd9c046e7..eae015a80 100644 --- a/fima/lib/Block/summary.php +++ b/fima/lib/Block/summary.php @@ -37,7 +37,7 @@ class Horde_Block_fima_summary extends Horde_Block { 'show_ledger' => array( 'type' => 'enum', 'name' => _("Show summary of this ledger"), - 'default' => Auth::getAuth(), + 'default' => Horde_Auth::getAuth(), 'values' => $ledgers), 'show_months' => array( 'type' => 'enum', diff --git a/fima/lib/Fima.php b/fima/lib/Fima.php index 4b4645f55..196e37a3c 100644 --- a/fima/lib/Fima.php +++ b/fima/lib/Fima.php @@ -191,7 +191,7 @@ class Fima { */ function listLedgers($owneronly = false, $permission = PERMS_SHOW) { - $ledgers = $GLOBALS['fima_shares']->listShares(Auth::getAuth(), $permission, $owneronly ? Auth::getAuth() : null); + $ledgers = $GLOBALS['fima_shares']->listShares(Horde_Auth::getAuth(), $permission, $owneronly ? Horde_Auth::getAuth() : null); if (is_a($ledgers, 'PEAR_Error')) { Horde::logMessage($ledgers, __FILE__, __LINE__, PEAR_LOG_ERR); return array(); @@ -706,7 +706,7 @@ class Fima { if (count($GLOBALS['display_ledgers']) == 0) { $ledgerss = Fima::listLedgers(true); - if (!Auth::getAuth()) { + if (!Horde_Auth::getAuth()) { /* All ledgers for guests. */ $GLOBALS['display_ledgers'] = array_keys($ledgers); } else { @@ -717,20 +717,20 @@ class Fima { } /* If the user's personal ledger doesn't exist, then create it. */ - if (!$GLOBALS['fima_shares']->exists(Auth::getAuth())) { + if (!$GLOBALS['fima_shares']->exists(Horde_Auth::getAuth())) { require_once 'Horde/Identity.php'; $identity = &Identity::singleton(); $name = $identity->getValue('fullname'); if (trim($name) == '') { - $name = Auth::removeHook(Auth::getAuth()); + $name = Horde_Auth::removeHook(Horde_Auth::getAuth()); } - $share = &$GLOBALS['fima_shares']->newShare(Auth::getAuth()); + $share = &$GLOBALS['fima_shares']->newShare(Horde_Auth::getAuth()); $share->set('name', sprintf(_("%s's Ledger"), $name)); $GLOBALS['fima_shares']->addShare($share); /* Make sure the personal ledger is displayed by default. */ - if (!in_array(Auth::getAuth(), $GLOBALS['display_ledgers'])) { - $GLOBALS['display_ledgers'][] = Auth::getAuth(); + if (!in_array(Horde_Auth::getAuth(), $GLOBALS['display_ledgers'])) { + $GLOBALS['display_ledgers'][] = Horde_Auth::getAuth(); } } } @@ -759,7 +759,7 @@ class Fima { $menu->add(Horde::applicationUrl('search.php'), _("Search"), 'search.png', $registry->getImageDir('horde')); $menu->add(Horde::applicationUrl('accounts.php'), _("_Accounts"), 'accounts.png'); - if (Auth::getAuth()) { + if (Horde_Auth::getAuth()) { $menu->add(Horde::applicationUrl('ledgers/index.php'), _("_My Ledgers"), 'accounts.png'); } diff --git a/fima/lib/Forms/DeleteLedger.php b/fima/lib/Forms/DeleteLedger.php index f80fc6886..477dbd674 100644 --- a/fima/lib/Forms/DeleteLedger.php +++ b/fima/lib/Forms/DeleteLedger.php @@ -48,7 +48,7 @@ class Fima_DeleteLedgerForm extends Horde_Form { return false; } - if ($this->_ledger->get('owner') != Auth::getAuth()) { + if ($this->_ledger->get('owner') != Horde_Auth::getAuth()) { return PEAR::raiseError(_("Permission denied")); } @@ -68,14 +68,14 @@ class Fima_DeleteLedgerForm extends Horde_Form { // Make sure we still own at least one ledger. if (count(Fima::listLedgers(true)) == 0) { // If the default share doesn't exist then create it. - if (!$GLOBALS['fima_shares']->exists(Auth::getAuth())) { + if (!$GLOBALS['fima_shares']->exists(Horde_Auth::getAuth())) { require_once 'Horde/Identity.php'; $identity = &Identity::singleton(); $name = $identity->getValue('fullname'); if (trim($name) == '') { - $name = Auth::removeHook(Auth::getAuth()); + $name = Horde_Auth::removeHook(Horde_Auth::getAuth()); } - $ledger = &$GLOBALS['fima_shares']->newShare(Auth::getAuth()); + $ledger = &$GLOBALS['fima_shares']->newShare(Horde_Auth::getAuth()); if (is_a($ledger, 'PEAR_Error')) { return; } diff --git a/fima/postings.php b/fima/postings.php index 1033ccece..f7510a7a0 100644 --- a/fima/postings.php +++ b/fima/postings.php @@ -169,7 +169,7 @@ case 'save_postings': $postingset = Horde_Util::getFormData('posting_id'); $share = &$GLOBALS['fima_shares']->getShare($ledger); - if (!$share->hasPermission(Auth::getAuth(), PERMS_EDIT)) { + if (!$share->hasPermission(Horde_Auth::getAuth(), PERMS_EDIT)) { $notification->push(sprintf(_("Access denied saving postings to %s."), $share->get('name')), 'horde.error'); header('Location: ' . Horde::applicationUrl('postings.php', true)); exit; @@ -284,7 +284,7 @@ case 'delete_postings': $postingset = Horde_Util::getFormData('indices'); $share = &$GLOBALS['fima_shares']->getShare($ledger); - if (!$share->hasPermission(Auth::getAuth(), PERMS_DELETE)) { + if (!$share->hasPermission(Horde_Auth::getAuth(), PERMS_DELETE)) { $notification->push(sprintf(_("Access denied deleting postings from %s."), $share->get('name')), 'horde.error'); header('Location: ' . Horde::applicationUrl('postings.php', true)); exit; @@ -315,7 +315,7 @@ case 'update_postings': $postingset = Horde_Util::getFormData('posting_id'); $share = &$GLOBALS['fima_shares']->getShare($ledger); - if (!$share->hasPermission(Auth::getAuth(), PERMS_EDIT)) { + if (!$share->hasPermission(Horde_Auth::getAuth(), PERMS_EDIT)) { $notification->push(sprintf(_("Access denied shifting postings in %s."), $share->get('name')), 'horde.error'); header('Location: ' . Horde::applicationUrl('postings.php', true)); exit; @@ -350,11 +350,11 @@ case 'update_postings': case 'copymove_postings': $share = &$GLOBALS['fima_shares']->getShare($ledger); - if (!$share->hasPermission(Auth::getAuth(), PERMS_EDIT)) { + if (!$share->hasPermission(Horde_Auth::getAuth(), PERMS_EDIT)) { $notification->push(sprintf(_("Access denied transfering postings in %s."), $share->get('name')), 'horde.error'); header('Location: ' . Horde::applicationUrl('postings.php', true)); exit; - } elseif (!$share->hasPermission(Auth::getAuth(), PERMS_DELETE) && (!Horde_Util::getFormData('keep') || Horde_Util::getFormData('delete'))) { + } elseif (!$share->hasPermission(Horde_Auth::getAuth(), PERMS_DELETE) && (!Horde_Util::getFormData('keep') || Horde_Util::getFormData('delete'))) { $notification->push(sprintf(_("Access denied transfering postings in %s."), $share->get('name')), 'horde.error'); header('Location: ' . Horde::applicationUrl('postings.php', true)); exit; diff --git a/fima/templates/accounts/accounts.inc b/fima/templates/accounts/accounts.inc index bc60f3728..fe0346c5c 100644 --- a/fima/templates/accounts/accounts.inc +++ b/fima/templates/accounts/accounts.inc @@ -1,7 +1,7 @@ hasPermission(Auth::getAuth(), PERMS_EDIT); -$perm_delete = $share->hasPermission(Auth::getAuth(), PERMS_DELETE); +$perm_edit = $share->hasPermission(Horde_Auth::getAuth(), PERMS_EDIT); +$perm_delete = $share->hasPermission(Horde_Auth::getAuth(), PERMS_DELETE); ?>