Auth:: -> Horde_Auth::
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 8 Jul 2009 00:20:26 +0000 (18:20 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 8 Jul 2009 16:28:05 +0000 (10:28 -0600)
178 files changed:
babel/lib/Babel.php
babel/view.php
chora/lib/Chora.php
drag_n_drop_portal/index.php
drag_n_drop_portal/save.php
fima/account.php
fima/accounts.php
fima/config/prefs.php.dist
fima/ledgers/create.php
fima/ledgers/delete.php
fima/ledgers/edit.php
fima/ledgers/index.php
fima/lib/Block/summary.php
fima/lib/Fima.php
fima/lib/Forms/DeleteLedger.php
fima/postings.php
fima/templates/accounts/accounts.inc
fima/templates/prefs/ledgerselect.inc
folks/account/approve.php
folks/account/renew.php
folks/account/resetpassword.php
folks/account/signup.php
folks/account/tabs.php
folks/account/username.php
folks/config/hooks.php.dist
folks/edit/activity.php
folks/edit/comments.php
folks/edit/edit.php
folks/edit/friends/add.php
folks/edit/friends/approve.php
folks/edit/friends/invite.php
folks/edit/friends/reject.php
folks/edit/password.php
folks/edit/privacy.php
folks/edit/tabs.php
folks/friends.php
folks/lib/Auth/folks.php
folks/lib/Block/my_comments.php
folks/lib/Driver.php
folks/lib/Driver/sql.php
folks/lib/Folks.php
folks/lib/Friends.php
folks/lib/Friends/prefs.php
folks/lib/Friends/shared.php
folks/lib/Notification.php
folks/lib/api.php
folks/login.php
folks/perms.php
folks/report.php
folks/rss/activity.php
folks/rss/friends.php
folks/rss/know.php
folks/scripts/mail-filter.php
folks/scripts/mail.php
folks/scripts/online.php
folks/search.php
folks/templates/common-header.inc
folks/templates/user/authenticated.php
folks/templates/user/user.php
folks/user.php
framework/Rdo/www/crud.php
framework/Rdo/www/index.php
imp/config/hooks.php.dist
imp/lib/Auth/Imp.php [new file with mode: 0644]
imp/lib/Auth/imp.php [deleted file]
imp/lib/Compose.php
imp/lib/Folder.php
imp/lib/IMP.php
imp/lib/Imap/Tree.php
imp/lib/LoginTasks/Task/DeleteAttachmentsMonthly.php
imp/lib/MIMP.php
imp/lib/Maillog.php
imp/lib/Notification/Listener/Status.php
imp/lib/Sentmail/sql.php
imp/lib/Session.php
imp/lib/Spam.php
imp/lib/base.php
imp/login.php
imp/message.php
imp/redirect.php
imp/rss.php
imp/scripts/custom_login.php
imp/templates/javascript_defs_dimp.php
ingo/lib/Ingo.php
ingo/lib/api.php
ingo/lib/base.php
ingo/scripts/ingo-postfix-policyd
ingo/scripts/upgrades/convert_prefs_to_sql.php
ingo/vacation.php
jeta/lib/Applet/jta.php
jeta/lib/Applet/sshtools.php
kastalia/main.php
koward/lib/Koward.php
koward/lib/Koward/Cli.php
koward/lib/Koward/Controller/Application.php
koward/lib/Koward/Controller/IndexController.php
koward/www/horde/config/prefs.php.dist
kronolith/add.php
kronolith/ajax.php
kronolith/attendees.php
kronolith/calendars/create.php
kronolith/calendars/delete.php
kronolith/calendars/edit.php
kronolith/calendars/index.php
kronolith/calendars/info.php
kronolith/calendars/remote_edit.php
kronolith/calendars/remote_subscribe.php
kronolith/calendars/remote_unsubscribe.php
kronolith/config/prefs.php.dist
kronolith/contacts.php
kronolith/data.php
kronolith/delete.php
kronolith/edit.php
kronolith/event.php
kronolith/feed/index.php
kronolith/index.php
kronolith/lib/Block/month.php
kronolith/lib/Block/monthlist.php
kronolith/lib/Block/prevmonthlist.php
kronolith/lib/Block/summary.php
kronolith/lib/Block/tree_alarms.php
kronolith/lib/Driver/Ical.php
kronolith/lib/Driver/Sql.php
kronolith/lib/Event.php
kronolith/lib/Event/Kolab.php
kronolith/lib/Forms/DeleteCalendar.php
kronolith/lib/Forms/EditRemoteCalendar.php
kronolith/lib/Forms/SubscribeRemoteCalendar.php
kronolith/lib/Imple/TagActions.php
kronolith/lib/Kronolith.php
kronolith/lib/LoginTasks/Task/PurgeEvents.php
kronolith/lib/Notification/Listener/Status.php
kronolith/lib/Storage.php
kronolith/lib/Storage/kolab.php
kronolith/lib/Storage/sql.php
kronolith/lib/Tagger.php
kronolith/lib/Views/EditEvent.php
kronolith/lib/Views/Event.php
kronolith/lib/api.php
kronolith/lib/prefs.php
kronolith/perms.php
kronolith/scripts/import_icals.php
kronolith/scripts/import_squirrelmail_calendar.php
kronolith/search.php
kronolith/templates/edit/edit.inc
kronolith/templates/panel.inc
kronolith/templates/perms/perms.inc
kronolith/templates/prefs/fb_cals_select.inc
kronolith/templates/prefs/shareselect.inc
news/add.php
news/admin/tabs.php
news/delete.php
news/delete_file.php
news/edit.php
news/files.php
news/lib/Block/my_comments.php
news/lib/Categories.php
news/lib/Driver.php
news/lib/Driver/sql.php
news/lib/Forms/Search.php
news/lib/News.php
news/lib/Search.php
news/mail.php
news/reads.php
news/templates/edit/row.php
skoli/add.php
skoli/classes/create.php
skoli/classes/delete.php
skoli/classes/edit.php
skoli/classes/index.php
skoli/entry.php
skoli/lib/Driver/sql.php
skoli/lib/Forms/DeleteClass.php
skoli/lib/Forms/Entry.php
skoli/lib/Skoli.php
skoli/list.php
skoli/templates/list/headers.inc
skoli/templates/panel.inc

index 08d7c61..cee2459 100644 (file)
@@ -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;
        }
index f05b15a..3ed8e6a 100644 (file)
@@ -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 '<form action="' . Horde::applicationUrl('view.php') . "#" . md5($encstr) . '" method="post" name="edit" id="edit">';
            echo '<input type="hidden" name="module" value="' . $app . '">';
index e20a5b8..b2084dc 100644 (file)
@@ -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));
     }
 
     /**
index 7bfb3de..db2068d 100644 (file)
@@ -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();
 }
 
index 46b6cbf..8ae30ed 100644 (file)
@@ -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();
 }
 
index cdfb050..c336e5b 100644 (file)
@@ -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;
index 011aa06..5ecad29 100644 (file)
@@ -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);
index 59fc274..2b46ea2 100644 (file)
@@ -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'
index 2a61d93..fabfff2 100644 (file)
@@ -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;
 }
index e561d61..85268ee 100644 (file)
@@ -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;
index d7b2ddd..f2ce372 100644 (file)
@@ -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;
index 14848d7..b8bb9e3 100644 (file)
@@ -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;
 }
index dd9c046..eae015a 100644 (file)
@@ -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',
index 4b4645f..196e37a 100644 (file)
@@ -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');
         }
         
index f80fc68..477dbd6 100644 (file)
@@ -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;
                 }
index 1033cce..f7510a7 100644 (file)
@@ -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;
index bc60f37..fe0346c 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
-$perm_edit = $share->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);
 
 ?>
 <script type="text/javascript">
index 392890b..48bffc3 100644 (file)
@@ -3,7 +3,7 @@ if (!$prefs->isLocked('activet_ledger')):
     $ledgers = Fima::listLedgers();
     if (($active_ledger = $prefs->getValue('active_ledger')) == null ||
         !isset($ledgers[$active_ledger])) {
-        $active_ledger = Auth::getAuth();
+        $active_ledger = Horde_Auth::getAuth();
     }
 ?>
 
index 3199f7c..423af95 100644 (file)
@@ -18,7 +18,7 @@ $title = _("Confirm email");
 $code = Horde_Util::getGet('code');
 if (empty($code)) {
     $notification->push(_("You must supply a confirmation code."));
-    header('Location: ' . Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
+    header('Location: ' . Horde_Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
     exit;
 }
 
@@ -26,7 +26,7 @@ if (empty($code)) {
 $user = Horde_Util::getGet('user');
 if (empty($code)) {
     $notification->push(_("You must supply a username."));
-    header('Location: ' . Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
+    header('Location: ' . Horde_Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
     exit;
 }
 
@@ -34,14 +34,14 @@ if (empty($code)) {
 $profile = $folks_driver->getProfile($user);
 if ($profile instanceof PEAR_Error) {
     $notification->push($profile);
-    header('Location: ' . Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
+    header('Location: ' . Horde_Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
     exit;
 }
 
 // This pages is only to activate users
 if ($profile['user_status'] != 'inactive') {
     $notification->push(_("User \"%s\" was already activated."));
-    header('Location: ' . Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
+    header('Location: ' . Horde_Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
     exit;
 }
 
@@ -49,7 +49,7 @@ if ($profile['user_status'] != 'inactive') {
 $internal_code = $folks_driver->getConfirmationCode($user, 'activate');
 if ($internal_code instanceof PEAR_Error) {
     $notification->push($internal_code);
-    header('Location: ' . Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
+    header('Location: ' . Horde_Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
     exit;
 }
 
@@ -65,5 +65,5 @@ if ($internal_code == $code) {
     $notification->push(_("The code is not right. If you copy and paste the link from your email, please check if you copied the whole string."), 'horde.warning');
 }
 
-header('Location: ' . Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
+header('Location: ' . Horde_Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
 exit;
index 83e154b..d1e0663 100644 (file)
@@ -18,7 +18,7 @@ $title = _("Renew account");
 $code = Horde_Util::getGet('code');
 if (empty($code)) {
     $notification->push(_("You must supply a confirmation code."));
-    header('Location: ' . Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
+    header('Location: ' . Horde_Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
     exit;
 }
 
@@ -26,7 +26,7 @@ if (empty($code)) {
 $user = Horde_Util::getGet('user');
 if (empty($code)) {
     $notification->push(_("You must supply a username."));
-    header('Location: ' . Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
+    header('Location: ' . Horde_Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
     exit;
 }
 
@@ -34,14 +34,14 @@ if (empty($code)) {
 $profile = $folks_driver->getProfile($user);
 if ($profile instanceof PEAR_Error) {
     $notification->push($profile);
-    header('Location: ' . Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
+    header('Location: ' . Horde_Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
     exit;
 }
 
 // This pages is only to activate users
 if ($profile['user_status'] != 'deleted') {
     $notification->push(_("User \"%s\" is not market to be in the removal process."));
-    header('Location: ' . Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
+    header('Location: ' . Horde_Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
     exit;
 }
         
@@ -49,7 +49,7 @@ if ($profile['user_status'] != 'deleted') {
 $internal_code = $folks_driver->getConfirmationCode($user, 'renew');
 if ($internal_code instanceof PEAR_Error) {
     $notification->push($internal_code);
-    header('Location: ' . Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
+    header('Location: ' . Horde_Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
     exit;
 }
 
@@ -65,5 +65,5 @@ if ($internal_code == $code) {
     $notification->push(_("The code is not right. If you copy and paste the link from your email, please check if you copied the whole string."), 'horde.warning');
 }
 
-header('Location: ' . Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
+header('Location: ' . Horde_Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
 exit;
index 835b655..88ef855 100644 (file)
@@ -29,16 +29,16 @@ function _getCAPTCHA($new = false)
 }
 
 // We are already logged
-if (Auth::isAuthenticated()) {
-    header('Location: ' . Folks::getUrlFor('user', Auth::getAuth()));
+if (Horde_Auth::isAuthenticated()) {
+    header('Location: ' . Folks::getUrlFor('user', Horde_Auth::getAuth()));
     exit;
 }
 
 // Make sure auth backend allows passwords to be reset.
-$auth = Auth::singleton($conf['auth']['driver']);
+$auth = Horde_Auth::singleton($conf['auth']['driver']);
 if (!$auth->hasCapability('resetpassword')) {
     $notification->push(_("Cannot reset password automatically, contact your administrator."), 'horde.error');
-    header('Location: ' . Auth::getLoginScreen('', Horde_Util::getFormData('url')));
+    header('Location: ' . Horde_Auth::getLoginScreen('', Horde_Util::getFormData('url')));
     exit;
 }
 
@@ -51,7 +51,7 @@ $form->setButtons(_("Continue"));
 // Get user security pass
 $user = Horde_Util::getFormData('username');
 if ($user) {
-    $u_prefs = Prefs::singleton($conf['prefs']['driver'], 'horde', Auth::addHook($user), '', null, false);
+    $u_prefs = Prefs::singleton($conf['prefs']['driver'], 'horde', Horde_Auth::addHook($user), '', null, false);
     $u_prefs->retrieve();
     $answer = $u_prefs->getValue('security_answer');
     $question = $u_prefs->getValue('security_question');
@@ -82,7 +82,7 @@ if ($form->validate()) {
     $email = Folks::getUserEmail($info['username']);
     if ($email instanceof PEAR_Error) {
         $notification->push($email);
-        header('Location: ' . Auth::getLoginScreen('', $info['url']));
+        header('Location: ' . Horde_Auth::getLoginScreen('', $info['url']));
         exit;
     }
 
@@ -94,7 +94,7 @@ if ($form->validate()) {
         $password = $auth->resetPassword($info['username']);
         if ($password instanceof PEAR_Error) {
             $notification->push($password);
-            header('Location: ' . Auth::getLoginScreen('', $info['url']));
+            header('Location: ' . Horde_Auth::getLoginScreen('', $info['url']));
             exit;
         }
 
@@ -107,7 +107,7 @@ if ($form->validate()) {
         Folks::sendMail($email, _("Your password has been reset"), $body);
 
         $notification->push(sprintf(_("Your password has been reset, check your email (%s) and log in with your new password."), $email), 'horde.success');
-        header('Location: ' . Auth::getLoginScreen('', $info['url']));
+        header('Location: ' . Horde_Auth::getLoginScreen('', $info['url']));
         exit;
     } else {
         /* Info submitted does not match what is in prefs, redirect user back
index 8858274..9a9303a 100644 (file)
 require_once dirname(__FILE__) . '/tabs.php';
 require_once 'Horde/Auth/Signup.php';
 
-$auth = Auth::singleton($conf['auth']['driver']);
+$auth = Horde_Auth::singleton($conf['auth']['driver']);
 
 // Make sure signups are enabled before proceeding
 if ($conf['signup']['allow'] !== true ||
     !$auth->hasCapability('add')) {
     $notification->push(_("User Registration has been disabled for this site."), 'horde.error');
-    header('Location: ' . Auth::getLoginScreen());
+    header('Location: ' . Horde_Auth::getLoginScreen());
     exit;
 }
 
@@ -52,7 +52,7 @@ if ($form->validate()) {
         $notification->push(sprintf(_("There was a problem adding \"%s\" to the system: %s"), $info['user_name'], $success->getMessage()), 'horde.error');
     } else {
         $notification->push($success_message, 'horde.success');
-        $url = Auth::getLoginScreen('', $info['url']);
+        $url = Horde_Auth::getLoginScreen('', $info['url']);
         header('Location: ' . $url);
         exit;
     }
index 012c704..8b6fece 100644 (file)
@@ -14,7 +14,7 @@ define('AUTH_HANDLER', true);
 define('FOLKS_BASE', dirname(__FILE__) . '/..');
 require_once FOLKS_BASE . '/lib/base.php';
 
-$auth = Auth::singleton($conf['auth']['driver']);
+$auth = Horde_Auth::singleton($conf['auth']['driver']);
 
 $vars = Horde_Variables::getDefaultVariables();
 $tabs = new Horde_UI_Tabs('what', $vars);
index 57d405b..b9c2732 100644 (file)
@@ -41,7 +41,7 @@ if ($form->validate()) {
         Folks::sendMail($info['email'], _("Your username was requested"), $body);
 
         $notification->push(sprintf(_("Your username was sent, check your email (%s)."), $users['user_email']), 'horde.success');
-        header('Location: ' . Auth::getLoginScreen('', $info['url']));
+        header('Location: ' . Horde_Auth::getLoginScreen('', $info['url']));
         exit;
     }
 }
index 52fe16d..985f953 100644 (file)
@@ -137,7 +137,7 @@ if (!function_exists('_folks_hook_getService')) {
             return $GLOBALS['registry']->callByPackage('ansel', 'listGalleries', array('ansel', PERMS_SHOW, null, true, 0, 3, $user));
 
         case 'blogs':
-            return $GLOBALS['registry']->callByPackage('thomas', 'getRecentPosts', array($user, Auth::getAuth(), '', 3));
+            return $GLOBALS['registry']->callByPackage('thomas', 'getRecentPosts', array($user, Horde_Auth::getAuth(), '', 3));
 
         case 'classifieds':
             return $GLOBALS['registry']->callByPackage('classified', 'listAds', array(array('user_uid' => $user), 0, 3));
@@ -223,13 +223,13 @@ if (!function_exists('_folks_hook_prelogin')) {
     {
         require_once 'Horde/Group.php';
         $group = Group::singleton();
-        $user_uid = Auth::getAuth();
+        $user_uid = Horde_Auth::getAuth();
 
         switch ($app) {
 
         case 'gollem':
 
-            if (Auth::isAdmin() || $group->userIsInGroup($user_uid, 1, false)) {
+            if (Horde_Auth::isAdmin() || $group->userIsInGroup($user_uid, 1, false)) {
                 $_GET['backend_key'] = 'kjbnzi78';
                 require $GLOBALS['registry']->get('fileroot', 'gollem') .  '/redirect.php';
                 exit;
@@ -241,7 +241,7 @@ if (!function_exists('_folks_hook_prelogin')) {
 
         case 'imp':
 
-            if (Auth::isAdmin()
+            if (Horde_Auth::isAdmin()
                 || $group->userIsInGroup($user_uid, 1, false)
                 || $group->userIsInGroup($user_uid, 2, false)) {
 
@@ -376,7 +376,7 @@ if (!function_exists('_horde_hook_post_pushapp')) {
             return;
         }
 
-        $user = Auth::getAuth();
+        $user = Horde_Auth::getAuth();
         if ($user) {
             return;
         }
@@ -403,7 +403,6 @@ if (!function_exists('_horde_hook_post_pushapp')) {
             return;
         }
 
-        $auth = &Auth::singleton('folks');
-        return $auth->setAuth($_COOKIE['folks_login_user'], array('transparent' => 1, 'password' => null));
+        return Horde_Auth::setAuth($_COOKIE['folks_login_user'], array('transparent' => 1, 'password' => null));
     }
 }
index 4fd50a5..63fb3cc 100644 (file)
@@ -43,7 +43,7 @@ if ($form->validate()) {
     }
 }
 
-$activities = $folks_driver->getActivity(Auth::getAuth());
+$activities = $folks_driver->getActivity(Horde_Auth::getAuth());
 if ($activities instanceof PEAR_Error) {
     $notification->push($activities);
     header('Location: ' . Folks::getUrlFor('list', 'list'));
index 3e07d95..b9b2fb3 100644 (file)
@@ -46,11 +46,11 @@ if (!$form->isSubmitted()) {
 
     if (Horde_Util::getFormData('submitbutton') == _("Delete all current comments")) {
 
-        $result = $registry->call('forums/deleteForum', array('folks', Auth::getAuth()));
+        $result = $registry->call('forums/deleteForum', array('folks', Horde_Auth::getAuth()));
         if ($result instanceof PEAR_Error) {
             $notification->push($result);
         } else {
-            $result = $folks_driver->updateComments(Auth::getAuth(), true);
+            $result = $folks_driver->updateComments(Horde_Auth::getAuth(), true);
             if ($result instanceof PEAR_Error) {
                 $notification->push($result);
             } else {
@@ -64,8 +64,8 @@ if (!$form->isSubmitted()) {
         if ($vars->get('user_comments') == 'moderate' && $profile['user_comments'] != 'moderate' ||
             $vars->get('user_comments') != 'moderate' && $profile['user_comments'] == 'moderate') {
 
-            $info = array('author' => Auth::getAuth(),
-                            'forum_name' => Auth::getAuth(),
+            $info = array('author' => Horde_Auth::getAuth(),
+                            'forum_name' => Horde_Auth::getAuth(),
                             'forum_moderated' => ($profile['user_comments'] == 'moderate'));
             $result = $registry->call('forums/saveFrom', array('folks', '', $info));
             if ($result instanceof PEAR_Error) {
index e71f0da..eb1c70b 100644 (file)
@@ -17,7 +17,7 @@ require_once 'tabs.php';
 
 $title = _("Edit my profile");
 
-$profile = $folks_driver->getRawProfile(Auth::getAuth());
+$profile = $folks_driver->getRawProfile(Horde_Auth::getAuth());
 if ($profile instanceof PEAR_Error) {
     $notification->push($profile);
     header('Location: ' . Folks::getUrlFor('list', 'list'));
@@ -34,7 +34,7 @@ $v->setDefault('SI');
 $form->addVariable(_("Homepage"), 'user_url', 'text', false);
 
 if ($registry->hasMethod('video/listVideos')) {
-    $result = $registry->call('video/listVideos', array(array('author' => Auth::getAuth()), 0, 100));
+    $result = $registry->call('video/listVideos', array(array('author' => Horde_Auth::getAuth()), 0, 100));
     if ($result instanceof PEAR_Error) {
         $notification->push($result);
     } else {
@@ -75,7 +75,7 @@ if ($form->validate()) {
     break;
 
     case _("Delete picture"):
-        $result = $folks_driver->deleteImage(Auth::getAuth());;
+        $result = $folks_driver->deleteImage(Horde_Auth::getAuth());;
         if ($result instanceof PEAR_Error) {
             $notification->push($result);
         } else {
index 7635e94..8f6058c 100644 (file)
@@ -39,14 +39,14 @@ if ($user) {
             $notification->push($result);
         } elseif ($friends->needsApproval($user)) {
             $title = sprintf(_("%s added you as a friend on %s"),
-                                        Auth::getAuth(),
+                                        Horde_Auth::getAuth(),
                                         $GLOBALS['registry']->get('name', 'horde'));
             $body = sprintf(_("User %s added you to his firends list on %s. \nTo approve, go to: %s \nTo reject, go to: %s \nTo see to his profile, go to: %s \n"),
-                            Auth::getAuth(),
+                            Horde_Auth::getAuth(),
                             $registry->get('name', 'horde'),
-                            Horde_Util::addParameter(Horde::applicationUrl('edit/friends/approve.php', true, -1), 'user', Auth::getAuth()),
-                            Horde_Util::addParameter(Horde::applicationUrl('edit/friends/reject.php', true, -1), 'user', Auth::getAuth()),
-                            Folks::getUrlFor('user', Auth::getAuth(), true, -1));
+                            Horde_Util::addParameter(Horde::applicationUrl('edit/friends/approve.php', true, -1), 'user', Horde_Auth::getAuth()),
+                            Horde_Util::addParameter(Horde::applicationUrl('edit/friends/reject.php', true, -1), 'user', Horde_Auth::getAuth()),
+                            Folks::getUrlFor('user', Horde_Auth::getAuth(), true, -1));
             $result = $friends->sendNotification($user, $title, $body);
             if ($result instanceof PEAR_Error) {
                 $notification->push($result);
index b9d0932..b8912b5 100644 (file)
@@ -14,7 +14,7 @@
 require_once dirname(__FILE__) . '/../../lib/base.php';
 require_once FOLKS_BASE . '/lib/Friends.php';
 
-if (!Auth::isAuthenticated()) {
+if (!Horde_Auth::isAuthenticated()) {
     Horde::authenticationFailureRedirect();
 }
 
@@ -37,13 +37,13 @@ if ($result instanceof PEAR_Error) {
 $notification->push(sprintf(_("User \"%s\" was confirmed as a friend."), $user), 'horde.success');
 
 $title = sprintf(_("%s approved you as a friend on %s"),
-                    Auth::getAuth(),
+                    Horde_Auth::getAuth(),
                     $registry->get('name', 'horde'));
 
 $body = sprintf(_("User %s confirmed you as a friend on %s.. \nTo see to his profile, go to: %s \n"),
-                Auth::getAuth(),
+                Horde_Auth::getAuth(),
                 $registry->get('name', 'horde'),
-                Folks::getUrlFor('user', Auth::getAuth(), true, -1));
+                Folks::getUrlFor('user', Horde_Auth::getAuth(), true, -1));
 
 $friends->sendNotification($user, $title, $body);
 
index 946a2de..3ce7ad7 100644 (file)
@@ -26,7 +26,7 @@ $form = new Horde_Form($vars, $title, 'invite');
 $form->addVariable(_("Friend's e-mail"), 'email', 'email', true);
 
 $v = &$form->addVariable(_("Subject"), 'subject', 'text', true);
-$v->setDefault(sprintf(_("%s Invited to join %s."), ucfirst(Auth::getAuth()), $registry->get('name', 'horde')));
+$v->setDefault(sprintf(_("%s Invited to join %s."), ucfirst(Horde_Auth::getAuth()), $registry->get('name', 'horde')));
 
 $v = &$form->addVariable(_("Body"), 'body', 'longtext', true);
 $body = Horde::loadConfiguration('invite.php', 'body', 'folks');
@@ -34,9 +34,9 @@ if ($body instanceof PEAR_Error) {
     $body = $body->getMessage();
 } else {
     $body = sprintf($body, $registry->get('name', 'horde'),
-                            Folks::getUrlFor('user', Auth::getAuth(), true),
+                            Folks::getUrlFor('user', Horde_Auth::getAuth(), true),
                             Horde::applicationUrl('account/signup.php', true),
-                            Auth::getAuth());
+                            Horde_Auth::getAuth());
 }
 $v->setDefault($body);
 
index 4b814b5..d76796f 100644 (file)
@@ -14,7 +14,7 @@
 require_once dirname(__FILE__) . '/../../lib/base.php';
 require_once FOLKS_BASE . '/lib/Friends.php';
 
-if (!Auth::isAuthenticated()) {
+if (!Horde_Auth::isAuthenticated()) {
     Horde::authenticationFailureRedirect();
 }
 
@@ -26,7 +26,7 @@ if (empty($user)) {
 }
 
 $friends = Folks_Friends::singleton(null, array('user' => $user));
-$result = $friends->removeFriend(Auth::getAuth());
+$result = $friends->removeFriend(Horde_Auth::getAuth());
 if ($result instanceof PEAR_Error) {
     $notification->push($result);
     header('Location: ' . Horde::applicationUrl('edit/friends/index.php'));
@@ -36,13 +36,13 @@ if ($result instanceof PEAR_Error) {
 $notification->push(sprintf(_("User \"%s\" was rejected as a friend."), $user), 'horde.success');
 
 $title = sprintf(_("%s rejected you as a friend on %s"),
-                    Auth::getAuth(),
+                    Horde_Auth::getAuth(),
                     $registry->get('name', 'horde'));
 
 $body = sprintf(_("User %s rejected you as a friend on %s.. \nTo see to his profile, go to: %s \n"),
-                Auth::getAuth(),
+                Horde_Auth::getAuth(),
                 $registry->get('name', 'horde'),
-                Folks::getUrlFor('user', Auth::getAuth(), true, -1));
+                Folks::getUrlFor('user', Horde_Auth::getAuth(), true, -1));
 
 $friends->sendNotification($user, $title, $body);
 
index 6688065..465dfc0 100644 (file)
@@ -15,10 +15,10 @@ require_once FOLKS_BASE . '/lib/base.php';
 require_once 'tabs.php';
 
 // Make sure auth backend allows passwords to be updated.
-$auth = Auth::singleton($conf['auth']['driver']);
+$auth = Horde_Auth::singleton($conf['auth']['driver']);
 if (!$auth->hasCapability('resetpassword')) {
     $notification->push(_("Cannot update password, contact your administrator."), 'horde.error');
-    header('Location: ' . Auth::getLoginScreen('', Horde_Util::getFormData('url')));
+    header('Location: ' . Horde_Auth::getLoginScreen('', Horde_Util::getFormData('url')));
     exit;
 }
 
@@ -150,7 +150,7 @@ do {
     }
 
     // try to chage it
-    $result = $folks_driver->changePassword($info['new'], Auth::getAuth());
+    $result = $folks_driver->changePassword($info['new'], Horde_Auth::getAuth());
     if ($result instanceof PEAR_Error) {
         $notification->push($result);
         break;
@@ -159,12 +159,12 @@ do {
     $notification->push(_("Password changed."), 'horde.success');
 
     // reset credentials so user is not forced to relogin
-    if (Auth::getCredential('password') == $info['old']) {
-        Auth::setCredential('password', $info['new']);
-        if (Auth::getProvider() == 'imp' || !empty($_SESSION['imp']['pass'])) {
+    if (Horde_Auth::getCredential('password') == $info['old']) {
+        Horde_Auth::setCredential('password', $info['new']);
+        if (Horde_Auth::getProvider() == 'imp' || !empty($_SESSION['imp']['pass'])) {
             $_SESSION['imp']['pass'] = Horde_Secret::write(Horde_Secret::getKey('imp'),
                                                         $info['new']);
-        } elseif (Auth::getProvider() == 'mimp' || !empty($_SESSION['mimp']['pass'])) {
+        } elseif (Horde_Auth::getProvider() == 'mimp' || !empty($_SESSION['mimp']['pass'])) {
             $_SESSION['mimp']['pass'] = Horde_Secret::write(Horde_Secret::getKey('mimp'),
                                                         $info['new']);
         }
index 5e01cb0..c0735ba 100644 (file)
@@ -17,7 +17,7 @@ require_once 'tabs.php';
 
 $title = _("Privacy");
 
-$profile = $folks_driver->getRawProfile(Auth::getAuth());
+$profile = $folks_driver->getRawProfile(Horde_Auth::getAuth());
 if ($profile instanceof PEAR_Error) {
     $notification->push($profile);
     header('Location: ' . Folks::getUrlFor('list', 'list'));
index e571cb2..1409f00 100644 (file)
@@ -11,7 +11,7 @@
  * @package Folks
  */
 
-if (!Auth::isAuthenticated()) {
+if (!Horde_Auth::isAuthenticated()) {
     Horde::authenticationFailureRedirect();
 }
 
index ff7af18..76912d0 100644 (file)
@@ -14,7 +14,7 @@
 require_once dirname(__FILE__) . '/lib/base.php';
 require_once FOLKS_BASE . '/lib/Forms/Activity.php';
 
-if (!Auth::isAuthenticated()) {
+if (!Horde_Auth::isAuthenticated()) {
     Horde::authenticationFailureRedirect();
 }
 
@@ -59,7 +59,7 @@ krsort($firendActivities);
 $firendActivities = array_slice($firendActivities, 0, 30);
 
 // Own activities
-$activities = $folks_driver->getActivity(Auth::getAuth());
+$activities = $folks_driver->getActivity(Horde_Auth::getAuth());
 if ($activities instanceof PEAR_Error) {
     $notification->push($activities);
     header('Location: ' . Folks::getUrlFor('list', 'list'));
index 630cb06..334b8d8 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /**
- * The Auth_folks class provides a sql implementation of the Horde
- * authentication system with use of folks app
+ * The Folks_Auth_Folks class provides a sql implementation of the Horde
+ * authentication system with use of folks app.
  *
- * $Id: folks.php 930 2008-09-26 09:14:36Z duck $
+ * $Horde$
  *
  * Copyright 2008 Obala d.o.o. (http://www.obala.si/)
  *
  *
  * @author Duck <duck@obala.net>
  */
-class Auth_folks extends Auth_application {
-
+class Folks_Auth_Folks extends Horde_Auth_Application
+{
     /**
      * An array of capabilities, so that the driver can report which
      * operations it supports and which it doesn't.
      *
      * @var array
      */
-    var $capabilities = array('add'           => false,
-                              'update'        => false,
-                              'resetpassword' => true,
-                              'remove'        => false,
-                              'list'          => false,
-                              'transparent'   => false);
+    protected $capabilities = array(
+        'resetpassword' => true
+    );
 
     /**
      * Constructs a new Application authentication object.
      *
      * @param array $params  A hash containing connection parameters.
      */
-    function Auth_folks($params = array())
+    public function __construct($params = array())
     {
-        $this->_params = array('app' => 'folks');
+        $params['app'] = 'folks';
+        parent::__construct($params);
     }
 
     /**
      * Returns the URI of the login screen for this authentication object.
      *
-     * @access private
-     *
      * @param string $app  The application to use.
      * @param string $url  The URL to redirect to after login.
      *
      * @return string  The login screen URI.
      */
-    function _getLoginScreen($app = 'folks', $url = '')
+    public function getLoginScreen($app = 'folks', $url = '')
     {
         $webroot = $GLOBALS['registry']->get('webroot', 'folks');
         if ($webroot instanceof PEAR_Error) {
@@ -64,13 +60,11 @@ class Auth_folks extends Auth_application {
     /**
      * Checks if $userId exists in the system.
      *
-     * @abstract
-     *
      * @param string $userId User ID for which to check
      *
      * @return boolean  Whether or not $userId already exists.
      */
-    function exists($userId)
+    public function exists($userId)
     {
         return $GLOBALS['registry']->callByPackage('folks',
                                                     'userExists',
@@ -83,24 +77,24 @@ class Auth_folks extends Auth_application {
      *
      * @param string $userId  The user id for which to reset the password.
      *
-     * @return mixed  The new password on success or a PEAR_Error object on
-     *                failure.
+     * @return string  The new password on success.
+     * @throws Horde_Exception
      */
-    function resetPassword($userId)
+    public function resetPassword($userId)
     {
         /* Get a new random password. */
-        $password = Auth::genRandomPassword();
+        $password = Horde_Auth::genRandomPassword();
 
         /* Process. */
         $fileroot = $GLOBALS['registry']->get('fileroot', 'folks');
         if ($fileroot instanceof PEAR_Error) {
-            return $fileroot;
+            throw new Horde_Exception($fileroot);
         }
 
         require_once $fileroot . '/lib/base.php';
         $result = $GLOBALS['folks_driver']->changePassword($password, $userId);
         if ($result instanceof PEAR_Error) {
-            return $result;
+            throw new Horde_Exception($result);
         }
 
         return $password;
@@ -110,9 +104,10 @@ class Auth_folks extends Auth_application {
      * Automatic authentication: Finds out if the client matches an allowed IP
      * block.
      *
-     * @return boolean  Whether or not the client is allowed.
+     * @return boolean
+     * @throws Horde_Exception
      */
-    function transparent()
+    protected function _transparent()
     {
         if (!isset($_COOKIE['folks_login_code']) ||
             !isset($_COOKIE['folks_login_user'])) {
@@ -121,7 +116,7 @@ class Auth_folks extends Auth_application {
 
         $fileroot = $GLOBALS['registry']->get('webroot', 'folks');
         if ($fileroot instanceof PEAR_Error) {
-            return $fileroot;
+            throw new Horde_Exception($fileroot);
         }
 
         require_once $fileroot . '/lib/base.php';
@@ -132,9 +127,9 @@ class Auth_folks extends Auth_application {
         if ($this->setAuth($_COOKIE['folks_login_user'], array('transparent' => 1, 'password' => null))) {
             $GLOBALS['folks_driver']->resetOnlineUsers();
             return true;
-        } else {
-            return false;
         }
+
+        return false;
     }
 
     /**
index 032fd14..2016c84 100644 (file)
@@ -38,7 +38,7 @@ class Horde_Block_folks_my_comments extends Horde_Block {
      */
     function _content()
     {
-        if (!Auth::isAuthenticated()) {
+        if (!Horde_Auth::isAuthenticated()) {
             return '';
         }
 
@@ -57,13 +57,13 @@ class Horde_Block_folks_my_comments extends Horde_Block {
               . '<th>' . _("User") . '</th></tr></thead>';
 
         $threads = $GLOBALS['registry']->call('forums/getThreadsByForumOwner',
-                                    array(Auth::getAuth(), 'message_timestamp', 1, false,
+                                    array(Horde_Auth::getAuth(), 'message_timestamp', 1, false,
                                             'folks', 0, $this->_params['limit']));
         if ($threads instanceof PEAR_Error) {
             return $threads->getMessage();
         }
 
-        $url = Folks::getUrlFor('user', Auth::getAuth());
+        $url = Folks::getUrlFor('user', Horde_Auth::getAuth());
         foreach ($threads as $message) {
             $html .= '<tr><td>'
                   . '<a href="' . $url . '" title="' . $message['message_date']. '">'
index ee2800c..3f5309f 100644 (file)
@@ -295,8 +295,8 @@ class Folks_Driver {
             $this->_updateOnlineStatus();
 
             // Update profile
-            if (Auth::isAuthenticated()) {
-                $this->_saveProfile(array('last_online_on' => $_SERVER['REQUEST_TIME']), Auth::getAuth());
+            if (Horde_Auth::isAuthenticated()) {
+                $this->_saveProfile(array('last_online_on' => $_SERVER['REQUEST_TIME']), Horde_Auth::getAuth());
             }
         }
 
@@ -325,7 +325,7 @@ class Folks_Driver {
         static $profiles;
 
         if ($user == null) {
-            $user = Auth::getAuth();
+            $user = Horde_Auth::getAuth();
         }
 
         if (empty($user)) {
@@ -337,7 +337,7 @@ class Folks_Driver {
         }
 
         $profile = $GLOBALS['cache']->get('folksProfile' . $user, $GLOBALS['conf']['cache']['default_lifetime']);
-        if ($profile || (Auth::isAdmin() && Horde_Util::getGet('debug'))) {
+        if ($profile || (Horde_Auth::isAdmin() && Horde_Util::getGet('debug'))) {
 
             $profile = unserialize($profile);
 
@@ -409,7 +409,7 @@ class Folks_Driver {
     public function changePassword($password, $user = null)
     {
         if ($user == null) {
-            $user = Auth::getAuth();
+            $user = Horde_Auth::getAuth();
         }
 
         $password = hash('md5', $password);
@@ -426,7 +426,7 @@ class Folks_Driver {
     public function saveProfile($data, $user = null)
     {
         if ($user == null) {
-            $user = Auth::getAuth();
+            $user = Horde_Auth::getAuth();
         }
 
         $GLOBALS['cache']->expire('folksProfile' . $user);
@@ -443,7 +443,7 @@ class Folks_Driver {
      */
     function logView($id)
     {
-        if (!Auth::isAuthenticated() || Auth::getAUth() == $id) {
+        if (!Horde_Auth::isAuthenticated() || Horde_Auth::getAUth() == $id) {
             return false;
         }
 
@@ -475,7 +475,7 @@ class Folks_Driver {
     */
     public function deleteUser($user)
     {
-        if  (!Auth::isAdmin()) {
+        if  (!Horde_Auth::isAdmin()) {
             return false;
         }
 
@@ -488,7 +488,7 @@ class Folks_Driver {
         // Delete groups
         if ($GLOBALS['conf']['friends']) {
             $shares = Horde_Share::singleton('folks');
-            $groups = $shares->listShares(Auth::getAuth(), PERMS_SHOW, true);
+            $groups = $shares->listShares(Horde_Auth::getAuth(), PERMS_SHOW, true);
             foreach ($groups as $share) {
                 $result = $shares->removeShare($share);
                 if ($result instanceof PEAR_Error) {
@@ -526,7 +526,7 @@ class Folks_Driver {
     public function getAttributes($user = null, $group = null)
     {
         if ($user == null) {
-            $user = Auth::getAuth();
+            $user = Horde_Auth::getAuth();
         }
 
         $attributes = $GLOBALS['cache']->get('folksUserAttributes' . $user, $GLOBALS['conf']['cache']['default_lifetime']);
@@ -553,7 +553,7 @@ class Folks_Driver {
     public function saveAttributes($data, $group, $user = null)
     {
         if ($user == null) {
-            $user = Auth::getAuth();
+            $user = Horde_Auth::getAuth();
         }
 
         $GLOBALS['cache']->expire('folksAttributes' . $user);
@@ -628,7 +628,7 @@ class Folks_Driver {
     */
     public function saveSearch($criteria, $name)
     {
-        $GLOBALS['cache']->expire('folksearch' . Auth::getAuth());
+        $GLOBALS['cache']->expire('folksearch' . Horde_Auth::getAuth());
 
         return $this->_saveSearch($criteria, $name);
     }
@@ -640,7 +640,7 @@ class Folks_Driver {
     */
     public function getSavedSearch()
     {
-        $search = $GLOBALS['cache']->get('folksearch' . Auth::getAuth(), $GLOBALS['conf']['cache']['default_lifetime']);
+        $search = $GLOBALS['cache']->get('folksearch' . Horde_Auth::getAuth(), $GLOBALS['conf']['cache']['default_lifetime']);
         if ($search) {
             return unserialize($search);
         }
@@ -650,7 +650,7 @@ class Folks_Driver {
             return $search;
         }
 
-        $GLOBALS['cache']->set('folksearch' . Auth::getAuth(), serialize($search));
+        $GLOBALS['cache']->set('folksearch' . Horde_Auth::getAuth(), serialize($search));
 
         return $search;
     }
@@ -679,7 +679,7 @@ class Folks_Driver {
     */
     public function deleteSavedSearch($name)
     {
-        $GLOBALS['cache']->expire('folksearch' . Auth::getAuth());
+        $GLOBALS['cache']->expire('folksearch' . Horde_Auth::getAuth());
 
         return $this->_deleteSavedSearch($name);
     }
@@ -696,7 +696,7 @@ class Folks_Driver {
     public function logActivity($message, $scope = 'folks', $user = null)
     {
         if ($user == null) {
-            $user = Auth::getAuth();
+            $user = Horde_Auth::getAuth();
         }
 
         if (empty($message)) {
@@ -764,7 +764,7 @@ class Folks_Driver {
     */
     public function deleteActivity($scope, $date)
     {
-        $user = Auth::getAuth();
+        $user = Horde_Auth::getAuth();
         $GLOBALS['cache']->expire($user . '_activity');
         return $this->_deleteActivity($scope, $date, $user);
     }
index 61770da..41c254b 100644 (file)
@@ -109,7 +109,7 @@ class Folks_Driver_sql extends Folks_Driver {
     protected function _updateOnlineStatus()
     {
         $query = 'REPLACE INTO ' . $this->_params['online'] . ' (user_uid, ip_address, time_last_click) VALUES (?, ?, ?)';
-        return $this->_write_db->query($query, array(Auth::getAuth(), $_SERVER['REMOTE_ADDR'], $_SERVER['REQUEST_TIME']));
+        return $this->_write_db->query($query, array(Horde_Auth::getAuth(), $_SERVER['REMOTE_ADDR'], $_SERVER['REQUEST_TIME']));
     }
 
     /**
@@ -375,7 +375,7 @@ class Folks_Driver_sql extends Folks_Driver {
     protected function _logView($id)
     {
         $query = 'REPLACE INTO ' . $this->_params['views'] . ' (view_uid, user_uid, view_time) VALUES (?, ?, ?)';
-        return $this->_write_db->query($query, array($id, Auth::getAuth(), $_SERVER['REQUEST_TIME']));
+        return $this->_write_db->query($query, array($id, Horde_Auth::getAuth(), $_SERVER['REQUEST_TIME']));
     }
 
     /**
@@ -386,7 +386,7 @@ class Folks_Driver_sql extends Folks_Driver {
     public function getViews()
     {
         $query = 'SELECT user_uid FROM ' . $this->_params['views'] . ' WHERE view_uid = ?';
-        return $this->_db->getCol($query, 0, array(Auth::getAuth()));
+        return $this->_db->getCol($query, 0, array(Horde_Auth::getAuth()));
     }
 
    /**
@@ -461,7 +461,7 @@ class Folks_Driver_sql extends Folks_Driver {
     {
         $query = 'INSERT INTO ' . $this->_params['search'] . ' (user_uid, search_name, search_criteria) VALUES (?, ?, ?)';
 
-        return $this->_write_db->query($query, array(Auth::getAuth(), $name, $criteria));
+        return $this->_write_db->query($query, array(Horde_Auth::getAuth(), $name, $criteria));
     }
 
    /**
@@ -473,7 +473,7 @@ class Folks_Driver_sql extends Folks_Driver {
     {
         $query = 'SELECT search_name FROM ' . $this->_params['search'] . ' WHERE user_uid = ?';
 
-        return $this->_db->getCol($query, 'search_name', Auth::getAuth());
+        return $this->_db->getCol($query, 'search_name', Horde_Auth::getAuth());
     }
 
    /**
@@ -487,7 +487,7 @@ class Folks_Driver_sql extends Folks_Driver {
     {
         $query = 'SELECT search_criteria FROM ' . $this->_params['search'] . ' WHERE user_uid = ? AND search_name = ?';
 
-        return $this->_db->getOne($query, array(Auth::getAuth(), $name));
+        return $this->_db->getOne($query, array(Horde_Auth::getAuth(), $name));
     }
 
    /**
@@ -499,7 +499,7 @@ class Folks_Driver_sql extends Folks_Driver {
     {
         $query = 'DELETE FROM ' . $this->_params['search'] . ' WHERE user_uid = ? AND search_name = ?';
 
-        return $this->_write_db->query($query, array(Auth::getAuth(), $name));
+        return $this->_write_db->query($query, array(Horde_Auth::getAuth(), $name));
     }
 
    /**
index 6a3afd1..dd92a5b 100644 (file)
@@ -264,13 +264,13 @@ class Folks {
     static public function getUserEmail($user)
     {
         // We should always realy on registration data
-        // $prefs = Prefs::singleton($GLOBALS['conf']['prefs']['driver'], 'horde', Auth::addHook($user), '', null, false);
+        // $prefs = Prefs::singleton($GLOBALS['conf']['prefs']['driver'], 'horde', Horde_Auth::addHook($user), '', null, false);
         // $prefs->retrieve();
         // $email = $prefs->getValue('alternate_email') ? $prefs->getValue('alternate_email') : $prefs->getValue('from_addr');
 
         // If there is no email set use the registration one
         if (empty($email)) {
-            if (Auth::isAuthenticated()) {
+            if (Horde_Auth::isAuthenticated()) {
                 $profile = $GLOBALS['folks_driver']->getProfile($user);
             } else {
                 $profile = $GLOBALS['folks_driver']->getRawProfile($user);
@@ -296,7 +296,7 @@ class Folks {
     {
         $img = $GLOBALS['registry']->getImageDir('horde');
         $menu = new Horde_Menu(Horde_Menu::MASK_ALL);
-        $menu->add(self::getUrlFor('user', Auth::getAuth()), _("My profile"), 'myaccount.png', $img);
+        $menu->add(self::getUrlFor('user', Horde_Auth::getAuth()), _("My profile"), 'myaccount.png', $img);
         $menu->add(self::getUrlFor('list', 'friends'), _("Friends"), 'group.png', $img);
         $menu->add(Horde::applicationUrl('edit/edit.php'), _("Edit profile"), 'edit.png', $img);
         $menu->add(Horde::applicationUrl('services.php'), _("Services"), 'horde.png', $img);
index d5544b7..b33e692 100644 (file)
@@ -93,7 +93,7 @@ class Folks_Friends {
     static public function singleton($driver = null, $params = null)
     {
         if (empty($params['user'])) {
-            $params['user'] = Auth::getAuth();
+            $params['user'] = Horde_Auth::getAuth();
         }
 
         $signature = $driver . ':' . $params['user'];
@@ -112,7 +112,7 @@ class Folks_Friends {
      */
     protected function __construct($params)
     {
-        $this->_user = empty($params['user']) ? Auth::getAuth() : $params['user'];
+        $this->_user = empty($params['user']) ? Horde_Auth::getAuth() : $params['user'];
 
         $this->_cache = Horde_Cache::singleton($GLOBALS['conf']['cache']['driver'],
                                             Horde::getDriverConfig('cache', $GLOBALS['conf']['cache']['driver']));
@@ -144,7 +144,7 @@ class Folks_Friends {
             return (boolean)$GLOBALS['prefs']->getValue('friends_approval');
         }
 
-        $prefs = Prefs::singleton($GLOBALS['conf']['prefs']['driver'], 'folks', Auth::addHook($user), '', null, false);
+        $prefs = Prefs::singleton($GLOBALS['conf']['prefs']['driver'], 'folks', Horde_Auth::addHook($user), '', null, false);
         $prefs->retrieve();
 
         return (boolean)$prefs->getValue('friends_approval');
@@ -219,7 +219,7 @@ class Folks_Friends {
         }
 
         // Check if users exits
-        $auth = Auth::singleton($GLOBALS['conf']['auth']['driver']);
+        $auth = Horde_Auth::singleton($GLOBALS['conf']['auth']['driver']);
         if (!$auth->exists($user)) {
             return PEAR::raiseError(sprintf(_("User \"%s\" does not exits"), $user));
         }
@@ -288,7 +288,7 @@ class Folks_Friends {
         }
 
         // Check if users exits
-        $auth = Auth::singleton($GLOBALS['conf']['auth']['driver']);
+        $auth = Horde_Auth::singleton($GLOBALS['conf']['auth']['driver']);
         if (!$auth->exists($friend)) {
             return PEAR::raiseError(sprintf(_("User \"%s\" does not exits"), $friend));
         }
index 164cbe1..d191e65 100644 (file)
@@ -103,7 +103,7 @@ class Folks_Friends_prefs extends Folks_Friends {
     private function _lists($type, $user = null)
     {
         if (empty($user)) {
-            $user = Auth::getAuth();
+            $user = Horde_Auth::getAuth();
         }
 
         $u_prefs = Prefs::singleton($GLOBALS['conf']['prefs']['driver'], $GLOBALS['registry']->getApp(), $user);
index df86780..f5e9883 100644 (file)
@@ -91,8 +91,8 @@ class Folks_Friends_shared extends  Folks_Friends_sql {
         }
 
         // Only owners of a group can delete them
-        if (Auth::getAuth() != $share->get('owner') &&
-            !Auth::isAdmin('folks:admin')) {
+        if (Horde_Auth::getAuth() != $share->get('owner') &&
+            !Horde_Auth::isAdmin('folks:admin')) {
             return PEAR::raiseError("You can rename only your own groups.");
         }
 
@@ -122,8 +122,8 @@ class Folks_Friends_shared extends  Folks_Friends_sql {
         }
 
         // Only owners of a group can delete them
-        if (Auth::getAuth() != $share->get('owner') &&
-            !Auth::isAdmin('folks:admin')) {
+        if (Horde_Auth::getAuth() != $share->get('owner') &&
+            !Horde_Auth::isAdmin('folks:admin')) {
             return PEAR::raiseError("You can delete only your own groups.");
         }
 
index 17f94ce..710ec9a 100644 (file)
@@ -50,8 +50,8 @@ class Folks_Notification {
         $result = false;
 
         if (empty($user)) {
-            if (Auth::isAuthenticated()) {
-                $user = Auth::getAuth();
+            if (Horde_Auth::isAuthenticated()) {
+                $user = Horde_Auth::getAuth();
             } else {
                 return true;
             }
@@ -92,8 +92,8 @@ class Folks_Notification {
         $result = false;
 
         if (empty($user)) {
-            if (Auth::isAuthenticated()) {
-                $user = Auth::getAuth();
+            if (Horde_Auth::isAuthenticated()) {
+                $user = Horde_Auth::getAuth();
             } else {
                 return true;
             }
index 5c6516f..77d38a2 100644 (file)
@@ -128,7 +128,7 @@ $_services['getImageUrl'] = array(
     'type' => 'string'
 );
 
-if (Auth::isAdmin()) {
+if (Horde_Auth::isAdmin()) {
     $_services['userList'] = array(
         'type' => '{urn:horde}stringArray'
     );
@@ -334,7 +334,7 @@ function _folks_isBlacklisted($user = null)
 
     $friends = Folks_Friends::singleton('sql', array('user' => $user));
 
-    return $friends->isBlacklisted(Auth::getAuth());
+    return $friends->isBlacklisted(Horde_Auth::getAuth());
 }
 
 /**
@@ -407,8 +407,8 @@ function _folks_listTimeObjects($categories, $start, $end)
 function _folks_logActivity($message, $scope = 'folks', $user = null)
 {
     if (empty($user)) {
-        $user = Auth::getAuth();
-    } elseif ($user !== Auth::getAuth() && !Auth::isAdmin('admin:' . $scope)) {
+        $user = Horde_Auth::getAuth();
+    } elseif ($user !== Horde_Auth::getAuth() && !Horde_Auth::isAdmin('admin:' . $scope)) {
         return PEAR::raiseError(_("You cannot log activities for other users."));
     }
 
@@ -445,7 +445,7 @@ function _folks_setStatus($online = true, $user = null)
     require_once dirname(__FILE__) . '/base.php';
 
     if ($user == null) {
-        $user = Auth::getAuth();
+        $user = Horde_Auth::getAuth();
     }
 
     if ($online) {
@@ -469,7 +469,7 @@ function _folks_getStatus($user = null)
     require_once dirname(__FILE__) . '/base.php';
 
     if ($user == null) {
-        $user = Auth::getAuth();
+        $user = Horde_Auth::getAuth();
     }
 
     return $GLOBALS['folks_driver']->isOnline($user);
index f3234f5..58d7f02 100644 (file)
@@ -64,7 +64,7 @@ function _loginNotice($user)
 if (isset($_GET['logout_reason'])) {
     setcookie('folks_login_user', '', $_SERVER['REQUEST_TIME'] - 1000, $conf['cookie']['path'], $conf['cookie']['domain']);
     setcookie('folks_login_code', '', $_SERVER['REQUEST_TIME'] - 1000, $conf['cookie']['path'], $conf['cookie']['domain']);
-    $folks_driver->deleteOnlineUser(Auth::getAuth());
+    $folks_driver->deleteOnlineUser(Horde_Auth::getAuth());
 
     @session_destroy();
     if (!empty($_GET['redirect'])) {
@@ -80,7 +80,7 @@ if (isset($_GET['logout_reason'])) {
  * Special login for apps (gollem, imp)?
  */
 if ($conf['login']['prelogin'] &&
-    Auth::getAuth() &&
+    Horde_Auth::getAuth() &&
    ($app = Horde_Util::getGet('app'))) {
     Horde::callHook('_folks_hook_prelogin', array($app), 'folks');
 }
@@ -89,14 +89,14 @@ if ($conf['login']['prelogin'] &&
  * Login parameters
  */
 $url_param = Horde_Util::getFormData('url');
-$login_url = Auth::getLoginScreen('folks', $url_param);
+$login_url = Horde_Auth::getLoginScreen('folks', $url_param);
 
 /*
  * We are already logged in?
  */
-if (Auth::isAuthenticated()) {
+if (Horde_Auth::isAuthenticated()) {
     if (empty($url_param)) {
-        $url_param = Folks::getUrlFor('user', Auth::getAuth());
+        $url_param = Folks::getUrlFor('user', Horde_Auth::getAuth());
     }
     header('Location: ' . $url_param);
     exit;
@@ -110,8 +110,7 @@ if (isset($_COOKIE['folks_login_code']) &&
     $_COOKIE['folks_login_code'] == $folks_driver->getCookie($_COOKIE['folks_login_user'])) {
 
     // Horde Auto login
-    $auth = Auth::singleton('auto', array('username' => $_COOKIE['folks_login_user']));
-    $auth->setAuth($_COOKIE['folks_login_user'], array('transparent' => 1));
+    Horde_Auth::setAuth($_COOKIE['folks_login_user'], array('transparent' => 1));
 
     if (empty($url_param)) {
         $url_param = Folks::getUrlFor('user', $_COOKIE['folks_login_user']);
@@ -191,8 +190,7 @@ if ($form->isSubmitted()) {
     }
 
     // Horde Auto login
-    $auth = &Auth::singleton('auto', array('username' => $username));
-    $auth->setAuth($username, array('transparent' => 1, 'password' => $info['password']));
+    Horde_Auth::setAuth($username, array('transparent' => 1, 'password' => $info['password']));
 
     // Save user last login info.
     // We ignore last_login pref as it can be turned off by user
index eaa80b9..5cb9421 100644 (file)
@@ -14,7 +14,7 @@ require_once 'Horde/Group.php';
 
 $shares = &Horde_Share::singleton('folks');
 $groups = &Group::singleton();
-$auth = &Auth::singleton($conf['auth']['driver']);
+$auth = Horde_Auth::singleton($conf['auth']['driver']);
 
 $reload = false;
 $actionID = Horde_Util::getFormData('actionID', 'edit');
@@ -31,7 +31,7 @@ case 'edit':
     }
     if (is_a($share, 'PEAR_Error')) {
         $notification->push($share, 'horde.error');
-    } elseif (isset($share) && Auth::getAuth() != $share->get('owner')) {
+    } elseif (isset($share) && Horde_Auth::getAuth() != $share->get('owner')) {
         exit('permission denied');
     }
     break;
@@ -41,16 +41,16 @@ case 'editform':
     if (is_a($share, 'PEAR_Error')) {
         $notification->push(_("Attempt to edit a non-existent share."), 'horde.error');
     } else {
-        if (Auth::getAuth() != $share->get('owner')) {
+        if (Horde_Auth::getAuth() != $share->get('owner')) {
             exit('permission denied');
         }
         $perm = &$share->getPermission();
 
         // Process owner and owner permissions.
         $old_owner = $share->get('owner');
-        $new_owner = Auth::addHook(Horde_Util::getFormData('owner', $old_owner));
+        $new_owner = Horde_Auth::addHook(Horde_Util::getFormData('owner', $old_owner));
         if ($old_owner !== $new_owner && !empty($new_owner)) {
-            if ($old_owner != Auth::getAuth() && !Auth::isAdmin()) {
+            if ($old_owner != Horde_Auth::getAuth() && !Horde_Auth::isAdmin()) {
                 $notification->push(_("Only the owner or system administrator may change ownership or owner permissions for a share"), 'horde.error');
             } else {
                 $share->set('owner', $new_owner);
@@ -133,7 +133,7 @@ case 'editform':
 
         foreach ($u_names as $key => $user) {
             // Apply backend hooks
-            $user = Auth::addHook($user);
+            $user = Horde_Auth::addHook($user);
             // If the user is empty, or we've already set permissions
             // via the owner_ options, don't do anything here.
             if (empty($user) || $user == $new_owner) {
@@ -235,7 +235,7 @@ if ($auth->hasCapability('list')) {
 if (!empty($conf['share']['any_group'])) {
     $groupList = $groups->listGroups();
 } else {
-    $groupList = $groups->getGroupMemberships(Auth::getAuth(), true);
+    $groupList = $groups->getGroupMemberships(Horde_Auth::getAuth(), true);
 }
 if (is_a($groupList, 'PEAR_Error')) {
     Horde::logMessage($groupList, __FILE__, __LINE__, PEAR_LOG_NOTICE);
index 21cf9b7..8a2f136 100644 (file)
@@ -15,7 +15,7 @@
 
 require_once dirname(__FILE__) . '/lib/base.php';
 
-if (!Auth::isAuthenticated()) {
+if (!Horde_Auth::isAuthenticated()) {
     Horde::authenticationFailureRedirect();
 }
 
index 76627bb..0482825 100644 (file)
@@ -14,8 +14,8 @@
 define('AUTH_HANDLER', true);
 require_once dirname(__FILE__) . '/../lib/base.php';
 
-$auth = Auth::singleton($conf['auth']['driver']);
-if (!Auth::getAuth() &&
+$auth = Horde_Auth::singleton($conf['auth']['driver']);
+if (!Horde_Auth::getAuth() &&
     (!isset($_SERVER['PHP_AUTH_USER']) ||
      !$auth->authenticate($_SERVER['PHP_AUTH_USER'], array('password' => isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : null)))) {
     header('WWW-Authenticate: Basic realm="Letter RSS Interface"');
index c50331a..3e9caa8 100644 (file)
@@ -14,8 +14,8 @@
 define('AUTH_HANDLER', true);
 require_once dirname(__FILE__) . '/../lib/base.php';
 
-$auth = Auth::singleton($conf['auth']['driver']);
-if (!Auth::getAuth() &&
+$auth = Horde_Auth::singleton($conf['auth']['driver']);
+if (!Horde_Auth::getAuth() &&
     (!isset($_SERVER['PHP_AUTH_USER']) ||
      !$auth->authenticate($_SERVER['PHP_AUTH_USER'], array('password' => isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : null)))) {
     header('WWW-Authenticate: Basic realm="Letter RSS Interface"');
index e0d9bcb..f79a259 100644 (file)
@@ -14,8 +14,8 @@
 define('AUTH_HANDLER', true);
 require_once dirname(__FILE__) . '/../lib/base.php';
 
-$auth = Auth::singleton($conf['auth']['driver']);
-if (!Auth::getAuth() &&
+$auth = Horde_Auth::singleton($conf['auth']['driver']);
+if (!Horde_Auth::getAuth() &&
     (!isset($_SERVER['PHP_AUTH_USER']) ||
      !$auth->authenticate($_SERVER['PHP_AUTH_USER'], array('password' => isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : null)))) {
     header('WWW-Authenticate: Basic realm="Letter RSS Interface"');
@@ -43,7 +43,7 @@ foreach ($my_list as $friend) {
         continue;
     }
     foreach ($friend_friends as $friend_friend) {
-        if ($friend_friend == Auth::getAuth() ||
+        if ($friend_friend == Horde_Auth::getAuth() ||
             in_array($friend_friend, $my_list)) {
             continue;
         } elseif (isset($users[$friend_friend])) {
index bf0b4c5..c6534eb 100644 (file)
@@ -176,8 +176,7 @@ $title = _("Email problem");
 $body = _("Dear %s, we tried to send you an email, but if turns out that the mail is usable any more. Maybe you run over quota. If your mail is discontinued, please update your profile with the email you are using now at %s.");
 
 // Horde Auto login to send messages with
-$auth = Auth::singleton('auto', array('username' => $opts_hash['--username']));
-$auth->setAuth($opts_hash['--username'], array('transparent' => 1));
+Horde_Auth::setAuth($opts_hash['--username'], array('transparent' => 1));
 
 // Send messages
 foreach ($users as $user) {
index 3d59137..1b1603b 100644 (file)
@@ -83,7 +83,7 @@ foreach ($opts as $opt) {
 
 // Login to horde if username & password are set.
 if (!empty($username) && !empty($password)) {
-    $auth = Auth::singleton($conf['auth']['driver']);
+    $auth = Horde_Auth::singleton($conf['auth']['driver']);
     if (!$auth->authenticate($username, array('password' => $password))) {
         $error = _("Login is incorrect.");
         Horde::logMessage($error, __FILE__, __LINE__, PEAR_LOG_ERR);
@@ -96,7 +96,7 @@ if (!empty($username) && !empty($password)) {
 }
 
 // Only admins can run this operation
-if (!Auth::isAdmin('folks:admin')) {
+if (!Horde_Auth::isAdmin('folks:admin')) {
     $cli->fatal('ADMIN ONLY');
 }
 
index 3fd7950..529c141 100644 (file)
 if (!isset($_COOKIE['online'])) {
 
     // Add this to your tempalte file
-    $sql = 'REPLACE INTO folks_online SET user_uid="' . Auth::getAuth() . '", ip_address="' . $_SERVER["REMOTE_ADDR"] . '", time_last_click="' . $_SERVER['REQUEST_TIME'] . '"';
+    $sql = 'REPLACE INTO folks_online SET user_uid="' . Horde_Auth::getAuth() . '", ip_address="' . $_SERVER["REMOTE_ADDR"] . '", time_last_click="' . $_SERVER['REQUEST_TIME'] . '"';
     mysql_unbuffered_query($sql);
 
     // If not using cront with online.sql
-    // $sql = 'UPDATE folks_users SET last_online_on = "' . $_SERVER['REQUEST_TIME'] .'" WHERE user_uid = "' . Auth::getAuth() . '"';
+    // $sql = 'UPDATE folks_users SET last_online_on = "' . $_SERVER['REQUEST_TIME'] .'" WHERE user_uid = "' . Horde_Auth::getAuth() . '"';
     // mysql_unbuffered_query($sql)
 
     // If not using cront with online.sql
index b3b4c39..a0fde7b 100644 (file)
@@ -73,7 +73,7 @@ if (!empty($criteria)) {
     $users = array();
 }
 
-if (Auth::isAuthenticated()) {
+if (Horde_Auth::isAuthenticated()) {
     $queries = $folks_driver->getSavedSearch();
     if ($queries instanceof PEAR_Error) {
         $notification->push($queries);
@@ -93,7 +93,7 @@ require FOLKS_TEMPLATES . '/list/list.php';
 
 echo '<br />';
 $form->renderActive(null, null, null, 'post');
-if (Auth::isAuthenticated()) {
+if (Horde_Auth::isAuthenticated()) {
     require FOLKS_TEMPLATES . '/list/search.php';
 }
 
index d4cfa80..0bc17b6 100644 (file)
@@ -22,7 +22,7 @@ Horde::includeScriptFiles();
 <title><?php echo htmlspecialchars($page_title) ?></title>
 <link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
 <link rel="alternate" type="application/rss+xml" href="<?php echo Folks::getUrlFor('feed', 'online') ?>" title="<?php echo _("Online users") ?>" />
-<?php if (Auth::isAuthenticated()): ?>
+<?php if (Horde_Auth::isAuthenticated()): ?>
 <link rel="alternate" type="application/rss+xml" href="<?php echo Folks::getUrlFor('feed', 'friends') ?>" title="<?php echo _("Online friends") ?>" />
 <link rel="alternate" type="application/rss+xml" href="<?php echo Folks::getUrlFor('feed', 'activity') ?>" title="<?php echo _("Friends activity") ?>" />
 <link rel="alternate" type="application/rss+xml" href="<?php echo Folks::getUrlFor('feed', 'know') ?>" title="<?php echo _("People you might know") ?>" />
index 0cdac5f..29f632e 100644 (file)
@@ -5,7 +5,7 @@
 <?php
 echo '<li><img src="' . $registry->getImageDir('horde') . '/alerts/success.png">'
                 . _("Click here to login.")
-                . ' <a href="' . Auth::getLoginScreen('letter', Horde_Util::addParameter(Horde::applicationUrl('user.php'), 'user', $user))  . '">' . _("Click here to login.") . '</a>'
+                . ' <a href="' . Horde_Auth::getLoginScreen('letter', Horde_Util::addParameter(Horde::applicationUrl('user.php'), 'user', $user))  . '">' . _("Click here to login.") . '</a>'
                     . '</li>';
 ?>
 </ul>
index ccbad1f..3d28b63 100644 (file)
@@ -2,7 +2,7 @@
 <h1><?php echo $title ?></h1>
 
 <?php
-if ($user == Auth::getAuth()) {
+if ($user == Horde_Auth::getAuth()) {
     echo $form->renderActive(null, null, '', 'post') . '<br />';
 }
 ?>
@@ -50,9 +50,9 @@ include FOLKS_TEMPLATES . '/user/actions.php';
             echo '<span class="offline">' . _("Offline") . '</span>';
             if ($profile['last_online_on'] &&
                 ($profile['last_online'] == 'all' ||
-                Auth::isAuthenticated() && (
+                Horde_Auth::isAuthenticated() && (
                     $profile['last_online'] == 'authenticated' ||
-                    $profile['last_online'] == 'friends' && $friends_driver->isFriend(Auth::getAuth())))
+                    $profile['last_online'] == 'friends' && $friends_driver->isFriend(Horde_Auth::getAuth())))
                 ) {
                 echo ' ' . _("Last time online") . ': ' . Folks::format_datetime($profile['last_online_on']);
             }
@@ -222,7 +222,7 @@ $path = $registry->get('webroot', 'genie');
 <tr>
 <td class="header" colspan="2">
 <span style="float: right">
-<a href="<?php echo $path ?>/wishlist.php?wishlist=<?php echo Auth::getAuth() ?>" title="<?php echo _("Add your content") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/plus.png" /></a>
+<a href="<?php echo $path ?>/wishlist.php?wishlist=<?php echo Horde_Auth::getAuth() ?>" title="<?php echo _("Add your content") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/plus.png" /></a>
 <a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/nav/right.png" /></a>
 </span>
 <a href="<?php echo $path ?>/wishlist.php?wishlist=<?php echo $user ?>" title="<?php echo _("Others user content") ?>" ><?php echo $registry->get('name', 'genie') ?> (<?php echo $profile['count_wishes'] ?>)</a>
@@ -248,7 +248,7 @@ $path = $registry->get('webroot', 'ansel');
 <tr>
 <td class="header" colspan="2">
 <span style="float: right">
-<a href="<?php echo $path ?>/view.php?groupby=owner&view=List&owner=<?php echo Auth::getAuth() ?>" title="<?php echo _("Add your content") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/plus.png" /></a>
+<a href="<?php echo $path ?>/view.php?groupby=owner&view=List&owner=<?php echo Horde_Auth::getAuth() ?>" title="<?php echo _("Add your content") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/plus.png" /></a>
 <a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/nav/right.png" /></a>
 </span>
 <a href="<?php echo $path ?>/view.php?groupby=owner&view=List&owner=<?php echo $user ?>" title="<?php echo _("Others user content") ?>" ><?php echo $registry->get('name', 'ansel') ?> (<?php echo $profile['count_galleries'] ?>)</a> |
@@ -373,9 +373,9 @@ case 'never':
     break;
 
 case 'authenticated':
-    $allow_comments = Auth::isAuthenticated();
+    $allow_comments = Horde_Auth::isAuthenticated();
     if ($allow_comments) {
-        if ($friends_driver->isBlacklisted(Auth::getAuth())) {
+        if ($friends_driver->isBlacklisted(Horde_Auth::getAuth())) {
             $allow_comments = false;
             $comments_reason = sprintf(_("You are on %s blacklist."), $user);
         }
@@ -388,13 +388,13 @@ case 'authenticated':
     break;
 
 case 'friends':
-    $allow_comments = $friends_driver->isFriend(Auth::getAuth());
+    $allow_comments = $friends_driver->isFriend(Horde_Auth::getAuth());
     $comments_reason = _("Only authenticated users can post comments.");
     break;
 
 default:
     $allow_comments = true;
-    if (Auth::isAuthenticated() && $friends_driver->isBlacklisted(Auth::getAuth())) {
+    if (Horde_Auth::isAuthenticated() && $friends_driver->isBlacklisted(Horde_Auth::getAuth())) {
         $allow_comments = false;
         $comments_reason = sprintf(_("You are on %s blacklist."), $user);
     }
index 2737f20..be2469c 100644 (file)
@@ -14,7 +14,7 @@
 require_once dirname(__FILE__) . '/lib/base.php';
 
 // Load profile
-$user = Horde_Util::getFormData('user', Auth::getAuth());
+$user = Horde_Util::getFormData('user', Horde_Auth::getAuth());
 $profile = $folks_driver->getProfile($user);
 if ($profile instanceof PEAR_Error) {
     $notification->push($profile);
@@ -31,7 +31,7 @@ $folks_driver->logView($user);
 
 // Get user activity
 if ($profile['activity_log'] == 'all' ||
-    Auth::isAuthenticated() && (
+    Horde_Auth::isAuthenticated() && (
         $profile['activity_log'] == 'authenticated' ||
         $profile['activity_log'] == 'friends' && $friends_driver->isFriend($user))
     ) {
@@ -45,7 +45,7 @@ if ($profile['activity_log'] == 'all' ||
 }
 
 // Prepare an process activity form
-if ($user == Auth::getAuth()) {
+if ($user == Horde_Auth::getAuth()) {
     require_once FOLKS_BASE . '/lib/Forms/Activity.php';
     $vars = Horde_Variables::getDefaultVariables();
     $form = new Folks_Activity_Form($vars, _("What are you doing right now?"), 'short');
@@ -83,7 +83,7 @@ case 'private':
 break;
 
 case 'public_authenticated':
-    if (Auth::isAuthenticated()) {
+    if (Horde_Auth::isAuthenticated()) {
         require FOLKS_TEMPLATES . '/user/user.php';
     } else {
         require FOLKS_TEMPLATES . '/user/authenticated.php';
index 5602329..7ffef3b 100644 (file)
@@ -17,7 +17,7 @@
 @define('HORDE_BASE', dirname(__FILE__) . '/../../');
 require_once HORDE_BASE . '/lib/base.php';
 
-if (!Auth::isAdmin()) {
+if (!Horde_Auth::isAdmin()) {
     die('Permission denied');
 }
 
index bb8feed..398f844 100644 (file)
@@ -17,7 +17,7 @@
 @define('HORDE_BASE', dirname(__FILE__) . '/../../');
 require_once HORDE_BASE . '/lib/base.php';
 
-if (!Auth::isAdmin()) {
+if (!Horde_Auth::isAdmin()) {
     die('Permission denied');
 }
 
index b87ab1f..cff3309 100644 (file)
 //         // Where does SpamAssassin live, and what username should we use
 //         // for preferences?
 //         $cmd = '/usr/local/bin/spamc';
-//         $username = Auth::getAuth();
+//         $username = Horde_Auth::getAuth();
 //
 //         // If you use the _sam_hook_username() hook, uncomment the next line
 //         //$username = _sam_hook_username($username);
 //     function _imp_hook_spam_email($action)
 //     {
 //         $prefix = ($action == 'spam') ? 'spam-' : 'fp-';
-//         return $prefix . Auth::getBareAuth() . '@example.com';
+//         return $prefix . Horde_Auth::getBareAuth() . '@example.com';
 //     }
 // }
 
@@ -493,7 +493,7 @@ if (!function_exists('_imp_hook_quota')) {
     {
         $host = $_SESSION['imp']['server'];
         $user = $_SESSION['imp']['user'];
-        $pass = Auth::getCredential('password');
+        $pass = Horde_Auth::getCredential('password');
         $command = $params[0];
 
         $session = ssh2_connect($host);
diff --git a/imp/lib/Auth/Imp.php b/imp/lib/Auth/Imp.php
new file mode 100644 (file)
index 0000000..cc0bdd3
--- /dev/null
@@ -0,0 +1,70 @@
+<?php
+/**
+ * The Horde_Auth_Imp:: class provides an IMP implementation of the Horde
+ * authentication system.
+ *
+ * Required parameters: NONE
+ * Optional parameters: NONE
+ *
+ * Copyright 2003-2009 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (LGPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
+ *
+ * @author  Michael Slusarz <slusarz@horde.org>
+ * @package Horde_Auth
+ */
+class IMP_Auth_Imp extends Horde_Auth_Driver
+{
+    /**
+     * Find out if a set of login credentials are valid, and if
+     * requested, mark the user as logged in in the current session.
+     *
+     * @param string $userID      The userID to check.
+     * @param array $credentials  The credentials to check.
+     * @param boolean $login      Whether to log the user in. If false, we'll
+     *                            only test the credentials and won't modify
+     *                            the current session.
+     *
+     * @return boolean  Whether or not the credentials are valid.
+     */
+    public function authenticate($userID = null, $credentials = array(),
+                                 $login = false)
+    {
+        return parent::authenticate($userID, $credentials, $login && (Horde_Auth::getProvider() == 'imp'));
+    }
+
+    /**
+     * Find out if a set of login credentials are valid.
+     *
+     * @param string $userID      The userID to check.
+     * @param array $credentials  An array of login credentials.
+     *
+     * @throws Horde_Exception
+     */
+    protected function _authenticate($userID, $credentials)
+    {
+        // Check for valid IMAP Client object.
+        if (!$GLOBALS['imp_imap']->ob) {
+            // Attempt to create IMAP Client object
+            $key = isset($credentials['server']) ? $credentials['server'] : IMP_Session::getAutoLoginServer();
+            if (is_null($key) ||
+                !isset($credentials['password']) ||
+                !$GLOBALS['imp_imap']->createImapObject($userID, $credentials['password'], $key)) {
+                IMP::loginLogMessage('failed', __FILE__, __LINE__);
+                throw new Horde_Exception('', Horde_Auth::REASON_FAILED);
+            }
+        }
+
+        try {
+            $GLOBALS['imp_imap']->ob->login();
+        } catch (Horde_Imap_Client_Exception $e) {
+            IMP::loginLogMessage($e->getMessage(), __FILE__, __LINE__);
+            if ($e->getCode() == Horde_Imap_Client_Exception::SERVER_CONNECT) {
+                throw new Horde_Exception(_("Could not connect to the remote server."));
+            }
+
+            throw new Horde_Exception('', Horde_Auth::REASON_BADLOGIN);
+        }
+    }
+}
diff --git a/imp/lib/Auth/imp.php b/imp/lib/Auth/imp.php
deleted file mode 100644 (file)
index a4294d4..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-<?php
-/**
- * The Auth_imp:: class provides an IMP implementation of the Horde
- * authentication system.
- *
- * Required parameters: NONE
- * Optional parameters: NONE
- *
- * Copyright 2003-2009 The Horde Project (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (LGPL). If you
- * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
- *
- * @author  Michael Slusarz <slusarz@horde.org>
- * @package Horde_Auth
- */
-class Auth_imp extends Auth
-{
-    /**
-     * Find out if a set of login credentials are valid, and if
-     * requested, mark the user as logged in in the current session.
-     *
-     * @param string $userID      The userID to check.
-     * @param array $credentials  The credentials to check.
-     * @param boolean $login      Whether to log the user in. If false, we'll
-     *                            only test the credentials and won't modify
-     *                            the current session.
-     *
-     * @return boolean  Whether or not the credentials are valid.
-     */
-    function authenticate($userID = null, $credentials = array(),
-                          $login = false)
-    {
-        return parent::authenticate($userID, $credentials, $login && ($this->getProvider() == 'imp'));
-    }
-
-    /**
-     * Find out if a set of login credentials are valid.
-     *
-     * @param string $userID      The userID to check.
-     * @param array $credentials  An array of login credentials.
-     *
-     * @return boolean  Whether or not the credentials are valid.
-     */
-    function _authenticate($userID, $credentials)
-    {
-        // Check for valid IMAP Client object.
-        if (!$GLOBALS['imp_imap']->ob) {
-            // Attempt to create IMAP Client object
-            $key = isset($credentials['server']) ? $credentials['server'] : IMP_Session::getAutoLoginServer();
-            if (is_null($key) ||
-                !isset($credentials['password']) ||
-                !$GLOBALS['imp_imap']->createImapObject($userID, $credentials['password'], $key)) {
-                IMP::loginLogMessage('failed', __FILE__, __LINE__);
-                $this->_setAuthError(AUTH_REASON_FAILED);
-                return false;
-            }
-        }
-
-        try {
-            $GLOBALS['imp_imap']->ob->login();
-            return true;
-        } catch (Horde_Imap_Client_Exception $e) {
-            IMP::loginLogMessage($e->getMessage(), __FILE__, __LINE__);
-            if ($e->getCode() == Horde_Imap_Client_Exception::SERVER_CONNECT) {
-                $this->_setAuthError(AUTH_REASON_MESSAGE, _("Could not connect to the remote server."));
-            } else {
-                $this->_setAuthError(AUTH_REASON_BADLOGIN);
-            }
-            return false;
-        }
-    }
-}
index 9defa60..9d8b5e7 100644 (file)
@@ -1000,7 +1000,7 @@ class IMP_Compose
             if (($this->_linkAttach &&
                  $GLOBALS['conf']['compose']['link_attachments']) ||
                 !empty($GLOBALS['conf']['compose']['link_all_attachments'])) {
-                $base = $this->linkAttachments(Horde::applicationUrl('attachment.php', true), $textpart, Auth::getAuth());
+                $base = $this->linkAttachments(Horde::applicationUrl('attachment.php', true), $textpart, Horde_Auth::getAuth());
 
                 if ($this->_pgpAttachPubkey || $this->_attachVCard) {
                     $new_body = new Horde_Mime_Part();
index cca9eb1..0063c60 100644 (file)
@@ -56,7 +56,7 @@ class IMP_Folder
     protected function __construct()
     {
         if (!empty($GLOBALS['conf']['server']['cache_folders'])) {
-            $this->_cacheid = 'imp_folder_cache|' . Auth::getAuth();
+            $this->_cacheid = 'imp_folder_cache|' . Horde_Auth::getAuth();
         }
     }
 
index 4fb67bb..1c0a286 100644 (file)
@@ -72,9 +72,9 @@ class IMP
                                                $hordeauth = false)
     {
         if ($hordeauth) {
-            $reason = Auth::isAuthenticated();
+            $reason = Horde_Auth::isAuthenticated();
         } else {
-            $auth_imp = Auth::singleton(array('imp', 'imp'));
+            $auth_imp = Horde_Auth::singleton(array('imp', 'imp'));
             $reason = $auth_imp->authenticate(null, array(), false);
         }
 
@@ -599,7 +599,7 @@ class IMP
          * then we only show the logout link if the sidebar isn't shown or if
          * the configuration says to always show the current user a logout
          * link. */
-        $impAuth = ((Auth::getProvider() == 'imp') || $_SESSION['imp']['autologin']);
+        $impAuth = ((Horde_Auth::getProvider() == 'imp') || $_SESSION['imp']['autologin']);
         if (!$impAuth ||
             !$prefs->getValue('show_sidebar') ||
             Horde::showService('logout')) {
@@ -1290,15 +1290,15 @@ class IMP
         ));
 
         if ($force ||
-            !((Auth::getProvider() != 'imp') || !$_SESSION['imp']['autologin'])) {
+            !((Horde_Auth::getProvider() != 'imp') || !$_SESSION['imp']['autologin'])) {
             $url = $GLOBALS['registry']->get('webroot', 'imp') . '/login.php';
         } else {
             $url = Horde::getServiceLink('logout', 'horde', true);
         }
 
         $url = (!is_null($reason) && is_array($reason))
-            ? Auth::addLogoutParameters($url, $reason[0], $reason[1])
-            : Auth::addLogoutParameters($url, $reason);
+            ? Horde_Auth::addLogoutParameters($url, $reason[0], $reason[1])
+            : Horde_Auth::addLogoutParameters($url, $reason);
 
         if (!empty($params)) {
             $url = Horde_Util::addParameter($url, $params, null, false);
@@ -1720,7 +1720,7 @@ class IMP
         $key = &self::$_authkey;
 
         if (is_null($key)) {
-            $key = Horde_Secret::getKey(Auth::getProvider() == 'imp' ? 'auth' : 'imp');
+            $key = Horde_Secret::getKey(Horde_Auth::getProvider() == 'imp' ? 'auth' : 'imp');
         }
         return $key;
     }
index ba4d1d9..a23a422 100644 (file)
@@ -235,7 +235,7 @@ class IMP_Imap_Tree
         if (!isset($_SESSION['imp']['cache']['tree'])) {
             $imp_cache = IMP::getCache();
             $_SESSION['imp']['cache']['tree'] = $imp_cache
-                ? uniqid(mt_rand() . Auth::getAuth())
+                ? uniqid(mt_rand() . Horde_Auth::getAuth())
                 : null;
         }
 
index 9352876..310d5ef 100644 (file)
@@ -34,7 +34,7 @@ class IMP_LoginTasks_Task_DeleteAttachmentsMonthly extends Horde_LoginTasks_Task
         $del_time = gmmktime(0, 0, 0, date('n') - $GLOBALS['prefs']->getValue('delete_attachments_monthly_keep'), 1, date('Y'));
 
         $vfs = VFS::singleton($GLOBALS['conf']['vfs']['type'], Horde::getDriverConfig('vfs', $GLOBALS['conf']['vfs']['type']));
-        $path = IMP_Compose::VFS_LINK_ATTACH_PATH . '/' . Auth::getAuth();
+        $path = IMP_Compose::VFS_LINK_ATTACH_PATH . '/' . Horde_Auth::getAuth();
 
         /* Make sure cleaning is done recursively. */
         $files = $vfs->listFolder($path, null, true, false, true);
index b9c924b..d65c1ff 100644 (file)
@@ -45,7 +45,7 @@ class MIMP
         // if ($options_link = Horde::getServiceLink('options', 'mimp')) {
         //     $items[Horde_Util::addParameter($options_link, 'mobile', 1, false)] = _("Options");
         // }
-        $logout_link = IMP::getLogoutUrl(AUTH_REASON_LOGOUT);
+        $logout_link = IMP::getLogoutUrl(Horde_Auth::REASON_LOGOUT);
         if (!empty($logout_link)) {
             $items[$logout_link] = _("Log out");
         }
index 031d318..ad74eb8 100644 (file)
@@ -210,7 +210,7 @@ class IMP_Maillog
             return '';
         }
 
-        return implode('.', array('imp', str_replace('.', '*', Auth::getAuth()), $msgid));
+        return implode('.', array('imp', str_replace('.', '*', Horde_Auth::getAuth()), $msgid));
     }
 
 }
index c5ee57f..6355ba6 100644 (file)
@@ -63,7 +63,7 @@ class IMP_Notification_Listener_Status extends Horde_Notification_Listener_Statu
         /* For dimp, don't capture notification messages if we are logging
          * out or accessing the options pages. */
         if (($this->_viewmode == 'dimp') &&
-            Auth::getAuth() && !strstr($_SERVER['PHP_SELF'], '/prefs.php')) {
+            Horde_Auth::getAuth() && !strstr($_SERVER['PHP_SELF'], '/prefs.php')) {
             $options['store'] = true;
         }
         parent::notify($messageStack, $options);
index 97abbc0..e8d1417 100644 (file)
@@ -88,7 +88,7 @@ class IMP_Sentmail_sql extends IMP_Sentmail
         $query = sprintf('INSERT INTO %s (sentmail_id, sentmail_who, sentmail_ts, sentmail_messageid, sentmail_action, sentmail_recipient, sentmail_success) VALUES (?, ?, ?, ?, ?, ?, ?)',
                          $this->_params['table']);
         $values = array($this->_db->nextId($this->_params['table']),
-                        Auth::getAuth(),
+                        Horde_Auth::getAuth(),
                         time(),
                         $message_id,
                         $action,
@@ -130,7 +130,7 @@ class IMP_Sentmail_sql extends IMP_Sentmail
         }
         $query = sprintf('SELECT sentmail_recipient, count(*) AS sentmail_count FROM %s WHERE sentmail_who = %s AND sentmail_success = 1%s GROUP BY sentmail_recipient ORDER BY sentmail_count DESC LIMIT %d',
                          $this->_params['table'],
-                         $this->_db->quote(Auth::getAuth()),
+                         $this->_db->quote(Horde_Auth::getAuth()),
                          $where,
                          $limit);
 
@@ -170,7 +170,7 @@ class IMP_Sentmail_sql extends IMP_Sentmail
         $query = sprintf('SELECT COUNT(*) FROM %s WHERE sentmail_ts > ?',
                          $this->_params['table']);
         if ($user) {
-            $query .= sprintf(' AND sentmail_who = %s', $this->_db->quote(Auth::getAuth()));
+            $query .= sprintf(' AND sentmail_who = %s', $this->_db->quote(Horde_Auth::getAuth()));
         }
 
         /* Log the query at a DEBUG log level. */
index b210269..f6a3ec9 100644 (file)
@@ -95,8 +95,8 @@ class IMP_Session
         }
 
         /* Determine the unique user name. */
-        if (Auth::isAuthenticated()) {
-            $sess['uniquser'] = Auth::removeHook(Auth::getAuth());
+        if (Horde_Auth::isAuthenticated()) {
+            $sess['uniquser'] = Horde_Auth::removeHook(Horde_Auth::getAuth());
         } else {
             $sess['uniquser'] = $imapuser;
             if (!empty($ptr['realm'])) {
@@ -110,9 +110,9 @@ class IMP_Session
             return false;
         }
 
-        /* Do necessary authentication now (since Auth:: may need to set
+        /* Do necessary authentication now (since Horde_Auth:: may need to set
          * values in Horde-land). */
-        $auth_imp = &Auth::singleton(array('imp', 'imp'));
+        $auth_imp = Horde_Auth::singleton(array('imp', 'imp'));
         if ($auth_imp->authenticate($sess['uniquser'], array('password' => $password), true) !== true) {
             unset($_SESSION['imp']);
             return false;
@@ -267,11 +267,11 @@ class IMP_Session
         }
 
         if ((!empty($auto_server) || $force) &&
-            Auth::getAuth() &&
+            Horde_Auth::getAuth() &&
             !empty($servers[$server_key]['hordeauth'])) {
             return (strcasecmp($servers[$server_key]['hordeauth'], 'full') == 0)
-                ? Auth::getAuth()
-                : Auth::getBareAuth();
+                ? Horde_Auth::getAuth()
+                : Horde_Auth::getBareAuth();
         }
 
         return false;
index 72813aa..6bb4edc 100644 (file)
@@ -58,9 +58,9 @@ class IMP_Spam
                      * be secure. */
                     $prog = str_replace(array('%u','%l', '%d'),
                         array(
-                            escapeshellarg(Auth::getAuth()),
-                                               escapeshellarg(Auth::getBareAuth()),
-                            escapeshellarg(Auth::getAuthDomain())
+                            escapeshellarg(Horde_Auth::getAuth()),
+                                               escapeshellarg(Horde_Auth::getBareAuth()),
+                            escapeshellarg(Horde_Auth::getAuthDomain())
                         ), $GLOBALS['conf'][$action]['program']);
                     $proc = proc_open($prog,
                         array(
index c7a3b9c..5aac18c 100644 (file)
@@ -84,7 +84,7 @@ if (!Horde_Util::nonInputVar('no_compress')) {
 // If IMP isn't responsible for Horde auth, and no one is logged into
 // Horde, redirect to the login screen. If this is a compose window
 // that just timed out, store the draft.
-if (!(Auth::isAuthenticated() || (Auth::getProvider() == 'imp'))) {
+if (!(Horde_Auth::isAuthenticated() || (Horde_Auth::getProvider() == 'imp'))) {
     if ($compose_page) {
         $imp_compose = IMP_Compose::singleton();
         $imp_compose->sessionExpireDraft();
index 9081599..3df76bf 100644 (file)
@@ -24,9 +24,9 @@ if (!empty($pref_server)) {
 }
 
 /* Get an Auth object. */
-$imp_auth = (Auth::getProvider() == 'imp');
-$auth = &Auth::singleton($conf['auth']['driver']);
-$logout_reason = $auth->getLogoutReason();
+$imp_auth = (Horde_Auth::getProvider() == 'imp');
+$auth = Horde_Auth::singleton($conf['auth']['driver']);
+$logout_reason = Horde_Auth::getLogoutReason();
 
 $actionID = (Horde_Util::getFormData('action') == 'compose') ? 'login_compose' : Horde_Util::getFormData('actionID');
 $url_param = Horde_Util::getFormData('url');
@@ -37,10 +37,10 @@ $load_frameset = intval($imp_auth && empty($conf['menu']['always']));
 if (!empty($_SESSION['imp']) && is_array($_SESSION['imp'])) {
     if ($logout_reason) {
         /* Log logout requests now. */
-        if ($logout_reason == AUTH_REASON_LOGOUT) {
+        if ($logout_reason == Horde_Auth::REASON_LOGOUT) {
             IMP::loginLogMessage('logout', __FILE__, __LINE__, PEAR_LOG_NOTICE);
         } else {
-            Horde::logMessage($_SERVER['REMOTE_ADDR'] . ' ' . $auth->getLogoutReasonString(), __FILE__, __LINE__, PEAR_LOG_NOTICE);
+            Horde::logMessage($_SERVER['REMOTE_ADDR'] . ' ' . Horde_Auth::getLogoutReasonString(), __FILE__, __LINE__, PEAR_LOG_NOTICE);
         }
 
         $language = (isset($prefs)) ? $prefs->getValue('language') : NLS::select();
@@ -53,7 +53,7 @@ if (!empty($_SESSION['imp']) && is_array($_SESSION['imp'])) {
         }
 
         if ($imp_auth) {
-            Auth::clearAuth();
+            Horde_Auth::clearAuth();
             @session_destroy();
             Horde::setupSessionHandler();
             @session_start();
@@ -73,23 +73,23 @@ if (!empty($_SESSION['imp']) && is_array($_SESSION['imp'])) {
 }
 
 /* Log session timeouts. */
-if ($logout_reason == AUTH_REASON_SESSION) {
+if ($logout_reason == Horde_Auth::REASON_SESSION) {
     $entry = sprintf('Session timeout for client [%s]', $_SERVER['REMOTE_ADDR']);
     Horde::logMessage($entry, __FILE__, __LINE__, PEAR_LOG_NOTICE);
 
     /* Make sure everything is really cleared. */
-    Auth::clearAuth();
+    Horde_Auth::clearAuth();
     unset($_SESSION['imp']);
 }
 
 /* Redirect the user on logout if redirection is enabled. */
-if ($logout_reason == AUTH_REASON_LOGOUT &&
+if ($logout_reason == Horde_Auth::REASON_LOGOUT &&
     ($conf['user']['redirect_on_logout'] ||
      !empty($conf['auth']['redirect_on_logout']))) {
     if (!empty($conf['auth']['redirect_on_logout'])) {
-        $url = Auth::addLogoutParameters($conf['auth']['redirect_on_logout'], AUTH_REASON_LOGOUT);
+        $url = Horde_Auth::addLogoutParameters($conf['auth']['redirect_on_logout'], Horde_Auth::REASON_LOGOUT);
     } else {
-        $url = Auth::addLogoutParameters($conf['user']['redirect_on_logout'], AUTH_REASON_LOGOUT);
+        $url = Horde_Auth::addLogoutParameters($conf['user']['redirect_on_logout'], Horde_Auth::REASON_LOGOUT);
     }
     if (!isset($_COOKIE[session_name()])) {
         $url = Horde_Util::addParameter($url, session_name(), session_id());
@@ -100,7 +100,7 @@ if ($logout_reason == AUTH_REASON_LOGOUT &&
 
 /* Redirect the user if an alternate login page has been specified. */
 if (!empty($conf['auth']['alternate_login'])) {
-    $url = Auth::addLogoutParameters($conf['auth']['alternate_login']);
+    $url = Horde_Auth::addLogoutParameters($conf['auth']['alternate_login']);
     if (!isset($_COOKIE[session_name()])) {
         $url = Horde_Util::addParameter($url, session_name(), session_id(), false);
     }
@@ -110,7 +110,7 @@ if (!empty($conf['auth']['alternate_login'])) {
     header('Location: ' . $url);
     exit;
 } elseif ($conf['user']['alternate_login']) {
-    $url = Auth::addLogoutParameters($conf['user']['alternate_login']);
+    $url = Horde_Auth::addLogoutParameters($conf['user']['alternate_login']);
     if (!isset($_COOKIE[session_name()])) {
         $url = Horde_Util::addParameter($url, session_name(), session_id(), false);
     }
@@ -143,18 +143,17 @@ if (!$logout_reason && IMP_Session::canAutoLogin($server_key, $autologin)) {
     exit;
 }
 
-$reason = $auth->getLogoutReasonString();
 $title = sprintf(_("Welcome to %s"), $registry->get('name', ($imp_auth) ? 'horde' : null));
 
-if ($reason) {
-    $notification->push(str_replace('<br />', ' ', $reason), 'horde.message');
+if ($logout_reason) {
+    $notification->push(str_replace('<br />', ' ', $logout_reason), 'horde.message');
 }
 
 /* Build the <select> widget for the servers and hordeauth servers lists. */
 $show_list = ($conf['server']['server_list'] == 'shown');
 if ($show_list) {
     $hordeauth_servers_list = $servers_list = array();
-    $isAuth = Auth::isAuthenticated();
+    $isAuth = Horde_Auth::isAuthenticated();
     foreach ($servers as $key => $val) {
         $entry = array(
             'sel' => ($server_key == $key) || IMP_Session::isPreferredServer($val, $key),
@@ -267,7 +266,7 @@ $t->set('anchor_string', htmlspecialchars(Horde_Util::getFormData('anchor_string
 $t->set('server_key', (!$display_list) ? htmlspecialchars($server_key) : null);
 
 /* Do we need to do IE version detection? */
-$t->set('ie_clientcaps', (!Auth::getAuth() && ($browser->getBrowser() == 'msie') && ($browser->getMajor() >= 5)));
+$t->set('ie_clientcaps', (!Horde_Auth::getAuth() && ($browser->getBrowser() == 'msie') && ($browser->getMajor() >= 5)));
 
 $extra_hidden = array();
 foreach (IMP::getComposeArgs() as $arg => $value) {
index cc7238c..e15bddd 100644 (file)
@@ -718,7 +718,7 @@ if (!empty($atc_parts) && ($show_parts != 'none')) {
 }
 
 if (IMP::$printMode && !empty($conf['print']['add_printedby'])) {
-    $hdrs[] = array('name' => _("Printed By"), 'val' => $user_identity->getFullname() ? $user_identity->getFullname() : Auth::getAuth(), 'i' => (++$i % 2));
+    $hdrs[] = array('name' => _("Printed By"), 'val' => $user_identity->getFullname() ? $user_identity->getFullname() : Horde_Auth::getAuth(), 'i' => (++$i % 2));
 }
 
 $m_template->set('headers', $hdrs);
index 91a011e..a741d1e 100644 (file)
@@ -30,7 +30,7 @@ function _newSessionUrl($actionID)
 
     if ($GLOBALS['url_in']) {
         $url = Horde::url(Horde_Util::removeParameter($GLOBALS['url_in'], session_name()), true);
-    } elseif (Auth::getProvider() == 'imp') {
+    } elseif (Horde_Auth::getProvider() == 'imp') {
         $url = Horde::applicationUrl($GLOBALS['registry']->get('webroot', 'horde') . '/', true);
 
         /* Force the initial page to IMP if we're logging in to compose a
@@ -93,7 +93,7 @@ $imapuser = Horde_Util::getPost('imapuser');
 $pass = Horde_Util::getPost('pass');
 if (!empty($autologin)) {
     $imapuser = IMP_Session::canAutoLogin();
-    $pass = Auth::getCredential('password');
+    $pass = Horde_Auth::getCredential('password');
 }
 $isLogin = empty($_SESSION['imp']['logintasks']);
 
@@ -113,7 +113,7 @@ if (isset($_SESSION['imp']) && is_array($_SESSION['imp'])) {
         (!is_null($pass) && ($pass != $GLOBALS['imp_imap']->ob->getParam('password')))) {
         /* Disable the old session. */
         unset($_SESSION['imp']);
-        _redirect(IMP::getLogoutUrl(AUTH_REASON_FAILED, true));
+        _redirect(IMP::getLogoutUrl(Horde_Auth::REASON_FAILED, true));
     }
 
     $url = $url_in;
@@ -133,7 +133,7 @@ if (isset($_SESSION['imp']) && is_array($_SESSION['imp'])) {
 
 /* Create a new session if we're given the proper parameters. */
 if (!is_null($imapuser) && !is_null($pass)) {
-    if (Auth::getProvider() == 'imp') {
+    if (Horde_Auth::getProvider() == 'imp') {
         /* Destroy any existing session on login and make sure to use a new
          * session ID, to avoid session fixation issues. */
         Horde::getCleanSession();
index 668b037..23085c6 100644 (file)
@@ -13,8 +13,8 @@ $authentication = 'none';
 @define('AUTH_HANDLER', true);
 require_once dirname(__FILE__) . '/lib/base.php';
 
-$auth = &Auth::singleton($conf['auth']['driver']);
-if ((!Auth::getAuth() || !IMP::checkAuthentication(true)) &&
+$auth = Horde_Auth::singleton($conf['auth']['driver']);
+if ((!Horde_Auth::getAuth() || !IMP::checkAuthentication(true)) &&
     (!isset($_SERVER['PHP_AUTH_USER']) ||
      !$auth->authenticate($_SERVER['PHP_AUTH_USER'], array('password' => isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : null)))) {
     header('WWW-Authenticate: Basic realm="IMP RSS Interface"');
index 2b50a2d..d22d6b9 100644 (file)
@@ -4,7 +4,7 @@ $authentication = 'none';
 require_once '/lib/base.php';
 
 /* Set up the password encryption token. */
-Horde_Secret::setKey(Auth::getProvider() == 'imp' ? 'auth' : 'imp');
+Horde_Secret::setKey(Horde_Auth::getProvider() == 'imp' ? 'auth' : 'imp');
 
 /* Use the first server defined in servers.php. */
 // CUSTOMIZE THIS
index 013b8a8..995c451 100644 (file)
@@ -49,7 +49,7 @@ $code['conf'] = array_filter(array(
     'URI_MESSAGE' => Horde::applicationUrl('message-dimp.php'),
     'URI_PREFS' => Horde::url($horde_webroot . '/services/prefs/', true, -1),
     'URI_PREFS_IMP' => str_replace('&amp;', '&', Horde_Util::addParameter(Horde::getServiceLink('options', 'imp'), array('nomenu' => 1))),
-    'URI_TIMEOUT' => Auth::addLogoutParameters($horde_webroot . '/login.php', AUTH_REASON_SESSION),
+    'URI_TIMEOUT' => Horde_Auth::addLogoutParameters($horde_webroot . '/login.php', Horde_Auth::REASON_SESSION),
     'URI_VIEW' => Horde::applicationUrl('view.php', true, -1),
 
     'SESSION_ID' => defined('SID') ? SID : '',
index a67a74c..335f805 100644 (file)
@@ -112,8 +112,8 @@ class Ingo
             $user = ($full ||
                      (isset($_SESSION['ingo']['backend']['hordeauth']) &&
                       $_SESSION['ingo']['backend']['hordeauth'] === 'full')) ?
-                Auth::getAuth() :
-                Auth::getBareAuth();
+                Horde_Auth::getAuth() :
+                Horde_Auth::getBareAuth();
         } else {
             list(, $user) = explode(':', $_SESSION['ingo']['current_share'], 2);
         }
@@ -286,15 +286,15 @@ class Ingo
         // Set authentication parameters.
         if (!empty($_SESSION['ingo']['backend']['hordeauth'])) {
             $params['username'] = ($_SESSION['ingo']['backend']['hordeauth'] === 'full')
-                        ? Auth::getAuth() : Auth::getBareAuth();
-            $params['password'] = Auth::getCredential('password');
+                        ? Horde_Auth::getAuth() : Horde_Auth::getBareAuth();
+            $params['password'] = Horde_Auth::getCredential('password');
         } elseif (isset($_SESSION['ingo']['backend']['params']['username']) &&
                   isset($_SESSION['ingo']['backend']['params']['password'])) {
             $params['username'] = $_SESSION['ingo']['backend']['params']['username'];
             $params['password'] = $_SESSION['ingo']['backend']['params']['password'];
         } else {
-            $params['username'] = Auth::getBareAuth();
-            $params['password'] = Auth::getCredential('password');
+            $params['username'] = Horde_Auth::getBareAuth();
+            $params['password'] = Horde_Auth::getCredential('password');
         }
 
         return Ingo_Driver::factory($_SESSION['ingo']['backend']['driver'], $params);
@@ -313,7 +313,7 @@ class Ingo
     static public function listRulesets($owneronly = false,
                                         $permission = PERMS_SHOW)
     {
-        $rulesets = $GLOBALS['ingo_shares']->listShares(Auth::getAuth(), $permission, $owneronly ? Auth::getAuth() : null);
+        $rulesets = $GLOBALS['ingo_shares']->listShares(Horde_Auth::getAuth(), $permission, $owneronly ? Horde_Auth::getAuth() : null);
         if (is_a($rulesets, 'PEAR_Error')) {
             Horde::logMessage($rulesets, __FILE__, __LINE__, PEAR_LOG_ERR);
             return array();
@@ -338,7 +338,7 @@ class Ingo
             }
             static $all_perms;
             if (!isset($all_perms)) {
-                $all_perms = $GLOBALS['ingo_shares']->getPermissions($_SESSION['ingo']['current_share'], Auth::getAuth());
+                $all_perms = $GLOBALS['ingo_shares']->getPermissions($_SESSION['ingo']['current_share'], Horde_Auth::getAuth());
             }
             return $all_perms & $mask;
         }
@@ -407,7 +407,7 @@ class Ingo
             $menu->add(Horde::applicationUrl('script.php'), _("_Script"), 'script.png');
         }
         if (!empty($GLOBALS['ingo_shares']) && empty($GLOBALS['conf']['share']['no_sharing'])) {
-            $menu->add('#', _("_Permissions"), 'perms.png', $GLOBALS['registry']->getImageDir('horde'), '', 'popup(\'' . Horde_Util::addParameter(Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/shares/edit.php', true), array('app' => 'ingo', 'share' => htmlspecialchars($_SESSION['ingo']['backend']['id'] . ':' . Auth::getAuth())), null, false) . '\');return false;');
+            $menu->add('#', _("_Permissions"), 'perms.png', $GLOBALS['registry']->getImageDir('horde'), '', 'popup(\'' . Horde_Util::addParameter(Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/shares/edit.php', true), array('app' => 'ingo', 'share' => htmlspecialchars($_SESSION['ingo']['backend']['id'] . ':' . Horde_Auth::getAuth())), null, false) . '\');return false;');
         }
 
         if ($returnType == 'object') {
index f4f707e..ca29971 100644 (file)
@@ -212,7 +212,7 @@ function _ingo_setVacation($info)
         /* Remove empty lines. */
         $info['addresses'] = preg_replace('/\n+/', "\n", $info['addresses']);
         if (empty($addresses)) {
-            $info['addresses'] = Auth::getAuth();
+            $info['addresses'] = Horde_Auth::getAuth();
         }
     }
 
index b2d9d62..5e71221 100644 (file)
@@ -37,7 +37,7 @@ $notification = &Horde_Notification::singleton();
 $notification->attach('status');
 
 // Redirect the user to the Horde login page if they haven't authenticated.
-if (!Auth::isAuthenticated() && !defined('AUTH_HANDLER')) {
+if (!Horde_Auth::isAuthenticated() && !defined('AUTH_HANDLER')) {
     Horde::authenticationFailureRedirect();
 }
 
@@ -60,13 +60,13 @@ if ($driver->supportShares()) {
     $GLOBALS['all_rulesets'] = Ingo::listRulesets();
 
     /* If personal share doesn't exist then create it. */
-    $signature = $_SESSION['ingo']['backend']['id'] . ':' . Auth::getAuth();
+    $signature = $_SESSION['ingo']['backend']['id'] . ':' . Horde_Auth::getAuth();
     if (!$GLOBALS['ingo_shares']->exists($signature)) {
         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['ingo_shares']->newShare($signature);
         $share->set('name', $name);
@@ -78,7 +78,7 @@ if ($driver->supportShares()) {
     $_SESSION['ingo']['current_share'] = Horde_Util::getFormData('ruleset', @$_SESSION['ingo']['current_share']);
     if (empty($_SESSION['ingo']['current_share']) ||
         empty($GLOBALS['all_rulesets'][$_SESSION['ingo']['current_share']]) ||
-        !$GLOBALS['all_rulesets'][$_SESSION['ingo']['current_share']]->hasPermission(Auth::getAuth(), PERMS_READ)) {
+        !$GLOBALS['all_rulesets'][$_SESSION['ingo']['current_share']]->hasPermission(Horde_Auth::getAuth(), PERMS_READ)) {
         $_SESSION['ingo']['current_share'] = $signature;
     }
 } else {
index 1969347..a52cf0d 100755 (executable)
@@ -79,7 +79,7 @@ Horde_Cli::init();
 require_once dirname(dirname(__FILE__)) . '/lib/base.php';
 
 // Initialize authentication manager.
-$auth = &Auth::singleton($conf['auth']['driver']);
+$auth = Horde_Auth::singleton($conf['auth']['driver']);
 
 // Initialize storage backend.
 $rules_storage = Ingo_Storage::factory();
index 0569249..b762c61 100755 (executable)
@@ -37,9 +37,6 @@ $cli = &Horde_Cli::singleton();
 /* Initialize the needed libraries. */
 require_once dirname(dirname(dirname(__FILE__))) . '/lib/base.php';
 
-/* Initialize authentication backend. */
-$auth = &Auth::singleton($conf['auth']['driver']);
-
 /* Initialize storage backends. */
 if ($conf['storage']['driver'] != 'sql') {
     $cli->fatal('You need to configure an SQL storage backend in Ingo\'s configuration', __FILE__, __LINE__);
@@ -69,7 +66,7 @@ while (!feof(STDIN)) {
 
     echo 'Converting filters for user: ' . $user;
 
-    $auth->setAuth($user, array());
+    Horde_Auth::setAuth($user, array());
     $_SESSION['ingo']['current_share'] = ':' . $user;
 
     foreach ($rules as $rule) {
index c7a7ce6..0b04dcd 100644 (file)
@@ -120,7 +120,7 @@ if (!$vacation->getVacationAddresses()) {
     /* Remove empty lines. */
     $addresses = preg_replace('/\n+/', "\n", $addresses);
     if (empty($addresses)) {
-        $addresses = Auth::getAuth();
+        $addresses = Horde_Auth::getAuth();
     }
     $vacation->setVacationAddresses($addresses);
 }
index 63183a2..4c3f90e 100644 (file)
@@ -78,7 +78,7 @@ class Jeta_Applet_jta extends Jeta_Applet
         $params = array(
             'config' => 'jta.conf',
             'plugins' => 'Status,Socket,SSH,Terminal',
-            'SSH.user' => (empty($GLOBALS['conf']['user']['hordeauth']) || ($GLOBALS['conf']['user']['hordeauth'] === 'full')) ? Auth::getAuth() : Auth::getBareAuth()
+            'SSH.user' => (empty($GLOBALS['conf']['user']['hordeauth']) || ($GLOBALS['conf']['user']['hordeauth'] === 'full')) ? Horde_Auth::getAuth() : Horde_Auth::getBareAuth()
         );
 
         foreach ($this->_jtaParams as $key => $val) {
index 77418fd..0a78783 100644 (file)
@@ -76,7 +76,7 @@ class Jeta_Applet_sshtools extends Jeta_Applet
     public function generateAppletCode()
     {
         $params = array(
-            'sshapps.connection.userName' => (empty($GLOBALS['conf']['user']['hordeauth']) || ($GLOBALS['conf']['user']['hordeauth'] === 'full')) ? Auth::getAuth() : Auth::getBareAuth()
+            'sshapps.connection.userName' => (empty($GLOBALS['conf']['user']['hordeauth']) || ($GLOBALS['conf']['user']['hordeauth'] === 'full')) ? Horde_Auth::getAuth() : Horde_Auth::getBareAuth()
         );
 
         foreach ($this->_sshtoolsParams as $key => $val) {
index 5ddd34e..ebc0b59 100755 (executable)
@@ -23,10 +23,10 @@ require(KASTALIA_BASE . '/config/conf.php');
 
 
 
-echo Auth::getAuth();
+echo Horde_Auth::getAuth();
 
-echo $registry->hasPermission(Auth::getAuth(), PERMS_EDIT);
-if($registry->hasPermission(Auth::getAuth(), PERMS_EDIT)) {
+echo $registry->hasPermission(Horde_Auth::getAuth(), PERMS_EDIT);
+if($registry->hasPermission(Horde_Auth::getAuth(), PERMS_EDIT)) {
    echo "TASTA";
    exit(0);
 }
index 5c59086..d01f712 100644 (file)
@@ -35,7 +35,7 @@ class Koward {
         $this->registry     = &$registry;
         $this->notification = &$notification;
 
-        $this->auth = &Auth::singleton($conf['auth']['driver']);
+        $this->auth = Horde_Auth::singleton($conf['auth']['driver']);
 
         $this->conf       = Horde::loadConfiguration('conf.php', 'conf');
         $this->objects    = Horde::loadConfiguration('objects.php', 'objects');
@@ -105,8 +105,8 @@ class Koward {
     public function getServer()
     {
         if (!isset(self::$server)) {
-            self::$server = Horde_Kolab_Server::singleton(array('user' => Auth::getAuth(),
-                                                                'pass' => Auth::getCredential('password')));
+            self::$server = Horde_Kolab_Server::singleton(array('user' => Horde_Auth::getAuth(),
+                                                                'pass' => Horde_Auth::getCredential('password')));
         }
 
         return self::$server;
index c886491..3239698 100644 (file)
@@ -80,7 +80,7 @@ class Koward_Cli extends Horde_Controller_Request_Base
         /* Authenticate the user if possible. */
         if ($this->_argv->user) {
             require_once 'Horde/Auth.php';
-            $auth = &Auth::singleton($conf['auth']['driver']);
+            $auth = Horde_Auth::singleton($conf['auth']['driver']);
             if (!$auth->authenticate($this->_argv->user,
                                      array('password' => $this->_argv->pass))) {
                 throw new InvalidArgumentException('Failed to log in!');
index 751def8..4fb4e3e 100644 (file)
@@ -37,7 +37,7 @@ class Koward_Controller_Application extends Horde_Controller_Base
 
         $this->welcome = isset($this->koward->conf['koward']['greeting']) ? $this->koward->conf['koward']['greeting'] : _("Welcome.");
 
-        $this->current_user = Auth::getAuth();
+        $this->current_user = Horde_Auth::getAuth();
 
         $session = Horde_Kolab_Session::singleton();
         if (!empty($session->user_uid)) {
@@ -78,7 +78,7 @@ class Koward_Controller_Application extends Horde_Controller_Base
             $menu->add($this->urlFor(array('controller' => 'check', 'action' => 'show')),
                    _("_Test"), 'problem.png', $registry->getImageDir('horde'));
         }
-        if (Auth::getAuth()) {
+        if (Horde_Auth::getAuth()) {
             $menu->add($this->urlFor(array('controller' => 'index', 'action' => 'logout')),
                        _("_Logout"), 'logout.png', $registry->getImageDir('horde'));
         }
@@ -98,9 +98,9 @@ class Koward_Controller_Application extends Horde_Controller_Base
 
         if (!$this->koward->hasAccess($id, $permission)) {
             $this->koward->notification->push(_("Access denied."), 'horde.error');
-            Horde::logMessage(sprintf('User %s does not have access to action %s!', Auth::getAuth(), $id),
+            Horde::logMessage(sprintf('User %s does not have access to action %s!', Horde_Auth::getAuth(), $id),
                               __FILE__, __LINE__, PEAR_LOG_NOTICE);
-            if (Auth::getAuth()) {
+            if (Horde_Auth::getAuth()) {
                 $url = $this->urlFor(array('controller' => 'index', 'action' => 'index'));
             } else {
                 $url = $this->urlFor(array('controller' => 'index', 'action' => 'login'));
index a488f3f..f48058b 100644 (file)
@@ -17,7 +17,7 @@ class IndexController extends Koward_Controller_Application
 
     public function login()
     {
-        $auth = Auth::getAuth();
+        $auth = Horde_Auth::getAuth();
         if (!empty($auth)) {
             header('Location: ' . $this->urlFor(array('controller' => 'index', 'action' => 'index')));
             exit;
@@ -35,7 +35,7 @@ class IndexController extends Koward_Controller_Application
             if ($this->koward->auth->authenticate(Horde_Util::getPost('horde_user'),
                                                   array('password' => Horde_Util::getPost('horde_pass')))) {
                 $entry = sprintf('Login success for %s [%s] to Horde',
-                                 Auth::getAuth(), $_SERVER['REMOTE_ADDR']);
+                                 Horde_Auth::getAuth(), $_SERVER['REMOTE_ADDR']);
                 Horde::logMessage($entry, __FILE__, __LINE__, PEAR_LOG_NOTICE);
 
                 $type = $this->koward->getType();
@@ -64,9 +64,9 @@ class IndexController extends Koward_Controller_Application
     public function logout()
     {
         $entry = sprintf('User %s [%s] logged out of Horde',
-                         Auth::getAuth(), $_SERVER['REMOTE_ADDR']);
+                         Horde_Auth::getAuth(), $_SERVER['REMOTE_ADDR']);
         Horde::logMessage($entry, __FILE__, __LINE__, PEAR_LOG_NOTICE);
-        Auth::clearAuth();
+        Horde_Auth::clearAuth();
         @session_destroy();
 
         header('Location: ' . $this->urlFor(array('controller' => 'index', 'action' => 'login')));
index 25de35e..d2fbe67 100644 (file)
@@ -91,7 +91,7 @@ $prefGroups['authentication'] = array(
     'members' => array('credentialsui'),
 );
 
-$auth = &Auth::singleton($GLOBALS['conf']['auth']['driver']);
+$auth = Horde_Auth::singleton($GLOBALS['conf']['auth']['driver']);
 if (is_a($auth, 'Auth') && $auth->hasCapability('update')) {
     $prefGroups['forgotpass'] = array(
         'column' => _("Your Information"),
index 8a775da..1baf406 100644 (file)
@@ -14,16 +14,16 @@ if (!Horde_Util::getFormData('cancel')) {
         list($calendar_id, $user) = explode(':', $targetcalendar, 2);
     } else {
         $calendar_id = $targetcalendar;
-        $user = Auth::getAuth();
+        $user = Horde_Auth::getAuth();
     }
     $share = &$kronolith_shares->getShare($calendar_id);
     if (is_a($share, 'PEAR_Error')) {
         $notification->push(sprintf(_("There was an error accessing the calendar: %s"), $share->getMessage()), 'horde.error');
-    } elseif ($user != Auth::getAuth() &&
-              !$share->hasPermission(Auth::getAuth(), PERMS_DELEGATE, Auth::getAuth())) {
+    } elseif ($user != Horde_Auth::getAuth() &&
+              !$share->hasPermission(Horde_Auth::getAuth(), PERMS_DELEGATE, Horde_Auth::getAuth())) {
         $notification->push(sprintf(_("You do not have permission to delegate events to %s."), Kronolith::getUserName($user)), 'horde.warning');
-    } elseif ($user == Auth::getAuth() &&
-              !$share->hasPermission(Auth::getAuth(), PERMS_EDIT, Auth::getAuth())) {
+    } elseif ($user == Horde_Auth::getAuth() &&
+              !$share->hasPermission(Horde_Auth::getAuth(), PERMS_EDIT, Horde_Auth::getAuth())) {
         $notification->push(sprintf(_("You do not have permission to add events to %s."), $share->get('name')), 'horde.warning');
     } elseif (Kronolith::hasPermission('max_events') === true ||
               Kronolith::hasPermission('max_events') > Kronolith::countEvents()) {
index 5df5c78..f7a9d4f 100644 (file)
@@ -305,7 +305,7 @@ try {
         $tagger = new Kronolith_Tagger();
         $result = new stdClass;
         $result->tags = array();
-        $tags = $tagger->getCloud(Auth::getAuth(), 10);
+        $tags = $tagger->getCloud(Horde_Auth::getAuth(), 10);
         foreach ($tags as $tag) {
             $result->tags[] = $tag['tag_name'];
         }
index c40cacc..12c9054 100644 (file)
@@ -205,11 +205,11 @@ if (!is_array($cal)) {
 if (!$cal) {
     $cal = $prefs->getValue('default_share');
     if (!$cal) {
-        $cal = Auth::getAuth();
+        $cal = Horde_Auth::getAuth();
     }
     $cal = array($cal);
 }
-$vfb = Kronolith_FreeBusy::generate($cal, null, null, true, Auth::getAuth());
+$vfb = Kronolith_FreeBusy::generate($cal, null, null, true, Horde_Auth::getAuth());
 if (!is_a($vfb, 'PEAR_Error')) {
     $attendee_view->addRequiredMember($vfb);
 } else {
index e315cc7..e3a9dfb 100644 (file)
@@ -16,7 +16,7 @@ require_once KRONOLITH_BASE . '/lib/Forms/CreateCalendar.php';
 
 // Exit if this isn't an authenticated user or if the user can't
 // create new calendars (default share is locked).
-if (!Auth::getAuth() || $prefs->isLocked('default_share')) {
+if (!Horde_Auth::getAuth() || $prefs->isLocked('default_share')) {
     header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true));
     exit;
 }
index f2d4ec0..19aba28 100644 (file)
@@ -15,14 +15,14 @@ require_once KRONOLITH_BASE . '/lib/base.php';
 require_once KRONOLITH_BASE . '/lib/Forms/DeleteCalendar.php';
 
 // Exit if this isn't an authenticated user.
-if (!Auth::getAuth()) {
+if (!Horde_Auth::getAuth()) {
     header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true));
     exit;
 }
 
 $vars = Horde_Variables::getDefaultVariables();
 $calendar_id = $vars->get('c');
-if ($calendar_id == Auth::getAuth()) {
+if ($calendar_id == Horde_Auth::getAuth()) {
     $notification->push(_("This calendar cannot be deleted."), 'horde.warning');
     header('Location: ' . Horde::applicationUrl('calendars/', true));
     exit;
@@ -33,7 +33,7 @@ if (is_a($calendar, 'PEAR_Error')) {
     $notification->push($calendar, 'horde.error');
     header('Location: ' . Horde::applicationUrl('calendars/', true));
     exit;
-} elseif ($calendar->get('owner') != Auth::getAuth()) {
+} elseif ($calendar->get('owner') != Horde_Auth::getAuth()) {
     $notification->push(_("You are not allowed to delete this calendar."), 'horde.error');
     header('Location: ' . Horde::applicationUrl('calendars/', true));
     exit;
index af2a43b..00c7ccd 100644 (file)
@@ -15,7 +15,7 @@ require_once KRONOLITH_BASE . '/lib/base.php';
 require_once KRONOLITH_BASE . '/lib/Forms/EditCalendar.php';
 
 // Exit if this isn't an authenticated user.
-if (!Auth::getAuth()) {
+if (!Horde_Auth::getAuth()) {
     header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true));
     exit;
 }
@@ -26,7 +26,7 @@ if (is_a($calendar, 'PEAR_Error')) {
     $notification->push($calendar, 'horde.error');
     header('Location: ' . Horde::applicationUrl('calendars/', true));
     exit;
-} elseif ($calendar->get('owner') != Auth::getAuth()) {
+} elseif ($calendar->get('owner') != Horde_Auth::getAuth()) {
     $notification->push(_("You are not allowed to change this calendar."), 'horde.error');
     header('Location: ' . Horde::applicationUrl('calendars/', true));
     exit;
index 05dd88f..b85aae0 100644 (file)
@@ -31,7 +31,7 @@ if (@include_once 'HTTP/WebDAV/Server.php') {
 }
 
 // Exit if this isn't an authenticated user.
-if (!Auth::getAuth()) {
+if (!Horde_Auth::getAuth()) {
     header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php'));
     exit;
 }
index 15f1262..2583cb0 100644 (file)
@@ -12,7 +12,7 @@
 require_once KRONOLITH_BASE . '/lib/base.php';
 
 // Exit if this isn't an authenticated user.
-if (!Auth::getAuth()) {
+if (!Horde_Auth::getAuth()) {
     exit;
 }
 
index 8cf5069..622b6c8 100644 (file)
@@ -16,7 +16,7 @@ require_once KRONOLITH_BASE . '/lib/Forms/EditRemoteCalendar.php';
 
 // Exit if this isn't an authenticated user or if the user can't
 // subscribe to remote calendars (remote_cals is locked).
-if (!Auth::getAuth() || $prefs->isLocked('remote_cals')) {
+if (!Horde_Auth::getAuth() || $prefs->isLocked('remote_cals')) {
     header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true));
     exit;
 }
@@ -53,7 +53,7 @@ if ($form->validate($vars)) {
     exit;
 }
 
-$key = Auth::getCredential('password');
+$key = Horde_Auth::getCredential('password');
 $username = $calendar['user'];
 $password = $calendar['password'];
 if ($key) {
index 7fa12e9..306cacd 100644 (file)
@@ -16,7 +16,7 @@ require_once KRONOLITH_BASE . '/lib/Forms/SubscribeRemoteCalendar.php';
 
 // Exit if this isn't an authenticated user or if the user can't
 // subscribe to remote calendars (remote_cals is locked).
-if (!Auth::getAuth() || $prefs->isLocked('remote_cals')) {
+if (!Horde_Auth::getAuth() || $prefs->isLocked('remote_cals')) {
     header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true));
     exit;
 }
index d470c86..f5d8f79 100644 (file)
@@ -16,7 +16,7 @@ require_once KRONOLITH_BASE . '/lib/Forms/UnsubscribeRemoteCalendar.php';
 
 // Exit if this isn't an authenticated user or if the user can't
 // subscribe to remote calendars (remote_cals is locked).
-if (!Auth::getAuth() || $prefs->isLocked('remote_cals')) {
+if (!Horde_Auth::getAuth() || $prefs->isLocked('remote_cals')) {
     header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true));
     exit;
 }
index f565360..56f8a14 100644 (file)
@@ -233,7 +233,7 @@ $_prefs['shareselect'] = array('type' => 'special');
 // default calendar
 // Set locked to true if you don't want users to have multiple calendars.
 $_prefs['default_share'] = array(
-    'value' => Auth::getAuth() ? Auth::getAuth() : 0,
+    'value' => Horde_Auth::getAuth() ? Horde_Auth::getAuth() : 0,
     'locked' => false,
     'shared' => false,
     'type' => 'implicit',
index ea6d7f5..ff739f3 100644 (file)
@@ -8,7 +8,7 @@
 
 require_once dirname(__FILE__) . '/lib/base.php';
 
-if (!Auth::getAuth()) {
+if (!Horde_Auth::getAuth()) {
     Horde_Util::closeWindowJS();
     exit;
 }
index 83c6afa..05ca83c 100644 (file)
@@ -193,7 +193,7 @@ if (!$error) {
             if (is_a($share, 'PEAR_Error')) {
                 $notification->push(_("You have specified an invalid calendar."), 'horde.error');
                 $next_step = $data->cleanup();
-            } elseif (!$share->hasPermission(Auth::getAuth(), PERMS_EDIT)) {
+            } elseif (!$share->hasPermission(Horde_Auth::getAuth(), PERMS_EDIT)) {
                 $notification->push(_("You do not have permission to add events to the selected calendar."), 'horde.error');
                 $next_step = $data->cleanup();
             } else {
index ff2e0f0..ff98fff 100644 (file)
@@ -22,7 +22,7 @@ if ($eventID = Horde_Util::getFormData('eventID')) {
         exit;
     }
     $share = &$kronolith_shares->getShare($event->getCalendar());
-    if (!$share->hasPermission(Auth::getAuth(), PERMS_DELETE, $event->getCreatorID())) {
+    if (!$share->hasPermission(Horde_Auth::getAuth(), PERMS_DELETE, $event->getCreatorID())) {
         $notification->push(_("You do not have permission to delete this event."), 'horde.warning');
     } else {
         $notification_type = Kronolith::ITIP_CANCEL;
index bd156b6..e2b4b13 100644 (file)
@@ -61,7 +61,7 @@ if ($exception = Horde_Util::getFormData('del_exception')) {
         list($target, $user) = explode(':', $targetcalendar, 2);
     } else {
         $target = $targetcalendar;
-        $user = Auth::getAuth();
+        $user = Horde_Auth::getAuth();
     }
     $share = &$kronolith_shares->getShare($target);
 
@@ -134,11 +134,11 @@ if ($exception = Horde_Util::getFormData('del_exception')) {
                 $sourceShare = &$kronolith_shares->getShare($source);
                 if (!is_a($share, 'PEAR_Error') &&
                     !is_a($sourceShare, 'PEAR_Error') &&
-                    $sourceShare->hasPermission(Auth::getAuth(), PERMS_DELETE) &&
-                    (($user == Auth::getAuth() &&
-                      $share->hasPermission(Auth::getAuth(), PERMS_EDIT)) ||
-                     ($user != Auth::getAuth() &&
-                      $share->hasPermission(Auth::getAuth(), PERMS_DELEGATE)))) {
+                    $sourceShare->hasPermission(Horde_Auth::getAuth(), PERMS_DELETE) &&
+                    (($user == Horde_Auth::getAuth() &&
+                      $share->hasPermission(Horde_Auth::getAuth(), PERMS_EDIT)) ||
+                     ($user != Horde_Auth::getAuth() &&
+                      $share->hasPermission(Horde_Auth::getAuth(), PERMS_DELEGATE)))) {
                     $kronolith_driver->open($source);
                     $res = $kronolith_driver->move(Horde_Util::getFormData('eventID'), $target);
                     if (is_a($res, 'PEAR_Error')) {
@@ -155,13 +155,13 @@ if ($exception = Horde_Util::getFormData('del_exception')) {
 
         if ($event && !is_a($event, 'PEAR_Error')) {
             if (isset($sourceShare) && !is_a($sourceShare, 'PEAR_Error')
-                && !$sourceShare->hasPermission(Auth::getAuth(), PERMS_DELETE)) {
+                && !$sourceShare->hasPermission(Horde_Auth::getAuth(), PERMS_DELETE)) {
                 $notification->push(_("You do not have permission to move this event."), 'horde.warning');
-            } elseif ($user != Auth::getAuth() &&
-                      !$share->hasPermission(Auth::getAuth(), PERMS_DELEGATE, $event->getCreatorID())) {
+            } elseif ($user != Horde_Auth::getAuth() &&
+                      !$share->hasPermission(Horde_Auth::getAuth(), PERMS_DELEGATE, $event->getCreatorID())) {
                 $notification->push(sprintf(_("You do not have permission to delegate events to %s."), Kronolith::getUserName($user)), 'horde.warning');
-            } elseif ($user == Auth::getAuth() &&
-                      !$share->hasPermission(Auth::getAuth(), PERMS_EDIT, $event->getCreatorID())) {
+            } elseif ($user == Horde_Auth::getAuth() &&
+                      !$share->hasPermission(Horde_Auth::getAuth(), PERMS_EDIT, $event->getCreatorID())) {
                 $notification->push(_("You do not have permission to edit this event."), 'horde.warning');
             } else {
                 $event->readForm();
index 85ea4a2..3718008 100644 (file)
@@ -32,7 +32,7 @@ case 'DeleteEvent':
 
 case 'EditEvent':
     if ($view->event->isPrivate() &&
-        $view->event->getCreatorId() != Auth::getAuth()) {
+        $view->event->getCreatorId() != Horde_Auth::getAuth()) {
         $url = Horde_Util::getFormData('url');
         if (empty($url)) {
             $url = Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true);
index d634bd7..dec9f52 100644 (file)
@@ -38,13 +38,13 @@ if (is_a($share, 'PEAR_Error')) {
                sprintf(_("The requested feed (%s) was not found on this server."),
                        htmlspecialchars($calendar)));
 }
-if (!$share->hasPermission(Auth::getAuth(), PERMS_READ)) {
-    if (Auth::getAuth()) {
+if (!$share->hasPermission(Horde_Auth::getAuth(), PERMS_READ)) {
+    if (Horde_Auth::getAuth()) {
         _no_access(403, 'Forbidden',
                    sprintf(_("Permission denied for the requested feed (%s)."),
                            htmlspecialchars($calendar)));
     } else {
-        $auth = &Auth::singleton($conf['auth']['driver']);
+        $auth = Horde_Auth::singleton($conf['auth']['driver']);
         if (isset($_SERVER['PHP_AUTH_USER'])) {
             $user = $_SERVER['PHP_AUTH_USER'];
             $pass = $_SERVER['PHP_AUTH_PW'];
index 6ba6276..284582f 100644 (file)
@@ -37,7 +37,7 @@ if ($help_link) {
 }
 $today = Kronolith::currentDate();
 $remote_calendars = @unserialize($prefs->getValue('remote_cals'));
-$current_user = Auth::getAuth();
+$current_user = Horde_Auth::getAuth();
 $my_calendars = array();
 $shared_calendars = array();
 foreach (Kronolith::listCalendars() as $id => $cal) {
index 90024e1..055c835 100644 (file)
@@ -78,7 +78,7 @@ class Horde_Block_Kronolith_month extends Horde_Block {
             if (is_a($this->_share, 'PEAR_Error')) {
                 return $this->_share;
             }
-            if (!$this->_share->hasPermission(Auth::getAuth(), PERMS_SHOW)) {
+            if (!$this->_share->hasPermission(Horde_Auth::getAuth(), PERMS_SHOW)) {
                 return _("Permission Denied");
             }
         }
index 2d4055a..a899b1e 100644 (file)
@@ -79,7 +79,7 @@ class Horde_Block_Kronolith_monthlist extends Horde_Block {
 
         if (isset($this->_params['calendar']) && $this->_params['calendar'] != '__all') {
             $calendar = $GLOBALS['kronolith_shares']->getShare($this->_params['calendar']);
-            if (!is_a($calendar, 'PEAR_Error') && !$calendar->hasPermission(Auth::getAuth(), PERMS_SHOW)) {
+            if (!is_a($calendar, 'PEAR_Error') && !$calendar->hasPermission(Horde_Auth::getAuth(), PERMS_SHOW)) {
                 return _("Permission Denied");
             }
             $all_events = Kronolith::listEvents($startDate, $endDate, array($this->_params['calendar']), true, false, false);
index 62ab312..5479c0a 100644 (file)
@@ -75,7 +75,7 @@ class Horde_Block_Kronolith_prevmonthlist extends Horde_Block {
 
         if (isset($this->_params['calendar']) && $this->_params['calendar'] != '__all') {
             $calendar = $GLOBALS['kronolith_shares']->getShare($this->_params['calendar']);
-            if (!is_a($calendar, 'PEAR_Error') && !$calendar->hasPermission(Auth::getAuth(), PERMS_SHOW)) {
+            if (!is_a($calendar, 'PEAR_Error') && !$calendar->hasPermission(Horde_Auth::getAuth(), PERMS_SHOW)) {
                 return _("Permission Denied");
             }
             $all_events = Kronolith::listEvents($startDate, $endDate, array($this->_params['calendar']), true, false, false);
index 0642ea7..607947c 100644 (file)
@@ -93,7 +93,7 @@ class Horde_Block_Kronolith_summary extends Horde_Block {
             $this->_params['calendar'] != '__all') {
 
             $calendar = $GLOBALS['kronolith_shares']->getShare($this->_params['calendar']);
-            if (!is_a($calendar, 'PEAR_Error') && !$calendar->hasPermission(Auth::getAuth(), PERMS_SHOW)) {
+            if (!is_a($calendar, 'PEAR_Error') && !$calendar->hasPermission(Horde_Auth::getAuth(), PERMS_SHOW)) {
                 return _("Permission Denied");
             }
 
index 438a7d9..e83658f 100644 (file)
@@ -31,7 +31,7 @@ class Horde_Block_kronolith_tree_alarms extends Horde_Block {
         }
         foreach ($alarms as $calId => $calAlarms) {
             foreach ($calAlarms as $event) {
-                if ($horde_alarm && $horde_alarm->isSnoozed($event->getUID(), Auth::getAuth())) {
+                if ($horde_alarm && $horde_alarm->isSnoozed($event->getUID(), Horde_Auth::getAuth())) {
                     continue;
                 }
                 $alarmCount++;
index 73707f8..9f8440b 100644 (file)
@@ -211,7 +211,7 @@ class Kronolith_Driver_Ical extends Kronolith_Driver
 
         /* Log fetch at DEBUG level. */
         Horde::logMessage(sprintf('Retrieved remote calendar for %s: url = "%s"',
-                                  Auth::getAuth(), $url),
+                                  Horde_Auth::getAuth(), $url),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
         $data = $http->getResponseBody();
index b5c0fcb..aa92bb4 100644 (file)
@@ -227,7 +227,7 @@ class Kronolith_Driver_Sql extends Kronolith_Driver
 
         /* Log the query at a DEBUG log level. */
         Horde::logMessage(sprintf('Kronolith_Driver_Sql::exists(): user = "%s"; query = "%s"',
-                                  Auth::getAuth(), $query),
+                                  Horde_Auth::getAuth(), $query),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
         $event = $this->_db->getRow($query, $values, DB_FETCHMODE_ASSOC);
@@ -345,7 +345,7 @@ class Kronolith_Driver_Sql extends Kronolith_Driver
 
         /* Log the query at a DEBUG log level. */
         Horde::logMessage(sprintf('Kronolith_Driver_Sql::_listEventsConditional(): user = "%s"; query = "%s"; values = "%s"',
-                                  Auth::getAuth(), $q, implode(',', $values)),
+                                  Horde_Auth::getAuth(), $q, implode(',', $values)),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
         /* Run the query. */
@@ -369,7 +369,7 @@ class Kronolith_Driver_Sql extends Kronolith_Driver
 
                 /* Log the query at a DEBUG log level. */
                 Horde::logMessage(sprintf('Kronolith_Driver_Sql::_listEventsConditional(): user = %s; query = "%s"; values = "%s"',
-                                          Auth::getAuth(), $query, implode(',', $values)),
+                                          Horde_Auth::getAuth(), $query, implode(',', $values)),
                                   __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
                 $result = $this->_write_db->query($query, $values);
@@ -407,7 +407,7 @@ class Kronolith_Driver_Sql extends Kronolith_Driver
                          $this->_params['table']);
         /* Log the query at a DEBUG log level. */
         Horde::logMessage(sprintf('Kronolith_Driver_Sql::_countEvents(): user = "%s"; query = "%s"; values = "%s"',
-                                  Auth::getAuth(), $query, $this->_calendar),
+                                  Horde_Auth::getAuth(), $query, $this->_calendar),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
         /* Run the query. */
@@ -436,7 +436,7 @@ class Kronolith_Driver_Sql extends Kronolith_Driver
 
         /* Log the query at a DEBUG log level. */
         Horde::logMessage(sprintf('Kronolith_Driver_Sql::getEvent(): user = "%s"; query = "%s"; values = "%s"',
-                                  Auth::getAuth(), $query, implode(',', $values)),
+                                  Horde_Auth::getAuth(), $query, implode(',', $values)),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
         $event = $this->_db->getRow($query, $values, DB_FETCHMODE_ASSOC);
@@ -486,7 +486,7 @@ class Kronolith_Driver_Sql extends Kronolith_Driver
 
         /* Log the query at a DEBUG log level. */
         Horde::logMessage(sprintf('Kronolith_Driver_Sql::getByUID(): user = "%s"; query = "%s"; values = "%s"',
-                                  Auth::getAuth(), $query, implode(',', $values)),
+                                  Horde_Auth::getAuth(), $query, implode(',', $values)),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
         $events = $this->_db->getAll($query, $values, DB_FETCHMODE_ASSOC);
@@ -560,7 +560,7 @@ class Kronolith_Driver_Sql extends Kronolith_Driver
 
             /* Log the query at a DEBUG log level. */
             Horde::logMessage(sprintf('Kronolith_Driver_Sql::saveEvent(): user = "%s"; query = "%s"; values = "%s"',
-                                      Auth::getAuth(), $query, implode(',', $values)),
+                                      Horde_Auth::getAuth(), $query, implode(',', $values)),
                               __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
             $result = $this->_write_db->query($query, $values);
@@ -620,7 +620,7 @@ class Kronolith_Driver_Sql extends Kronolith_Driver
 
             /* Log the query at a DEBUG log level. */
             Horde::logMessage(sprintf('Kronolith_Driver_Sql::saveEvent(): user = "%s"; query = "%s"; values = "%s"',
-                                Auth::getAuth(), $query, implode(',', $values)),
+                                Horde_Auth::getAuth(), $query, implode(',', $values)),
                                 __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
             $result = $this->_write_db->query($query, $values);
@@ -701,7 +701,7 @@ class Kronolith_Driver_Sql extends Kronolith_Driver
 
         /* Log the query at a DEBUG log level. */
         Horde::logMessage(sprintf('Kronolith_Driver_Sql::delete(): user = "%s"; query = "%s"; values = "%s"',
-                                  Auth::getAuth(), $query, implode(',', $values)),
+                                  Horde_Auth::getAuth(), $query, implode(',', $values)),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
         return $this->_write_db->query($query, $values);
@@ -729,7 +729,7 @@ class Kronolith_Driver_Sql extends Kronolith_Driver
 
         /* Log the query at a DEBUG log level. */
         Horde::logMessage(sprintf('Kronolith_Driver_Sql::deleteEvent(): user = "%s"; query = "%s"; values = "%s"',
-                                  Auth::getAuth(), $query, implode(',', $values)),
+                                  Horde_Auth::getAuth(), $query, implode(',', $values)),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
         $result = $this->_write_db->query($query, $values);
@@ -835,7 +835,7 @@ class Kronolith_Driver_Sql extends Kronolith_Driver
 
             /* Log the query at a DEBUG log level. */
             Horde::logMessage(sprintf('Kronolith_Driver_Sql::_initConn(): user = "%s"; query = "%s"',
-                                      Auth::getAuth(), $query),
+                                      Horde_Auth::getAuth(), $query),
                               __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
             $db->query($query);
@@ -846,7 +846,7 @@ class Kronolith_Driver_Sql extends Kronolith_Driver
 
             /* Log the query at a DEBUG log level. */
             Horde::logMessage(sprintf('Kronolith_Driver_Sql::_initConn(): user = "%s"; query = "%s"',
-                                      Auth::getAuth(), $query),
+                                      Horde_Auth::getAuth(), $query),
                               __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
             $db->query($query);
@@ -893,7 +893,7 @@ class Kronolith_Driver_Sql extends Kronolith_Driver
     {
         return PEAR::raiseError('to be refactored');
 
-        if (!Auth::isAdmin()) {
+        if (!Horde_Auth::isAdmin()) {
             return PEAR::raiseError(_("Permission Denied"));
         }
 
index f855d01..eca5654 100644 (file)
@@ -282,7 +282,7 @@ abstract class Kronolith_Event
     public function hasPermission($permission, $user = null)
     {
         if ($user === null) {
-            $user = Auth::getAuth();
+            $user = Horde_Auth::getAuth();
         }
 
         if ($this->remoteCal) {
@@ -387,7 +387,7 @@ abstract class Kronolith_Event
         $vEvent->setAttribute('ORGANIZER',
                               'mailto:' . Kronolith::getUserEmail($this->getCreatorId()),
                               array('CN' => $name));
-        if (!$this->isPrivate() || $this->getCreatorId() == Auth::getAuth()) {
+        if (!$this->isPrivate() || $this->getCreatorId() == Horde_Auth::getAuth()) {
             if (!empty($this->description)) {
                 $vEvent->setAttribute('DESCRIPTION', $v1 ? $this->description : Horde_String::convertCharset($this->description, NLS::getCharset(), 'utf-8'));
             }
@@ -814,7 +814,7 @@ abstract class Kronolith_Event
     {
         // See if it's a new event.
         if ($this->getId() === null) {
-            $this->setCreatorId(Auth::getAuth());
+            $this->setCreatorId(Horde_Auth::getAuth());
         }
         if (!empty($hash['title'])) {
             $this->setTitle($hash['title']);
@@ -944,7 +944,7 @@ abstract class Kronolith_Event
         }
 
         if (empty($user)) {
-            $user = Auth::getAuth();
+            $user = Horde_Auth::getAuth();
         }
         if (empty($prefs)) {
             $prefs = $GLOBALS['prefs'];
@@ -1297,7 +1297,7 @@ abstract class Kronolith_Event
      */
     public function getCreatorId()
     {
-        return !empty($this->creatorID) ? $this->creatorID : Auth::getAuth();
+        return !empty($this->creatorID) ? $this->creatorID : Horde_Auth::getAuth();
     }
 
     /**
@@ -1330,7 +1330,7 @@ abstract class Kronolith_Event
         }
 
         if ($user === null) {
-            $user = Auth::getAuth();
+            $user = Horde_Auth::getAuth();
         }
 
         $twentyFour = $GLOBALS['prefs']->getValue('twentyFour');
@@ -1338,10 +1338,10 @@ abstract class Kronolith_Event
         $end = $this->end->format($twentyFour ? 'G:i' : 'g:ia');
 
         // We explicitly allow admin access here for the alarms notifications.
-        if (!Auth::isAdmin() && $this->isPrivate() &&
+        if (!Horde_Auth::isAdmin() && $this->isPrivate() &&
             $this->getCreatorId() != $user) {
             return _("busy");
-        } elseif (Auth::isAdmin() || $this->hasPermission(PERMS_READ, $user)) {
+        } elseif (Horde_Auth::isAdmin() || $this->hasPermission(PERMS_READ, $user)) {
             return strlen($this->title) ? $this->title : _("[Unnamed event]");
         } else {
             return _("busy");
@@ -1562,7 +1562,7 @@ abstract class Kronolith_Event
         if (strpos($targetcalendar, ':')) {
             list(, $creator) = explode(':', $targetcalendar, 2);
         } else {
-            $creator = isset($this->eventID) ? $this->getCreatorId() : Auth::getAuth();
+            $creator = isset($this->eventID) ? $this->getCreatorId() : Horde_Auth::getAuth();
         }
         $this->setCreatorId($creator);
 
@@ -2199,7 +2199,7 @@ abstract class Kronolith_Event
 
             $edit = '';
             $delete = '';
-            if ((!$this->isPrivate() || $this->getCreatorId() == Auth::getAuth())
+            if ((!$this->isPrivate() || $this->getCreatorId() == Horde_Auth::getAuth())
                 && $this->hasPermission(PERMS_EDIT)) {
                 $editurl = $this->getEditUrl(array('datetime' => $datetime->strftime('%Y%m%d%H%M%S'),
                                                    'url' => $from_url));
@@ -2246,10 +2246,10 @@ abstract class Kronolith_Event
     public function getTooltip()
     {
         $tooltip = $this->getTimeRange()
-            . "\n" . sprintf(_("Owner: %s"), ($this->getCreatorId() == Auth::getAuth() ?
+            . "\n" . sprintf(_("Owner: %s"), ($this->getCreatorId() == Horde_Auth::getAuth() ?
                                               _("Me") : Kronolith::getUserName($this->getCreatorId())));
 
-        if (!$this->isPrivate() || $this->getCreatorId() == Auth::getAuth()) {
+        if (!$this->isPrivate() || $this->getCreatorId() == Horde_Auth::getAuth()) {
             if ($this->location) {
                 $tooltip .= "\n" . _("Location") . ': ' . $this->location;
             }
index 60fac0d..f64bd3c 100644 (file)
@@ -40,8 +40,8 @@ class Kronolith_Event_Kolab extends Kronolith_Event
         }
 
         if (isset($event['organizer']['smtp-address'])) {
-            if (Kronolith::isUserEmail(Auth::getAuth(), $event['organizer']['smtp-address'])) {
-                $this->creatorID = Auth::getAuth();
+            if (Kronolith::isUserEmail(Horde_Auth::getAuth(), $event['organizer']['smtp-address'])) {
+                $this->creatorID = Horde_Auth::getAuth();
             } else {
                 $this->creatorID = $event['organizer']['smtp-address'];
             }
index 1da8099..179ecae 100644 (file)
@@ -46,7 +46,7 @@ class Kronolith_DeleteCalendarForm extends Horde_Form {
             return false;
         }
 
-        if ($this->_calendar->get('owner') != Auth::getAuth()) {
+        if ($this->_calendar->get('owner') != Horde_Auth::getAuth()) {
             return PEAR::raiseError(_("Permission denied"));
         }
 
@@ -65,14 +65,14 @@ class Kronolith_DeleteCalendarForm extends Horde_Form {
         // Make sure we still own at least one calendar.
         if (count(Kronolith::listCalendars(true)) == 0) {
             // If the default share doesn't exist then create it.
-            if (!$GLOBALS['kronolith_shares']->exists(Auth::getAuth())) {
+            if (!$GLOBALS['kronolith_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());
                 }
-                $calendar = &$GLOBALS['kronolith_shares']->newShare(Auth::getAuth());
+                $calendar = &$GLOBALS['kronolith_shares']->newShare(Horde_Auth::getAuth());
                 if (is_a($calendar, 'PEAR_Error')) {
                     return;
                 }
index c46dc40..9ba2ab6 100644 (file)
@@ -47,7 +47,7 @@ class Kronolith_EditRemoteCalendarForm extends Horde_Form {
         }
 
         if (strlen($username) || strlen($password)) {
-            $key = Auth::getCredential('password');
+            $key = Horde_Auth::getCredential('password');
             if ($key) {
                 $username = base64_encode(Horde_Secret::write($key, $username));
                 $password = base64_encode(Horde_Secret::write($key, $password));
index debfbdd..cb7020e 100644 (file)
@@ -47,7 +47,7 @@ class Kronolith_SubscribeRemoteCalendarForm extends Horde_Form {
         }
 
         if (strlen($username) || strlen($password)) {
-            $key = Auth::getCredential('password');
+            $key = Horde_Auth::getCredential('password');
             if ($key) {
                 $username = base64_encode(Horde_Secret::write($key, $username));
                 $password = base64_encode(Horde_Secret::write($key, $password));
index ee22739..baa82fa 100644 (file)
@@ -53,10 +53,10 @@ class Kronolith_Imple_TagActions extends Kronolith_Imple
         // Check perms
         if ($args['type'] == 'calendar') {
             $cal = $GLOBALS['kronolith_shares']->getShare($args['resource']);
-            $perm = $cal->hasPermission(Auth::getAuth(), PERMS_EDIT);
+            $perm = $cal->hasPermission(Horde_Auth::getAuth(), PERMS_EDIT);
         } elseif($args['type'] == 'event') {
             $event = Kronolith::getDriver()->getByUID($args['resource']);
-            $perm = $event->hasPermission(PERMS_EDIT, Auth::getAuth());
+            $perm = $event->hasPermission(PERMS_EDIT, Horde_Auth::getAuth());
         }
 
         if ($perm) {
@@ -94,10 +94,10 @@ class Kronolith_Imple_TagActions extends Kronolith_Imple
 
         if ($type == 'calendar') {
             $cal = $GLOBALS['kronolith_shares']->getShare($id);
-            $hasEdit = $cal->hasPermission(Auth::getAuth(), PERMS_EDIT);
+            $hasEdit = $cal->hasPermission(Horde_Auth::getAuth(), PERMS_EDIT);
         } elseif ($type == 'event') {
             $event = Kronolith::getDriver()->getByUID($id);
-            $hasEdit = $event->hasPermission(PERMS_EDIT, Auth::getAuth());
+            $hasEdit = $event->hasPermission(PERMS_EDIT, Horde_Auth::getAuth());
         }
 
         foreach ($tags as $tag_id => $tag) {
index 4f6e36b..28203df 100644 (file)
@@ -163,9 +163,9 @@ class Kronolith
             'debug' => !empty($conf['js']['debug']),
         );
         foreach ($GLOBALS['all_calendars'] as $id => $calendar) {
-            $owner = $calendar->get('owner') == Auth::getAuth();
+            $owner = $calendar->get('owner') == Horde_Auth::getAuth();
             $code['conf']['calendars']['internal'][$id] = array(
-                'name' => ($owner ? '' : '[' . Auth::removeHook($calendar->get('owner')) . '] ')
+                'name' => ($owner ? '' : '[' . Horde_Auth::removeHook($calendar->get('owner')) . '] ')
                     . $calendar->get('name'),
                 'owner' => $owner,
                 'fg' => self::foregroundColor($calendar),
@@ -1105,23 +1105,23 @@ class Kronolith
 
         /* If an authenticated user has no calendars visible and their
          * personal calendar doesn't exist, create it. */
-        if (Auth::getAuth() &&
+        if (Horde_Auth::getAuth() &&
             !count($GLOBALS['display_calendars']) &&
-            !$GLOBALS['kronolith_shares']->exists(Auth::getAuth())) {
+            !$GLOBALS['kronolith_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['kronolith_shares']->newShare(Auth::getAuth());
+            $share = &$GLOBALS['kronolith_shares']->newShare(Horde_Auth::getAuth());
             $share->set('name', sprintf(_("%s's Calendar"), $name));
             $GLOBALS['kronolith_shares']->addShare($share);
             $GLOBALS['all_calendars'][Auth::getAuth()] = &$share;
 
             /* Make sure the personal calendar is displayed by default. */
-            if (!in_array(Auth::getAuth(), $GLOBALS['display_calendars'])) {
-                $GLOBALS['display_calendars'][] = Auth::getAuth();
+            if (!in_array(Horde_Auth::getAuth(), $GLOBALS['display_calendars'])) {
+                $GLOBALS['display_calendars'][] = Horde_Auth::getAuth();
             }
 
             /* Calendar auto-sharing with the user's groups */
@@ -1139,11 +1139,11 @@ class Kronolith
                     break;
                 }
                 $groups = &Group::singleton();
-                $group_list = $groups->getGroupMemberships(Auth::getAuth());
+                $group_list = $groups->getGroupMemberships(Horde_Auth::getAuth());
                 if (!is_a($group_list, 'PEAR_Error') && count($group_list)) {
                     $perm = $share->getPermission();
                     // Add the default perm, not added otherwise
-                    $perm->addUserPermission(Auth::getAuth(), PERMS_ALL, false);
+                    $perm->addUserPermission(Horde_Auth::getAuth(), PERMS_ALL, false);
                     foreach ($group_list as $group_id => $group_name) {
                         $perm->addGroupPermission($group_id, $perm_value, false);
                     }
@@ -1427,7 +1427,7 @@ class Kronolith
      */
     public static function listCalendars($owneronly = false, $permission = PERMS_SHOW)
     {
-        $calendars = $GLOBALS['kronolith_shares']->listShares(Auth::getAuth(), $permission, $owneronly ? Auth::getAuth() : null, 0, 0, 'name');
+        $calendars = $GLOBALS['kronolith_shares']->listShares(Horde_Auth::getAuth(), $permission, $owneronly ? Horde_Auth::getAuth() : null, 0, 0, 'name');
         if (is_a($calendars, 'PEAR_Error')) {
             Horde::logMessage($calendars, __FILE__, __LINE__, PEAR_LOG_ERR);
             return array();
@@ -1451,8 +1451,8 @@ class Kronolith
             $prefs->isLocked('default_share')) {
             return $default_share;
         } elseif (isset($GLOBALS['all_calendars'][Auth::getAuth()]) &&
-                  $GLOBALS['all_calendars'][Auth::getAuth()]->hasPermission(Auth::getAuth(), $permission)) {
-            return Auth::getAuth();
+                  $GLOBALS['all_calendars'][Auth::getAuth()]->hasPermission(Horde_Auth::getAuth(), $permission)) {
+            return Horde_Auth::getAuth();
         } elseif (count($calendars)) {
             return key($calendars);
         }
@@ -1558,8 +1558,8 @@ class Kronolith
         $mail_params = $conf['mailer']['params'];
         if ($mail_driver == 'smtp' && $mail_params['auth'] &&
             empty($mail_params['username'])) {
-            $mail_params['username'] = Auth::getAuth();
-            $mail_params['password'] = Auth::getCredential('password');
+            $mail_params['username'] = Horde_Auth::getAuth();
+            $mail_params['password'] = Horde_Auth::getCredential('password');
         }
 
         $share = &$GLOBALS['kronolith_shares']->getShare($event->getCalendar());
@@ -1747,8 +1747,8 @@ class Kronolith
         $mail_params = $conf['mailer']['params'];
         if ($mail_driver == 'smtp' && $mail_params['auth'] &&
             empty($mail_params['username'])) {
-            $mail_params['username'] = Auth::getAuth();
-            $mail_params['password'] = Auth::getCredential('password');
+            $mail_params['username'] = Horde_Auth::getAuth();
+            $mail_params['password'] = Horde_Auth::getCredential('password');
         }
 
         foreach ($addresses as $lang => $twentyFour) {
@@ -1830,7 +1830,7 @@ class Kronolith
                       'df' => $prefs->getValue('date_format'));
 
         if ($prefs->getValue('event_notification_exclude_self') &&
-            $user == Auth::getAuth()) {
+            $user == Horde_Auth::getAuth()) {
             return false;
         }
 
@@ -1943,7 +1943,7 @@ class Kronolith
                   'id' => 'tabEvent',
                   'onclick' => 'return ShowTab(\'Event\');'));
         if ((!$event->isPrivate() ||
-             $event->getCreatorId() == Auth::getAuth()) &&
+             $event->getCreatorId() == Horde_Auth::getAuth()) &&
             $event->hasPermission(PERMS_EDIT)) {
             $tabs->addTab(
                 $event->isRemote() ? _("Save As New") : _("_Edit"),
@@ -2045,7 +2045,7 @@ class Kronolith
             if ($cal['url'] == $calendar) {
                 $user = isset($cal['user']) ? $cal['user'] : '';
                 $password = isset($cal['password']) ? $cal['password'] : '';
-                $key = Auth::getCredential('password');
+                $key = Horde_Auth::getCredential('password');
                 if ($key && $user) {
                     $user = Horde_Secret::read($key, base64_decode($user));
                     $password = Horde_Secret::read($key, base64_decode($password));
@@ -2231,7 +2231,7 @@ class Kronolith
 
         /* Check here for guest calendars so that we don't get multiple
          * messages after redirects, etc. */
-        if (!Auth::getAuth() && !count($GLOBALS['all_calendars'])) {
+        if (!Horde_Auth::getAuth() && !count($GLOBALS['all_calendars'])) {
             $GLOBALS['notification']->push(_("No calendars are available to guests."));
         }
 
index 1b54202..2322ba5 100644 (file)
@@ -49,7 +49,7 @@ class Kronolith_LoginTasks_Task_PurgeEvents extends Horde_LoginTasks_Task
         $query->end = $del_time;
         $query->status = null;
         $query->calendars = array_keys($calendars);
-        $query->creatorID = Auth::getAuth();
+        $query->creatorID = Horde_Auth::getAuth();
 
         /* Perform the search */
         $events = Kronolith::search($query);
index f22bcc8..0170c83 100644 (file)
@@ -38,7 +38,7 @@ class Kronolith_Notification_Listener_Status extends Horde_Notification_Listener
     {
         /* Don't capture notification messages if we are logging out are
          * accessing the options pages. */
-        if (Auth::getAuth() && !strstr($_SERVER['PHP_SELF'], '/prefs.php')) {
+        if (Horde_Auth::getAuth() && !strstr($_SERVER['PHP_SELF'], '/prefs.php')) {
             $options['store'] = true;
         }
         parent::notify($messageStack, $options);
index 3958626..4f11323 100644 (file)
@@ -37,7 +37,7 @@ class Kronolith_Storage {
     function &factory($user = null, $driver = null, $params = null)
     {
         if (is_null($user)) {
-            $user = Auth::getAuth();
+            $user = Horde_Auth::getAuth();
         }
 
         if (is_null($driver)) {
@@ -96,7 +96,7 @@ class Kronolith_Storage {
         static $instances = array();
 
         if (is_null($user)) {
-            $user = Auth::getAuth();
+            $user = Horde_Auth::getAuth();
         }
 
         if (is_null($driver)) {
index a28c361..f9a118a 100644 (file)
@@ -58,7 +58,7 @@ class Kronolith_Storage_kolab extends Kronolith_Storage {
 
         require_once 'HTTP/Request.php';
         $http = new HTTP_Request($fb_url, $options);
-        $http->setBasicAuth(Auth::getAuth(), Auth::getCredential('password'));
+        $http->setBasicAuth(Horde_Auth::getAuth(), Horde_Auth::getCredential('password'));
         @$http->sendRequest();
         if ($http->getResponseCode() != 200) {
             return PEAR::raiseError(sprintf(_("Unable to retrieve free/busy information for %s"),
index 6ea632b..b56d6a2 100644 (file)
@@ -138,7 +138,7 @@ class Kronolith_Storage_sql extends Kronolith_Storage {
 
         /* Log the query at debug level. */
         Horde::logMessage(sprintf('SQL search by %s: query = "%s"',
-                                  Auth::getAuth(), $query),
+                                  Horde_Auth::getAuth(), $query),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
         /* Execute the query. */
@@ -179,7 +179,7 @@ class Kronolith_Storage_sql extends Kronolith_Storage {
 
         /* Log the query at debug level. */
         Horde::logMessage(sprintf('SQL insert by %s: query = "%s"',
-                                  Auth::getAuth(), $query),
+                                  Horde_Auth::getAuth(), $query),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
         /* Execute the query. */
index fcdedbe..af14dbc 100644 (file)
@@ -83,7 +83,7 @@ class Kronolith_Tagger
             $tags = self::$_tagger->splitTags($tags);
         }
 
-        self::$_tagger->tag(Auth::getAuth(),
+        self::$_tagger->tag(Horde_Auth::getAuth(),
                    array('object' => $localId,
                          'type' => self::$_type_ids[$content_type]),
                    $tags);
@@ -269,7 +269,7 @@ class Kronolith_Tagger
      */
     public function listTags($token)
     {
-        return self::$_tagger->getTags(array('q' => $token, 'userId' => Auth::getAuth()));
+        return self::$_tagger->getTags(array('q' => $token, 'userId' => Horde_Auth::getAuth()));
     }
 
     /**
index a4c98d3..ea48df6 100644 (file)
@@ -63,7 +63,7 @@ class Kronolith_View_EditEvent {
 
         $url = Horde_Util::getFormData('url');
         $perms = PERMS_EDIT;
-        if ($this->event->getCreatorId() == Auth::getAuth()) {
+        if ($this->event->getCreatorId() == Horde_Auth::getAuth()) {
             $perms |= PERMS_DELEGATE;
         }
         $calendars = Kronolith::listCalendars(false, $perms);
index eaad30f..49cf7cc 100644 (file)
@@ -41,7 +41,7 @@ class Kronolith_View_Event {
 
         $createdby = '';
         $modifiedby = '';
-        $userId = Auth::getAuth();
+        $userId = Horde_Auth::getAuth();
         if ($this->event->getUID()) {
             /* Get the event's history. */
             $history = &Horde_History::singleton();
@@ -75,7 +75,7 @@ class Kronolith_View_Event {
         $creatorId = $this->event->getCreatorId();
         $description = $this->event->getDescription();
         $location = $this->event->getLocation();
-        $private = $this->event->isPrivate() && $creatorId != Auth::getAuth();
+        $private = $this->event->isPrivate() && $creatorId != Horde_Auth::getAuth();
         $owner = Kronolith::getUserName($creatorId);
         $status = Kronolith::statusToString($this->event->getStatus());
         $attendees = $this->event->getAttendees();
index 14a4b97..87bd097 100644 (file)
@@ -175,7 +175,7 @@ function _kronolith_perms()
  */
 function _kronolith_removeUserData($user)
 {
-    if (!Auth::isAdmin() && $user != Auth::getAuth()) {
+    if (!Horde_Auth::isAdmin() && $user != Horde_Auth::getAuth()) {
         return PEAR::raiseError(_("You are not allowed to remove user data."));
     }
 
@@ -339,7 +339,7 @@ function _kronolith_browse($path = '', $properties = array())
         //
         // This request is for all calendars owned by the requested user
         //
-        $calendars = $GLOBALS['kronolith_shares']->listShares(Auth::getAuth(),
+        $calendars = $GLOBALS['kronolith_shares']->listShares(Horde_Auth::getAuth(),
                                                               PERMS_SHOW,
                                                               $parts[0]);
         $results = array();
@@ -358,7 +358,7 @@ function _kronolith_browse($path = '', $properties = array())
                 $results[$retpath . '.ics']['icon'] = $registry->getImageDir() . '/mime/icalendar.png';
             }
             if (in_array('browseable', $properties)) {
-                $results[$retpath]['browseable'] = $calendar->hasPermission(Auth::getAuth(), PERMS_READ);
+                $results[$retpath]['browseable'] = $calendar->hasPermission(Horde_Auth::getAuth(), PERMS_READ);
                 $results[$retpath . '.ics']['browseable'] = false;
             }
             if (in_array('contenttype', $properties)) {
@@ -1013,7 +1013,7 @@ function _kronolith_delete($uid)
     }
 
     $event = null;
-    if (Auth::isAdmin()) {
+    if (Horde_Auth::isAdmin()) {
         $event = $events[0];
     }
 
@@ -1021,7 +1021,7 @@ function _kronolith_delete($uid)
     if (empty($event)) {
         $ownerCalendars = Kronolith::listCalendars(true, PERMS_DELETE);
         foreach ($events as $ev) {
-            if (Auth::isAdmin() || isset($ownerCalendars[$ev->getCalendar()])) {
+            if (Horde_Auth::isAdmin() || isset($ownerCalendars[$ev->getCalendar()])) {
                 $event = $ev;
                 break;
             }
@@ -1072,7 +1072,7 @@ function _kronolith_replace($uid, $content, $contentType)
     }
 
     if (!$event->hasPermission(PERMS_EDIT) ||
-        ($event->isPrivate() && $event->getCreatorId() != Auth::getAuth())) {
+        ($event->isPrivate() && $event->getCreatorId() != Horde_Auth::getAuth())) {
         return PEAR::raiseError(_("Permission Denied"));
     }
 
@@ -1222,7 +1222,7 @@ function _kronolith_updateAttendee($response, $sender = null)
     }
 
     if (empty($event) ||
-        ($event->isPrivate() && $event->getCreatorId() != Auth::getAuth())) {
+        ($event->isPrivate() && $event->getCreatorId() != Horde_Auth::getAuth())) {
         return PEAR::raiseError(_("Permission Denied"));
     }
 
@@ -1313,8 +1313,8 @@ function _kronolith_listAlarms($time, $user = null)
     require_once dirname(__FILE__) . '/base.php';
     require_once 'Horde/Group.php';
 
-    $current_user = Auth::getAuth();
-    if ((empty($user) || $user != $current_user) && !Auth::isAdmin()) {
+    $current_user = Horde_Auth::getAuth();
+    if ((empty($user) || $user != $current_user) && !Horde_Auth::isAdmin()) {
         return PEAR::raiseError(_("Permission Denied"));
     }
 
index 049b163..8948018 100644 (file)
@@ -19,7 +19,7 @@ function handle_remote_cal_management($updated)
     $calUser = trim(Horde_Util::getFormData('remote_user'));
     $calPasswd = trim(Horde_Util::getFormData('remote_password'));
 
-    $key = Auth::getCredential('password');
+    $key = Horde_Auth::getCredential('password');
     if ($key) {
         $calUser = base64_encode(Secret::write($key, $calUser));
         $calPasswd = base64_encode(Secret::write($key, $calPasswd));
index 09af13f..6d04584 100644 (file)
@@ -14,7 +14,7 @@ require_once 'Horde/Group.php';
 
 $shares = &Horde_Share::singleton('kronolith');
 $groups = &Group::singleton();
-$auth = &Auth::singleton($conf['auth']['driver']);
+$auth = Horde_Auth::singleton($conf['auth']['driver']);
 
 $reload = false;
 $actionID = Horde_Util::getFormData('actionID', 'edit');
@@ -31,7 +31,7 @@ case 'edit':
     }
     if (is_a($share, 'PEAR_Error')) {
         $notification->push($share, 'horde.error');
-    } elseif (isset($share) && Auth::getAuth() != $share->get('owner')) {
+    } elseif (isset($share) && Horde_Auth::getAuth() != $share->get('owner')) {
         exit('permission denied');
     }
     break;
@@ -41,16 +41,16 @@ case 'editform':
     if (is_a($share, 'PEAR_Error')) {
         $notification->push(_("Attempt to edit a non-existent share."), 'horde.error');
     } else {
-        if (Auth::getAuth() != $share->get('owner')) {
+        if (Horde_Auth::getAuth() != $share->get('owner')) {
             exit('permission denied');
         }
         $perm = &$share->getPermission();
 
         // Process owner and owner permissions.
         $old_owner = $share->get('owner');
-        $new_owner = Auth::addHook(Horde_Util::getFormData('owner', $old_owner));
+        $new_owner = Horde_Auth::addHook(Horde_Util::getFormData('owner', $old_owner));
         if ($old_owner !== $new_owner && !empty($new_owner)) {
-            if ($old_owner != Auth::getAuth() && !Auth::isAdmin()) {
+            if ($old_owner != Horde_Auth::getAuth() && !Horde_Auth::isAdmin()) {
                 $notification->push(_("Only the owner or system administrator may change ownership or owner permissions for a share"), 'horde.error');
             } else {
                 $share->set('owner', $new_owner);
@@ -149,7 +149,7 @@ case 'editform':
 
         foreach ($u_names as $key => $user) {
             // Apply backend hooks
-            $user = Auth::addHook($user);
+            $user = Horde_Auth::addHook($user);
             // If the user is empty, or we've already set permissions
             // via the owner_ options, don't do anything here.
             if (empty($user) || $user == $new_owner) {
@@ -262,7 +262,7 @@ if ($auth->hasCapability('list')) {
 if (!empty($conf['share']['any_group'])) {
     $groupList = $groups->listGroups();
 } else {
-    $groupList = $groups->getGroupMemberships(Auth::getAuth(), true);
+    $groupList = $groups->getGroupMemberships(Horde_Auth::getAuth(), true);
 }
 if (is_a($groupList, 'PEAR_Error')) {
     Horde::logMessage($groupList, __FILE__, __LINE__, PEAR_LOG_NOTICE);
index 3c26b51..c2d8c4e 100755 (executable)
@@ -48,11 +48,10 @@ if (empty($ical)) {
 }
 
 // Registry.
-$registry = &Registry::singleton();
+$registry = Registry::singleton();
 
 // Set user.
-$auth = &Auth::singleton($conf['auth']['driver']);
-$auth->setAuth($user, array());
+Horde_Auth::setAuth($user, array());
 
 // Import data.
 $result = $registry->call('calendar/import',
index e3996aa..c573957 100755 (executable)
@@ -46,8 +46,7 @@ $default_tz = date_default_timezone_get();
 // Make sure we load Horde base to get the auth config
 require_once HORDE_BASE . '/lib/base.php';
 if ($conf['auth']['admins']) {
-    $auth = Auth::singleton($conf['auth']['driver']);
-    $auth->setAuth($conf['auth']['admins'][0], array());
+    Horde_Auth::setAuth($conf['auth']['admins'][0], array());
 }
 
 // Now that we are authenticated, we can load Kronolith's base. Otherwise, the
@@ -69,10 +68,9 @@ $handle = $db->query('SELECT id, name, owner_name FROM calendars, calendar_owner
 if (is_a($handle, 'PEAR_Error')) {
     $cli->fatal($handle->toString());
 }
-$auth = &Auth::singleton($conf['auth']['driver']);
 while ($row = $handle->fetchRow(DB_FETCHMODE_ASSOC)) {
     $user = $row['owner_name'];
-    $auth->setAuth($user, array());
+    Horde_Auth::setAuth($user, array());
     $cli->message('Creating calendar ' . $row['name']);
     $share = $kronolith_shares->newShare($row['id']);
     $share->set('name', $row['name']);
@@ -113,7 +111,6 @@ $handle = $db->query('SELECT event_id, calendar_id, ical_raw, owner_name, prefva
 if (is_a($handle, 'PEAR_Error')) {
     $cli->fatal($handle->toString());
 }
-$auth = &Auth::singleton($conf['auth']['driver']);
 $ical = new Horde_iCalendar();
 $tz = $calendar = $user = $count = null;
 while ($row = $handle->fetchRow(DB_FETCHMODE_ASSOC)) {
@@ -135,26 +132,26 @@ while ($row = $handle->fetchRow(DB_FETCHMODE_ASSOC)) {
     // Set user.
     if ($user != $row['owner_name']) {
         $user = $row['owner_name'];
-        $auth->setAuth($user, array());
+        Horde_Auth::setAuth($user, array());
     }
-    // Parse event.                                                            
-    $parsed = $ical->parsevCalendar($row['ical_raw']);                         
-    if (is_a($parsed, 'PEAR_Error')) {                                         
-        $cli->message('  ' . $parsed->getMessage(), 'cli.warning');            
-        continue;                                                              
-    }                                                                          
-    $components = $ical->getComponents();                                      
-    if (!count($components)) {                                                 
-        $cli->message('  No iCalendar data was found.', 'cli.warning');        
-        continue;                                                              
-    }                                                                          
-                                                                               
-    // Save event.                                                             
-    $event = &$kronolith_driver->getEvent();                                   
-    $event->fromiCalendar($components[0]);                                     
-    $result = $event->save();                                                  
-    if (is_a($result, 'PEAR_Error')) {                                         
-        $cli->message('  ' . $result->getMessage(), 'cli.error');              
+    // Parse event.
+    $parsed = $ical->parsevCalendar($row['ical_raw']);
+    if (is_a($parsed, 'PEAR_Error')) {
+        $cli->message('  ' . $parsed->getMessage(), 'cli.warning');
+        continue;
+    }
+    $components = $ical->getComponents();
+    if (!count($components)) {
+        $cli->message('  No iCalendar data was found.', 'cli.warning');
+        continue;
+    }
+
+    // Save event.
+    $event = &$kronolith_driver->getEvent();
+    $event->fromiCalendar($components[0]);
+    $result = $event->save();
+    if (is_a($result, 'PEAR_Error')) {
+        $cli->message('  ' . $result->getMessage(), 'cli.error');
         continue;
     }
     $count++;
index 9086f37..0d11806 100644 (file)
@@ -64,7 +64,7 @@ if ($search_mode == 'basic') {
     }
 
     $optgroup = $GLOBALS['browser']->hasFeature('optgroup');
-    $current_user = Auth::getAuth();
+    $current_user = Horde_Auth::getAuth();
     $calendars = array();
     foreach (Kronolith::listCalendars(false, PERMS_READ) as $id => $cal) {
         if ($cal->get('owner') == $current_user) {
index ac0c137..3992470 100644 (file)
@@ -70,7 +70,7 @@
     $creator = $event->getCreatorId();
     foreach ($calendars as $id => $cal) {
         $delegates = array();
-        if ($cal->hasPermission(Auth::getAuth(), PERMS_EDIT, $creator)) {
+        if ($cal->hasPermission(Horde_Auth::getAuth(), PERMS_EDIT, $creator)) {
             $delegates[$id] = htmlspecialchars($cal->get('name'));
         } else {
             $delegates[$id . ':' . $cal->get('owner')] = htmlspecialchars($cal->get('name'). ' (' . sprintf(_("as %s"), Kronolith::getUserName($cal->get('owner'))) . ')');
index e5fcbf2..4b60cfb 100644 (file)
@@ -13,7 +13,7 @@ Horde::addScriptFile('calendar-panel.js', 'kronolith', true);
 
 $info_img = Horde::img('info_icon.png', _("Calendar Information"), array('class' => 'calendar-info'), $registry->getImageDir('horde'));
 
-$current_user = Auth::getAuth();
+$current_user = Horde_Auth::getAuth();
 $my_calendars = array();
 $shared_calendars = array();
 foreach (Kronolith::listCalendars() as $id => $cal) {
@@ -40,7 +40,7 @@ $tagger = Kronolith::getTagger();
   <input id="calendarSearch" type="text" for="mycalendars,sharedcalendars,remotecalendars,externalcalendars" />
  </p>
 
-<?php if (Auth::getAuth()): ?>
+<?php if (Horde_Auth::getAuth()): ?>
  <p>
   <a href="<?php echo Horde::applicationUrl('calendars/') ?>"><?php echo _("[Manage Calendars]") ?></a>
  </p>
@@ -61,7 +61,7 @@ $tagger = Kronolith::getTagger();
          <li class="panel-tags">
 <?php
 echo $tag;
-if ($cal->hasPermission(Auth::getAuth(), PERMS_EDIT)) {
+if ($cal->hasPermission(Horde_Auth::getAuth(), PERMS_EDIT)) {
     echo '<a href="#" id="remove' . md5($id . $tag_id) . '">'
         . Horde::img('delete-small.png', _("Remove Tag"), '', $registry->getImageDir('horde'))
         . '</a>';
@@ -97,7 +97,7 @@ Kronolith_Imple::factory('TagActions', array('triggerId' => 'remove' . md5($id .
  <h4><?php echo _("Shared Calendars:") ?></h4>
  <ul id="sharedcalendars">
 <?php foreach ($shared_calendars as $id => $cal): ?>
-  <li<?php echo Kronolith::getCSSColors($cal) ?>><label><input type="checkbox" class="checkbox" name="display_cal[]" value="<?php echo htmlspecialchars($id) ?>"<?php echo (in_array($id, $display_calendars) ? ' checked="checked"' : '') . ' /> [' . htmlspecialchars(Auth::removeHook($cal->get('owner'))) . '] ' . htmlspecialchars($cal->get('name')) ?></label> <?php echo $info_img ?></li>
+  <li<?php echo Kronolith::getCSSColors($cal) ?>><label><input type="checkbox" class="checkbox" name="display_cal[]" value="<?php echo htmlspecialchars($id) ?>"<?php echo (in_array($id, $display_calendars) ? ' checked="checked"' : '') . ' /> [' . htmlspecialchars(Horde_Auth::removeHook($cal->get('owner'))) . '] ' . htmlspecialchars($cal->get('name')) ?></label> <?php echo $info_img ?></li>
 <?php endforeach; ?>
  </ul>
 <?php endif; ?>
index 2490337..1907fa7 100644 (file)
@@ -28,8 +28,8 @@
     <label for="owner" class="hidden"><?php echo _("Owner:") ?></label>
     <select id="owner" name="owner">
       <option value=""><?php echo _("Select a new owner:") ?></option>
-      <option value="<?php echo htmlspecialchars(Auth::removeHook($owner)) ?>" selected="selected"><?php echo htmlspecialchars(Auth::removeHook($owner)) ?></option>
-<?php foreach ($userList as $user) { if ($user != Auth::removeHook($owner)) { ?>
+      <option value="<?php echo htmlspecialchars(Horde_Auth::removeHook($owner)) ?>" selected="selected"><?php echo htmlspecialchars(Horde_Auth::removeHook($owner)) ?></option>
+<?php foreach ($userList as $user) { if ($user != Horde_Auth::removeHook($owner)) { ?>
       <option value="<?php echo htmlspecialchars($user) ?>"><?php echo htmlspecialchars($user) ?></option>
 <?php } } ?>
     </select>
@@ -37,7 +37,7 @@
 <?php else: ?>
   <td class="light">
     <label for="owner" class="hidden"><?php echo _("Owner:") ?></label>
-    <input type="text" id="owner" name="owner" value="<?php echo htmlspecialchars(Auth::removeHook($owner)) ?>" />
+    <input type="text" id="owner" name="owner" value="<?php echo htmlspecialchars(Horde_Auth::removeHook($owner)) ?>" />
   </td>
 <?php endif; ?>
 </tr>
 <?php
 foreach ($userperms as $user => $uperm) {
     if ($user != $owner) {
-        $user = Auth::removeHook($user);
+        $user = Horde_Auth::removeHook($user);
 ?>
 <tr>
   <td class="light"><?php echo htmlspecialchars($user) ?><input type="hidden" name="u_names[<?php echo htmlspecialchars($user) ?>]" value="<?php echo htmlspecialchars($user) ?>" /></td>
@@ -220,7 +220,7 @@ foreach ($userperms as $user => $uperm) {
 <?php
 foreach ($userList as $user) {
     if (!isset($userperms[Auth::addHook($user)]) &&
-        $user != Auth::removeHook($owner)) {
+        $user != Horde_Auth::removeHook($owner)) {
 ?>
       <option value="<?php echo htmlspecialchars($user) ?>"><?php echo htmlspecialchars($user) ?></option>
 <?php } } ?>
index ac0e224..5579a72 100644 (file)
@@ -6,7 +6,7 @@
   <?php echo _("Copy this URL for use wherever you need your Free/Busy URL:") ?>
  </div>
  <p class="text">
-  <?php echo Horde_Util::addParameter(Horde::applicationUrl('fb.php', true, -1), 'u', Auth::getAuth()) ?>
+  <?php echo Horde_Util::addParameter(Horde::applicationUrl('fb.php', true, -1), 'u', Horde_Auth::getAuth()) ?>
  </p>
 </div>
 
index c6e9adf..cf9979c 100644 (file)
@@ -3,7 +3,7 @@ if (!$prefs->isLocked('default_share')):
     $sharelist = Kronolith::listCalendars();
     if (($default_share = $prefs->getValue('default_share')) == null ||
         !isset($sharelist[$default_share])) {
-        $default_share = Auth::getAuth();
+        $default_share = Horde_Auth::getAuth();
     }
 ?>
 
index 4df3744..19827d6 100644 (file)
@@ -88,7 +88,7 @@ function _max_upload_size()
 }
 
 // Is logged it?
-if (!Auth::isAuthenticated()) {
+if (!Horde_Auth::isAuthenticated()) {
     $notification->push(_("Only authenticated users can post news."), 'horde.warning');
     Horde::authenticationFailureRedirect();
 }
@@ -215,7 +215,7 @@ if ($conf['attributes']['attachments']) {
     }
 }
 
-if (Auth::isAdmin('news:admin')) {
+if (Horde_Auth::isAdmin('news:admin')) {
 
     $form->setSection('admin', _("Admin"), '', true);
     $form->addVariable(_("News administrator options"), 'content', 'header', false);
@@ -277,7 +277,7 @@ if ($form->validate()) {
 
     if (!empty($allowed_cats) &&
         (in_array($info['category1'], $allowed_cats) || in_array($info['category2'], $allowed_cats))) {
-        $info['editor'] = Auth::getAuth();
+        $info['editor'] = Horde_Auth::getAuth();
         $info['status'] = News::CONFIRMED;
     }
 
@@ -343,7 +343,7 @@ if ($form->validate()) {
         $data = array($info['sortorder'],
                       $info['status'],
                       $info['publish'],
-                      Auth::getAuth(),
+                      Horde_Auth::getAuth(),
                       $info['editor'],
                       @$info['sourcelink'],
                       isset($info['source']) ? $info['source'] : '',
@@ -521,7 +521,7 @@ if ($form->validate()) {
     }
     $version = $news->db->getOne('SELECT MAX(version) FROM ' . $news->prefix . '_versions WHERE id = ?', array($id));
     $result = $news->write_db->query('INSERT INTO ' . $news->prefix . '_versions (id, version, action, created, user_uid, content) VALUES (?, ?, ?, NOW(), ? ,?)',
-                                array($id, $version + 1, $status_version, Auth::getAuth(), serialize($info['body'])));
+                                array($id, $version + 1, $status_version, Horde_Auth::getAuth(), serialize($info['body'])));
     if ($result instanceof PEAR_Error) {
         $notification->push($result);
     }
index b16d943..6c241d5 100644 (file)
@@ -11,7 +11,7 @@
  */
 
 /* Only admin should be using this. */
-if (!Auth::isAdmin('news:admin')) {
+if (!Horde_Auth::isAdmin('news:admin')) {
     $notification->push(_("You are not authorised for this action."), 'horde.warning');
     Horde::authenticationFailureRedirect();
 }
index 30af249..a30382e 100644 (file)
@@ -15,7 +15,7 @@
 
 require_once dirname(__FILE__) . '/lib/base.php';
 
-if (!Auth::isAdmin('news:admin')) {
+if (!Horde_Auth::isAdmin('news:admin')) {
     $notification->push(_("Only admin can delete a news."));
     header('Location: ' . Horde::applicationUrl('edit.php'));
     exit;
index 02383be..57a6bb9 100644 (file)
@@ -15,7 +15,7 @@
 
 require_once dirname(__FILE__) . '/lib/base.php';
 
-if (!Auth::isAdmin('news:admin')) {
+if (!Horde_Auth::isAdmin('news:admin')) {
     $notification->push(_("Only admin can delete a news."));
     header('Location: ' . Horde::applicationUrl('edit.php'));
     exit;
index 04d6646..fdc3863 100644 (file)
@@ -35,7 +35,7 @@ $actionID = Horde_Util::getFormData('actionID');
 if (!empty($actionID) && $id > 0) {
     $version = $news->db->getOne('SELECT MAX(version) FROM ' . $news->prefix . '_versions WHERE id = ?', array($id));
     $result  = $news->write_db->query('INSERT INTO ' . $news->prefix . '_versions (id, version, action, created, user_uid) VALUES (?,?,?,NOW(),?)',
-                                        array($id, $version + 1, $actionID, Auth::getAuth()));
+                                        array($id, $version + 1, $actionID, Horde_Auth::getAuth()));
 }
 
 if ($id) {
@@ -142,7 +142,7 @@ case 'renew';
     /* save as future version */
     $version = $news->db->getOne('SELECT MAX(version) FROM ' . $news->prefix . '_versions WHERE id = ?', array($id)) + 1;
     $result  = $news->write_db->query('INSERT INTO ' . $news->prefix . '_versions (id, version, created, user_uid, content) VALUES (?,?,NOW(),?,?)',
-                                array($id, $version, Auth::getAuth(), serialize($new_version)));
+                                array($id, $version, Horde_Auth::getAuth(), serialize($new_version)));
 
     $notification->push(sprintf(_("News \"%s\" (%s): %s"), $article['title'], $id, _("renewed")), 'horde.success');
     header('Location: ' . $browse_url);
index 6bbd37e..368f1c7 100644 (file)
@@ -30,7 +30,7 @@ case 'download_file':
 
     $data = News::getFile($file_id);
     if ($data instanceof PEAR_Error) {
-        if (Auth::isAdmin('news:admin')) {
+        if (Horde_Auth::isAdmin('news:admin')) {
             Horde::fatal($data, __FILE__, __LINE__);
         } else {
             header('HTTP/1.0 404 Not Found');
@@ -47,7 +47,7 @@ case 'view_file':
 
     $data = News::getFile($file_id);
     if ($data instanceof PEAR_Error) {
-        if (Auth::isAdmin('news:admin')) {
+        if (Horde_Auth::isAdmin('news:admin')) {
             Horde::fatal($data, __FILE__, __LINE__);
         } else {
             header('HTTP/1.0 404 Not Found');
@@ -107,7 +107,7 @@ case 'download_zip':
 
     $data = News::getFile($file_id);
     if ($data instanceof PEAR_Error) {
-        if (Auth::isAdmin('news:admin')) {
+        if (Horde_Auth::isAdmin('news:admin')) {
             Horde::fatal($data, __FILE__, __LINE__);
         } else {
             header('HTTP/1.0 404 Not Found');
index 39e41af..33a5f1c 100644 (file)
@@ -38,7 +38,7 @@ class Horde_Block_news_my_comments extends Horde_Block {
      */
     function _content()
     {
-        if (!Auth::isAuthenticated()) {
+        if (!Horde_Auth::isAuthenticated()) {
             return '';
         }
 
@@ -57,7 +57,7 @@ class Horde_Block_news_my_comments extends Horde_Block {
               . '<th>' . _("User") . '</th></tr></thead>';
 
         $threads = $GLOBALS['registry']->call('forums/getThreadsByForumOwner',
-                                    array(Auth::getAuth(), 'message_timestamp', 1, false,
+                                    array(Horde_Auth::getAuth(), 'message_timestamp', 1, false,
                                             'news', 0, $this->_params['limit']));
         if ($threads instanceof PEAR_Error) {
             return $threads->getMessage();
index 10d6c74..bff3ab9 100644 (file)
@@ -238,16 +238,16 @@ class News_Categories {
     public function getAllowed($perm = PERMS_SHOW)
     {
         $cats = $this->getCategories();
-        if (Auth::isAdmin('news:admin') ||
-            $GLOBALS['perms']->hasPermission('news', Auth::getAuth(), $perm)) {
+        if (Horde_Auth::isAdmin('news:admin') ||
+            $GLOBALS['perms']->hasPermission('news', Horde_Auth::getAuth(), $perm)) {
             return $cats;
         }
 
         foreach ($cats as $key => $value) {
             // user has access?
-            if (!$GLOBALS['perms']->hasPermission('news:categories', Auth::getAuth(), $perm)  && // master
-                !$GLOBALS['perms']->hasPermission('news:categories:' . $key, Auth::getAuth(), $perm) && // child
-                !$GLOBALS['perms']->hasPermission('news:categories:' . $this->_nodes[$key]['category_parentid'], Auth::getAuth(), $perm) // father
+            if (!$GLOBALS['perms']->hasPermission('news:categories', Horde_Auth::getAuth(), $perm)  && // master
+                !$GLOBALS['perms']->hasPermission('news:categories:' . $key, Horde_Auth::getAuth(), $perm) && // child
+                !$GLOBALS['perms']->hasPermission('news:categories:' . $this->_nodes[$key]['category_parentid'], Horde_Auth::getAuth(), $perm) // father
                 ) {
                 unset($cats[$key]);
             }
index d759af6..ea772e4 100644 (file)
@@ -55,7 +55,7 @@ class News_Driver {
     public function get($id)
     {
         // Admins bypass the cache (can read nonpublished and locked news)
-        if (!Auth::isAdmin('news:admin')) {
+        if (!Horde_Auth::isAdmin('news:admin')) {
             $key = 'news_'  . News::getLang() . '_' . $id;
             $data = $GLOBALS['cache']->get($key, $GLOBALS['conf']['cache']['default_lifetime']);
             if ($data) {
@@ -68,7 +68,7 @@ class News_Driver {
             return $data;
         }
 
-        if (!Auth::isAdmin('news:admin')) {
+        if (!Horde_Auth::isAdmin('news:admin')) {
             $GLOBALS['cache']->set($key, serialize($data));
         }
 
index 054bf25..7c33450 100644 (file)
@@ -71,7 +71,7 @@ class News_Driver_sql extends News_Driver {
                 ' WHERE n.id = ? AND n.id=l.id AND l.lang = ?';
 
         /** TODO Allow for now to allow static linked news, but not shown in list
-        if (!Auth::isAdmin('news:admin')) {
+        if (!Horde_Auth::isAdmin('news:admin')) {
             $query .= ' AND n.status = ' . News::CONFIRMED;
         }
         */
@@ -203,7 +203,7 @@ class News_Driver_sql extends News_Driver {
 
         /* Log it */
         $sql = 'INSERT INTO ' . $this->prefix . '_user_reads (id,user,ip,useragent,readdate) VALUES (?, ?, ? , ?, NOW())';
-        $result = $this->write_db->query($sql, array($id, Auth::getAuth(), $_SERVER['REMOTE_ADDR'], $_SERVER['HTTP_USER_AGENT']));
+        $result = $this->write_db->query($sql, array($id, Horde_Auth::getAuth(), $_SERVER['REMOTE_ADDR'], $_SERVER['HTTP_USER_AGENT']));
         if ($result instanceof PEAR_Error) {
             return $result;
         }
index 9b84762..d53b412 100644 (file)
@@ -49,7 +49,7 @@ class News_Search extends Horde_Form {
         $this->addVariable(_("Unpublish"), 'unpublish', 'datetime', false, false, false, $GLOBALS['news']->datetimeParams());
         $this->addVariable(_("User"), 'user', 'text', false, false, false);
 
-        if (Auth::isAdmin()) {
+        if (Horde_Auth::isAdmin()) {
             $this->addVariable(_("Editor"), 'editor', 'text', false, false, false);
         }
 
index b8a9131..33f53e3 100644 (file)
@@ -191,7 +191,7 @@ class News {
             return '';
         }
 
-        if (Auth::isAdmin('news:admin')) {
+        if (Horde_Auth::isAdmin('news:admin')) {
             $delete_img = Horde::img('delete.png', _("Delete"), ' style="width: 16px height: 16px"', $GLOBALS['registry']->getImageDir('horde'));
             $delete_url = Horde::applicationUrl('delete_file.php');
         }
@@ -211,7 +211,7 @@ class News {
             $html .= Horde::link(Horde_Util::addParameter($view_url, 'actionID', 'download_file'), sprintf(_("Dowload %s"), $file['file_name'])) . $dowload_img . '</a> ' . "\n";
             $html .= Horde::link(Horde_Util::addParameter($view_url, 'actionID', 'view_file'), sprintf(_("Preview %s"), $file['file_name']), '', '_file_view');
             $html .= Horde::img(Horde_Mime_Viewer::getIcon($file['file_type']), $file['file_name'], 'width="16" height="16"', '') . ' ';
-            if (Auth::isAdmin('news:admin')) {
+            if (Horde_Auth::isAdmin('news:admin')) {
                 $html .= Horde::link(Horde_Util::addParameter($delete_url, $file), sprintf(_("Delete %s"), $file['file_name'])) . $delete_img . '</a> ' . "\n";
             }
             $html .= $file['file_name'] . '</a> ' . "\n";
@@ -518,7 +518,7 @@ class News {
             $menu->add(Horde::applicationUrl('cloud.php'), _("Tag cloud"), 'colorpicker.png', $img_dir);
         }
 
-        if (Auth::isAdmin('news:admin')) {
+        if (Horde_Auth::isAdmin('news:admin')) {
             $menu->add(Horde::applicationUrl('edit.php'), _("Editorship"), 'config.png', $img_dir);
             $menu->add(Horde::applicationUrl('admin/categories/index.php'), _("Administration"), 'administration.png', $img_dir);
         }
index 20305ee..ed8ea47 100644 (file)
@@ -52,7 +52,7 @@ class News_Search extends Horde_Form {
         $this->addVariable(_("Unpublish"), 'unpublish', 'datetime', false, false, false, News::datetimeParams());
         $this->addVariable(_("User"), 'user', 'text', false, false, false);
 
-        if (Auth::isAdmin()) {
+        if (Horde_Auth::isAdmin()) {
             $this->addVariable(_("Editor"), 'editor', 'text', false, false, false);
         }
 
index c9e0128..132e772 100644 (file)
@@ -31,7 +31,7 @@ function _error($msg)
     exit;
 }
 
-if (!Auth::isAuthenticated()) {
+if (!Horde_Auth::isAuthenticated()) {
     _error(_("Only authenticated users can send mails."));
 }
 
@@ -48,7 +48,7 @@ if (empty($from)) {
 }
 
 $body = sprintf(_("%s would you like to invite you to read the news\n Title: %s\n\n Published: %s \nLink: %s"),
-                Auth::getAuth(),
+                Horde_Auth::getAuth(),
                 $row['title'],
                 $row['publish'],
                 News::getUrlFor('news', $id, true, -1));
index 2bef1b1..50f5eb2 100644 (file)
@@ -13,7 +13,7 @@
 
 require_once dirname(__FILE__) . '/lib/base.php';
 
-if (!Auth::isAuthenticated()) {
+if (!Horde_Auth::isAuthenticated()) {
     Horde::authenticationFailureRedirect();
 }
 
index 9027a1f..a58b146 100644 (file)
@@ -10,7 +10,7 @@ echo Horde::link(Horde_Util::addParameter($browse_url, 'id', $row['id']), _("Inf
      Horde::img('devel.png', _("Info"), '', $img_dir). '</a>  &nbsp;';
 
 /* admins options */
-if (Auth::isAdmin() || isset($allowed_cats[$row['category1']]) || isset($allowed_cats[$row['category2']])) {
+if (Horde_Auth::isAdmin() || isset($allowed_cats[$row['category1']]) || isset($allowed_cats[$row['category2']])) {
 
     if ($row['status'] == News::CONFIRMED) {
         $url = Horde_Util::addParameter($browse_url, array('page' => $page, 'actionID' => 'deactivate', 'id' =>  $row['id']));
index 59dfb7d..b4c83cf 100644 (file)
@@ -15,7 +15,7 @@ require_once SKOLI_BASE . '/lib/base.php';
 require_once SKOLI_BASE . '/lib/Forms/Entry.php';
 
 /* Redirect to create a new class if we don't have access to any class */
-if (count(Skoli::listClasses(false, PERMS_EDIT)) == 0 && Auth::getAuth()) {
+if (count(Skoli::listClasses(false, PERMS_EDIT)) == 0 && Horde_Auth::getAuth()) {
     $notification->push(_("Please create a new Class first."), 'horde.message');
     header('Location: ' . Horde::applicationUrl('classes/create.php', true));
     exit;
index b510a2e..d36194d 100644 (file)
@@ -13,7 +13,7 @@ require_once SKOLI_BASE . '/lib/base.php';
 require_once SKOLI_BASE . '/lib/Forms/CreateClass.php';
 
 // Exit if this isn't an authenticated user.
-if (!Auth::getAuth()) {
+if (!Horde_Auth::getAuth()) {
     header('Location: ' . Horde::applicationUrl('list.php', true));
     exit;
 }
index 0aace38..4aa9fe1 100644 (file)
@@ -13,7 +13,7 @@ require_once SKOLI_BASE . '/lib/base.php';
 require_once SKOLI_BASE . '/lib/Forms/DeleteClass.php';
 
 // Exit if this isn't an authenticated user.
-if (!Auth::getAuth()) {
+if (!Horde_Auth::getAuth()) {
     header('Location: ' . Horde::applicationUrl('list.php', true));
     exit;
 }
@@ -26,7 +26,7 @@ if (is_a($class, 'PEAR_Error')) {
     $notification->push($class, 'horde.error');
     header('Location: ' . Horde::applicationUrl('classes/', true));
     exit;
-} elseif (!$class->hasPermission(Auth::getAuth(), PERMS_DELETE)) {
+} elseif (!$class->hasPermission(Horde_Auth::getAuth(), PERMS_DELETE)) {
     $notification->push(_("You are not allowed to delete this class."), 'horde.error');
     header('Location: ' . Horde::applicationUrl('classes/', true));
     exit;
index a6558f2..fe9aba5 100644 (file)
@@ -13,7 +13,7 @@ require_once SKOLI_BASE . '/lib/base.php';
 require_once SKOLI_BASE . '/lib/Forms/EditClass.php';
 
 // Exit if this isn't an authenticated user.
-if (!Auth::getAuth()) {
+if (!Horde_Auth::getAuth()) {
     header('Location: ' . Horde::applicationUrl('list.php', true));
     exit;
 }
@@ -24,7 +24,7 @@ if (is_a($class, 'PEAR_Error')) {
     $notification->push($class, 'horde.error');
     header('Location: ' . Horde::applicationUrl('classes/', true));
     exit;
-} elseif (!$class->hasPermission(Auth::getAuth(), PERMS_EDIT)) {
+} elseif (!$class->hasPermission(Horde_Auth::getAuth(), PERMS_EDIT)) {
     $notification->push(_("You are not allowed to change this class."), 'horde.error');
     header('Location: ' . Horde::applicationUrl('classes/', true));
     exit;
index 2bf6d19..7570b4b 100644 (file)
@@ -12,7 +12,7 @@
 require_once SKOLI_BASE . '/lib/base.php';
 
 // Exit if this isn't an authenticated user.
-if (!Auth::getAuth()) {
+if (!Horde_Auth::getAuth()) {
     header('Location: ' . Horde::applicationUrl('list.php', true));
     exit;
 }
index d9f0c52..853588e 100644 (file)
@@ -15,7 +15,7 @@ require_once SKOLI_BASE . '/lib/base.php';
 require_once 'Horde/UI/Tabs.php';
 
 // Exit if this isn't an authenticated user.
-if (!Auth::getAuth()) {
+if (!Horde_Auth::getAuth()) {
     header('Location: ' . Horde::applicationUrl('list.php', true));
     exit;
 }
@@ -31,7 +31,7 @@ if (is_a($entry, 'PEAR_Error') || !count($entry)) {
 $share = $GLOBALS['skoli_shares']->getShare($entry['class_id']);
 
 // Check permissions
-if (!$share->hasPermission(Auth::getAuth(), PERMS_READ)) {
+if (!$share->hasPermission(Horde_Auth::getAuth(), PERMS_READ)) {
     $notification->push(_("You are not allowed to view this entry."), 'horde.error');
     header('Location: ' . Horde_Util::addParameter(Horde::applicationUrl('search.php', true), 'actionID', 'search'));
     exit;
@@ -86,10 +86,10 @@ if ($actionID == 'delete') {
 $url = Horde_Util::addParameter(Horde::applicationUrl('entry.php'), 'entry', $entry['object_id']);
 $tabs = new Horde_UI_Tabs('view', $vars);
 $tabs->addTab(_("View"), $url, array('tabname' => 'Entry', 'id' => 'tabEntry'));
-if ($share->hasPermission(Auth::getAuth(), PERMS_EDIT)) {
+if ($share->hasPermission(Horde_Auth::getAuth(), PERMS_EDIT)) {
     $tabs->addTab(_("Edit"), $url, array('tabname' => 'EditEntry', 'id' => 'tabEditEntry'));
 }
-if ($share->hasPermission(Auth::getAuth(), PERMS_DELETE)) {
+if ($share->hasPermission(Horde_Auth::getAuth(), PERMS_DELETE)) {
     $tabs->addTab(_("Delete"), $url, array('tabname' => 'DeleteEntry', 'id' => 'tabDeleteEntry'));
 }
 
index d6d7cc0..471dee8 100644 (file)
@@ -518,7 +518,7 @@ class Skoli_Driver_sql extends Skoli_Driver {
                      ' VALUES (?, ?, ?, ?, ?, ?, ?)';
             $entryId = md5(uniqid(mt_rand(), true));
             $date = new Horde_Date($vars->get('object_time'));
-            $values = array($entryId, Auth::getAuth(), $this->generateUID(), $this->_class, $studentid, $date->datestamp(), $vars->get('object_type'));
+            $values = array($entryId, Horde_Auth::getAuth(), $this->generateUID(), $this->_class, $studentid, $date->datestamp(), $vars->get('object_type'));
 
             /* Log the query at a DEBUG log level. */
             Horde::logMessage(sprintf('Skoli_Driver_sql::addEntry(): %s', $query),
index d45267f..30422b3 100644 (file)
@@ -49,7 +49,7 @@ class Skoli_DeleteClassForm extends Horde_Form {
             return false;
         }
 
-        if ($this->_class->get('owner') != Auth::getAuth()) {
+        if ($this->_class->get('owner') != Horde_Auth::getAuth()) {
             return PEAR::raiseError(_("Permission denied"));
         }
 
index d10624e..2f0b0fd 100644 (file)
@@ -45,7 +45,7 @@ class Skoli_EntryForm extends Horde_Form {
         $classes = Skoli::listClasses(false, PERMS_EDIT);
         $classes_enums = array();
         foreach ($classes as $class) {
-            if ($class->hasPermission(Auth::getAuth(), PERMS_EDIT)) {
+            if ($class->hasPermission(Horde_Auth::getAuth(), PERMS_EDIT)) {
                 $classes_enums[$class->getName()] = $class->get('name');
             }
         }
index 3cae93e..ccba45b 100644 (file)
@@ -136,7 +136,7 @@ class Skoli {
     {
         global $registry;
 
-        $classes = $GLOBALS['skoli_shares']->listShares(Auth::getAuth(), $permission, $owneronly ? Auth::getAuth() : null, 0, 0, 'name');
+        $classes = $GLOBALS['skoli_shares']->listShares(Horde_Auth::getAuth(), $permission, $owneronly ? Horde_Auth::getAuth() : null, 0, 0, 'name');
         if (is_a($classes, 'PEAR_Error')) {
             Horde::logMessage($classes, __FILE__, __LINE__, PEAR_LOG_ERR);
             return array();
@@ -208,13 +208,13 @@ class Skoli {
             $share = $GLOBALS['skoli_shares']->getShare($class);
 
             /* Check permissions */
-            if (!$share->hasPermission(Auth::getAuth(), PERMS_READ) || !isset($addressbooks[$share->get('address_book')])) {
+            if (!$share->hasPermission(Horde_Auth::getAuth(), PERMS_READ) || !isset($addressbooks[$share->get('address_book')])) {
                 continue;
             }
 
             $list[$i] = $share->datatreeObject->data;
             $list[$i]['_id'] = $class;
-            $list[$i]['_edit'] = $share->hasPermission(Auth::getAuth(), PERMS_EDIT);
+            $list[$i]['_edit'] = $share->hasPermission(Horde_Auth::getAuth(), PERMS_EDIT);
 
             /* Add all students to the list */
             $driver = &Skoli_Driver::singleton($class);
@@ -334,12 +334,12 @@ class Skoli {
         $addressbooks = $registry->call('contacts/sources');
         foreach ($classes as $class_id=>$share) {
             /* Check permissions */
-            if (!$share->hasPermission(Auth::getAuth(), PERMS_READ) || !isset($addressbooks[$share->get('address_book')])) {
+            if (!$share->hasPermission(Horde_Auth::getAuth(), PERMS_READ) || !isset($addressbooks[$share->get('address_book')])) {
                 continue;
             }
 
-            $share_permissions_edit = $share->hasPermission(Auth::getAuth(), PERMS_EDIT);
-            $share_permissions_delete = $share->hasPermission(Auth::getAuth(), PERMS_DELETE);
+            $share_permissions_edit = $share->hasPermission(Horde_Auth::getAuth(), PERMS_EDIT);
+            $share_permissions_delete = $share->hasPermission(Horde_Auth::getAuth(), PERMS_DELETE);
 
             $driver = &Skoli_Driver::singleton($class_id);
             $entries = $driver->getEntries($studentid, $type, $searchparams);
index 566f358..4573d87 100644 (file)
@@ -54,7 +54,7 @@ if ($app == false || $registry->get('status', $app) == 'inactive' || !$registry-
 }
 
 /* Redirect to create a new class if we don't have access to any class */
-if (count(Skoli::listClasses()) == 0 && Auth::getAuth()) {
+if (count(Skoli::listClasses()) == 0 && Horde_Auth::getAuth()) {
     $notification->push(_("Please create a new Class first."), 'horde.message');
     header('Location: ' . Horde::applicationUrl('classes/create.php', true));
     exit;
index 68fe09d..cbd9e1f 100644 (file)
@@ -83,7 +83,7 @@ function doPrefsUpdate(column, sortDown)
   <th id="s<?php echo SKOLI_SORT_CATEGORY ?>"<?php if ($sortby_class == SKOLI_SORT_CATEGORY) echo ' class="' . $sortdirclass_class . '"' ?> width="10%">
    <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby_class', SKOLI_SORT_CATEGORY)), _("Sort by Category"), 'sortlink', '', '', _("Category")) ?>&nbsp;
    <?php
-   if (Auth::getAuth() && (!$GLOBALS['prefs']->isLocked('categories') ||
+   if (Horde_Auth::getAuth() && (!$GLOBALS['prefs']->isLocked('categories') ||
                            !$GLOBALS['prefs']->isLocked('category_colors'))) {
        $categoryUrl = Horde_Util::addParameter(Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/prefs.php'), array('app' => 'horde', 'group' => 'categories'));
        echo ' ' . Horde::link($categoryUrl, _("Edit categories and colors"), '', '_blank', 'popup(this.href); return false;') . Horde::img('colorpicker.png', _("Edit categories and colors"), '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
index a7aa45a..5e1493e 100644 (file)
@@ -2,7 +2,7 @@
 Horde::addScriptFile('prototype.js', 'horde', true);
 Horde::addScriptFile('QuickFinder.js', 'horde', true);
 
-$current_user = Auth::getAuth();
+$current_user = Horde_Auth::getAuth();
 $my_classes = array();
 $shared_classes = array();
 foreach (Skoli::listClasses() as $id => $cl) {
@@ -44,7 +44,7 @@ function sbarToggle()
   <label><input type="checkbox" class="checkbox" name="show_students" value="1"<?php echo ($prefs->getValue('show_students') ? ' checked="checked"' : '') . ' /> ' . _("Show students?") ?></label>
  </p>
 
-<?php if (Auth::getAuth()): ?>
+<?php if (Horde_Auth::getAuth()): ?>
  <p>
   <a href="<?php echo Horde::applicationUrl('classes/') ?>"><?php echo _("[Manage Classes]") ?></a>
  </p>
@@ -63,7 +63,7 @@ function sbarToggle()
  <h4><?php echo _("Shared Classes:") ?></h4>
  <ul id="sharedclasses">
 <?php foreach ($shared_classes as $id => $cl): ?>
-  <li><label><input type="checkbox" class="checkbox" name="display_class[]" value="<?php echo htmlspecialchars($id) ?>"<?php echo (in_array($id, $display_classes) ? ' checked="checked"' : '') . ' /> [' . htmlspecialchars(Auth::removeHook($cl->get('owner'))) . '] ' . htmlspecialchars($cl->get('name')) ?></label></li>
+  <li><label><input type="checkbox" class="checkbox" name="display_class[]" value="<?php echo htmlspecialchars($id) ?>"<?php echo (in_array($id, $display_classes) ? ' checked="checked"' : '') . ' /> [' . htmlspecialchars(Horde_Auth::removeHook($cl->get('owner'))) . '] ' . htmlspecialchars($cl->get('name')) ?></label></li>
 <?php endforeach; ?>
  </ul>
 <?php endif; ?>