Move Horde_Auth::getAuth() to Horde_Registry::.
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 2 Jun 2010 17:52:15 +0000 (11:52 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 2 Jun 2010 19:54:08 +0000 (13:54 -0600)
Conversions:
  Horde_Auth::getAuth() -> $registry->getAuth()
  Horde_Auth::getBareAuth() -> $registry->getAuth('bare')
  Horde_Auth::getAuthDomain() -> $registry->getAuth('domain')
  Horde_Auth::getOriginalAuth() -> $registry->getAuth('original')

387 files changed:
agora/lib/Agora.php
agora/lib/Forms/Message.php
agora/lib/Messages.php
agora/messages/abuse.php
agora/owner.php
ansel/config/hooks.php.dist
ansel/edit_dates.php
ansel/faces/custom.php
ansel/faces/gallery.php
ansel/faces/name.php
ansel/faces/search/image.php
ansel/faces/search/image_define.php
ansel/faces/search/image_save.php
ansel/faces/search/image_search.php
ansel/faces/search/img.php
ansel/faces/search/owner.php
ansel/gallery.php
ansel/gallery/captions.php
ansel/gallery/delete.php
ansel/gallery/sort.php
ansel/image.php
ansel/img/download.php
ansel/img/full.php
ansel/img/index.php
ansel/img/mini.php
ansel/img/prettythumb.php
ansel/img/screen.php
ansel/img/thumb.php
ansel/img/upload_preview.php
ansel/lib/Ajax/Imple/EditCaption.php
ansel/lib/Ajax/Imple/EditFaces.php
ansel/lib/Ajax/Imple/ImageSaveGeotag.php
ansel/lib/Ajax/Imple/TagActions.php
ansel/lib/Ansel.php
ansel/lib/Api.php
ansel/lib/Block/gallery.php
ansel/lib/Block/my_galleries.php
ansel/lib/Block/recent_comments.php
ansel/lib/Block/recently_added.php
ansel/lib/Block/recently_added_geodata.php
ansel/lib/Faces/Base.php
ansel/lib/Form/Ecard.php
ansel/lib/Gallery.php
ansel/lib/GalleryMode/Date.php
ansel/lib/GalleryMode/Normal.php
ansel/lib/Image.php
ansel/lib/Report.php
ansel/lib/Storage.php
ansel/lib/Tags.php
ansel/lib/Tile/DateGallery.php
ansel/lib/Tile/Gallery.php
ansel/lib/Tile/Image.php
ansel/lib/View/Base.php
ansel/lib/View/EmbeddedRenderer/GalleryLink.php
ansel/lib/View/EmbeddedRenderer/Mini.php
ansel/lib/View/Gallery.php
ansel/lib/View/GalleryRenderer/Base.php
ansel/lib/View/GalleryRenderer/Gallery.php
ansel/lib/View/GalleryRenderer/GalleryLightbox.php
ansel/lib/View/Image.php
ansel/lib/View/List.php
ansel/lib/View/Results.php
ansel/lib/Widget/Actions.php
ansel/lib/Widget/GalleryFaces.php
ansel/lib/Widget/Geotag.php
ansel/lib/Widget/ImageFaces.php
ansel/lib/Widget/Tags.php
ansel/map_edit.php
ansel/perms.php
ansel/preview.php
ansel/rss.php
ansel/scripts/ansel.php
ansel/templates/gallery/gallery.inc
ansel/templates/group/category.inc
ansel/templates/group/owner.inc
ansel/templates/image/preview_cropimage.inc
ansel/templates/image/preview_image.inc
ansel/templates/tile/image.inc
ansel/templates/view/image.inc
ansel/templates/view/slideshow.inc
ansel/xppublish.php
babel/lib/Babel.php
babel/view.php
beatnik/lib/Beatnik.php
beatnik/lib/Driver.php
beatnik/templates/listzones/header.inc
chora/lib/Chora.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
folks/account/resetpassword.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/friends.php
folks/lib/Api.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/login.php
folks/perms.php
folks/rss/activity.php
folks/rss/friends.php
folks/rss/know.php
folks/scripts/online.php
folks/templates/user/user.php
folks/user.php
framework/Ajax/lib/Horde/Ajax/Application/Base.php
framework/Auth/lib/Horde/Auth.php
framework/Auth/lib/Horde/Auth/Base.php
framework/Auth/lib/Horde/Auth/Customsql.php
framework/Auth/lib/Horde/Auth/Shibboleth.php
framework/Auth/package.xml
framework/Core/lib/Horde/Core/Auth/Application.php
framework/Core/lib/Horde/Core/Binder/Mail.php
framework/Core/lib/Horde/Core/Binder/Notification.php
framework/Core/lib/Horde/Core/Factory/Identity.php
framework/Core/lib/Horde/Core/Factory/KolabStorage.php
framework/Core/lib/Horde/Core/LoginTasks/Backend/Horde.php
framework/Core/lib/Horde/Menu.php
framework/Core/lib/Horde/Registry.php
framework/DataTree/DataTree/sql.php
framework/Group/lib/Horde/Group/Contactlists.php
framework/History/lib/Horde/History.php
framework/Kolab_FreeBusy/lib/Horde/Kolab/FreeBusy/Driver/Freebusy/Kolab.php
framework/Kolab_Session/lib/Horde/Kolab/Session/Auth/Horde.php
framework/Kolab_Storage/lib/Horde/Kolab/Storage.php
framework/Kolab_Storage/lib/Horde/Kolab/Storage/Data.php
framework/Kolab_Storage/lib/Horde/Kolab/Storage/Folder/Base.php
framework/Kolab_Storage/lib/Horde/Kolab/Storage/Folder/Decorator/Trigger.php
framework/Net_IMSP/IMSP/Utils.php
framework/Perms/lib/Horde/Perms.php
framework/Rpc/lib/Horde/Rpc.php
framework/Rpc/lib/Horde/Rpc/Soap.php
framework/Rpc/lib/Horde/Rpc/Webdav.php
framework/Share/lib/Horde/Share.php
framework/Share/lib/Horde/Share/Kolab.php
framework/Share/lib/Horde/Share/Object.php
framework/Share/lib/Horde/Share/Object/Kolab.php
framework/Share/lib/Horde/Share/Object/Sql/Hierarchical.php
framework/Share/lib/Horde/Share/Sql/Hierarchical.php
framework/Share/tests/kolab_createdefault.phpt
framework/SyncML/SyncML/Backend/Horde.php
framework/VFS/lib/VFS/kolab.php
gollem/config/backends.php.dist
gollem/lib/Auth.php
gollem/lib/Gollem.php
horde/config/hooks.php.dist
horde/index.php
horde/lib/Api.php
horde/lib/Block/account.php
horde/lib/Prefs/Ui.php
horde/login.php
horde/services/changepassword.php
horde/services/portal/index.php
horde/services/portal/mobile.php
horde/services/portal/sidebar.php
horde/services/problem.php
horde/services/shares/edit.php
horde/services/snooze.php
hylax/lib/Storage/sql.php
imp/compose.php
imp/config/hooks.php.dist
imp/config/servers.php.dist
imp/lib/Application.php
imp/lib/Auth.php
imp/lib/Compose.php
imp/lib/Injector/Binder/Folder.php
imp/lib/Injector/Binder/Imaptree.php
imp/lib/LoginTasks/Task/DeleteAttachmentsMonthly.php
imp/lib/Maillog.php
imp/lib/Prefs/Identity.php
imp/lib/Prefs/Ui.php
imp/lib/Sentmail/Sql.php
imp/lib/Spam.php
imp/view.php
ingo/lib/Api.php
ingo/lib/Application.php
ingo/lib/Ingo.php
ingo/lib/Storage/Sql.php
ingo/vacation.php
jeta/lib/Applet/jta.php
jeta/lib/Applet/sshtools.php
jonah/lib/Jonah.php
jonah/lib/News/sql.php
jonah/stories/share.php
kastalia/main.php
koward/lib/Koward.php
koward/lib/Koward/Controller/Application.php
koward/lib/Koward/Controller/IndexController.php
kronolith/add.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/lib/Ajax/Application.php
kronolith/lib/Ajax/Imple/TagActions.php
kronolith/lib/Api.php
kronolith/lib/Application.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/DeleteResource.php
kronolith/lib/Forms/DeleteResourceGroup.php
kronolith/lib/Geo/Mysql.php
kronolith/lib/Geo/Sql.php
kronolith/lib/Kronolith.php
kronolith/lib/LoginTasks/Task/PurgeEvents.php
kronolith/lib/Storage.php
kronolith/lib/Storage/kolab.php
kronolith/lib/Storage/sql.php
kronolith/lib/Tagger.php
kronolith/lib/View/EditEvent.php
kronolith/lib/View/Event.php
kronolith/new.php
kronolith/perms.php
kronolith/resources/delete.php
kronolith/resources/edit.php
kronolith/resources/groups/delete.php
kronolith/resources/groups/edit.php
kronolith/resources/groups/index.php
kronolith/resources/index.php
kronolith/search.php
kronolith/templates/chunks/calendar.php
kronolith/templates/chunks/permissions.inc
kronolith/templates/edit/edit.inc
kronolith/templates/index/index.inc
kronolith/templates/panel.inc
mnemo/config/prefs.php.dist
mnemo/data.php
mnemo/lib/Api.php
mnemo/lib/Block/tree_menu.php
mnemo/lib/Driver/kolab.php
mnemo/lib/Forms/DeleteNotepad.php
mnemo/lib/Mnemo.php
mnemo/memo.php
mnemo/note/pdf.php
mnemo/notepads/create.php
mnemo/notepads/delete.php
mnemo/notepads/edit.php
mnemo/notepads/index.php
mnemo/templates/list/memo_headers.inc
mnemo/templates/list/memo_summaries.inc
mnemo/templates/memo/memo.inc
mnemo/templates/panel.inc
mnemo/templates/view/memo.inc
mnemo/view.php
nag/config/prefs.php.dist
nag/data.php
nag/lib/Api.php
nag/lib/Application.php
nag/lib/Block/summary.php
nag/lib/Block/tree_alarms.php
nag/lib/Block/tree_menu.php
nag/lib/Driver.php
nag/lib/Driver/Kolab.php
nag/lib/Driver/Sql.php
nag/lib/Forms/task.php
nag/lib/Nag.php
nag/lib/Task.php
nag/task.php
nag/tasklists/create.php
nag/tasklists/delete.php
nag/tasklists/edit.php
nag/tasklists/index.php
nag/tasklists/info.php
nag/templates/list/task_headers.inc
nag/templates/list/task_summaries.inc
nag/templates/panel.inc
nag/templates/view/task.inc
nag/view.php
news/add.php
news/edit.php
news/lib/Block/my_comments.php
news/lib/Categories.php
news/lib/Driver/sql.php
news/mail.php
operator/lib/Driver.php
operator/lib/Operator.php
passwd/main.php
pastie/lib/Driver/Sql.php
shout/lib/Shout.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
turba/addressbooks/create.php
turba/addressbooks/delete.php
turba/addressbooks/edit.php
turba/addressbooks/index.php
turba/config/sources.php.dist
turba/lib/Api.php
turba/lib/Application.php
turba/lib/Driver.php
turba/lib/Driver/Imsp.php
turba/lib/Driver/Kolab.php
turba/lib/Driver/Ldap.php
turba/lib/Driver/Share.php
turba/lib/Driver/Sql.php
turba/lib/Forms/DeleteAddressBook.php
turba/lib/Turba.php
turba/lib/View/Contact.php
turba/lib/tests/TestBase.php
vilma/lib/Vilma.php
whups/data.php
whups/lib/Api.php
whups/lib/Block/myqueries.php
whups/lib/Block/myrequests.php
whups/lib/Block/mytickets.php
whups/lib/Block/query.php
whups/lib/Driver.php
whups/lib/Driver/sql.php
whups/lib/Forms/AddComment.php
whups/lib/Forms/CreateTicket.php
whups/lib/Forms/EditTicket.php
whups/lib/Forms/Query.php
whups/lib/Forms/Search.php
whups/lib/Mail.php
whups/lib/Query.php
whups/lib/Renderer/Comment.php
whups/lib/Ticket.php
whups/lib/Whups.php
whups/mybugs.php
whups/query/index.php
whups/query/rss.php
whups/query/run.php
whups/search.php
whups/templates/view/results.inc
whups/ticket/comment.php
whups/ticket/create.php
whups/ticket/queue.php
whups/ticket/type.php
wicked/lib/Driver.php
wicked/lib/Driver/sql.php
wicked/lib/Page.php
wicked/lib/Page/EditPage.php
wicked/lib/Sync.php
wicked/lib/Wicked.php
wicked/templates/edit/standard.inc

index f3649cd..b35d6e1 100644 (file)
@@ -247,7 +247,7 @@ class Agora {
         /* Thread list, if applicable. */
         if (isset($GLOBALS['forum_id'])) {
             $menu->add(Agora::setAgoraId($GLOBALS['forum_id'], null, Horde::applicationUrl('threads.php')), _("_Threads"), 'threads.png', Horde_Themes::img());
-            if ($scope == 'agora' && Horde_Auth::getAuth()) {
+            if ($scope == 'agora' && $GLOBALS['registry']->getAuth()) {
                 $menu->add(Agora::setAgoraId($GLOBALS['forum_id'], null, Horde::applicationUrl('messages/edit.php')), _("New Thread"), 'newmessage.png', Horde_Themes::img());
             }
         }
index 1b1f365..9c78e8b 100644 (file)
@@ -16,7 +16,7 @@ class MessageForm extends Horde_Form {
         global $conf;
 
         if (!parent::validate($vars, $canAutoFill)) {
-            if (!Horde_Auth::getAuth() && !empty($conf['forums']['captcha'])) {
+            if (!$GLOBALS['registry']->getAuth() && !empty($conf['forums']['captcha'])) {
                 $vars->remove('captcha');
                 $this->removeVariable($varname = 'captcha');
                 $this->insertVariableBefore('newcomment', _("Spam protection"), 'captcha', 'figlet', true, null, null, array(Agora::getCAPTCHA(true), $conf['forums']['figlet_font']));
index ee548f8..bf06e53 100644 (file)
@@ -180,7 +180,7 @@ class Agora_Messages {
                 . 'message_timestamp, message_modifystamp, ip) '
                 . ' VALUES (?, ?, ?, ?, ?, ?, ?, 0, ?, ?, ?)';
 
-            $author = Horde_Auth::getAuth() ? Horde_Auth::getAuth() : $info['posted_by'];
+            $author = $GLOBALS['registry']->getAuth() ? $GLOBALS['registry']->getAuth() : $info['posted_by'];
             $info['message_id'] = $this->_write_db->nextId('agora_messages');
             $params = array($info['message_id'],
                             $this->_forum_id,
@@ -1112,14 +1112,14 @@ class Agora_Messages {
         /* Check permissions */
         if ($GLOBALS['registry']->isAdmin(array('permission' => 'agora:admin')) ||
             ($GLOBALS['injector']->getInstance('Horde_Perms')->exists('agora:forums:' . $this->_scope) &&
-             $GLOBALS['injector']->getInstance('Horde_Perms')->hasPermission('agora:forums:' . $this->_scope, Horde_Auth::getAuth(), Horde_Perms::DELETE))) {
+             $GLOBALS['injector']->getInstance('Horde_Perms')->hasPermission('agora:forums:' . $this->_scope, $GLOBALS['registry']->getAuth(), Horde_Perms::DELETE))) {
                 $sql .= ' AND scope = ? ';
                 $params[] = $this->_scope;
         } else {
             // Get only author forums
             $sql .= ' AND scope = ? AND author = ?';
             $params[] = $this->_scope;
-            $params[] = Horde_Auth::getAuth();
+            $params[] = $GLOBALS['registry']->getAuth();
         }
 
         /* Get moderate forums and their names */
@@ -1536,7 +1536,7 @@ class Agora_Messages {
         $form->addHidden('', 'message_id', 'int', false);
         $form->addHidden('', 'message_parent_id', 'int', false);
 
-        if (!Horde_Auth::getAuth()) {
+        if (!$GLOBALS['registry']->getAuth()) {
             $form->addVariable(_("From"), 'posted_by', 'text', true);
         }
 
@@ -1563,7 +1563,7 @@ class Agora_Messages {
             $form->addVariable(_("Attachment"), 'message_attachment', 'file', false);
         }
 
-        if (!empty($conf['forums']['captcha']) && !Horde_Auth::getAuth()) {
+        if (!empty($conf['forums']['captcha']) && !$GLOBALS['registry']->getAuth()) {
             $form->addVariable(_("Spam protection"), 'captcha', 'figlet', true, null, null, array(Agora::getCAPTCHA(!$form->isSubmitted()), $conf['forums']['figlet_font']));
         }
 
@@ -1776,7 +1776,7 @@ class Agora_Messages {
         }
 
         $moderate = array();
-        $user = Horde_Auth::getAuth();
+        $user = $GLOBALS['registry']->getAuth();
         $edit_url =  Horde::applicationUrl('messages/edit.php');
         $editforum_url =  Horde::applicationUrl('editforum.php');
         $delete_url = Horde::applicationUrl('deleteforum.php');
@@ -1967,7 +1967,7 @@ class Agora_Messages {
     {
         if (empty($info['forum_id'])) {
             if (empty($info['author'])) {
-                $info['author'] = Horde_Auth::getAuth();
+                $info['author'] = $GLOBALS['registry']->getAuth();
             }
             $info['forum_id'] = $this->newForum($info['forum_name'], $info['author']);
             if ($info['forum_id'] instanceof PEAR_Error) {
@@ -2169,7 +2169,7 @@ class Agora_Messages {
     public function hasPermission($perm = Horde_Perms::READ, $forum_id = null, $scope = null)
     {
         // Allow all admins
-        if (($forum_id === null && isset($this->_forum['author']) && $this->_forum['author'] == Horde_Auth::getAuth()) ||
+        if (($forum_id === null && isset($this->_forum['author']) && $this->_forum['author'] == $GLOBALS['registry']->getAuth()) ||
             $GLOBALS['registry']->isAdmin(array('permission' => 'agora:admin'))) {
             return true;
         }
@@ -2189,8 +2189,8 @@ class Agora_Messages {
             return ($perm & Horde_Perms::DELETE) ? false : true;
         }
 
-        return $perms->hasPermission('agora:forums:' . $scope, Horde_Auth::getAuth(), $perm) ||
-            $perms->hasPermission('agora:forums:' . $scope . ':' . $forum_id, Horde_Auth::getAuth(), $perm);
+        return $perms->hasPermission('agora:forums:' . $scope, $GLOBALS['registry']->getAuth(), $perm) ||
+            $perms->hasPermission('agora:forums:' . $scope . ':' . $forum_id, $GLOBALS['registry']->getAuth(), $perm);
     }
 
     /**
index 66571d2..307b11d 100644 (file)
@@ -72,7 +72,7 @@ if ($form->validate()) {
     $mail = new Horde_Mime_Mail(array(
         'subject' => sprintf(_("Message %s reported as abuse"),
                              $message_id),
-        'body' => $url . "\n\n" . Horde_Auth::getAuth() . "\n\n" . $_SERVER["REMOTE_ADDR"],
+        'body' => $url . "\n\n" . $registry->getAuth() . "\n\n" . $_SERVER["REMOTE_ADDR"],
         'to' => $emails,
         'from' => $emails[0],
         'charset' => Horde_Nls::getCharset()));
index a9bbac7..d2512f6 100644 (file)
@@ -15,7 +15,7 @@ Horde_Registry::appInit('agora');
 
 /* Default to agora and current user if is not an admin. */
 $scope = Horde_Util::getGet('scope', 'agora');
-$owner = $registry->isAdmin() ? Horde_Util::getGet('owner', Horde_Auth::getAuth()) : Horde_Auth::getAuth();
+$owner = $registry->isAdmin() ? Horde_Util::getGet('owner', $registry->getAuth()) : $registry->getAuth();
 
 /* Get the sorting. */
 $sort_by = Agora::getSortBy('threads');
index f2cf511..61064fb 100644 (file)
@@ -16,7 +16,7 @@ class Ansel_Hooks
      */
 //    public function user_age()
 //     {
-//         $query  = 'SELECT age FROM user WHERE user_uid = ' . $GLOBALS['ansel_db']->quote(Horde_Auth::getAuth());
+//         $query  = 'SELECT age FROM user WHERE user_uid = ' . $GLOBALS['ansel_db']->quote($GLOBALS['registry']->getAuth());
 //         $result = $GLOBALS['ansel_db']->queryOne($query);
 //         if (is_a($result, 'PEAR_Error')) {
 //               throw new Horde_Exception_Prior($result);
@@ -62,7 +62,7 @@ class Ansel_Hooks
 //                 $g = $GLOBALS['ansel_storage']->getGallery($image->gallery);
 //                 $pwd = $g->get('passwd');
 //                 $no_agelimit = empty($GLOBALS['conf']['ages']['limits']) || $g->get('age') == 0;
-//                 if (Horde_Auth::getAuth() && $g->get('owner') == Horde_Auth::getAuth() && empty($pwd) && $no_agelimit) {
+//                 if ($GLOBALS['registry']->getAuth() && $g->get('owner') == $GLOBALS['registry']->getAuth() && empty($pwd) && $no_agelimit) {
 //                     $perms[$image->gallery] = true;
 //                 } else {
 //                     $perms[$image->gallery] = false;
index cb612ed..f2977d6 100644 (file)
@@ -19,7 +19,7 @@ $page = Horde_Util::getFormData('page', 0);
 /* If we have a single gallery, check perms now */
 if (!empty($gallery_id)) {
     $gallery = $ansel_storage->getGallery($gallery_id);
-    if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+    if (!$gallery->hasPermission($registry->getAuth(), Horde_Perms::EDIT)) {
         $notification->push(_("You are not allowed to edit these photos."), 'horde.error');
         echo Horde::wrapInlineScript(array(
             'window.opener.location.href = window.opener.location.href;',
@@ -51,7 +51,7 @@ if ($actionID == 'edit_dates') {
             if (empty($gallery_id)) {
                 // Images might be from different galleries
                 $gallery = $ansel_storage->getGallery($image->gallery);
-                if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+                if (!$gallery->hasPermission($registry->getAuth(), Horde_Perms::EDIT)) {
                     continue;
                 }
             }
index 21db99f..9b600d9 100644 (file)
@@ -32,7 +32,7 @@ try {
 }
 
 $gallery = $ansel_storage->getGallery($image->gallery);
-if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+if (!$gallery->hasPermission($registry->getAuth(), Horde_Perms::EDIT)) {
     $notification->push(_("Access denied editing the photo."));
     header('Location: ' . Ansel::getUrlFor('view', array('gallery' => $image->gallery)));
     exit;
@@ -45,7 +45,7 @@ $y2 = $conf['screen']['width'];
 $name = Horde_Util::getFormData('name');
 
 if ($face_id) {
-    $faces = $GLOBALS['injector']->getInstance('Ansel_Faces');
+    $faces = $injector->getInstance('Ansel_Faces');
     try {
         $face = $faces->getFaceById($face_id, true);
         $x1 = $face['face_x1'];
index a93faf9..7a75169 100644 (file)
@@ -28,7 +28,7 @@ try {
     header('Location: ' . Ansel::getUrlFor('view', array('gallery' => $gallery_id)));
     exit;
 }
-if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+if (!$gallery->hasPermission($registry->getAuth(), Horde_Perms::EDIT)) {
     $notification->push(sprintf(_("Access denied editing gallery \"%s\"."), $gallery->get('name')), 'horde.error');
     header('Location: ' . Ansel::getUrlFor('view', array('gallery' => $gallery_id)));
     exit;
@@ -41,7 +41,7 @@ $images = $gallery->getImages($page * $perpage, $perpage);
 $reloadimage = Horde::img('reload.png');
 $customimage = Horde::img('layout.png');
 $customurl = Horde::applicationUrl('faces/custom.php')->add('page', $page);
-$face = $GLOBALS['injector']->getInstance('Ansel_Faces');
+$face = $injector->getInstance('Ansel_Faces');
 $autogenerate = $face->canAutogenerate();
 
 $vars = Horde_Variables::getDefaultVariables();
index e85f5f2..0af49df 100644 (file)
@@ -19,9 +19,9 @@ $name = Horde_Util::getFormData('name');
 
 $image = &$ansel_storage->getImage($image_id);
 $gallery = &$ansel_storage->getGallery($image->gallery);
-if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+if (!$gallery->hasPermission($registry->getAuth(), Horde_Perms::EDIT)) {
     throw new Horde_Exception('Access denied editing the photo.');
 }
 
-$faces = $GLOBALS['injector']->getInstance('Ansel_Faces');
+$faces = $injector->getInstance('Ansel_Faces');
 $result = $faces->setName($face_id, $name);
index c7893b1..c2edb41 100644 (file)
@@ -47,7 +47,7 @@ if ($form->validate()) {
         exit;
     }
 
-    $path = $tmp . '/search_face_' . Horde_Auth::getAuth() . Ansel_Faces::getExtension();
+    $path = $tmp . '/search_face_' . $registry->getAuth() . Ansel_Faces::getExtension();
     if (file_put_contents($path, $img->raw())) {
         header('Location: ' . Horde::applicationUrl('faces/search/image_define.php'));
     } else {
index aac20fa..2feef1a 100644 (file)
@@ -13,7 +13,7 @@ require_once 'tabs.php';
 
 /* check if image exists */
 $tmp = Horde::getTempDir();
-$path = $tmp . '/search_face_' . Horde_Auth::getAuth() . Ansel_Faces::getExtension();
+$path = $tmp . '/search_face_' . $registry->getAuth() . Ansel_Faces::getExtension();
 
 if (file_exists($path) !== true) {
     $notification->push(_("You must upload the search photo first"));
index 691d3ff..8fc5fdd 100644 (file)
@@ -13,7 +13,7 @@ require_once 'tabs.php';
 
 /* Check if image exists. */
 $tmp = Horde::getTempDir();
-$path = $tmp . '/search_face_' . Horde_Auth::getAuth() . Ansel_Faces::getExtension();
+$path = $tmp . '/search_face_' . $registry->getAuth() . Ansel_Faces::getExtension();
 
 if (!file_exists($path)) {
     $notification->push(_("You must upload the search photo first"));
@@ -62,7 +62,7 @@ try {
 }
 
 /* Save image. */
-$path = $tmp . '/search_face_thumb_' . Horde_Auth::getAuth() . Ansel_Faces::getExtension();
+$path = $tmp . '/search_face_thumb_' . $registry->getAuth() . Ansel_Faces::getExtension();
 if (!file_put_contents($path, $img->raw())) {
     $notification->push(_("Cannot store search photo"));
     header('Location: ' . Horde::applicationUrl('faces/search/image.php'));
@@ -78,7 +78,7 @@ if (empty($signature)) {
 }
 
 /* Save signature. */
-$path = $tmp . '/search_face_' . Horde_Auth::getAuth() . '.sig';
+$path = $tmp . '/search_face_' . $registry->getAuth() . '.sig';
 if (file_put_contents($path, $signature)) {
     header('Location: ' . Horde::applicationUrl('faces/search/image.php'));
     exit;
index a608386..ae8b75f 100644 (file)
@@ -25,7 +25,7 @@ if (($face_id = Horde_Util::getGet('face_id')) !== null) {
     }
 } else {
     $tmp = Horde::getTempDir();
-    $path = $tmp . '/search_face_' . Horde_Auth::getAuth() . '.sig';
+    $path = $tmp . '/search_face_' . $registry->getAuth() . '.sig';
     if (file_exists($path) !== true) {
         $notification->push(_("You must upload the search photo first"));
         header('Location: ' . Horde::applicationUrl('faces/search/image.php'));
index b87e851..87b7f5c 100644 (file)
@@ -15,7 +15,7 @@ Horde_Registry::appInit('ansel');
 
 $thumb = Horde_Util::getGet('thumb');
 $tmp = Horde::getTempDir();
-$path = $tmp . '/search_face_' . ($thumb ? 'thumb_' : '') .  Horde_Auth::getAuth() . Ansel_Faces::getExtension();
+$path = $tmp . '/search_face_' . ($thumb ? 'thumb_' : '') .  $registry->getAuth() . Ansel_Faces::getExtension();
 
 header('Content-type: image/' . $conf['image']['type']);
 readfile($path);
index 9fe8475..8064237 100644 (file)
@@ -13,10 +13,10 @@ require_once 'tabs.php';
 
 $page = Horde_Util::getFormData('page', 0);
 $perpage = $prefs->getValue('facesperpage');
-$owner = Horde_Util::getGet('owner', Horde_Auth::getAuth());
+$owner = Horde_Util::getGet('owner', $GLOBALS['registry']->getAuth());
 if (!$owner) {
     $title = _("From system galleries");
-} elseif ($owner == Horde_Auth::getAuth()) {
+} elseif ($owner == $GLOBALS['registry']->getAuth()) {
     $title = _("From my galleries");
 } else {
     $title = sprintf(_("From galleries of %s"), $owner);
index 8b0d919..eb6f463 100644 (file)
@@ -52,7 +52,7 @@ case 'addchild':
         exit;
     }
 
-    if (!$parent->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+    if (!$parent->hasPermission($registry->getAuth(), Horde_Perms::EDIT)) {
         $notification->push(sprintf(_("Access denied adding a gallery to \"%s\"."),
                             $parent->get('name')), 'horde.error');
         header('Location: ' . Horde::applicationUrl('view.php?view=List', true));
@@ -80,8 +80,8 @@ case 'addchild':
 case 'downloadzip':
     $galleryId = Horde_Util::getFormData('gallery');
     $gallery = $ansel_storage->getGallery($galleryId);
-    if (!Horde_Auth::getAuth() ||
-        !$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+    if (!$registry->getAuth() ||
+        !$gallery->hasPermission($registry->getAuth(), Horde_Perms::READ)) {
 
         $notification->push(sprintf(_("Access denied downloading photos from \"%s\"."), $gallery->get('name')), 'horde.error');
         header('Location: ' . Horde::applicationUrl('view.php?view=List', true));
@@ -122,7 +122,7 @@ case 'save':
     // Check general permissions.
     if (!$registry->isAdmin() &&
         ($injector->getInstance('Horde_Perms')->exists('ansel') &&
-         !$injector->getInstance('Horde_Perms')->hasPermission('ansel', Horde_Auth::getAuth(), Horde_Perms::EDIT))) {
+         !$injector->getInstance('Horde_Perms')->hasPermission('ansel', $registry->getAuth(), Horde_Perms::EDIT))) {
         $notification->push(_("Access denied editing galleries."), 'horde.error');
         header('Location: ' . Horde::applicationUrl('view.php?view=List', true));
         exit;
@@ -159,7 +159,7 @@ case 'save':
 
         // Modifying an existing gallery.
         $gallery = $ansel_storage->getGallery($galleryId);
-        if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+        if (!$gallery->hasPermission($registry->getAuth(), Horde_Perms::EDIT)) {
             $notification->push(sprintf(_("Access denied saving gallery \"%s\"."), $gallery->get('name')), 'horde.error');
         } else {
             // Don't allow the display name to be nulled out.
@@ -175,8 +175,8 @@ case 'save':
             $gallery->set('age', $gallery_age);
             $gallery->set('download', $gallery_download);
             $gallery->set('view_mode', $gallery_mode);
-            if (Horde_Auth::getAuth() &&
-                $gallery->get('owner') == Horde_Auth::getAuth()) {
+            if ($registry->getAuth() &&
+                $gallery->get('owner') == $registry->getAuth()) {
                 $gallery->set('passwd', $gallery_passwd);
             }
 
@@ -218,7 +218,7 @@ case 'save':
                 header('Location: ' . Horde::applicationUrl(Ansel::getUrlFor('view', array('view' => 'List'), true)));
                 exit;
             }
-            if (!$parent->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+            if (!$parent->hasPermission($registry->getAuth(), Horde_Perms::EDIT)) {
                 $notification->push(sprintf(
                     _("You do not have permission to add children to %s."),
                     $parent->get('name')), 'horde.error');
index 1381b82..ee17799 100644 (file)
@@ -25,7 +25,7 @@ try {
     exit;
 }
 
-if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+if (!$gallery->hasPermission($registry->getAuth(), Horde_Perms::EDIT)) {
     $notification->push(sprintf(_("Access denied setting captions for %s."), $gallery->get('name')), 'horde.error');
     header('Location: ' . Ansel::getUrlFor('view', array('view' => 'List'), true));
     exit;
index 7a9f292..7ccedd3 100644 (file)
@@ -26,7 +26,7 @@ if ($galleryId) {
     }
     switch ($actionID) {
     case 'delete':
-        if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE)) {
+        if (!$gallery->hasPermission($registry->getAuth(), Horde_Perms::DELETE)) {
             $notification->push(sprintf(_("Access denied deleting gallery \"%s\"."),
                                         $gallery->get('name')), 'horde.error');
         } else {
@@ -44,8 +44,8 @@ if ($galleryId) {
         }
 
         // Clear the OtherGalleries widget cache
-        if ($GLOBALS['conf']['ansel_cache']['usecache']) {
-            $GLOBALS['injector']->getInstance('Horde_Cache')->expire('Ansel_OtherGalleries' . $gallery->get('owner'));
+        if ($conf['ansel_cache']['usecache']) {
+            $injector->getInstance('Horde_Cache')->expire('Ansel_OtherGalleries' . $gallery->get('owner'));
         }
 
         // Return to the default view.
@@ -53,7 +53,7 @@ if ($galleryId) {
         exit;
 
     case 'empty':
-        if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE)) {
+        if (!$gallery->hasPermission($registry->getAuth(), Horde_Perms::DELETE)) {
             $notification->push(sprintf(_("Access denied deleting gallery \"%s\"."),
                                         $gallery->get('name')),
                                 'horde.error');
index 780c53a..17c96f8 100644 (file)
@@ -27,7 +27,7 @@ try {
     exit;
 }
 
-if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+if (!$gallery->hasPermission($registry->getAuth(), Horde_Perms::EDIT)) {
     $notification->push(sprintf(_("Access denied editing gallery \"%s\"."), $gallery->get('name')), 'horde.error');
     header('Location: ' . Ansel::getUrlFor('view', array('view' => 'List'), true));
     exit;
index b468aa6..52a3fa2 100644 (file)
@@ -31,12 +31,12 @@ if ($watermark) {
     $identity = $injector->getInstance('Horde_Prefs_Identity')->getIdentity();
     $name = $identity->getValue('fullname');
     if (empty($name)) {
-        $name = Horde_Auth::getAuth();
+        $name = $registry->getAuth();
     }
 
     // Set up array of possible substitutions.
     $watermark_array = array('%N' => $name,            // User's fullname.
-                             '%L' => Horde_Auth::getAuth()); // User login.
+                             '%L' => $registry->getAuth()); // User login.
     $watermark = str_replace(array_keys($watermark_array),
                              array_values($watermark_array), $watermark);
     $watermark = strftime($watermark);
@@ -163,7 +163,7 @@ case 'savecloseimage':
 case 'saveclose':
 case 'save':
     $title = _("Save Photo");
-    if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+    if (!$gallery->hasPermission($registry->getAuth(), Horde_Perms::EDIT)) {
         $notification->push(sprintf(_("Access denied saving photo to \"%s\"."), $gallery->get('name')),
                             'horde.error');
         $imageurl = Ansel::getUrlFor('view', array_merge(
@@ -189,7 +189,7 @@ case 'save':
         /* See if we were replacing photo */
         if (!empty($info['file0']['file'])) {
             try {
-                $GLOBALS['browser']->wasFileUploaded('file0');
+                $browser->wasFileUploaded('file0');
                 if (filesize($info['file0']['file'])) {
                     /* Read in the uploaded data. */
                     $data = file_get_contents($info['file0']['file']);
@@ -299,7 +299,7 @@ case 'resizeedit':
                                              'slug' => $gallery->get('slug')),
                                        $date));
 
-    if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+    if (!$gallery->hasPermission($registry->getAuth(), Horde_Perms::EDIT)) {
         $notification->push(_("Access denied editing the photo."),
                             'horde.error');
 
@@ -351,7 +351,7 @@ case 'resizeedit':
     exit;
 
 case 'watermark':
-    if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+    if (!$gallery->hasPermission($registry->getAuth(), Horde_Perms::EDIT)) {
         $notification->push(sprintf(_("Access denied saving photo to \"%s\"."),
                                     $gallery->get('name')),
                             'horde.error');
@@ -390,7 +390,7 @@ case 'mirror':
 case 'grayscale':
 case 'crop':
 case 'resize':
-    if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+    if (!$gallery->hasPermission($registry->getAuth(), Horde_Perms::EDIT)) {
         $notification->push(sprintf(_("Access denied saving photo to \"%s\"."),
                                     $gallery->get('name')),
                             'horde.error');
@@ -568,7 +568,7 @@ case 'delete':
 
     /* Delete the images if we're provided with a valid image ID. */
     if (count($images)) {
-        if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE)) {
+        if (!$gallery->hasPermission($registry->getAuth(), Horde_Perms::DELETE)) {
             $notification->push(sprintf(_("Access denied deleting photos from \"%s\"."), $gallery->get('name')), 'horde.error');
         } else {
             foreach ($images as $image) {
@@ -688,8 +688,8 @@ case 'downloadzip':
     $galleryId = Horde_Util::getFormData('gallery');
     if ($galleryId) {
         $gallery = $ansel_storage->getGallery($galleryId);
-        if (!Horde_Auth::getAuth() ||
-            !$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ) ||
+        if (!$registry->getAuth() ||
+            !$gallery->hasPermission($registry->getAuth(), Horde_Perms::READ) ||
             $gallery->hasPasswd() || !$gallery->isOldEnough()) {
 
             $notification->push(sprintf(_("Access denied downloading photos from \"%s\"."), $gallery->get('name')), 'horde.error');
@@ -717,7 +717,7 @@ case 'downloadzip':
 
 case 'previewcrop':
 
-    if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+    if (!$gallery->hasPermission($registry->getAuth(), Horde_Perms::EDIT)) {
         $notification->push(_("Access denied editing the photo."), 'horde.error');
         $imageurl = Ansel::getUrlFor(
             'view', array('gallery' => $gallery_id,
@@ -749,7 +749,7 @@ case 'previewcrop':
     exit;
 
 case 'imagecrop':
-        if ($gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+        if ($gallery->hasPermission($registry->getAuth(), Horde_Perms::EDIT)) {
             $params = Horde_Util::getFormData('params');
             list($x1, $y1, $x2, $y2) = explode('.', $params);
             $image = &$ansel_storage->getImage($image_id);
index d508760..0bd3013 100644 (file)
@@ -13,14 +13,14 @@ Horde_Registry::appInit('ansel');
 
 $image = $ansel_storage->getImage(Horde_Util::getFormData('image'));
 $gallery = $ansel_storage->getGallery($image->gallery);
-if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ) || !$gallery->canDownload()) {
+if (!$gallery->hasPermission($registry->getAuth(), Horde_Perms::READ) || !$gallery->canDownload()) {
     throw new Horde_Exception_PermissionDenied(_("Access denied viewing this photo."), __FILE__, __LINE__);
 }
 $image->downloadHeaders();
 
 /* Sendfile support. Lighttpd < 1.5 only understands the X-LIGHTTPD-send-file header */
 if ($conf['vfs']['src'] == 'sendfile') {
-    $filename = $GLOBALS['injector']->getInstance('Horde_Vfs')->getVfs('images')->readFile($image->getVFSPath('full'), $image->getVFSName('full'));
+    $filename = $injector->getInstance('Horde_Vfs')->getVfs('images')->readFile($image->getVFSPath('full'), $image->getVFSName('full'));
     header('Content-Type: ' . $image->getType('full'));
     header('X-LIGHTTPD-send-file: ' . $filename);
     header('X-Sendfile: ' . $filename);
index 3e64f71..ffe1615 100644 (file)
@@ -13,13 +13,13 @@ Horde_Registry::appInit('ansel');
 
 $image = $ansel_storage->getImage(Horde_Util::getFormData('image'));
 $gallery = $ansel_storage->getGallery($image->gallery);
-if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ) || !$gallery->canDownload()) {
+if (!$gallery->hasPermission($registry->getAuth(), Horde_Perms::READ) || !$gallery->canDownload()) {
     throw new Horde_Exception_PermissionDenied(_("Access denied viewing this photo."));
 }
 
 /* Sendfile support. Lighttpd < 1.5 only understands the X-LIGHTTPD-send-file header */
 if ($conf['vfs']['src'] == 'sendfile') {
-    $filename = $GLOBALS['injector']->getInstance('Horde_Vfs')->getVfs('images')->readFile($image->getVFSPath('full'), $image->getVFSName('full'));
+    $filename = $injector->getInstance('Horde_Vfs')->getVfs('images')->readFile($image->getVFSPath('full'), $image->getVFSName('full'));
     header('Content-Type: ' . $image->getType('full'));
     header('X-LIGHTTPD-send-file: ' . $filename);
     header('X-Sendfile: ' . $filename);
index 66e583e..7e7e281 100644 (file)
@@ -13,13 +13,13 @@ Horde_Registry::appInit('ansel');
 
 $image = &$ansel_storage->getImage(Horde_Util::getFormData('image'));
 $gallery = $ansel_storage->getGallery($image->gallery);
-if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+if (!$gallery->hasPermission($registry->getAuth(), Horde_Perms::READ)) {
     throw new Horde_Exception_PermissionDenied(_("Access denied viewing this photo."));
 }
 
 /* Sendfile support. Lighttpd < 1.5 only understands the X-LIGHTTPD-send-file header */
 if ($conf['vfs']['src'] == 'sendfile') {
-    $filename = $GLOBALS['injector']->getInstance('Horde_Vfs')->getVfs('images')->readFile($image->getVFSPath('screen'), $image->getVFSName('screen'));
+    $filename = $injector->getInstance('Horde_Vfs')->getVfs('images')->readFile($image->getVFSPath('screen'), $image->getVFSName('screen'));
     header('Content-Type: ' . $image->getType('screen'));
     header('X-LIGHTTPD-send-file: ' . $filename);
     header('X-Sendfile: ' . $filename);
index 81f18dd..8ec5632 100644 (file)
@@ -13,7 +13,7 @@ Horde_Registry::appInit('ansel');
 
 $image = $ansel_storage->getImage(Horde_Util::getFormData('image'));
 $gallery = $ansel_storage->getGallery(abs($image->gallery));
-if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+if (!$gallery->hasPermission($registry->getAuth(), Horde_Perms::READ)) {
     throw new Horde_Exception_PermissionDenied(_("Access denied viewing this photo."));
 }
 
@@ -26,7 +26,7 @@ if ($conf['vfs']['src'] == 'sendfile') {
         Horde::logMessage($e, 'ERR');
         exit;
     }
-    $filename = $GLOBALS['injector']->getInstance('Horde_Vfs')->getVfs('images')->readFile($image->getVFSPath('mini'), $image->getVFSName('mini'));
+    $filename = $injector->getInstance('Horde_Vfs')->getVfs('images')->readFile($image->getVFSPath('mini'), $image->getVFSName('mini'));
     header('Content-Type: ' . $image->getType('mini'));
     header('X-LIGHTTPD-send-file: ' . $filename);
     header('X-Sendfile: ' . $filename);
index 40a7bcf..1942c30 100644 (file)
@@ -14,7 +14,7 @@ Horde_Registry::appInit('ansel');
 $style = Horde_Util::getFormData('style');
 $image = $ansel_storage->getImage(Horde_Util::getFormData('image'));
 $gallery = $ansel_storage->getGallery(abs($image->gallery));
-if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+if (!$gallery->hasPermission($registry->getAuth(), Horde_Perms::READ)) {
     throw new Horde_Exception_PermissionDenied(_("Access denied viewing this photo."));
 }
 
@@ -27,7 +27,7 @@ if ($conf['vfs']['src'] == 'sendfile') {
         Horde::logMessage($e, 'ERR');
         exit;
     }
-    $filename = $GLOBALS['injector']->getInstance('Horde_Vfs')->getVfs('images')->readFile($image->getVFSPath('prettythumb', $style), $image->getVFSName('prettythumb'));
+    $filename = $injector->getInstance('Horde_Vfs')->getVfs('images')->readFile($image->getVFSPath('prettythumb', $style), $image->getVFSName('prettythumb'));
     header('Content-Type: ' . $image->getType('prettythumb'));
     header('X-LIGHTTPD-send-file: ' . $filename);
     header('X-Sendfile: ' . $filename);
index 9e7a17a..1e7d838 100644 (file)
@@ -13,7 +13,7 @@ Horde_Registry::appInit('ansel');
 
 $image = &$ansel_storage->getImage(Horde_Util::getFormData('image'));
 $gallery = $ansel_storage->getGallery($image->gallery);
-if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+if (!$gallery->hasPermission($registry->getAuth(), Horde_Perms::READ)) {
     throw new Horde_Exception_PermissionDenied(_("Access denied viewing this photo."));
 }
 
@@ -26,7 +26,7 @@ if ($conf['vfs']['src'] == 'sendfile') {
         Horde::logMessage($result, 'ERR');
         exit;
     }
-    $filename = $GLOBALS['injector']->getInstance('Horde_Vfs')->getVfs('images')->readFile($image->getVFSPath('screen'), $image->getVFSName('screen'));
+    $filename = $injector->getInstance('Horde_Vfs')->getVfs('images')->readFile($image->getVFSPath('screen'), $image->getVFSName('screen'));
     header('Content-Type: ' . $image->getType('screen'));
     header('X-LIGHTTPD-send-file: ' . $filename);
     header('X-Sendfile: ' . $filename);
index f8a56cb..bb7b39c 100644 (file)
@@ -13,7 +13,7 @@ Horde_Registry::appInit('ansel');
 
 $image = $ansel_storage->getImage(Horde_Util::getFormData('image'));
 $gallery = $ansel_storage->getGallery(abs($image->gallery));
-if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+if (!$gallery->hasPermission($registry->getAuth(), Horde_Perms::READ)) {
     throw new Horde_Exception_PermissionDenied(_("Access denied viewing this photo."));
 }
 
@@ -26,7 +26,7 @@ if ($conf['vfs']['src'] == 'sendfile') {
         Horde::logMessage($result, 'ERR');
         exit;
     }
-    $filename = $GLOBALS['injector']->getInstance('Horde_Vfs')->getVfs('images')->readFile($image->getVFSPath('thumb'), $image->getVFSName('thumb'));
+    $filename = $injector->getInstance('Horde_Vfs')->getVfs('images')->readFile($image->getVFSPath('thumb'), $image->getVFSName('thumb'));
     header('Content-Type: ' . $image->getType('thumb'));
     header('X-LIGHTTPD-send-file: ' . $filename);
     header('X-Sendfile: ' . $filename);
index 1204a7b..4ecad89 100644 (file)
@@ -11,7 +11,7 @@
 require_once dirname(__FILE__) . '/../lib/Application.php';
 Horde_Registry::appInit('ansel');
 $gallery = $ansel_storage->getGallery((int)Horde_Util::getFormData('gallery'));
-if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+if (!$gallery->hasPermission($registry->getAuth(), Horde_Perms::READ)) {
     throw new Horde_Exception_PermissionDenied();
 }
 
index 8019c7f..057903f 100644 (file)
@@ -50,7 +50,7 @@ class Ansel_Ajax_Imple_EditCaption extends Horde_Ajax_Imple_Base
 
     public function handle($args, $post)
     {
-        if (Horde_Auth::getAuth()) {
+        if ($GLOBALS['registry']->getAuth()) {
             /* Are we requesting the unformatted text? */
             if (!empty($args['action']) && $args['action'] == 'load') {
                 $id = $args['id'];
@@ -68,7 +68,7 @@ class Ansel_Ajax_Imple_EditCaption extends Horde_Ajax_Imple_Base
             $id = $args['id'];
             $image = $GLOBALS['ansel_storage']->getImage($id);
             $g = $GLOBALS['ansel_storage']->getGallery($image->gallery);
-            if ($g->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+            if ($g->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
                 $image->caption = $pref_value;
                 try {
                     $result = $image->save();
index 2e1d0cb..ce66ae8 100644 (file)
@@ -30,7 +30,7 @@ class Ansel_Ajax_Imple_EditFaces extends Horde_Ajax_Imple_Base
 
     function handle($args, $post)
     {
-        if (Horde_Auth::getAuth()) {
+        if ($GLOBALS['registry']->getAuth()) {
             $action = $args['action'];
             $image_id = (int)$post['image'];
             $reload = empty($post['reload']) ? 0 : $post['reload'];
@@ -72,7 +72,7 @@ class Ansel_Ajax_Imple_EditFaces extends Horde_Ajax_Imple_Base
                 $face_id = (int)$post['face'];
                 $image = $GLOBALS['ansel_storage']->getImage($image_id);
                 $gallery = $GLOBALS['ansel_storage']->getGallery($image->gallery);
-                if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+                if (!$gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
                     throw new Horde_Exception('Access denied editing the photo.');
                 }
 
@@ -89,7 +89,7 @@ class Ansel_Ajax_Imple_EditFaces extends Horde_Ajax_Imple_Base
                 $name = $post['facename'];
                 $image = &$GLOBALS['ansel_storage']->getImage($image_id);
                 $gallery = &$GLOBALS['ansel_storage']->getGallery($image->gallery);
-                if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+                if (!$gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
                     throw new Horde_Exception('You are not allowed to edit this photo');
                 }
 
index 153c97a..8549272 100644 (file)
@@ -46,7 +46,7 @@ class Ansel_Ajax_Imple_ImageSaveGeotag extends Horde_Ajax_Imple_Base
         }
 
         // Bail out if no perms on the image.
-        if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+        if (!$gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
             return array('response' => 0);
         }
         switch ($type) {
@@ -64,7 +64,7 @@ class Ansel_Ajax_Imple_ImageSaveGeotag extends Horde_Ajax_Imple_Base
             // Now get the "add geotag" stuff
             $addurl = Horde::applicationUrl('map_edit.php')->add('image', $img);
             $addLink = $addurl->link(array('onclick' => Horde::popupJs(Horde::applicationUrl('map_edit.php'), array('params' => array('image' => $img), 'urlencode' => true, 'width' => '750', 'height' => '600')) . 'return false;'));
-            $imgs = $GLOBALS['ansel_storage']->getRecentImagesGeodata(Horde_Auth::getAuth());
+            $imgs = $GLOBALS['ansel_storage']->getRecentImagesGeodata($GLOBALS['registry']->getAuth());
             if (count($imgs) > 0) {
                 $imgsrc = '<div class="ansel_location_sameas">';
                 foreach ($imgs as $id => $data) {
index 6e6152c..ca5e2a3 100644 (file)
@@ -80,7 +80,7 @@ class Ansel_Ajax_Imple_TagActions extends Horde_Ajax_Imple_Base
 
                 return array('response' => 1,
                              'message' => $this->_getTagHtml($newTags,
-                                                             $parent->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)));
+                                                             $parent->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)));
             }
             break;
 
@@ -96,7 +96,7 @@ class Ansel_Ajax_Imple_TagActions extends Horde_Ajax_Imple_Base
 
             return array('response' => 1,
                          'message' => $this->_getTagHtml($newTags,
-                                                         $parent->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)));
+                                                         $parent->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)));
             break;
         }
 
index 686ef7d..272fe61 100644 (file)
@@ -362,7 +362,7 @@ class Ansel
             default:
                $url = Ansel::getUrlFor('view',
                                        array('view' => 'List',
-                                             'owner' => Horde_Auth::getAuth(),
+                                             'owner' => $GLOBALS['registry']->getAuth(),
                                              'groupby' => 'owner'),
                                        true);
                break;
@@ -567,24 +567,24 @@ class Ansel
                    (($GLOBALS['prefs']->getValue('defaultview') == 'galleries' &&
                      basename($_SERVER['PHP_SELF']) == 'index.php') ||
                     ((basename($_SERVER['PHP_SELF']) == 'group.php') &&
-                     Horde_Util::getFormData('owner') !== Horde_Auth::getAuth())
+                     Horde_Util::getFormData('owner') !== $GLOBALS['registry']->getAuth())
                     ? 'current'
                     : '__noselection'));
-        if (Horde_Auth::getAuth()) {
-            $url = Ansel::getUrlFor('view', array('owner' => Horde_Auth::getAuth(),
+        if ($GLOBALS['registry']->getAuth()) {
+            $url = Ansel::getUrlFor('view', array('owner' => $GLOBALS['registry']->getAuth(),
                                                   'groupby' => 'owner',
                                                   'view' => 'List'));
             $menu->add($url, _("_My Galleries"), 'mygalleries.png', null, null,
                        null,
-                       (Horde_Util::getFormData('owner', false) == Horde_Auth::getAuth())
+                       (Horde_Util::getFormData('owner', false) == $GLOBALS['registry']->getAuth())
                        ? 'current' :
                        '__noselection');
         }
 
         /* Let authenticated users create new galleries. */
         if ($GLOBALS['registry']->isAdmin() ||
-            (!$GLOBALS['injector']->getInstance('Horde_Perms')->exists('ansel') && Horde_Auth::getAuth()) ||
-            $GLOBALS['injector']->getInstance('Horde_Perms')->hasPermission('ansel', Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+            (!$GLOBALS['injector']->getInstance('Horde_Perms')->exists('ansel') && $GLOBALS['registry']->getAuth()) ||
+            $GLOBALS['injector']->getInstance('Horde_Perms')->hasPermission('ansel', $GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
             $menu->add(Horde::applicationUrl('gallery.php')->add('actionID', 'add'),
                        _("_New Gallery"), 'add.png', null, null, null,
                        (basename($_SERVER['PHP_SELF']) == 'gallery.php' &&
@@ -652,7 +652,7 @@ class Ansel
         if (!empty($owner)) {
             if (!$owner) {
                 $owner_title = _("System Galleries");
-            } elseif ($owner == Horde_Auth::getAuth()) {
+            } elseif ($owner == $GLOBALS['registry']->getAuth()) {
                 $owner_title = _("My Galleries");
             } elseif (!empty($GLOBALS['conf']['gallery']['customlabel'])) {
                 $uprefs = Horde_Prefs::singleton($GLOBALS['conf']['prefs']['driver'],
index 6de9e1b..fef8849 100644 (file)
@@ -81,7 +81,7 @@ class Ansel_Api extends Horde_Registry_Api
                 $gallery_id = end($parts);
                 $galleries = $GLOBALS['ansel_storage']->getGalleries(array($gallery_id));
                 if (!isset($galleries[$gallery_id]) ||
-                    !$galleries[$gallery_id]->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+                    !$galleries[$gallery_id]->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
 
                     throw new Horde_Exception_NotFound(_("Invalid gallery specified."));
                 }
@@ -115,7 +115,7 @@ class Ansel_Api extends Horde_Registry_Api
                 }
                 if (in_array('browseable', $properties)) {
                     $results[$retpath]['browseable'] = $gallery->hasPermission(
-                        Horde_Auth::getAuth(), Horde_Perms::READ);
+                        $GLOBALS['registry']->getAuth(), Horde_Perms::READ);
                 }
                 if (in_array('contenttype', $properties)) {
                     $results[$retpath]['contenttype'] = 'httpd/unix-directory';
@@ -191,7 +191,7 @@ class Ansel_Api extends Horde_Registry_Api
             throw new Horde_Exception_NotFound("Gallery does not exist");
         }
         $gallery = $GLOBALS['ansel_storage']->getGallery($gallery_id);
-        if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+        if (!$gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
             throw new Horde_Exception_PermissionDenied(_("Access denied adding photos to \"%s\"."));
         }
 
@@ -235,7 +235,7 @@ class Ansel_Api extends Horde_Registry_Api
     {
         if (($GLOBALS['conf']['comments']['allow'] == 'all' ||
             ($GLOBALS['conf']['comments']['allow'] == 'authenticated' &&
-            Horde_Auth::getAuth()))) {
+            $GLOBALS['registry']->getAuth()))) {
             return true;
         } else {
             return false;
@@ -339,7 +339,7 @@ class Ansel_Api extends Horde_Registry_Api
         } elseif ($GLOBALS['ansel_storage']->galleryExists($gallery_id)) {
             $gallery = $GLOBALS['ansel_storage']->getGallery($gallery_id);
         }
-        if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+        if (!$gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
             throw new Horde_Exception_PermissionDenied(sprintf(_("Access denied adding photos to \"%s\"."), $gallery->get('name')));
         }
         if (!empty($gallery_data)) {
@@ -414,7 +414,7 @@ class Ansel_Api extends Horde_Registry_Api
 
         $image = $GLOBALS['ansel_storage']->getImage($image_id);
         $gallery = $GLOBALS['ansel_storage']->getGallery($image->gallery);
-        if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE)) {
+        if (!$gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
             throw new Horde_Exception_PermissionDenied(sprintf(_("Access denied deleting photos from \"%s\"."), $gallery->get('name')));
         }
         return $gallery->removeImage($image);
@@ -437,8 +437,8 @@ class Ansel_Api extends Horde_Registry_Api
     public function createGallery($app = null, $attributes = array(), $perm = null, $parent = null)
     {
         if (!($GLOBALS['registry']->isAdmin() ||
-            (!$GLOBALS['injector']->getInstance('Horde_Perms')->exists('ansel') && Horde_Auth::getAuth()) ||
-            $GLOBALS['injector']->getInstance('Horde_Perms')->hasPermission('ansel', Horde_Auth::getAuth(), Horde_Perms::EDIT))) {
+            (!$GLOBALS['injector']->getInstance('Horde_Perms')->exists('ansel') && $GLOBALS['registry']->getAuth()) ||
+            $GLOBALS['injector']->getInstance('Horde_Perms')->hasPermission('ansel', $GLOBALS['registry']->getAuth(), Horde_Perms::EDIT))) {
 
             throw new Horde_Exception_PermissionDenied(_("Access denied creating new galleries."));
         }
@@ -483,7 +483,7 @@ class Ansel_Api extends Horde_Registry_Api
         }
 
         $gallery = $GLOBALS['ansel_storage']->getGallery($gallery_id);
-        if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE)) {
+        if (!$gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
             throw new Horde_Exception_PermissionDenied(sprintf(_("Access denied deleting gallery \"%s\"."), $gallery->get('name')));
         } else {
             $imageList = $gallery->listImages();
@@ -691,7 +691,7 @@ class Ansel_Api extends Horde_Registry_Api
         ensure the caller has at least Horde_Perms::READ on the galleries. */
         $galleries = array();
         foreach ($results as $gallery) {
-            if ($gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+            if ($gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
                 $galleries[$gallery->id] = array_merge($gallery->data, array('crumbs' => $gallery->getGalleryCrumbData()));
             }
         }
@@ -862,7 +862,7 @@ class Ansel_Api extends Horde_Registry_Api
             $GLOBALS['ansel_storage'] = new Ansel_Storage($app);
         }
 
-        return $GLOBALS['ansel_storage']->countGalleries(Horde_Auth::getAuth(), $perm,
+        return $GLOBALS['ansel_storage']->countGalleries($GLOBALS['registry']->getAuth(), $perm,
             $attributes, $parent,
             $allLevels);
     }
index 4ffd086..9416068 100644 (file)
@@ -36,7 +36,7 @@ class Horde_Block_ansel_gallery extends Horde_Block {
                             'type' => 'checkbox',
                             'default' => true));
 
-        if ($GLOBALS['ansel_storage']->countGalleries(Horde_Auth::getAuth(), Horde_Perms::READ) < $GLOBALS['conf']['gallery']['listlimit']) {
+        if ($GLOBALS['ansel_storage']->countGalleries($GLOBALS['registry']->getAuth(), Horde_Perms::READ) < $GLOBALS['conf']['gallery']['listlimit']) {
             foreach ($GLOBALS['ansel_storage']->listGalleries() as $gal) {
                 $params['gallery']['values'][$gal->id] = $gal->get('name');
             }
@@ -97,7 +97,7 @@ class Horde_Block_ansel_gallery extends Horde_Block {
         $html .= '<noscript>';
         $html .= $viewurl->link(array('title' => sprintf(_("View %s"), $gallery->get('name'))));
         if ($iid = $gallery->getDefaultImage('ansel_default') &&
-            $gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+            $gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
 
             $html .= '<img src="' . Ansel::getImageUrl($gallery->getDefaultImage('ansel_default'), 'thumb', true) . '" alt="' . htmlspecialchars($gallery->get('name')) . '" />';
         } else {
@@ -135,7 +135,7 @@ class Horde_Block_ansel_gallery extends Horde_Block {
 
         if (empty($this->_gallery)) {
             throw new Horde_Exception_NotFound(_("Gallery does not exist."));
-        } elseif (!$this->_gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::SHOW) ||
+        } elseif (!$this->_gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::SHOW) ||
                   !$this->_gallery->isOldEnough() || $this->_gallery->hasPasswd()) {
             throw new Horde_Exception_PermissionDenied(_("Access denied viewing this gallery."));
         }
index 91e4d4c..9fde9c1 100644 (file)
@@ -30,7 +30,7 @@ class Horde_Block_ansel_my_galleries extends Horde_Block {
     {
         return Ansel::getUrlFor('view',
                                 array('groupby' => 'owner',
-                                      'owner' => Horde_Auth::getAuth(),
+                                      'owner' => $GLOBALS['registry']->getAuth(),
                                       'view' => 'List'))->link()
             . _("My Galleries") . '</a>';
     }
@@ -41,7 +41,7 @@ class Horde_Block_ansel_my_galleries extends Horde_Block {
         /* Get the top level galleries */
         try {
             $galleries = $GLOBALS['ansel_storage']->listGalleries(
-                Horde_Perms::EDIT, Horde_Auth::getAuth(), null, false, 0,
+                Horde_Perms::EDIT, $GLOBALS['registry']->getAuth(), null, false, 0,
                 empty($this->_params['limit']) ? 0 : $this->_params['limit'],
                 'last_modified', 1);
 
index 532b5b2..8679f57 100644 (file)
@@ -29,7 +29,7 @@ class Horde_Block_ansel_recent_comments extends Horde_Block {
                             'default' => '__random',
                             'values' => array('all' => 'All')));
 
-        if ($GLOBALS['ansel_storage']->countGalleries(Horde_Auth::getAuth(), Horde_Perms::READ) < $GLOBALS['conf']['gallery']['listlimit']) {
+        if ($GLOBALS['ansel_storage']->countGalleries($GLOBALS['registry']->getAuth(), Horde_Perms::READ) < $GLOBALS['conf']['gallery']['listlimit']) {
             foreach ($GLOBALS['ansel_storage']->listGalleries(Horde_Perms::READ) as $id => $gal) {
                 $params['gallery']['values'][$id] = $gal->get('name');
             }
@@ -146,7 +146,7 @@ class Horde_Block_ansel_recent_comments extends Horde_Block {
 
         if (empty($this->_gallery)) {
             throw new Horde_Exception_NotFount(_("Gallery does not exist."));
-        } elseif (!$this->_gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+        } elseif (!$this->_gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
             throw new Horde_Exception_PermissionDenied(_("Access denied viewing this gallery."));
         }
 
index 189b5ae..a2d45da 100644 (file)
@@ -31,7 +31,7 @@ class Horde_Block_ansel_recently_added extends Horde_Block {
                              'default' => 10),
         );
 
-        if ($GLOBALS['ansel_storage']->countGalleries(Horde_Auth::getAuth(), Horde_Perms::READ) < $GLOBALS['conf']['gallery']['listlimit']) {
+        if ($GLOBALS['ansel_storage']->countGalleries($GLOBALS['registry']->getAuth(), Horde_Perms::READ) < $GLOBALS['conf']['gallery']['listlimit']) {
             foreach ($GLOBALS['ansel_storage']->listGalleries(Horde_Perms::READ) as $id => $gal) {
                 if (!$gal->hasPasswd() && $gal->isOldEnough()) {
                     $params['gallery']['values'][$id] = $gal->get('name');
@@ -178,7 +178,7 @@ HEADER;
 
         if (empty($this->_gallery)) {
             throw new Horde_Exception_NotFound(_("Gallery not found."));
-        } elseif (!$this->_gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+        } elseif (!$this->_gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
             throw new Horde_Exception_PermissionDenied(_("Access denied viewing this gallery."));
         }
 
index c7649f9..e26b892 100644 (file)
@@ -35,7 +35,7 @@ class Horde_Block_ansel_recently_added_geodata extends Horde_Block {
                              'default' => 250),
         );
 
-        if ($GLOBALS['ansel_storage']->countGalleries(Horde_Auth::getAuth(), Horde_Perms::READ) < $GLOBALS['conf']['gallery']['listlimit']) {
+        if ($GLOBALS['ansel_storage']->countGalleries($GLOBALS['registry']->getAuth(), Horde_Perms::READ) < $GLOBALS['conf']['gallery']['listlimit']) {
             foreach ($GLOBALS['ansel_storage']->listGalleries(Horde_Perms::READ) as $id => $gal) {
                 if (!$gal->hasPasswd() && $gal->isOldEnough()) {
                     $params['gallery']['values'][$id] = $gal->get('name');
@@ -153,7 +153,7 @@ EOT;
 
         if (empty($this->_gallery)) {
            throw new Horde_Exception_NotFound(_("Gallery not found."));
-        } elseif (!$this->_gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+        } elseif (!$this->_gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
             throw new Horde_Exception_PermissionDenied(_("Access denied viewing this gallery."));
         }
 
index e2b2857..aa3d4c5 100644 (file)
@@ -170,7 +170,7 @@ class Ansel_Faces_Base
         // an internally generated query string fragment. Will need to split
         // this out into two seperate operations somehow.
         $share = substr($GLOBALS['ansel_storage']->shares->getShareCriteria(
-            Horde_Auth::getAuth(), Horde_Perms::READ), 5);
+            $GLOBALS['registry']->getAuth(), Horde_Perms::READ), 5);
 
         $sql = 'SELECT f.face_id, f.gallery_id, f.image_id, f.face_name FROM ansel_faces f, '
                 . str_replace('WHERE', 'WHERE (', $share)
@@ -210,7 +210,7 @@ class Ansel_Faces_Base
         // add gallery permission
         // FIXME: Ditto on the REALLY ugly hack comment from above!
         $share = substr($GLOBALS['ansel_storage']->shares->getShareCriteria(
-            Horde_Auth::getAuth(), Horde_Perms::READ), 5);
+            $GLOBALS['registry']->getAuth(), Horde_Perms::READ), 5);
 
         $sql = 'SELECT COUNT(*) FROM ansel_faces f, '
                 . str_replace('WHERE', 'WHERE (', $share)
@@ -263,7 +263,7 @@ class Ansel_Faces_Base
             'order' => 'f.face_id DESC'
         );
 
-        if (!Horde_Auth::getAuth() || $owner != Horde_Auth::getAuth()) {
+        if (!$GLOBALS['registry']->getAuth() || $owner != $GLOBALS['registry']->getAuth()) {
             $info['filter'] .= ' AND s.gallery_passwd IS NULL';
         }
 
@@ -291,7 +291,7 @@ class Ansel_Faces_Base
     public function countOwnerFaces($owner)
     {
         $info = array('filter' => 's.share_owner = ' . $GLOBALS['ansel_db']->quote($owner));
-        if (!Horde_Auth::getAuth() || $owner != Horde_Auth::getAuth()) {
+        if (!$GLOBALS['registry']->getAuth() || $owner != $GLOBALS['registry']->getAuth()) {
             $info['filter'] .= ' AND s.gallery_passwd IS NULL';
         }
 
@@ -447,7 +447,7 @@ class Ansel_Faces_Base
     {
         $image = $GLOBALS['ansel_storage']->getImage($image);
         $gallery = $GLOBALS['ansel_storage']->getGallery($image->gallery);
-        if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+        if (!$gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
             throw new Horde_Exception_PermissionDenied('Access denied editing the photo.');
         }
 
@@ -536,7 +536,7 @@ class Ansel_Faces_Base
         if (!($image instanceof Ansel_Image)) {
             $image = $GLOBALS['ansel_storage']->getImage($image);
             $gallery = $GLOBALS['ansel_storage']->getGallery($image->gallery);
-            if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+            if (!$gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
                 throw new Horde_Exception_PermissionDenied('Access denied editing the photo.');
             }
         }
@@ -731,7 +731,7 @@ class Ansel_Faces_Base
     public function getFromGallery($gallery_id, $create = false, $force = false)
     {
         $gallery = $GLOBALS['ansel_storage']->getGallery($gallery_id);
-        if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+        if (!$gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
             throw new Horde_Exception(sprintf("Access denied editing gallery \"%s\".", $gallery->get('name')));
         }
 
index bf7b17f..aeb80c1 100644 (file)
@@ -19,7 +19,7 @@ class Ansel_Form_Ecard extends Horde_Form {
         $this->addHidden('', 'image', 'text', false);
         $this->addHidden('', 'image_desc', 'text', false);
 
-        $user = Horde_Auth::getAuth();
+        $user = $GLOBALS['registry']->getAuth();
         if (empty($user)) {
             $this->addVariable(_("Use the following return address:"), 'ecard_retaddr', 'text', true);
         } else {
index 33501e4..897fd78 100644 (file)
@@ -87,8 +87,8 @@ class Ansel_Gallery extends Horde_Share_Object_Sql_Hierarchical
      */
     public function canDownload()
     {
-        if (Horde_Auth::getAuth() &&
-            (Horde_Auth::getAuth() == $this->data['share_owner'] ||
+        if ($GLOBALS['registry']->getAuth() &&
+            ($GLOBALS['registry']->getAuth() == $this->data['share_owner'] ||
              $GLOBALS['registry']->isAdmin(array('permission' => 'ansel:admin')))) {
             return true;
         }
@@ -101,7 +101,7 @@ class Ansel_Gallery extends Horde_Share_Object_Sql_Hierarchical
             return $GLOBALS['registry']->isAuthenticated();
 
         case 'edit':
-            return $this->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT);
+            return $this->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT);
 
         case 'hook':
             return Horde::callHook('_ansel_hook_can_download', array($this->id));
@@ -378,7 +378,7 @@ class Ansel_Gallery extends Horde_Share_Object_Sql_Hierarchical
      */
     public function copyImagesTo($images, $gallery)
     {
-        if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+        if (!$gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
             throw new Horde_Exception_PermissionDenied(sprintf(_("Access denied copying photos to \"%s\"."), $gallery->get('name')));
         }
 
@@ -719,7 +719,7 @@ class Ansel_Gallery extends Horde_Share_Object_Sql_Hierarchical
      * @throws Horde_Exception
      */
     public function getTags() {
-        if ($this->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+        if ($this->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
             return Ansel_Tags::readTags($this->id, 'gallery');
         } else {
             throw new Horde_Exception(_("Access denied viewing this gallery."));
@@ -736,7 +736,7 @@ class Ansel_Gallery extends Horde_Share_Object_Sql_Hierarchical
      */
     public function setTags($tags)
     {
-        if ($this->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+        if ($this->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
             return Ansel_Tags::writeTags($this->id, $tags, 'gallery');
         } else {
             throw new Horde_Exception(_("Access denied adding tags to this gallery."));
@@ -806,8 +806,8 @@ class Ansel_Gallery extends Horde_Share_Object_Sql_Hierarchical
      */
     public function isOldEnough()
     {
-        if ((Horde_Auth::getAuth() &&
-             $this->data['share_owner'] == Horde_Auth::getAuth()) ||
+        if (($GLOBALS['registry']->getAuth() &&
+             $this->data['share_owner'] == $GLOBALS['registry']->getAuth()) ||
             empty($GLOBALS['conf']['ages']['limits']) ||
             empty($this->data['attribute_age'])) {
 
@@ -840,8 +840,8 @@ class Ansel_Gallery extends Horde_Share_Object_Sql_Hierarchical
      */
     public function hasPasswd()
     {
-        if (Horde_Auth::getAuth() &&
-            (Horde_Auth::getAuth() == $this->get('owner') ||
+        if ($GLOBALS['registry']->getAuth() &&
+            ($GLOBALS['registry']->getAuth() == $this->get('owner') ||
              $GLOBALS['registry']->isAdmin(array('permission' => 'ansel:admin')))) {
             return false;
         }
index f86386b..81170b2 100644 (file)
@@ -408,9 +408,9 @@ class Ansel_GalleryMode_Date
      */
     function moveImagesTo($images, $gallery)
     {
-        if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+        if (!$gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
             throw new Horde_Exception_PermissionDenied(sprintf(_("Access denied moving photos to \"%s\"."), $newGallery->get('name')));
-        } elseif (!$this->_gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE)) {
+        } elseif (!$this->_gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
             throw new Horde_Exception_PermissionDenied(sprintf(_("Access denied removing photos from \"%s\"."), $gallery->get('name')));
         }
 
@@ -537,7 +537,7 @@ class Ansel_GalleryMode_Date
         }
 
         /* Clear any comments */
-        if (($GLOBALS['conf']['comments']['allow'] == 'all' || ($GLOBALS['conf']['comments']['allow'] == 'authenticated' && Horde_Auth::getAuth())) &&
+        if (($GLOBALS['conf']['comments']['allow'] == 'all' || ($GLOBALS['conf']['comments']['allow'] == 'authenticated' && $GLOBALS['registry']->getAuth())) &&
             $GLOBALS['registry']->hasMethod('forums/deleteForum')) {
 
             $result = $GLOBALS['registry']->call('forums/deleteForum', array('ansel', $image->id));
@@ -959,7 +959,7 @@ class Ansel_Gallery_Date {
      */
     function countChildren($perm = Horde_Perms::SHOW, $allLevels = true)
     {
-        return $this->_gallery->getShareOb()->countShares(Horde_Auth::getAuth(), $perm, null, $this, $allLevels);
+        return $this->_gallery->getShareOb()->countShares($GLOBALS['registry']->getAuth(), $perm, null, $this, $allLevels);
     }
 
     /**
index 3ae1274..095a728 100644 (file)
@@ -66,7 +66,7 @@ class Ansel_GalleryMode_Normal {
             /* Get the number of images and galleries */
             $numimages = $this->countImages();
             $num_galleries = $GLOBALS['ansel_storage']->countGalleries(
-                Horde_Auth::getAuth(), Horde_Perms::SHOW, null, $this->_gallery, false);
+                $GLOBALS['registry']->getAuth(), Horde_Perms::SHOW, null, $this->_gallery, false);
 
             /* Now fetch the subgalleries, but only if we need to */
             if ($num_galleries > $from) {
@@ -142,7 +142,7 @@ class Ansel_GalleryMode_Normal {
             return $this->_gallery->data['attribute_images'];
         }
 
-        $gCnt = $GLOBALS['ansel_storage']->countGalleries(Horde_Auth::getAuth(),
+        $gCnt = $GLOBALS['ansel_storage']->countGalleries($GLOBALS['registry']->getAuth(),
                                                           $perm, null,
                                                           $this->_gallery, false);
 
@@ -178,9 +178,9 @@ class Ansel_GalleryMode_Normal {
      */
     function moveImagesTo($images, $gallery)
     {
-        if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+        if (!$gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
           throw new Horde_Exception_PermissionDenied(sprintf(_("Access denied moving photos to \"%s\"."), $newGallery->get('name')));
-        } elseif (!$this->_gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE)) {
+        } elseif (!$this->_gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
             throw new Horde_Exception_PermissionDenied(sprintf(_("Access denied removing photos from \"%s\"."), $gallery->get('name')));
         }
 
@@ -271,7 +271,7 @@ class Ansel_GalleryMode_Normal {
         }
 
         /* Clear any comments */
-        if (($GLOBALS['conf']['comments']['allow'] == 'all' || ($GLOBALS['conf']['comments']['allow'] == 'authenticated' && Horde_Auth::getAuth())) &&
+        if (($GLOBALS['conf']['comments']['allow'] == 'all' || ($GLOBALS['conf']['comments']['allow'] == 'authenticated' && $GLOBALS['registry']->getAuth())) &&
             $GLOBALS['registry']->hasMethod('forums/deleteForum')) {
 
             $result = $GLOBALS['registry']->call('forums/deleteForum',
index ac72939..99a6b44 100644 (file)
@@ -1011,7 +1011,7 @@ class Ansel_Image Implements Iterator
             $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity();
             $name = $identity->getValue('fullname');
             if (empty($name)) {
-                $name = Horde_Auth::getAuth();
+                $name = $GLOBALS['registry']->getAuth();
             }
             $watermark = sprintf(_("(c) %s %s"), date('Y'), $name);
         }
@@ -1122,7 +1122,7 @@ class Ansel_Image Implements Iterator
             return $this->_tags;
         }
         $gallery = $ansel_storage->getGallery($this->gallery);
-        if ($gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+        if ($gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
             return Ansel_Tags::readTags($this->id);
         } else {
             throw new Horde_Exception_PermissionDenied(_("Access denied viewing this photo."));
@@ -1142,7 +1142,7 @@ class Ansel_Image Implements Iterator
         global $ansel_storage;
 
         $gallery = $ansel_storage->getGallery(abs($this->gallery));
-        if ($gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+        if ($gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
             // Clear the local cache.
             $this->_tags = array();
             Ansel_Tags::writeTags($this->id, $tags);
index e5b79e7..d599250 100644 (file)
@@ -99,7 +99,7 @@ class Ansel_Report {
      */
     function getMessage($message)
     {
-        $message .=  "\n\n" . _("Report by user") . ': ' . Horde_Auth::getAuth()
+        $message .=  "\n\n" . _("Report by user") . ': ' . $GLOBALS['registry']->getAuth()
                  . ' (' . $_SERVER['REMOTE_ADDR'] . ')';
 
         return $message;
index 5ecda01..a805d68 100644 (file)
@@ -95,7 +95,7 @@ class Ansel_Storage
     {
         /* Required values. */
         if (empty($attributes['owner'])) {
-            $attributes['owner'] = Horde_Auth::getAuth();
+            $attributes['owner'] = $GLOBALS['registry']->getAuth();
         }
         if (empty($attributes['name'])) {
             $attributes['name'] = _("Unnamed");
@@ -222,7 +222,7 @@ class Ansel_Storage
 
             if ($perms) {
                 $groups = Horde_Group::singleton();
-                $group_list = $groups->getGroupMemberships(Horde_Auth::getAuth());
+                $group_list = $groups->getGroupMemberships($GLOBALS['registry']->getAuth());
                 if (count($group_list)) {
                     foreach ($group_list as $group_id => $group_name) {
                         $perm->addGroupPermission($group_id, $perms, false);
@@ -691,7 +691,7 @@ class Ansel_Storage
         global $conf, $registry;
 
         /* Need to get comment counts if comments are enabled */
-        if (($conf['comments']['allow'] == 'all' || ($conf['comments']['allow'] == 'authenticated' && Horde_Auth::getAuth())) &&
+        if (($conf['comments']['allow'] == 'all' || ($conf['comments']['allow'] == 'authenticated' && $GLOBALS['registry']->getAuth())) &&
             $registry->hasMethod('forums/numMessagesBatch')) {
 
             return $registry->call('forums/numMessagesBatch', array($ids, 'ansel'));
@@ -719,7 +719,7 @@ class Ansel_Storage
 
         if (!count($galleries) && !count($slugs)) {
             $sql = 'SELECT DISTINCT ' . $this->_getImageFields('i') . ' FROM ansel_images i, '
-            . str_replace('WHERE' , ' WHERE i.gallery_id = s.share_id AND (', substr($this->_shares->getShareCriteria(Horde_Auth::getAuth()), 5)) . ')';
+            . str_replace('WHERE' , ' WHERE i.gallery_id = s.share_id AND (', substr($this->_shares->getShareCriteria($GLOBALS['registry']->getAuth()), 5)) . ')';
         } elseif (!count($slugs) && count($galleries)) {
             // Searching by gallery_id
             $sql = 'SELECT ' . $this->_getImageFields() . ' FROM ansel_images '
@@ -921,7 +921,7 @@ class Ansel_Storage
                            $direction = 0)
     {
         try {
-            $shares = $this->_shares->listShares(Horde_Auth::getAuth(), $perm, $attributes,
+            $shares = $this->_shares->listShares($GLOBALS['registry']->getAuth(), $perm, $attributes,
                                                  $from, $count, $sort_by, $direction,
                                                  $parent, $allLevels);
 
@@ -967,7 +967,7 @@ class Ansel_Storage
             // image will not be incldued in the output.
             if (!isset($galleries[$gallery_id]['perm'])) {
                 $galleries[$gallery_id]['perm'] =
-                    ($galleries[$gallery_id]['gallery']->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ) &&
+                    ($galleries[$gallery_id]['gallery']->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ) &&
                      $galleries[$gallery_id]['gallery']->isOldEnough() &&
                      !$galleries[$gallery_id]['gallery']->hasPasswd());
             }
@@ -1014,7 +1014,7 @@ class Ansel_Storage
     public function getRandomGallery($perm = Horde_Perms::SHOW, $attributes = null,
                               $parent = null, $allLevels = true)
     {
-        $num_galleries = $this->countGalleries(Horde_Auth::getAuth(), $perm,
+        $num_galleries = $this->countGalleries($GLOBALS['registry']->getAuth(), $perm,
                                                $attributes, $parent,
                                                $allLevels);
         if (!$num_galleries) {
index b2f9507..7a187f1 100644 (file)
@@ -187,7 +187,7 @@ class Ansel_Tags
         $skey = md5(serialize($ids) . $from . $resource_type . $max . $user);
 
         if ($GLOBALS['conf']['ansel_cache']['usecache']) {
-           $key = Horde_Auth::getAuth() . '__anseltagsearches';
+           $key = $GLOBALS['registry']->getAuth() . '__anseltagsearches';
            $cvalue = $GLOBALS['injector']->getInstance('Horde_Cache')->get($key, 300);
            $cvalue = @unserialize($cvalue);
            if (!$cvalue) {
@@ -220,7 +220,7 @@ class Ansel_Tags
                         $img = $GLOBALS['ansel_storage']->getImage($id);
                         $gal = $GLOBALS['ansel_storage']->getGallery($img->gallery);
                         $owner = $gal->get('owner');
-                        if ($gal->hasPermission(Horde_Auth::getAuth(), Horde_Perms::SHOW) &&
+                        if ($gal->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::SHOW) &&
                             (!isset($user) || (isset($user) && $owner && $owner == $user))) {
                             $imgs[] = $id;
                         }
@@ -255,7 +255,7 @@ class Ansel_Tags
                         Horde::logMessage($e->getMessage(), 'ERR');
                         continue;
                     }
-                    if ($gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::SHOW)  && (!isset($user) || (isset($user) && $gallery->get('owner') && $gallery->get('owner') == $user))) {
+                    if ($gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::SHOW)  && (!isset($user) || (isset($user) && $gallery->get('owner') && $gallery->get('owner') == $user))) {
                         $results['galleries'][] = $id;
                     }
                 }
@@ -450,7 +450,7 @@ class Ansel_Tags
     static public function clearCache()
     {
         if ($GLOBALS['conf']['ansel_cache']['usecache']) {
-            $GLOBALS['injector']->getInstance('Horde_Cache')->expire(Horde_Auth::getAuth() . '__anseltagsearches');
+            $GLOBALS['injector']->getInstance('Horde_Cache')->expire($GLOBALS['registry']->getAuth() . '__anseltagsearches');
         }
     }
 }
@@ -528,7 +528,7 @@ class Ansel_Tags_Search {
                                                    $this->_owner);
 
             $images = count($iresults['images']) ? array_values($GLOBALS['ansel_storage']->getImages(array('ids' => $iresults['images']))) : array();
-            if (($conf['comments']['allow'] == 'all' || ($conf['comments']['allow'] == 'authenticated' && Horde_Auth::getAuth())) &&
+            if (($conf['comments']['allow'] == 'all' || ($conf['comments']['allow'] == 'authenticated' && $GLOBALS['registry']->getAuth())) &&
                 $registry->hasMethod('forums/numMessagesBatch')) {
 
                 $ids = array_keys($images);
index cedc2e9..ad54c99 100644 (file)
@@ -67,7 +67,7 @@ class Ansel_Tile_DateGallery
         }
 
         /* Check permissions on the gallery and get appropriate tile image */
-        if ($dgallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+        if ($dgallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
             if (is_null($style)) {
                 $style = $dgallery->getStyle();
             }
index 656cc97..a605bd2 100644 (file)
@@ -42,7 +42,7 @@ class Ansel_Tile_Gallery
         }
 
         /* Check gallery permissions and get appropriate tile image */
-        if ($gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+        if ($gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
             if (is_null($style)) {
                 $style = $gallery->getStyle();
             }
@@ -84,7 +84,7 @@ class Ansel_Tile_Gallery
         $text_link = $view_link . htmlspecialchars($gallery->get('name'), ENT_COMPAT, Horde_Nls::getCharset())
                      . '</a>';
 
-        if ($gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT) && !$mini) {
+        if ($gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT) && !$mini) {
             $properties_link = Horde::applicationUrl('gallery.php', true)->add(
                         array('gallery' => $gallery->id,
                               'actionID' => 'modify',
@@ -94,7 +94,7 @@ class Ansel_Tile_Gallery
         }
 
         if ($showOwner && !$mini &&
-            Horde_Auth::getAuth() != $gallery->get('owner')) {
+            $GLOBALS['registry']->getAuth() != $gallery->get('owner')) {
             $owner_link = Ansel::getUrlFor('view',
                                             array('view' => 'List',
                                                   'owner' => $gallery->get('owner'),
index 4619671..d6cb4fe 100644 (file)
@@ -93,8 +93,8 @@ class Ansel_Tile_Image
         }
 
         $thumb_url = Ansel::getImageUrl($image->id, $thumbstyle, true, $style['name']);
-        $option_select = $parent->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE);
-        $option_edit = $parent->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT);
+        $option_select = $parent->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE);
+        $option_edit = $parent->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT);
         $imgAttributes = (!empty($params['image_view_attributes']) ? $params['image_view_attributes'] : array());
 
         $imgOnClick = (!empty($params['image_onclick'])
index 77a49d4..9424d9a 100644 (file)
@@ -141,7 +141,7 @@ abstract class Ansel_View_Base
         } else {
             $gallery = $GLOBALS['ansel_storage']->getGallery($galleryId);
         }
-        if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+        if (!$gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
             throw new Horde_Exception(sprintf(_("Access denied to gallery \"%s\"."), $gallery->get('name')));
         }
 
index bfba1db..42d824b 100644 (file)
@@ -63,7 +63,7 @@ class Ansel_View_EmbeddedRenderer_GalleryLink extends Ansel_View_Gallery
                 Horde::logMessage($e, 'ERR');
                 exit;
             }
-            if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+            if (!$gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
                 return '';
             }
 
index ce73f33..2e7abc4 100644 (file)
@@ -57,7 +57,7 @@ class Ansel_View_EmbeddedRenderer_Mini extends Ansel_View_Gallery
 
             // We don't allow age restricted or password locked galleries to be
             // viewed via the mini embedded view since it shows *all* the images
-            if (!$this->gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ) ||
+            if (!$this->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ) ||
                 !$this->gallery->isOldEnough() ||
                 $this->gallery->hasPasswd()) {
 
index 0dd53d2..1f2d163 100644 (file)
@@ -81,7 +81,7 @@ class Ansel_View_Gallery extends Ansel_View_Base
             exit;
         }
 
-        if (!$this->gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+        if (!$this->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
             throw new Horde_Exception('Access denied viewing this gallery.');
         }
 
index 4cc0fee..164e3cd 100644 (file)
@@ -148,7 +148,7 @@ abstract class Ansel_View_GalleryRenderer_Base
             /* Special case widgets - these are built in */
             if (array_key_exists('Actions', $this->style['widgets'])) {
                 /* Don't show action widget if no actions */
-                if (Horde_Auth::getAuth() ||
+                if ($GLOBALS['registry']->getAuth() ||
                     !empty($conf['report_content']['driver']) &&
                     (($conf['report_content']['allow'] == 'authenticated' &&
                       $GLOBALS['registry']->isAuthenticated()) ||
index b699e03..724a933 100644 (file)
@@ -40,8 +40,8 @@ class Ansel_View_GalleryRenderer_Gallery extends Ansel_View_GalleryRenderer_Base
 
         /* Only need these if not being called via the api */
         if (empty($this->view->api)) {
-            $option_edit = $this->view->gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT);
-            $option_select = $option_delete = $this->view->gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE);
+            $option_edit = $this->view->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT);
+            $option_select = $option_delete = $this->view->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE);
             $option_move = ($option_delete && $GLOBALS['ansel_storage']->countGalleries(Horde_Perms::EDIT));
             $option_copy = ($option_edit && $GLOBALS['ansel_storage']->countGalleries(Horde_Perms::EDIT));
             /* See if we requested a show_actions change */
index 92d45a9..d241281 100644 (file)
@@ -62,10 +62,10 @@ class Ansel_View_GalleryRenderer_GalleryLightbox extends Ansel_View_GalleryRende
 
         /* Don't bother if we are being called from the api */
         if (empty($this->view->api)) {
-            $option_edit = $this->view->gallery->hasPermission(Horde_Auth::getAuth(),
+            $option_edit = $this->view->gallery->hasPermission($GLOBALS['registry']->getAuth(),
                                                          Horde_Perms::EDIT);
             $option_select = $option_delete = $this->view->gallery->hasPermission(
-                Horde_Auth::getAuth(), Horde_Perms::DELETE);
+                $GLOBALS['registry']->getAuth(), Horde_Perms::DELETE);
             $option_move = ($option_delete && $GLOBALS['ansel_storage']->countGalleries(Horde_Perms::EDIT));
             $option_copy = ($option_edit && $GLOBALS['ansel_storage']->countGalleries(Horde_Perms::EDIT));
             /* See if we requested a show_actions change (fallback for non-js) */
index d9416d1..5cfffd8 100644 (file)
@@ -226,7 +226,7 @@ class Ansel_View_Image extends Ansel_View_Base
         $imageIndex = $this->_revList[$this->resource->id];
 
         /* Get comments before any output in sent. */
-        if (($conf['comments']['allow'] == 'all' || ($conf['comments']['allow'] == 'authenticated' && Horde_Auth::getAuth())) &&
+        if (($conf['comments']['allow'] == 'all' || ($conf['comments']['allow'] == 'authenticated' && $GLOBALS['registry']->getAuth())) &&
             $registry->hasMethod('forums/doComments')) {
             $hasComments = true;
             if (!empty($this->_params['comment_url'])) {
@@ -362,7 +362,7 @@ class Ansel_View_Image extends Ansel_View_Base
             $this->addWidget(Ansel_Widget::factory('Links', array()));
 
             /* In line caption editing */
-            if ($this->gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+            if ($this->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
                 $imple = Horde_Ajax_Imple::factory(array('ansel', 'EditCaption'),
                                                 array('id' => $this->resource->id,
                                                       'domid' => "Caption",
index 4115637..188f0b5 100644 (file)
@@ -101,7 +101,7 @@ class Ansel_View_List extends Ansel_View_Base
                 $try = $ansel_storage->getGalleries($getThese);
                 $this->_galleryList = array();
                 foreach ($try as $id => $gallery) {
-                    if ($gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::SHOW)) {
+                    if ($gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::SHOW)) {
                         $this->_galleryList[$id] = $gallery;
                     }
                 }
@@ -120,10 +120,10 @@ class Ansel_View_List extends Ansel_View_Base
             }
 
             $this->_numGalleries = $ansel_storage->countGalleries(
-                Horde_Auth::getAuth(), Horde_Perms::SHOW, $filter, null, false);
+                $GLOBALS['registry']->getAuth(), Horde_Perms::SHOW, $filter, null, false);
 
             if ($this->_numGalleries == 0 && empty($this->_params['api'])) {
-                if ($this->_owner && $filter == $this->_owner && $this->_owner == Horde_Auth::getAuth()) {
+                if ($this->_owner && $filter == $this->_owner && $this->_owner == $GLOBALS['registry']->getAuth()) {
                     $notification->push(_("You have no photo galleries, add one!"),
                                         'horde.message');
                     header('Location: ' .Horde::applicationUrl('gallery.php')->add('actionID', 'add'));
@@ -148,7 +148,7 @@ class Ansel_View_List extends Ansel_View_Base
     public function getTitle()
     {
         if ($this->_owner) {
-            if ($this->_owner == Horde_Auth::getAuth() && empty($this->_params['api'])) {
+            if ($this->_owner == $GLOBALS['registry']->getAuth() && empty($this->_params['api'])) {
                 return  _("My Galleries");
             } elseif (!empty($GLOBALS['conf']['gallery']['customlabel'])) {
                 $uprefs = Horde_Prefs::singleton($GLOBALS['conf']['prefs']['driver'],
index 29f3009..e9cf14e 100644 (file)
@@ -61,7 +61,7 @@ class Ansel_View_Results extends Ansel_View_Base
              foreach ($images as $image) {
                  $img = $ansel_storage->getImage($image);
                  $gallery = $ansel_storage->getgallery($img->gallery);
-                 if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE)) {
+                 if (!$gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
                      $notification->push(
                         sprintf(_("Access denied deleting photos from \"%s\"."), $image), 'horde.error');
                  } else {
index d3c19d5..69dd380 100644 (file)
@@ -58,7 +58,7 @@ class Ansel_Widget_Actions extends Ansel_Widget_Base
             }
             $html .= '<li>' . $slideshow_url->link(array('class' => 'widget')) . Horde::img('slideshow_play.png', _("Start Slideshow")) . ' ' . _("Start Slideshow") . '</a></li>';
         }
-        if (!empty($uploadurl) && $this->_view->gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+        if (!empty($uploadurl) && $this->_view->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
             $html .= '<li>' . $uploadurl->link(array('class' => 'widget')) . Horde::img('image_add.png') . ' ' . _("Upload photos") . '</a></li>';
 
             /* Subgalleries */
@@ -136,7 +136,7 @@ class Ansel_Widget_Actions extends Ansel_Widget_Base
         }
 
         /* Image upload, subgalleries, captions etc... */
-        if ($this->_view->gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+        if ($this->_view->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
             /* Properties */
             $html .= '<li>' . $galleryurl->copy()->add(array('actionID' => 'modify', 'url' => $selfurl))->link(array('class' => 'widget')) . Horde::img('edit.png') . ' ' . _("Change properties") . '</a></li>';
             if ($count) {
@@ -173,8 +173,8 @@ class Ansel_Widget_Actions extends Ansel_Widget_Base
             }
         }
 
-        if (Horde_Auth::getAuth() &&
-            $this->_view->gallery->get('owner') == Horde_Auth::getAuth()) {
+        if ($GLOBALS['registry']->getAuth() &&
+            $this->_view->gallery->get('owner') == $GLOBALS['registry']->getAuth()) {
             $html .= '<li>' . Horde::link('#', '', 'popup widget', '', Horde::popupJs(Horde::applicationUrl('perms.php'), array('params' => array('cid' => $this->_view->gallery->id), 'urlencode' => true)) . 'return false;') . Horde::img('perms.png') . ' ' . _("Set permissions") . '</a></li>';
         } elseif (!empty($conf['report_content']['driver']) &&
             (($conf['report_content']['allow'] == 'authenticated' &&
@@ -185,7 +185,7 @@ class Ansel_Widget_Actions extends Ansel_Widget_Base
             $html .= '<li>' . $reporturl->link(array('class' => 'widget')) . _("Report") . '</a></li>';
         }
 
-        if ($this->_view->gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE)) {
+        if ($this->_view->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
             $html .= '<li>' . $galleryurl->copy()->add('actionID', 'empty')->link(array('class' => 'widget')) . Horde::img('delete.png') . ' ' . _("Delete All Photos") . '</a></li>';
             $html .= '<li>' . $galleryurl->copy()->add('actionID', 'delete')->link(array('class' => 'widget')) . Horde::img('delete.png', 'horde') . ' ' . _("Delete Entire Gallery") . '</a></li>';
         }
index 7067c4b..3294f90 100644 (file)
@@ -65,7 +65,7 @@ class Ansel_Widget_GalleryFaces extends Ansel_Widget_Base
             . ';width:100%;max-height:300px;overflow:auto;" id="faces_widget_content" >';
 
         $images = $faces->getGalleryFaces($this->_view->resource->id);
-        if ($this->_view->gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+        if ($this->_view->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
             $link_text = (empty($images) ? _("Find faces") : _("Edit faces"));
             $html .= Horde::applicationUrl('faces/gallery.php')->add('gallery', $this->_view->gallery->id)->link(
                          array('id' => 'edit_faces',
index 4b7af3e..d0df96c 100644 (file)
@@ -80,7 +80,7 @@ class Ansel_Widget_Geotag extends Ansel_Widget_Base
         $imple = Horde_Ajax_Imple::factory(array('ansel', 'ImageSaveGeotag'), array());
         $impleUrl = $imple->getUrl();
 
-        $permsEdit = $this->_view->gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT);
+        $permsEdit = $this->_view->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT);
         $viewType = $this->_view->viewType();
 
         if (count($geodata) == 0 && $viewType != 'Image') {
@@ -139,7 +139,7 @@ class Ansel_Widget_Geotag extends Ansel_Widget_Base
                 // Image view, but no geotags, provide ability to add it.
                 $addurl = Horde::applicationUrl('map_edit.php')->add('image', $this->_params['images'][0]);
                 $addLink = $addurl->link(array('onclick' => Horde::popupJs(Horde::applicationUrl('map_edit.php'), array('params' => array('image' => $this->_params['images'][0]), 'urlencode' => true, 'width' => '750', 'height' => '600')) . 'return false;'));
-                $imgs = $ansel_storage->getRecentImagesGeodata(Horde_Auth::getAuth());
+                $imgs = $ansel_storage->getRecentImagesGeodata($GLOBALS['registry']->getAuth());
                     if (count($imgs) > 0) {
                         $imgsrc = '<div class="ansel_location_sameas">';
                         foreach ($imgs as $id => $data) {
index 5991db4..ed102d0 100644 (file)
@@ -63,7 +63,7 @@ class Ansel_Widget_ImageFaces extends Ansel_Widget_Base
         // back on going to the find all faces in gallery page if no js...
         // although, currently, *that* page requires js as well so...
         // TODO: A way to 'close', or go back to, the normal widget view.
-        if ($this->_view->gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+        if ($this->_view->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
             $link_text = (empty($images) ? _("Find faces") : _("Edit faces"));
             $html .= Horde::applicationUrl('faces/gallery.php')->add('gallery', $this->_view->gallery->id)->link(
                     array('id' => 'edit_faces',
index d06e714..483840a 100644 (file)
@@ -33,7 +33,7 @@ class Ansel_Widget_Tags extends Ansel_Widget_Base
         /* Build the tag widget */
         $html = $this->_htmlBegin();
         $html .= '<div id="tags">' . $this->_getTagHTML() . '</div>';
-        if ($this->_view->gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+        if ($this->_view->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
             Horde::startBuffer();
             /* Attach the Ajax action */
             $imple = Horde_Ajax_Imple::factory(array('ansel', 'TagActions'),
@@ -71,7 +71,7 @@ class Ansel_Widget_Tags extends Ansel_Widget_Base
             Ansel_Tags::clearSearch();
         }
 
-        $hasEdit = $this->_view->gallery->hasPermission(Horde_Auth::getAuth(),
+        $hasEdit = $this->_view->gallery->hasPermission($GLOBALS['registry']->getAuth(),
                                                         Horde_Perms::EDIT);
         $owner = $this->_view->gallery->get('owner');
         $tags = $this->_view->resource->getTags();
index 9356443..15e7afe 100644 (file)
@@ -24,7 +24,7 @@ if (empty($image_id)) {
 }
 $image = $ansel_storage->getImage($image_id);
 $gallery = $ansel_storage->getGallery($image->gallery);
-if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+if (!$gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
     throw new Horde_Exception_PermissionDenied(_("Not Authorized. Details have been logged for the server administrator."));
 }
 
@@ -72,7 +72,7 @@ $gtUrl = $gt->getUrl();
 $loadingImg = Horde::img('loading.gif', _("Loading..."));
 
 /* Obtain other geotagged images to possibly locate this image at */
-$imgs = $GLOBALS['ansel_storage']->getRecentImagesGeodata(Horde_Auth::getAuth());
+$imgs = $GLOBALS['ansel_storage']->getRecentImagesGeodata($GLOBALS['registry']->getAuth());
 if (count($imgs) > 0) {
     $other_images = '<div class="ansel_location_sameas">' . _("Click on a thumbnail to locate at the same point.") . '<br />';
     foreach ($imgs as $id => $data) {
index 4306479..c2e3717 100644 (file)
@@ -42,8 +42,8 @@ case 'edit':
         }
     }
 
-    if (!Horde_Auth::getAuth() ||
-        (isset($share) && Horde_Auth::getAuth() != $share->get('owner'))) {
+    if (!$GLOBALS['registry']->getAuth() ||
+        (isset($share) && $GLOBALS['registry']->getAuth() != $share->get('owner'))) {
         exit('permission denied');
     }
     break;
@@ -57,8 +57,8 @@ case 'editforminherit':
     }
 
     if (!empty($share)) {
-        if (!Horde_Auth::getAuth() ||
-            Horde_Auth::getAuth() != $share->get('owner')) {
+        if (!$GLOBALS['registry']->getAuth() ||
+            $GLOBALS['registry']->getAuth() != $share->get('owner')) {
             exit('permission denied');
         }
         $perm = $share->getPermission();
@@ -67,7 +67,7 @@ case 'editforminherit':
         $old_owner = $share->get('owner');
         $new_owner = Horde_Util::getFormData('owner', $old_owner);
         if ($old_owner !== $new_owner && !empty($new_owner)) {
-            if ($old_owner != Horde_Auth::getAuth() && !$registry->isAdmin()) {
+            if ($old_owner != $GLOBALS['registry']->getAuth() && !$registry->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);
index 2611114..99ff408 100644 (file)
@@ -20,7 +20,7 @@ try {
     Horde::logMessage($e->getMessage(), 'ERR');
     exit;
 }
-if ($gal->hasPermission(Horde_Auth::getAuth(), Horde_Perms::SHOW) &&
+if ($gal->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::SHOW) &&
     !$gal->hasPasswd() &&
     $gal->isOldEnough()) {
 
index c6966e6..98ab659 100644 (file)
@@ -18,7 +18,7 @@ $stream_type = Horde_Util::getFormData('stream_type', 'all');
 $id = Horde_Util::getFormData('id');
 $type = basename(Horde_Util::getFormData('type', 'rss2'));
 $slug = Horde_Util::getFormData('slug');
-$uid = md5($stream_type . $id . $type . Horde_Auth::getAuth());
+$uid = md5($stream_type . $id . $type . $GLOBALS['registry']->getAuth());
 $filename = 'ansel_feed_template_' . $uid;
 if ($conf['ansel_cache']['usecache']) {
     $cache_key = 'ansel_feed_template_' . $uid;
@@ -77,7 +77,7 @@ if (empty($rss)) {
         } elseif (is_numeric($id)) {
             $gallery = $ansel_storage->getGallery($id);
         }
-        if ($gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::SHOW) &&
+        if ($gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::SHOW) &&
             !$gallery->hasPasswd() && $gallery->isOldEnough()) {
 
             if (!$gallery->countImages() && $gallery->hasSubGalleries()) {
@@ -218,7 +218,7 @@ if (empty($rss)) {
             }
             if (!isset($galleries[$gallery_id]['perm'])) {
                 $galleries[$gallery_id]['perm'] =
-                    ($galleries[$gallery_id]['gallery']->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ) &&
+                    ($galleries[$gallery_id]['gallery']->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ) &&
                      $galleries[$gallery_id]['gallery']->isOldEnough() &&
                      !$galleries[$gallery_id]['gallery']->hasPasswd());
             }
index ef065f3..b7fca0d 100755 (executable)
@@ -108,7 +108,7 @@ if (!empty($galleryId)) {
         $cli->fatal($error);
     } else {
         $gallery = $ansel_storage->getGallery($galleryId);
-        if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+        if (!$gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
             $error = sprintf(_("Access denied adding photos to \"%s\"."), $galleryId);
             Horde::logMessage($error, 'WARN');
             $cli->fatal($error);
index bb68610..0a252b8 100644 (file)
@@ -113,7 +113,7 @@ if ($prefs->isLocked('default_download')) {
   </td>
 </tr>
 <?php } ?>
-<?php if (Horde_Auth::getAuth() && !empty($gallery) && Horde_Auth::getAuth() == $gallery->get('owner')): ?>
+<?php if ($GLOBALS['registry']->getAuth() && !empty($gallery) && $GLOBALS['registry']->getAuth() == $gallery->get('owner')): ?>
 <tr>
   <td align="right" valign="top"><strong><?php echo _("Gallery Password") ?></strong>&nbsp;</td>
   <td><input name="gallery_passwd" type="password" value="<?php echo htmlspecialchars($gallery_passwd) ?>" size="50" /></td>
index 6d68cf0..0308fd2 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 $num_galleries = $GLOBALS['ansel_storage']->countGalleries(
-    Horde_Auth::getAuth(), Horde_Perms::SHOW, array('category' => $group), null, false);
+    $GLOBALS['registry']->getAuth(), Horde_Perms::SHOW, array('category' => $group), null, false);
 
 if (empty($group)) {
     $category_title = _("Unfiled");
index 24a2270..aebc265 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-if ($group == Horde_Auth::getAuth()) {
+if ($group == $GLOBALS['registry']->getAuth()) {
     $owner_title = _("My Galleries");
     $custom = '';
 } elseif (!empty($GLOBALS['conf']['gallery']['customlabel'])) {
@@ -25,7 +25,7 @@ $link = Horde::link(Ansel::getUrlFor('view', array('groupby' => $groupby,
                                                    'owner' => $group,
                                                    'view' => 'List')));
 
-$num_galleries = $ansel_storage->countGalleries(Horde_Auth::getAuth(), Horde_Perms::SHOW,
+$num_galleries = $ansel_storage->countGalleries($GLOBALS['registry']->getAuth(), Horde_Perms::SHOW,
                                                 $group, null, false);
 if ($num_galleries < 5) {
     $mini_galleries = $ansel_storage->listGalleries(Horde_Perms::SHOW,
index 186965f..1310004 100644 (file)
@@ -16,11 +16,11 @@ $image_url = $base_url->copy()->add(array(
 ?>
 <div class="control anselActions" style="text-align:center;">
 <?php
-if ($gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+if ($gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
     echo $save_url->link(array('title' => _("Save Change")))
              . Horde::img('save.png') . ' ' . _("Save Change") . '</a> ';
 }
-if ($gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+if ($gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
     echo $edit_url->link(array('title' => _("Cancel Change")))
              . Horde::img('delete.png') . ' ' . _("Cancel Change") . '</a>';
 }
index a541920..d9cd9c8 100644 (file)
@@ -18,11 +18,11 @@ $image_url = $base_url->copy()->add(array('actionID' => 'image' . $action,
 ?>
 <div class="control anselActions" style="text-align:center;">
 <?php
-if ($gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+if ($gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
     echo $save_url->link(array('title' => _("Save Change")))
              . Horde::img('save.png') . ' ' . _("Save Change") . '</a> ';
 }
-if ($gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+if ($gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
     echo $edit_url->link(array('title' => _("Cancel Change")))
              . Horde::img('delete.png') . ' ' . _("Cancel Change") . '</a>';
 }
index eff0be3..56dc065 100644 (file)
@@ -1,13 +1,13 @@
 <?php echo '<div class="image-tile" id="imagetile_' . (int)$image->id . '">' . Horde::link($view_url, $image->filename, '', '', $imgOnClick, $title, '', $imgAttributes) . '<img src="' . $thumb_url  . '" alt="' . htmlspecialchars($image->filename) . '" /></a>'; ?>
  <div style="valign: bottom;">
  <div class="image-tile-caption" id="<?php echo (int)$image->id . 'caption'?>"><?php echo $imageCaption ?></div>
-<?php if (Horde_Auth::getAuth() || $option_select): ?>
+<?php if ($GLOBALS['registry']->getAuth() || $option_select): ?>
 <div><label><input type="checkbox" class="checkbox" name="image[<?php echo (int)$image->id ?>]" /> <?php echo _("Select for Action") ?></label></div>
 <?php endif; ?>
 <?php if ($view != 'Gallery'): ?>
 <div><?php echo _("From: ") . Horde::link($gallery_url) . $parent->get('name') ?></a></div>
 <?php endif; ?>
-<?php if (($conf['comments']['allow'] == 'all' || ($conf['comments']['allow'] == 'authenticated' && Horde_Auth::getAuth())) && empty($params['hide_comments'])): ?>
+<?php if (($conf['comments']['allow'] == 'all' || ($conf['comments']['allow'] == 'authenticated' && $GLOBALS['registry']->getAuth())) && empty($params['hide_comments'])): ?>
  <div><?php echo Horde::link($img_view_url . '#messagediv', _("View or leave comments")) ?> <?php printf(ngettext("%d comment", "%d comments", $image->commentCount), $image->commentCount) ?></a></div>
 <?php endif;
 if ($option_select): ?>
index 1e29d1c..fd3b4b5 100644 (file)
@@ -54,12 +54,12 @@ function arrowHandler(e)
     <?php
         $needSeperator = false;
         $actionHTML = '';
-        if ($this->gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT) && empty($this->_params['api'])) {
+        if ($this->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT) && empty($this->_params['api'])) {
             $needSeperator = true;
             $actionHTML .= Horde::link('#', '', '', '_blank', $this->_urls['prop_popup'] . 'return false;', '', '', array('id' => 'image_properties_link')) . _("Properties") . '</a>';
             $actionHTML .= ' | ' . Horde::link($this->_urls['edit'], '', '', '', '', '', '', array('id' => 'image_edit_link')) . _("Edit") . '</a>';
         }
-        if ($this->gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE) && empty($this->_params['api'])) {
+        if ($this->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE) && empty($this->_params['api'])) {
             $actionHTML .= ' | ' . Horde::link($this->_urls['delete'], '', '', '', 'return window.confirm(\'' . addslashes(sprintf(_("Do you want to permanently delete ''%s''?"), $this->resource->filename)) . '\');', '', '', array('id' => 'image_delete_link')) . _("Delete") . '</a>';
         }
         if (!empty($conf['ecard']['enable']) && !empty($this->_urls['ecard'])) {
@@ -69,8 +69,8 @@ function arrowHandler(e)
             $actionHTML .= (empty($this->_params['api']) && $needSeperator ? ' | ' : '') . Horde::link($this->_urls['download'], '', '', '', '', '', '', array('id' => 'image_download_link')) . _("Download Original Photo"); $needSeperator = true . '</a>';
         }
         if (empty($this->_params['api']) &&
-            (!Horde_Auth::getAuth() ||
-             $this->gallery->get('owner') != Horde_Auth::getAuth()) &&
+            (!$GLOBALS['registry']->getAuth() ||
+             $this->gallery->get('owner') != $GLOBALS['registry']->getAuth()) &&
             !empty($GLOBALS['conf']['report_content']['driver']) &&
             (($conf['report_content']['allow'] == 'authenticated' &&
               $GLOBALS['registry']->isAuthenticated()) ||
index 753143e..81d9bc4 100644 (file)
@@ -13,11 +13,11 @@ function stopSlideShow()
 <table width="100%" cellspacing="0">
  <tr class="control">
   <td>
-    <?php if ($this->gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)): ?>
+    <?php if ($this->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)): ?>
         <?php echo Horde::link('#', '', '', '_blank', 'SlideController.pause();' . $this->_urls['prop_popup'], '', '', array('id' => 'image_properties_link')) . _("Properties") ?></a>
       | <?php echo Horde::link(Horde::applicationUrl($this->_urls['edit']), '', '', '', '', '', '', array('id' => 'image_edit_link')) . _("Edit") ?></a>
     <?php endif; ?>
-    <?php if ($this->gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE)): ?>
+    <?php if ($this->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)): ?>
       | <?php echo Horde::link($this->_urls['delete'], '', '', '', 'return window.confirm(\'' . addslashes(sprintf(_("Do you want to permanently delete \"%s\"?"), $this->resource->filename)) . '\');', '', '', array('id' => 'image_delete_link')) . _("Delete") ?></a>
     <?php endif; ?>
   </td>
index fbaa5bf..e81d1dc 100644 (file)
@@ -171,7 +171,7 @@ if ($cmd == 'add') {
     } else {
         try {
             $gallery = $ansel_storage->getGallery($galleryId);
-            if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+            if (!$gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
                 $error = sprintf(_("Access denied adding photos to \"%s\"."), $gallery->get('name'));
             } else {
                 $error = false;
index c3b2c1f..9d70eae 100644 (file)
@@ -162,7 +162,7 @@ class Babel {
      */
     function hasPermission($permission, $filter = null, $perm = null)
     {
-       $userId = Horde_Auth::getAuth();
+       $userId = $GLOBALS['registry']->getAuth();
        $admin = ($userId == 'admin') ? true : false;
     $perms = $GLOBALS['injector']->getInstance('Horde_Perms');
 
@@ -175,7 +175,7 @@ class Babel {
        switch ($filter) {
         case 'tabs':
            if ($perm) {
-               $allowed  = $perms->hasPermission('babel:' . $permission, Horde_Auth::getAuth(), $perm);
+               $allowed  = $perms->hasPermission('babel:' . $permission, $GLOBALS['registry']->getAuth(), $perm);
            }
            break;
        }
index 3eb596c..14240d4 100644 (file)
@@ -343,7 +343,7 @@ if (!$app) {
        if ($editmode && $cstring == $encstr) {
 
            // Lock the current item for 5 minutes
-           $locks->setLock(Horde_Auth::getAuth(), md5($encstr), $lockscope, 300);
+           $locks->setLock($GLOBALS['registry']->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 4a8f51f..e6995db 100644 (file)
@@ -483,10 +483,10 @@ class Beatnik {
         $user = 0;
         $superadmin = 0;
 
-        $superadmin = $GLOBALS['injector']->getInstance('Horde_Perms')->hasPermission('beatnik:domains', Horde_Auth::getAuth(), $permmask);
+        $superadmin = $GLOBALS['injector']->getInstance('Horde_Perms')->hasPermission('beatnik:domains', $GLOBALS['registry']->getAuth(), $permmask);
 
         while ($numparents >= 0) {
-            $tmpuser = $GLOBALS['injector']->getInstance('Horde_Perms')->hasPermission($permname, Horde_Auth::getAuth(), $permmask);
+            $tmpuser = $GLOBALS['injector']->getInstance('Horde_Perms')->hasPermission($permname, $GLOBALS['registry']->getAuth(), $permmask);
 
             $user = $user | $tmpuser;
             if ($numparents > 0) {
index f7100ce..fa7b395 100644 (file)
@@ -65,9 +65,9 @@ class Beatnik_Driver {
         }
 
         if (!$GLOBALS['registry']->isAdmin() &&
-            !$GLOBALS['injector']->getInstance('Horde_Perms')->hasPermission('beatnik:domains', Horde_Auth::getAuth(), $perms)) {
+            !$GLOBALS['injector']->getInstance('Horde_Perms')->hasPermission('beatnik:domains', $GLOBALS['registry']->getAuth(), $perms)) {
             foreach ($domains as $id => $domain) {
-                if (!$GLOBALS['injector']->getInstance('Horde_Perms')->hasPermission('beatnik:domains:' . $domain['zonename'], Horde_Auth::getAuth(), $perms)) {
+                if (!$GLOBALS['injector']->getInstance('Horde_Perms')->hasPermission('beatnik:domains:' . $domain['zonename'], $GLOBALS['registry']->getAuth(), $perms)) {
                     unset($domains[$id]);
                 }
             }
index 0fb1203..6997fac 100644 (file)
@@ -11,7 +11,7 @@
 <p>
 <?php
 echo _("Domain Categories") . ' ';
-if (Horde_Auth::getAuth() && (!$prefs->isLocked('categories') || !$prefs->isLocked('category_colors'))) {
+if ($GLOBALS['registry']->getAuth() && (!$prefs->isLocked('categories') || !$prefs->isLocked('category_colors'))) {
     $categoryUrl = Horde_Util::addParameter(Horde::url($registry->get('webroot', 'horde') . '/services/prefs.php'),
                                         array('app' => 'horde', 'group' => 'categories'));
     echo Horde::link($categoryUrl, _("Edit domain groups and colors"), 'widget', '_blank') .
index 3caf089..51f881a 100644 (file)
@@ -168,7 +168,7 @@ class Chora
     static public function checkPerms($key)
     {
         return (!$GLOBALS['injector']->getInstance('Horde_Perms')->exists('chora:sourceroots:' . $key) ||
-                $GLOBALS['injector']->getInstance('Horde_Perms')->hasPermission('chora:sourceroots:' . $key, Horde_Auth::getAuth(), Horde_Perms::READ | Horde_Perms::SHOW));
+                $GLOBALS['injector']->getInstance('Horde_Perms')->hasPermission('chora:sourceroots:' . $key, $GLOBALS['registry']->getAuth(), Horde_Perms::READ | Horde_Perms::SHOW));
     }
 
     /**
index 5af5694..6230694 100644 (file)
@@ -67,7 +67,7 @@ case 'add_account':
 
 case 'modify_account':
     $account_id = $vars->get('account');
-    if (!$share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+    if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
         $notification->push(_("Access denied editing account."), 'horde.error');
     } else {
         $account = Fima::getAccount($account_id);
@@ -77,7 +77,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(Horde_Auth::getAuth(), Horde_Perms::DELETE));
+            $form = new Fima_AccountForm($vars, sprintf(_("Edit: %s"), trim($account['number'] . ' ' . $account['name'])), $share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE));
             break;
         }
     }
@@ -100,7 +100,7 @@ case 'save_account':
     }
 
     $form->getInfo($vars, $info);
-    if (!$share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+    if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
         $notification->push(sprintf(_("Access denied saving account to %s."), $share->get('name')), 'horde.error');
         header('Location: ' . Horde::applicationUrl('accounts.php', true));
         exit;
@@ -169,7 +169,7 @@ case 'save_account':
 
 case 'delete_account':
     $account_id = $vars->get('account');
-    if (!$share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE)) {
+    if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
         $notification->push(_("Access denied deleting account."), 'horde.error');
     } else {
         $account = Fima::getAccount($account_id);
@@ -180,7 +180,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(Horde_Auth::getAuth(), Horde_Perms::EDIT));
+            $form = new Fima_AccountDeleteForm($vars, sprintf(_("Delete: %s"), trim($account['number'] . ' ' . $account['name'])), $share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT));
             break;
         }
     }
@@ -203,7 +203,7 @@ case 'purge_account':
     }
 
     $form->getInfo($vars, $info);
-    if (!$share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE)) {
+    if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_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 70a15f3..edca6e8 100644 (file)
@@ -23,7 +23,7 @@ if (is_a($share, 'PEAR_Error')) {
 $actionID = Horde_Util::getFormData('actionID');
 switch ($actionID) {
 case 'delete_all':
-    if (!$share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE)) {
+    if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
         $notification->push(_("Access denied deleting all accounts and postings."), 'horde.error');
     } else {
         $storage = &Fima_Driver::singleton($ledger);
index bc26a07..57caf4d 100644 (file)
@@ -26,7 +26,7 @@ $prefGroups['display'] = array(
 // active ledger
 // Set locked to true if you don't want users to have multiple ledgers.
 $_prefs['active_ledger'] = array(
-    'value' => Horde_Auth::getAuth() ? Horde_Auth::getAuth() : 0
+    'value' => $GLOBALS['registry']->getAuth() ? $GLOBALS['registry']->getAuth() : 0
     'type' => 'enum',
     'shared' => true
 );
index 410fbac..2587c81 100644 (file)
@@ -12,7 +12,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 (!Horde_Auth::getAuth() || $prefs->isLocked('active_ledger')) {
+if (!$GLOBALS['registry']->getAuth() || $prefs->isLocked('active_ledger')) {
     header('Location: ' . Horde::applicationUrl('postings.php', true));
     exit;
 }
index ec03e7f..94398c1 100644 (file)
@@ -11,14 +11,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 (!Horde_Auth::getAuth()) {
+if (!$GLOBALS['registry']->getAuth()) {
     header('Location: ' . Horde::applicationUrl('postings.php', true));
     exit;
 }
 
 $vars = Horde_Variables::getDefaultVariables();
 $ledger_id = $vars->get('l');
-if ($ledger_id == Horde_Auth::getAuth()) {
+if ($ledger_id == $GLOBALS['registry']->getAuth()) {
     $notification->push(_("This ledger cannot be deleted."), 'horde.warning');
     header('Location: ' . Horde::applicationUrl('ledgers/', true));
     exit;
@@ -29,7 +29,7 @@ if (is_a($ledger, 'PEAR_Error')) {
     $notification->push($ledger, 'horde.error');
     header('Location: ' . Horde::applicationUrl('ledgers/', true));
     exit;
-} elseif ($ledger->get('owner') != Horde_Auth::getAuth()) {
+} elseif ($ledger->get('owner') != $GLOBALS['registry']->getAuth()) {
     $notification->push(_("You are not allowed to delete this ledger."), 'horde.error');
     header('Location: ' . Horde::applicationUrl('ledgers/', true));
     exit;
index bc38cb0..c606e04 100644 (file)
@@ -11,7 +11,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 (!Horde_Auth::getAuth()) {
+if (!$GLOBALS['registry']->getAuth()) {
     header('Location: ' . Horde::applicationUrl('postings.php', true));
     exit;
 }
@@ -22,7 +22,7 @@ if (is_a($ledger, 'PEAR_Error')) {
     $notification->push($ledger, 'horde.error');
     header('Location: ' . Horde::applicationUrl('ledgers/', true));
     exit;
-} elseif ($ledger->get('owner') != Horde_Auth::getAuth()) {
+} elseif ($ledger->get('owner') != $GLOBALS['registry']->getAuth()) {
     $notification->push(_("You are not allowed to change this ledger."), 'horde.error');
     header('Location: ' . Horde::applicationUrl('ledgers/', true));
     exit;
index 807b182..be14034 100644 (file)
@@ -10,7 +10,7 @@
 require_once FIMA_BASE . '/lib/base.php';
 
 /* Exit if this isn't an authenticated user. */
-if (!Horde_Auth::getAuth()) {
+if (!$GLOBALS['registry']->getAuth()) {
     require FIMA_BASE . '/postings.php';
     exit;
 }
index 296fbac..78e8575 100644 (file)
@@ -35,7 +35,7 @@ class Horde_Block_fima_summary extends Horde_Block {
                      'show_ledger' => array(
                          'type' => 'enum',
                          'name' => _("Show summary of this ledger"),
-                         'default' => Horde_Auth::getAuth(),
+                         'default' => $GLOBALS['registry']->getAuth(),
                          'values' => $ledgers),
                      'show_months' => array(
                          'type' => 'enum',
index 3508a5b..a3786dc 100644 (file)
@@ -189,7 +189,7 @@ class Fima {
      */
     function listLedgers($owneronly = false, $permission = Horde_Perms::SHOW)
     {
-        $ledgers = $GLOBALS['fima_shares']->listShares(Horde_Auth::getAuth(), $permission, $owneronly ? Horde_Auth::getAuth() : null);
+        $ledgers = $GLOBALS['fima_shares']->listShares($GLOBALS['registry']->getAuth(), $permission, $owneronly ? $GLOBALS['registry']->getAuth() : null);
         if (is_a($ledgers, 'PEAR_Error')) {
             Horde::logMessage($ledgers, 'ERR');
             return array();
@@ -704,7 +704,7 @@ class Fima {
 
         if (count($GLOBALS['display_ledgers']) == 0) {
             $ledgerss = Fima::listLedgers(true);
-            if (!Horde_Auth::getAuth()) {
+            if (!$GLOBALS['registry']->getAuth()) {
                 /* All ledgers for guests. */
                 $GLOBALS['display_ledgers'] = array_keys($ledgers);
             } else {
@@ -715,19 +715,19 @@ class Fima {
                 }
 
                 /* If the user's personal ledger doesn't exist, then create it. */
-                if (!$GLOBALS['fima_shares']->exists(Horde_Auth::getAuth())) {
+                if (!$GLOBALS['fima_shares']->exists($GLOBALS['registry']->getAuth())) {
                     $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity();
                     $name = $identity->getValue('fullname');
                     if (trim($name) == '') {
-                        $name = Horde_Auth::getOriginalAuth();
+                        $name = $GLOBALS['registry']->getAuth('original');
                     }
-                    $share = &$GLOBALS['fima_shares']->newShare(Horde_Auth::getAuth());
+                    $share = &$GLOBALS['fima_shares']->newShare($GLOBALS['registry']->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(Horde_Auth::getAuth(), $GLOBALS['display_ledgers'])) {
-                        $GLOBALS['display_ledgers'][] = Horde_Auth::getAuth();
+                    if (!in_array($GLOBALS['registry']->getAuth(), $GLOBALS['display_ledgers'])) {
+                        $GLOBALS['display_ledgers'][] = $GLOBALS['registry']->getAuth();
                     }
                 }
             }
@@ -757,7 +757,7 @@ class Fima {
         $menu->add(Horde::applicationUrl('search.php'), _("Search"), 'search.png', $hordeimg);
         $menu->add(Horde::applicationUrl('accounts.php'), _("_Accounts"), 'accounts.png');
 
-        if (Horde_Auth::getAuth()) {
+        if ($GLOBALS['registry']->getAuth()) {
             $menu->add(Horde::applicationUrl('ledgers/index.php'), _("_My Ledgers"), 'accounts.png');
         }
 
index 3e453c6..0969d6e 100644 (file)
@@ -46,7 +46,7 @@ class Fima_DeleteLedgerForm extends Horde_Form {
             return false;
         }
 
-        if ($this->_ledger->get('owner') != Horde_Auth::getAuth()) {
+        if ($this->_ledger->get('owner') != $GLOBALS['registry']->getAuth()) {
             return PEAR::raiseError(_("Permission denied"));
         }
 
@@ -66,13 +66,13 @@ 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(Horde_Auth::getAuth())) {
+            if (!$GLOBALS['fima_shares']->exists($GLOBALS['registry']->getAuth())) {
                 $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity();
                 $name = $identity->getValue('fullname');
                 if (trim($name) == '') {
-                    $name = Horde_Auth::getOriginalAuth();
+                    $name = $GLOBALS['registry']->getAuth('original');
                 }
-                $ledger = &$GLOBALS['fima_shares']->newShare(Horde_Auth::getAuth());
+                $ledger = &$GLOBALS['fima_shares']->newShare($GLOBALS['registry']->getAuth());
                 if (is_a($ledger, 'PEAR_Error')) {
                     return;
                 }
index d7e600e..4fc0434 100644 (file)
@@ -167,7 +167,7 @@ case 'save_postings':
     $postingset = Horde_Util::getFormData('posting_id');
 
     $share = &$GLOBALS['fima_shares']->getShare($ledger);
-    if (!$share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+    if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
         $notification->push(sprintf(_("Access denied saving postings to %s."), $share->get('name')), 'horde.error');
         header('Location: ' . Horde::applicationUrl('postings.php', true));
         exit;
@@ -282,7 +282,7 @@ case 'delete_postings':
     $postingset = Horde_Util::getFormData('indices');
 
     $share = &$GLOBALS['fima_shares']->getShare($ledger);
-    if (!$share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE)) {
+    if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
         $notification->push(sprintf(_("Access denied deleting postings from %s."), $share->get('name')), 'horde.error');
         header('Location: ' . Horde::applicationUrl('postings.php', true));
         exit;
@@ -313,7 +313,7 @@ case 'update_postings':
     $postingset = Horde_Util::getFormData('posting_id');
 
     $share = &$GLOBALS['fima_shares']->getShare($ledger);
-    if (!$share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+    if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
         $notification->push(sprintf(_("Access denied shifting postings in %s."), $share->get('name')), 'horde.error');
         header('Location: ' . Horde::applicationUrl('postings.php', true));
         exit;
@@ -348,11 +348,11 @@ case 'update_postings':
 
 case 'copymove_postings':
     $share = &$GLOBALS['fima_shares']->getShare($ledger);
-    if (!$share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+    if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_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(Horde_Auth::getAuth(), Horde_Perms::DELETE) && (!Horde_Util::getFormData('keep') || Horde_Util::getFormData('delete'))) {
+    } elseif (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_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 1cdad54..011753f 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
-$perm_edit = $share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT);
-$perm_delete = $share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE);
+$perm_edit = $share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT);
+$perm_delete = $share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE);
 
 ?>
 <script type="text/javascript">
index aa7a360..09dd3f6 100644 (file)
@@ -30,7 +30,7 @@ function _getCAPTCHA($new = false)
 
 // We are already logged
 if ($registry->isAuthenticated()) {
-    header('Location: ' . Folks::getUrlFor('user', Horde_Auth::getAuth()));
+    header('Location: ' . Folks::getUrlFor('user', $GLOBALS['registry']->getAuth()));
     exit;
 }
 
index 01742e6..2ea8b5b 100644 (file)
@@ -128,7 +128,7 @@ class Folks_Hooks
             return $GLOBALS['registry']->callByPackage('ansel', 'listGalleries', array('ansel', Horde_Perms::SHOW, null, true, 0, 3, $user));
 
         case 'blogs':
-            return $GLOBALS['registry']->callByPackage('thomas', 'getRecentPosts', array($user, Horde_Auth::getAuth(), '', 3));
+            return $GLOBALS['registry']->callByPackage('thomas', 'getRecentPosts', array($user, $GLOBALS['registry']->getAuth(), '', 3));
 
         case 'classifieds':
             return $GLOBALS['registry']->callByPackage('classified', 'listAds', array(array('user_uid' => $user), 0, 3));
@@ -208,7 +208,7 @@ class Folks_Hooks
     public function prelogin($app)
     {
         $group = Horde_Group::singleton();
-        $user_uid = Horde_Auth::getAuth();
+        $user_uid = $GLOBALS['registry']->getAuth();
 
         switch ($app) {
 
@@ -353,7 +353,7 @@ class Folks_Hooks
             return;
         }
 
-        $user = Horde_Auth::getAuth();
+        $user = $GLOBALS['registry']->getAuth();
         if ($user) {
             return;
         }
index fb07a96..7a1b939 100644 (file)
@@ -43,7 +43,7 @@ if ($form->validate()) {
     }
 }
 
-$activities = $folks_driver->getActivity(Horde_Auth::getAuth());
+$activities = $folks_driver->getActivity($GLOBALS['registry']->getAuth());
 if ($activities instanceof PEAR_Error) {
     $notification->push($activities);
     header('Location: ' . Folks::getUrlFor('list', 'list'));
index 9942eb2..196c3aa 100644 (file)
@@ -47,8 +47,8 @@ if (!$form->isSubmitted()) {
     if (Horde_Util::getFormData('submitbutton') == _("Delete all current comments")) {
 
         try {
-            $registry->call('forums/deleteForum', array('folks', Horde_Auth::getAuth()));
-            $result = $folks_driver->updateComments(Horde_Auth::getAuth(), true);
+            $registry->call('forums/deleteForum', array('folks', $GLOBALS['registry']->getAuth()));
+            $result = $folks_driver->updateComments($GLOBALS['registry']->getAuth(), true);
             if ($result instanceof PEAR_Error) {
                 $notification->push($result);
             } else {
@@ -63,8 +63,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' => Horde_Auth::getAuth(),
-                            'forum_name' => Horde_Auth::getAuth(),
+            $info = array('author' => $GLOBALS['registry']->getAuth(),
+                            'forum_name' => $GLOBALS['registry']->getAuth(),
                             'forum_moderated' => ($profile['user_comments'] == 'moderate'));
             try {
                 $registry->call('forums/saveFrom', array('folks', '', $info));
index 60badf6..6b3a4bb 100644 (file)
@@ -17,7 +17,7 @@ require_once 'tabs.php';
 
 $title = _("Edit my profile");
 
-$profile = $folks_driver->getRawProfile(Horde_Auth::getAuth());
+$profile = $folks_driver->getRawProfile($GLOBALS['registry']->getAuth());
 if ($profile instanceof PEAR_Error) {
     $notification->push($profile);
     header('Location: ' . Folks::getUrlFor('list', 'list'));
@@ -35,7 +35,7 @@ $form->addVariable(_("Homepage"), 'user_url', 'text', false);
 
 if ($registry->hasMethod('video/listVideos')) {
     try {
-        $result = $registry->call('video/listVideos', array(array('author' => Horde_Auth::getAuth()), 0, 100));
+        $result = $registry->call('video/listVideos', array(array('author' => $GLOBALS['registry']->getAuth()), 0, 100));
         $videos = array();
         foreach ($result as $video_id => $video) {
             $videos[$video_id] = $video['video_title'] . ' - ' . Folks::format_date($video['video_created']);
@@ -75,7 +75,7 @@ if ($form->validate()) {
     break;
 
     case _("Delete picture"):
-        $result = $folks_driver->deleteImage(Horde_Auth::getAuth());;
+        $result = $folks_driver->deleteImage($GLOBALS['registry']->getAuth());;
         if ($result instanceof PEAR_Error) {
             $notification->push($result);
         } else {
index 9657206..892af7d 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"),
-                                        Horde_Auth::getAuth(),
+                                        $GLOBALS['registry']->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"),
-                            Horde_Auth::getAuth(),
+                            $GLOBALS['registry']->getAuth(),
                             $registry->get('name', 'horde'),
-                            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));
+                            Horde_Util::addParameter(Horde::applicationUrl('edit/friends/approve.php', true, -1), 'user', $GLOBALS['registry']->getAuth()),
+                            Horde_Util::addParameter(Horde::applicationUrl('edit/friends/reject.php', true, -1), 'user', $GLOBALS['registry']->getAuth()),
+                            Folks::getUrlFor('user', $GLOBALS['registry']->getAuth(), true, -1));
             $result = $friends->sendNotification($user, $title, $body);
             if ($result instanceof PEAR_Error) {
                 $notification->push($result);
index 0c7ebf4..5f27092 100644 (file)
@@ -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"),
-                    Horde_Auth::getAuth(),
+                    $GLOBALS['registry']->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"),
-                Horde_Auth::getAuth(),
+                $GLOBALS['registry']->getAuth(),
                 $registry->get('name', 'horde'),
-                Folks::getUrlFor('user', Horde_Auth::getAuth(), true, -1));
+                Folks::getUrlFor('user', $GLOBALS['registry']->getAuth(), true, -1));
 
 $friends->sendNotification($user, $title, $body);
 
index 34e59c8..ed5528d 100644 (file)
@@ -26,15 +26,15 @@ $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(Horde_Auth::getAuth()), $registry->get('name', 'horde')));
+$v->setDefault(sprintf(_("%s Invited to join %s."), ucfirst($GLOBALS['registry']->getAuth()), $registry->get('name', 'horde')));
 
 $v = &$form->addVariable(_("Body"), 'body', 'longtext', true);
 try {
     $body = Horde::loadConfiguration('invite.php', 'body', 'folks');
     $body = sprintf($body, $registry->get('name', 'horde'),
-                            Folks::getUrlFor('user', Horde_Auth::getAuth(), true),
+                            Folks::getUrlFor('user', $GLOBALS['registry']->getAuth(), true),
                             Horde::applicationUrl('account/signup.php', true),
-                            Horde_Auth::getAuth());
+                            $GLOBALS['registry']->getAuth());
 } catch (Horde_Exception $e) {
     $body = $body->getMessage();
 }
index a085539..4eeed93 100644 (file)
@@ -26,7 +26,7 @@ if (empty($user)) {
 }
 
 $friends = Folks_Friends::singleton(null, array('user' => $user));
-$result = $friends->removeFriend(Horde_Auth::getAuth());
+$result = $friends->removeFriend($GLOBALS['registry']->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"),
-                    Horde_Auth::getAuth(),
+                    $GLOBALS['registry']->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"),
-                Horde_Auth::getAuth(),
+                $GLOBALS['registry']->getAuth(),
                 $registry->get('name', 'horde'),
-                Folks::getUrlFor('user', Horde_Auth::getAuth(), true, -1));
+                Folks::getUrlFor('user', $GLOBALS['registry']->getAuth(), true, -1));
 
 $friends->sendNotification($user, $title, $body);
 
index eee926e..cdd52c0 100644 (file)
@@ -150,7 +150,7 @@ do {
     }
 
     // try to chage it
-    $result = $folks_driver->changePassword($info['new'], Horde_Auth::getAuth());
+    $result = $folks_driver->changePassword($info['new'], $GLOBALS['registry']->getAuth());
     if ($result instanceof PEAR_Error) {
         $notification->push($result);
         break;
index c0735ba..f3ab162 100644 (file)
@@ -17,7 +17,7 @@ require_once 'tabs.php';
 
 $title = _("Privacy");
 
-$profile = $folks_driver->getRawProfile(Horde_Auth::getAuth());
+$profile = $folks_driver->getRawProfile($GLOBALS['registry']->getAuth());
 if ($profile instanceof PEAR_Error) {
     $notification->push($profile);
     header('Location: ' . Folks::getUrlFor('list', 'list'));
index 6e6aa73..b4db402 100644 (file)
@@ -59,7 +59,7 @@ krsort($firendActivities);
 $firendActivities = array_slice($firendActivities, 0, 30);
 
 // Own activities
-$activities = $folks_driver->getActivity(Horde_Auth::getAuth());
+$activities = $folks_driver->getActivity($GLOBALS['registry']->getAuth());
 if ($activities instanceof PEAR_Error) {
     $notification->push($activities);
     header('Location: ' . Folks::getUrlFor('list', 'list'));
index fb13631..2988e14 100644 (file)
@@ -225,7 +225,7 @@ class Folks_Api extends Horde_Registry_Api
 
         $friends = Folks_Friends::singleton('sql', array('user' => $user));
 
-        return $friends->isBlacklisted(Horde_Auth::getAuth());
+        return $friends->isBlacklisted($GLOBALS['registry']->getAuth());
     }
 
     /**
@@ -298,8 +298,8 @@ class Folks_Api extends Horde_Registry_Api
     public function logActivity($message, $scope = 'folks', $user = null)
     {
         if (empty($user)) {
-            $user = Horde_Auth::getAuth();
-        } elseif ($user !== Horde_Auth::getAuth() &&
+            $user = $GLOBALS['registry']->getAuth();
+        } elseif ($user !== $GLOBALS['registry']->getAuth() &&
                   !$GLOBALS['registry']->isAdmin(array('permission' => 'admin:' . $scope))) {
             return PEAR::raiseError(_("You cannot log activities for other users."));
         }
@@ -337,7 +337,7 @@ class Folks_Api extends Horde_Registry_Api
         require_once dirname(__FILE__) . '/base.php';
 
         if ($user == null) {
-            $user = Horde_Auth::getAuth();
+            $user = $GLOBALS['registry']->getAuth();
         }
 
         if ($online) {
@@ -361,7 +361,7 @@ class Folks_Api extends Horde_Registry_Api
         require_once dirname(__FILE__) . '/base.php';
 
         if ($user == null) {
-            $user = Horde_Auth::getAuth();
+            $user = $GLOBALS['registry']->getAuth();
         }
 
         return $GLOBALS['folks_driver']->isOnline($user);
index ade8f92..4a9b6a4 100644 (file)
@@ -55,13 +55,13 @@ class Horde_Block_folks_my_comments extends Horde_Block {
 
         try {
             $threads = $GLOBALS['registry']->call('forums/getThreadsByForumOwner',
-                                                  array(Horde_Auth::getAuth(), 'message_timestamp', 1, false,
+                                                  array($GLOBALS['registry']->getAuth(), 'message_timestamp', 1, false,
                                                   'folks', 0, $this->_params['limit']));
         } catch (Horde_Exception $e) {
             return $e->getMessage();
         }
 
-        $url = Folks::getUrlFor('user', Horde_Auth::getAuth());
+        $url = Folks::getUrlFor('user', $GLOBALS['registry']->getAuth());
         foreach ($threads as $message) {
             $html .= '<tr><td>'
                   . '<a href="' . $url . '" title="' . $message['message_date']. '">'
index 4d0e024..d9ffa30 100644 (file)
@@ -273,7 +273,7 @@ class Folks_Driver {
 
             // Update profile
             if ($GLOBALS['registry']->isAuthenticated()) {
-                $this->_saveProfile(array('last_online_on' => $_SERVER['REQUEST_TIME']), Horde_Auth::getAuth());
+                $this->_saveProfile(array('last_online_on' => $_SERVER['REQUEST_TIME']), $GLOBALS['registry']->getAuth());
             }
         }
 
@@ -302,7 +302,7 @@ class Folks_Driver {
         static $profiles;
 
         if ($user == null) {
-            $user = Horde_Auth::getAuth();
+            $user = $GLOBALS['registry']->getAuth();
         }
 
         if (empty($user)) {
@@ -386,7 +386,7 @@ class Folks_Driver {
     public function changePassword($password, $user = null)
     {
         if ($user == null) {
-            $user = Horde_Auth::getAuth();
+            $user = $GLOBALS['registry']->getAuth();
         }
 
         $password = hash('md5', $password);
@@ -403,7 +403,7 @@ class Folks_Driver {
     public function saveProfile($data, $user = null)
     {
         if ($user == null) {
-            $user = Horde_Auth::getAuth();
+            $user = $GLOBALS['registry']->getAuth();
         }
 
         $GLOBALS['cache']->expire('folksProfile' . $user);
@@ -465,7 +465,7 @@ class Folks_Driver {
         // Delete groups
         if ($GLOBALS['conf']['friends']) {
             $shares = $GLOBALS['injector']->getInstance('Horde_Share')->getScope();
-            $groups = $shares->listShares(Horde_Auth::getAuth(), Horde_Perms::SHOW, true);
+            $groups = $shares->listShares($GLOBALS['registry']->getAuth(), Horde_Perms::SHOW, true);
             foreach ($groups as $share) {
                 $result = $shares->removeShare($share);
                 if ($result instanceof PEAR_Error) {
@@ -500,7 +500,7 @@ class Folks_Driver {
     public function getAttributes($user = null, $group = null)
     {
         if ($user == null) {
-            $user = Horde_Auth::getAuth();
+            $user = $GLOBALS['registry']->getAuth();
         }
 
         $attributes = $GLOBALS['cache']->get('folksUserAttributes' . $user, $GLOBALS['conf']['cache']['default_lifetime']);
@@ -527,7 +527,7 @@ class Folks_Driver {
     public function saveAttributes($data, $group, $user = null)
     {
         if ($user == null) {
-            $user = Horde_Auth::getAuth();
+            $user = $GLOBALS['registry']->getAuth();
         }
 
         $GLOBALS['cache']->expire('folksAttributes' . $user);
@@ -602,7 +602,7 @@ class Folks_Driver {
     */
     public function saveSearch($criteria, $name)
     {
-        $GLOBALS['cache']->expire('folksearch' . Horde_Auth::getAuth());
+        $GLOBALS['cache']->expire('folksearch' . $GLOBALS['registry']->getAuth());
 
         return $this->_saveSearch($criteria, $name);
     }
@@ -614,7 +614,7 @@ class Folks_Driver {
     */
     public function getSavedSearch()
     {
-        $search = $GLOBALS['cache']->get('folksearch' . Horde_Auth::getAuth(), $GLOBALS['conf']['cache']['default_lifetime']);
+        $search = $GLOBALS['cache']->get('folksearch' . $GLOBALS['registry']->getAuth(), $GLOBALS['conf']['cache']['default_lifetime']);
         if ($search) {
             return unserialize($search);
         }
@@ -624,7 +624,7 @@ class Folks_Driver {
             return $search;
         }
 
-        $GLOBALS['cache']->set('folksearch' . Horde_Auth::getAuth(), serialize($search));
+        $GLOBALS['cache']->set('folksearch' . $GLOBALS['registry']->getAuth(), serialize($search));
 
         return $search;
     }
@@ -653,7 +653,7 @@ class Folks_Driver {
     */
     public function deleteSavedSearch($name)
     {
-        $GLOBALS['cache']->expire('folksearch' . Horde_Auth::getAuth());
+        $GLOBALS['cache']->expire('folksearch' . $GLOBALS['registry']->getAuth());
 
         return $this->_deleteSavedSearch($name);
     }
@@ -670,7 +670,7 @@ class Folks_Driver {
     public function logActivity($message, $scope = 'folks', $user = null)
     {
         if ($user == null) {
-            $user = Horde_Auth::getAuth();
+            $user = $GLOBALS['registry']->getAuth();
         }
 
         if (empty($message)) {
@@ -738,7 +738,7 @@ class Folks_Driver {
     */
     public function deleteActivity($scope, $date)
     {
-        $user = Horde_Auth::getAuth();
+        $user = $GLOBALS['registry']->getAuth();
         $GLOBALS['cache']->expire($user . '_activity');
         return $this->_deleteActivity($scope, $date, $user);
     }
index 69a801e..1511802 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(Horde_Auth::getAuth(), $_SERVER['REMOTE_ADDR'], $_SERVER['REQUEST_TIME']));
+        return $this->_write_db->query($query, array($GLOBALS['registry']->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, Horde_Auth::getAuth(), $_SERVER['REQUEST_TIME']));
+        return $this->_write_db->query($query, array($id, $GLOBALS['registry']->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(Horde_Auth::getAuth()));
+        return $this->_db->getCol($query, 0, array($GLOBALS['registry']->getAuth()));
     }
 
    /**
@@ -466,7 +466,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(Horde_Auth::getAuth(), $name, $criteria));
+        return $this->_write_db->query($query, array($GLOBALS['registry']->getAuth(), $name, $criteria));
     }
 
    /**
@@ -478,7 +478,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', Horde_Auth::getAuth());
+        return $this->_db->getCol($query, 'search_name', $GLOBALS['registry']->getAuth());
     }
 
    /**
@@ -492,7 +492,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(Horde_Auth::getAuth(), $name));
+        return $this->_db->getOne($query, array($GLOBALS['registry']->getAuth(), $name));
     }
 
    /**
@@ -504,7 +504,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(Horde_Auth::getAuth(), $name));
+        return $this->_write_db->query($query, array($GLOBALS['registry']->getAuth(), $name));
     }
 
    /**
index 7d727ab..77b3e82 100644 (file)
@@ -292,7 +292,7 @@ class Folks {
     {
         $img = Horde_Themes::img(null, 'horde');
         $menu = new Horde_Menu(Horde_Menu::MASK_ALL);
-        $menu->add(self::getUrlFor('user', Horde_Auth::getAuth()), _("My profile"), 'myaccount.png', $img);
+        $menu->add(self::getUrlFor('user', $GLOBALS['registry']->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 f217eca..857fdef 100644 (file)
@@ -93,7 +93,7 @@ class Folks_Friends {
     static public function singleton($driver = null, $params = null)
     {
         if (empty($params['user'])) {
-            $params['user'] = Horde_Auth::getAuth();
+            $params['user'] = $GLOBALS['registry']->getAuth();
         }
 
         $signature = $driver . ':' . $params['user'];
@@ -112,7 +112,7 @@ class Folks_Friends {
      */
     protected function __construct($params)
     {
-        $this->_user = empty($params['user']) ? Horde_Auth::getAuth() : $params['user'];
+        $this->_user = empty($params['user']) ? $GLOBALS['registry']->getAuth() : $params['user'];
 
         $this->_cache = $GLOBALS['injector']->getInstance('Horde_Cache');
     }
index 04b9e9a..cf4f75b 100644 (file)
@@ -101,7 +101,7 @@ class Folks_Friends_prefs extends Folks_Friends {
     private function _lists($type, $user = null)
     {
         if (empty($user)) {
-            $user = Horde_Auth::getAuth();
+            $user = $GLOBALS['registry']->getAuth();
         }
 
         $u_prefs = Horde_Prefs::singleton($GLOBALS['conf']['prefs']['driver'], $GLOBALS['registry']->getApp(), $user);
index 69345af..0002a98 100644 (file)
@@ -83,8 +83,8 @@ class Folks_Friends_shared extends  Folks_Friends_sql {
         $share = $GLOBALS['folks_shares']->getShareById($group);
 
         // Only owners of a group can delete them
-        if (!Horde_Auth::getAuth() ||
-            (Horde_Auth::getAuth() != $share->get('owner') &&
+        if (!$GLOBALS['registry']->getAuth() ||
+            ($GLOBALS['registry']->getAuth() != $share->get('owner') &&
              !$GLOBALS['registry']->isAdmin(array('permission' => 'folks:admin')))) {
             return PEAR::raiseError("You can rename only your own groups.");
         }
@@ -115,8 +115,8 @@ class Folks_Friends_shared extends  Folks_Friends_sql {
         }
 
         // Only owners of a group can delete them
-        if (!Horde_Auth::getAuth() ||
-            (Horde_Auth::getAuth() != $share->get('owner') &&
+        if (!$GLOBALS['registry']->getAuth() ||
+            ($GLOBALS['registry']->getAuth() != $share->get('owner') &&
              !$GLOBALS['registry']->isAdmin(array('permission' => 'folks:admin')))) {
             return PEAR::raiseError("You can delete only your own groups.");
         }
index e02f736..710de67 100644 (file)
@@ -51,7 +51,7 @@ class Folks_Notification {
 
         if (empty($user)) {
             if ($GLOBALS['registry']->isAuthenticated()) {
-                $user = Horde_Auth::getAuth();
+                $user = $GLOBALS['registry']->getAuth();
             } else {
                 return true;
             }
@@ -93,7 +93,7 @@ class Folks_Notification {
 
         if (empty($user)) {
             if ($GLOBALS['registry']->isAuthenticated()) {
-                $user = Horde_Auth::getAuth();
+                $user = $GLOBALS['registry']->getAuth();
             } else {
                 return true;
             }
index 410b865..3045173 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(Horde_Auth::getAuth());
+    $folks_driver->deleteOnlineUser($GLOBALS['registry']->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'] &&
-    Horde_Auth::getAuth() &&
+    $GLOBALS['registry']->getAuth() &&
    ($app = Horde_Util::getGet('app'))) {
     Horde::callHook('prelogin', array($app), 'folks');
 }
@@ -96,7 +96,7 @@ $login_url = Horde_Util::addParameter(Horde::getServiceLink('login', 'folks'), '
  */
 if ($registry->isAuthenticated()) {
     if (empty($url_param)) {
-        $url_param = Folks::getUrlFor('user', Horde_Auth::getAuth());
+        $url_param = Folks::getUrlFor('user', $GLOBALS['registry']->getAuth());
     }
     header('Location: ' . $url_param);
     exit;
index 958588a..b78739f 100644 (file)
@@ -30,8 +30,8 @@ case 'edit':
     }
     if (is_a($share, 'PEAR_Error')) {
         $notification->push($share, 'horde.error');
-    } elseif (!Horde_Auth::getAuth() ||
-              (isset($share) && Horde_Auth::getAuth() != $share->get('owner'))) {
+    } elseif (!$GLOBALS['registry']->getAuth() ||
+              (isset($share) && $GLOBALS['registry']->getAuth() != $share->get('owner'))) {
         exit('permission denied');
     }
     break;
@@ -41,8 +41,8 @@ case 'editform':
     if (is_a($share, 'PEAR_Error')) {
         $notification->push(_("Attempt to edit a non-existent share."), 'horde.error');
     } else {
-        if (!Horde_Auth::getAuth() ||
-            Horde_Auth::getAuth() != $share->get('owner')) {
+        if (!$GLOBALS['registry']->getAuth() ||
+            $GLOBALS['registry']->getAuth() != $share->get('owner')) {
             exit('permission denied');
         }
         $perm = &$share->getPermission();
@@ -51,7 +51,7 @@ case 'editform':
         $old_owner = $share->get('owner');
         $new_owner = $registry->convertUsername(Horde_Util::getFormData('owner', $old_owner), true);
         if ($old_owner !== $new_owner && !empty($new_owner)) {
-            if ($old_owner != Horde_Auth::getAuth() && !$registry->isAdmin()) {
+            if ($old_owner != $GLOBALS['registry']->getAuth() && !$registry->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);
@@ -236,7 +236,7 @@ if ($auth->hasCapability('list')) {
 $groupList = array();
 try {
     $groupList = empty($conf['share']['any_group'])
-        ? $groups->getGroupMemberships(Horde_Auth::getAuth(), true)
+        ? $groups->getGroupMemberships($GLOBALS['registry']->getAuth(), true)
         : $groups->listGroups();
     asort($groupList);
 } catch (Horde_Group_Exception $e) {
index 53a401e..61d9571 100644 (file)
@@ -15,7 +15,7 @@ $folks_authentication = 'none';
 require_once dirname(__FILE__) . '/../lib/base.php';
 
 $auth = $injector->getInstance('Horde_Auth')->getOb();
-if (!Horde_Auth::getAuth() &&
+if (!$GLOBALS['registry']->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 28b6967..b3a88a9 100644 (file)
@@ -15,7 +15,7 @@ $folks_authentication = 'none';
 require_once dirname(__FILE__) . '/../lib/base.php';
 
 $auth = $injector->getInstance('Horde_Auth')->getOb();
-if (!Horde_Auth::getAuth() &&
+if (!$GLOBALS['registry']->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 0c0237c..d0f32eb 100644 (file)
@@ -15,7 +15,7 @@ $folks_authentication = 'none';
 require_once dirname(__FILE__) . '/../lib/base.php';
 
 $auth = $injector->getInstance('Horde_Auth')->getOb();
-if (!Horde_Auth::getAuth() &&
+if (!$GLOBALS['registry']->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 == Horde_Auth::getAuth() ||
+        if ($friend_friend == $GLOBALS['registry']->getAuth() ||
             in_array($friend_friend, $my_list)) {
             continue;
         } elseif (isset($users[$friend_friend])) {
index 529c141..b47a10e 100644 (file)
 if (!isset($_COOKIE['online'])) {
 
     // Add this to your tempalte file
-    $sql = 'REPLACE INTO folks_online SET user_uid="' . Horde_Auth::getAuth() . '", ip_address="' . $_SERVER["REMOTE_ADDR"] . '", time_last_click="' . $_SERVER['REQUEST_TIME'] . '"';
+    $sql = 'REPLACE INTO folks_online SET user_uid="' . $GLOBALS['registry']->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 = "' . Horde_Auth::getAuth() . '"';
+    // $sql = 'UPDATE folks_users SET last_online_on = "' . $_SERVER['REQUEST_TIME'] .'" WHERE user_uid = "' . $GLOBALS['registry']->getAuth() . '"';
     // mysql_unbuffered_query($sql)
 
     // If not using cront with online.sql
index 70e6a07..7a13d55 100644 (file)
@@ -2,7 +2,7 @@
 <h1><?php echo $title ?></h1>
 
 <?php
-if ($user == Horde_Auth::getAuth()) {
+if ($user == $GLOBALS['registry']->getAuth()) {
     echo $form->renderActive(null, null, '', 'post') . '<br />';
 }
 ?>
@@ -52,7 +52,7 @@ include FOLKS_TEMPLATES . '/user/actions.php';
                 ($profile['last_online'] == 'all' ||
                 $GLOBALS['registry']->isAuthenticated() && (
                     $profile['last_online'] == 'authenticated' ||
-                    $profile['last_online'] == 'friends' && $friends_driver->isFriend(Horde_Auth::getAuth())))
+                    $profile['last_online'] == 'friends' && $friends_driver->isFriend($GLOBALS['registry']->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 Horde_Auth::getAuth() ?>" title="<?php echo _("Add your content") ?>"><img src="<?php echo Horde_Themes::img('plus.png') ?>" /></a>
+<a href="<?php echo $path ?>/wishlist.php?wishlist=<?php echo $GLOBALS['registry']->getAuth() ?>" title="<?php echo _("Add your content") ?>"><img src="<?php echo Horde_Themes::img('plus.png') ?>" /></a>
 <a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo Horde_Themes::img('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 Horde_Auth::getAuth() ?>" title="<?php echo _("Add your content") ?>"><img src="<?php echo Horde_Themes::img('plus.png') ?>" /></a>
+<a href="<?php echo $path ?>/view.php?groupby=owner&view=List&owner=<?php echo $GLOBALS['registry']->getAuth() ?>" title="<?php echo _("Add your content") ?>"><img src="<?php echo Horde_Themes::img('plus.png') ?>" /></a>
 <a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo Horde_Themes::img('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> |
@@ -375,7 +375,7 @@ case 'never':
 case 'authenticated':
     $allow_comments = $GLOBALS['registry']->isAuthenticated();
     if ($allow_comments) {
-        if ($friends_driver->isBlacklisted(Horde_Auth::getAuth())) {
+        if ($friends_driver->isBlacklisted($GLOBALS['registry']->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(Horde_Auth::getAuth());
+    $allow_comments = $friends_driver->isFriend($GLOBALS['registry']->getAuth());
     $comments_reason = _("Only authenticated users can post comments.");
     break;
 
 default:
     $allow_comments = true;
-    if ($GLOBALS['registry']->isAuthenticated() && $friends_driver->isBlacklisted(Horde_Auth::getAuth())) {
+    if ($GLOBALS['registry']->isAuthenticated() && $friends_driver->isBlacklisted($GLOBALS['registry']->getAuth())) {
         $allow_comments = false;
         $comments_reason = sprintf(_("You are on %s blacklist."), $user);
     }
index fb5b0f1..7679392 100644 (file)
@@ -14,7 +14,7 @@
 require_once dirname(__FILE__) . '/lib/base.php';
 
 // Load profile
-$user = Horde_Util::getFormData('user', Horde_Auth::getAuth());
+$user = Horde_Util::getFormData('user', $GLOBALS['registry']->getAuth());
 $profile = $folks_driver->getProfile($user);
 if ($profile instanceof PEAR_Error) {
     $notification->push($profile);
@@ -45,7 +45,7 @@ if ($profile['activity_log'] == 'all' ||
 }
 
 // Prepare an process activity form
-if ($user == Horde_Auth::getAuth()) {
+if ($user == $GLOBALS['registry']->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');
index 800cdc7..4049ccd 100644 (file)
@@ -136,7 +136,7 @@ abstract class Horde_Ajax_Application_Base
         try {
             $horde_groups = Horde_Group::singleton();
             $groups = empty($GLOBALS['conf']['share']['any_group'])
-                ? $horde_groups->getGroupMemberships(Horde_Auth::getAuth(), true)
+                ? $horde_groups->getGroupMemberships($GLOBALS['registry']->getAuth(), true)
                 : $horde_groups->listGroups();
             asort($groups);
         } catch (Horde_Group_Exception $e) {
index 5a25861..5e197bf 100644 (file)
@@ -354,38 +354,6 @@ class Horde_Auth
     }
 
     /**
-     * Returns the currently logged in user, if there is one. This is the
-     * unique Horde ID.
-     *
-     * @see self::getOriginalAuth()
-     *
-     * @return mixed  The userId of the current user, or false if no user is
-     *                logged in.
-     */
-    static public function getAuth()
-    {
-        return empty($_SESSION['horde_auth']['userId'])
-            ? false
-            : $_SESSION['horde_auth']['userId'];
-    }
-
-    /**
-     * Get the authentication username.  This is the username used to
-     * originally login to Horde.
-     *
-     * @see self::getAuth()
-     *
-     * @return mixed  The authentication backend's user name, or false if no
-     *                user is logged in.
-     */
-    static public function getOriginalAuth()
-    {
-        return empty($_SESSION['horde_auth']['authId'])
-            ? false
-            : $_SESSION['horde_auth']['authId'];
-    }
-
-    /**
      * Return whether the authentication backend requested a password change.
      *
      * @return boolean Whether the backend requested a password change.
@@ -396,35 +364,6 @@ class Horde_Auth
     }
 
     /**
-     * Returns the curently logged-in user without any domain information
-     * (e.g., foo@example.com would be returned as 'foo').
-     *
-     * @return mixed  The user ID of the current user, or false if no user
-     *                is logged in.
-     */
-    static public function getBareAuth()
-    {
-        $user = self::getAuth();
-        return ($user && (($pos = strpos($user, '@')) !== false))
-            ? substr($user, 0, $pos)
-            : $user;
-    }
-
-    /**
-     * Returns the domain of currently logged-in user (e.g., foo@example.com
-     * would be returned as 'example.com').
-     *
-     * @return mixed  The domain suffix of the current user, or false.
-     */
-    static public function getAuthDomain()
-    {
-        $user = self::getAuth();
-        return ($user && (($pos = strpos($user, '@')) !== false))
-            ? substr($user, $pos + 1)
-            : false;
-    }
-
-    /**
      * Returns the requested credential for the currently logged in user, if
      * present.
      *
@@ -436,7 +375,7 @@ class Horde_Auth
      */
     static public function getCredential($credential = null, $app = null)
     {
-        if (!self::getAuth()) {
+        if (!$GLOBALS['registry']->getAuth()) {
             return false;
         }
 
@@ -458,7 +397,7 @@ class Horde_Auth
      */
     static public function setCredential($credential, $value, $app = null)
     {
-        if (self::getAuth()) {
+        if ($GLOBALS['registry']->getAuth()) {
             $credentials = self::_getCredentials($app);
 
             if ($credentials !== false) {
@@ -521,7 +460,7 @@ class Horde_Auth
     {
         $app = empty($options['app']) ? 'horde' : $options['app'];
         $authId = $userId = trim($authId);
-        $is_auth = self::getAuth();
+        $is_auth = $GLOBALS['registry']->getAuth();
 
         try {
             if (!$is_auth) {
index 39110f4..ba6c544 100644 (file)
@@ -238,7 +238,7 @@ abstract class Horde_Auth_Base
     public function transparent()
     {
         $userId = empty($this->_credentials['userId'])
-            ? Horde_Auth::getAuth()
+            ? $GLOBALS['registry']->getAuth()
             : $this->_credentials['userId'];
         $credentials = empty($this->_credentials['credentials'])
             ? Horde_Auth::getCredential()
index 0409121..26920b8 100644 (file)
@@ -228,7 +228,7 @@ class Horde_Auth_Customsql extends Horde_Auth_Sql
         /* Build a custom query, based on the config file. */
         $query = str_replace(
             '\L',
-            $this->_db->quote(Horde_Auth::getAuth()),
+            $this->_db->quote($GLOBALS['registry']->getAuth()),
             $this->_params['query_list']
         );
 
index 2032b10..4a0ca6c 100644 (file)
@@ -83,7 +83,7 @@ class Horde_Auth_Shibboleth extends Horde_Auth_Base
     public function checkExistingAuth()
     {
         return !empty($_SERVER[$this->_params['username_header']]) &&
-            $this->_removeScope($_SERVER[$this->_params['username_header']]) == Horde_Auth::getAuth();
+            $this->_removeScope($_SERVER[$this->_params['username_header']]) == $GLOBALS['registry']->getAuth();
     }
 
     /**
index e587514..20ea1eb 100644 (file)
@@ -34,7 +34,6 @@ http://pear.php.net/dtd/package-2.0.xsd">
  * Moved signup code to horde/Core.
  * Add ability to retrieve app-specific credentials via
  Horde_Auth::getCredential().
- * Add Horde_Auth::getOriginalAuth().
  * Split Horde_Auth:: into Horde_Auth:: and Horde_Auth_Base:: components.
  * Initial Horde 4 package.
  </notes>
index 4074965..3b94a7d 100644 (file)
@@ -250,7 +250,7 @@ class Horde_Core_Auth_Application extends Horde_Auth_Base
             /* If this application contains neither transparent nor
              * authenticate capabilities, it does not require any
              * authentication if already authenticated to Horde. */
-            return (Horde_Auth::getAuth() &&
+            return ($GLOBALS['registry']->getAuth() &&
                     !$this->hasCapability('authenticate'));
         }
 
index be04e64..3b20f5f 100644 (file)
@@ -17,7 +17,7 @@ class Horde_Core_Binder_Mail implements Horde_Injector_Binder
         if (($driver == 'smtp') &&
             $params['auth'] &&
             empty($params['username'])) {
-            $params['username'] = Horde_Auth::getAuth();
+            $params['username'] = $GLOBALS['registry']->getAuth();
             $params['password'] = Horde_Auth::getCredential('password');
         }
 
index fcdc902..1608431 100644 (file)
@@ -12,7 +12,7 @@ class Horde_Core_Binder_Notification implements Horde_Injector_Binder
         $notify->addType('default', '*', 'Horde_Core_Notification_Status');
         $notify->addType('status', 'horde.*', 'Horde_Core_Notification_Status');
 
-        $notify->addDecorator(new Horde_Notification_Handler_Decorator_Alarm($injector->getInstance('Horde_Alarm'), Horde_Auth::getAuth()));
+        $notify->addDecorator(new Horde_Notification_Handler_Decorator_Alarm($injector->getInstance('Horde_Alarm'), $GLOBALS['registry']->getAuth()));
         $notify->addDecorator(new Horde_Core_Notification_Hordelog());
 
         return $notify;
index 22e8911..a9c5a65 100644 (file)
@@ -74,11 +74,11 @@ class Horde_Core_Factory_Identity
             }
 
             $params = array(
-                'user' => is_null($user) ? Horde_Auth::getAuth() : $user,
+                'user' => is_null($user) ? $GLOBALS['registry']->getAuth() : $user,
             );
 
             if (isset($GLOBALS['prefs']) &&
-                ($params['user'] == Horde_Auth::getAuth())) {
+                ($params['user'] == $GLOBALS['registry']->getAuth())) {
                 $params['prefs'] = $GLOBALS['prefs'];
             } else {
                 $params['prefs'] = Horde_Prefs::singleton($GLOBALS['conf']['prefs']['driver'], $GLOBALS['registry']->getApp(), $user, '', null, false);
index 91b8a16..2ea16f0 100644 (file)
@@ -96,7 +96,7 @@ class Horde_Core_Factory_KolabStorage
 
         $params = array(
             'hostspec' => $session->getImapServer(),
-            'username' => Horde_Auth::getAuth(),
+            'username' => $GLOBALS['registry']->getAuth(),
             'password' => Horde_Auth::getCredential('password'),
             'secure'   => true
         );
index 816608a..fbf43dd 100644 (file)
@@ -39,7 +39,7 @@ class Horde_Core_LoginTasks_Backend_Horde extends Horde_LoginTasks_Backend
      */
     public function isAuthenticated()
     {
-        return (Horde_Auth::getAuth() !== false);
+        return ($GLOBALS['registry']->getAuth() !== false);
     }
 
     /**
index e74a2b4..cb02f27 100644 (file)
@@ -191,7 +191,7 @@ class Horde_Menu
                 $auth_target = '_parent';
             }
 
-            if (Horde_Auth::getAuth()) {
+            if ($GLOBALS['registry']->getAuth()) {
                 if ((!$prefs->getValue('show_sidebar') || $this->showService('logout')) &&
                     ($logout_link = Horde::getServiceLink('logout', $app))) {
                     $this->add($logout_link, _("_Log out"), 'logout.png', null, $auth_target, null, '__noselection');
@@ -360,7 +360,7 @@ class Horde_Menu
             return true;
 
         case 'authenticated':
-            return (bool)Horde_Auth::getAuth();
+            return (bool)$GLOBALS['registry']->getAuth();
 
         default:
         case 'never':
index cdc8ada..a14f495 100644 (file)
@@ -1084,7 +1084,7 @@ class Horde_Registry
          *  - To all authenticated users if no permission is set on $app.
          *  - To anyone who is allowed by an explicit ACL on $app. */
         if ($checkPerms) {
-            if (Horde_Auth::getAuth() && !Horde_Auth::checkExistingAuth()) {
+            if ($GLOBALS['registry']->getAuth() && !Horde_Auth::checkExistingAuth()) {
                 throw new Horde_Exception('User is not authorized', self::AUTH_FAILURE);
             }
             if (!$this->hasPermission($app, Horde_Perms::READ)) {
@@ -1092,8 +1092,8 @@ class Horde_Registry
                     throw new Horde_Exception('User is not authorized', self::AUTH_FAILURE);
                 }
 
-                Horde::logMessage(sprintf('%s does not have READ permission for %s', Horde_Auth::getAuth() ? 'User ' . Horde_Auth::getAuth() : 'Guest user', $app), 'DEBUG');
-                throw new Horde_Exception(sprintf(_('%s is not authorized for %s.'), Horde_Auth::getAuth() ? 'User ' . Horde_Auth::getAuth() : 'Guest user', $this->applications[$app]['name']), self::PERMISSION_DENIED);
+                Horde::logMessage(sprintf('%s does not have READ permission for %s', $GLOBALS['registry']->getAuth() ? 'User ' . $GLOBALS['registry']->getAuth() : 'Guest user', $app), 'DEBUG');
+                throw new Horde_Exception(sprintf(_('%s is not authorized for %s.'), $GLOBALS['registry']->getAuth() ? 'User ' . $GLOBALS['registry']->getAuth() : 'Guest user', $this->applications[$app]['name']), self::PERMISSION_DENIED);
             }
         }
 
@@ -1226,8 +1226,8 @@ class Horde_Registry
          * explicit permissions, or for apps that allow the given permission. */
         return $this->isAdmin() ||
             ($GLOBALS['injector']->getInstance('Horde_Perms')->exists($app)
-             ? $GLOBALS['injector']->getInstance('Horde_Perms')->hasPermission($app, Horde_Auth::getAuth(), $perms)
-             : (bool)Horde_Auth::getAuth());
+             ? $GLOBALS['injector']->getInstance('Horde_Perms')->hasPermission($app, $GLOBALS['registry']->getAuth(), $perms)
+             : (bool)$GLOBALS['registry']->getAuth());
     }
 
     /**
@@ -1268,12 +1268,12 @@ class Horde_Registry
 
         /* If there is no logged in user, return an empty Horde_Prefs::
          * object with just default preferences. */
-        if (!Horde_Auth::getAuth()) {
+        if (!$GLOBALS['registry']->getAuth()) {
             $GLOBALS['prefs'] = Horde_Prefs::factory('Session', $app, '', '', null, false);
         } else {
             if (!isset($GLOBALS['prefs']) ||
-                ($GLOBALS['prefs']->getUser() != Horde_Auth::getAuth())) {
-                $GLOBALS['prefs'] = Horde_Prefs::factory($GLOBALS['conf']['prefs']['driver'], $app, Horde_Auth::getAuth(), Horde_Auth::getCredential('password'));
+                ($GLOBALS['prefs']->getUser() != $GLOBALS['registry']->getAuth())) {
+                $GLOBALS['prefs'] = Horde_Prefs::factory($GLOBALS['conf']['prefs']['driver'], $app, $GLOBALS['registry']->getAuth(), Horde_Auth::getCredential('password'));
             } else {
                 $GLOBALS['prefs']->retrieve($app);
             }
@@ -1459,7 +1459,7 @@ class Horde_Registry
         /* Using cache while not authenticated isn't possible because,
          * although storage is possible, retrieval isn't since there is no
          * MD5 sum in the session to use to build the cache IDs. */
-        if (!Horde_Auth::getAuth()) {
+        if (!$GLOBALS['registry']->getAuth()) {
             return;
         }
 
@@ -1495,7 +1495,7 @@ class Horde_Registry
         /* Using cache while not authenticated isn't possible because,
          * although storage is possible, retrieval isn't since there is no
          * MD5 sum in the session to use to build the cache IDs. */
-        if (Horde_Auth::getAuth() &&
+        if ($GLOBALS['registry']->getAuth() &&
             ($id = $this->_getCacheId($name))) {
             $result = $GLOBALS['injector']->getInstance('Horde_Cache')->get($id, 86400);
             if ($result !== false) {
@@ -1637,7 +1637,7 @@ class Horde_Registry
     {
         $user = isset($options['user'])
             ? $options['user']
-            : Horde_Auth::getAuth();
+            : $GLOBALS['registry']->getAuth();
 
         if ($user &&
             @is_array($GLOBALS['conf']['auth']['admins']) &&
@@ -1683,7 +1683,7 @@ class Horde_Registry
     public function isAuthenticated($options = array())
     {
         /* Check for cached authentication results. */
-        if (Horde_Auth::getAuth()) {
+        if ($GLOBALS['registry']->getAuth()) {
             $driver = (empty($options['app']) || ($options['app'] == 'horde'))
                 ? $GLOBALS['conf']['auth']['driver']
                 : $options['app'];
@@ -1816,4 +1816,49 @@ class Horde_Registry
         }
     }
 
+    /**
+     * Returns the currently logged in user, if there is one.
+     *
+     * @param string $format  The return format:
+     * <pre>
+     * 'bare' - Horde ID without any domain information (e.g., foo@example.com
+     *          would be returned as 'foo').
+     * 'default' - [DEFAULT] The unique Horde ID.
+     * 'domain' - Domain of the Horde ID (e.g., foo@example.com would be
+     *            returned as 'example.com').
+     * 'original' - The username used to originally login to Horde.
+     * </pre>
+     *
+     * @return mixed  The user ID or false if no user is logged in.
+     */
+    public function getAuth($format = 'default')
+    {
+        if ($format == 'original') {
+            return empty($_SESSION['horde_auth']['authId'])
+                ? false
+                : $_SESSION['horde_auth']['authId'];
+        }
+
+        if (empty($_SESSION['horde_auth']['userId'])) {
+            return false;
+        }
+
+        $user = $_SESSION['horde_auth']['userId'];
+
+        switch ($format) {
+        case 'bare':
+            return (($pos = strpos($user, '@')) === false)
+                ? $user
+                : substr($user, 0, $pos);
+
+        case 'domain':
+            return (($pos = strpos($user, '@')) === false)
+                ? false
+                : substr($user, $pos + 1);
+
+        case 'default':
+            return $user;
+        }
+    }
+
 }
index 86e8533..223597e 100644 (file)
@@ -602,7 +602,7 @@ class DataTree_sql extends DataTree {
                         Horde_String::convertCharset($name, Horde_Nls::getCharset(), $this->_params['charset']),
                         is_null($order) ? NULL : (int)$order,
                         $data,
-                        (string)Horde_Auth::getAuth(),
+                        (string)$GLOBALS['registry']->getAuth(),
                         (int)$ser,
                         $parents);
 
index 3bb70e2..493c37b 100644 (file)
@@ -340,7 +340,7 @@ class Horde_Group_Contactlists extends Horde_Group
                 if (empty($contact_shares)) {
                     $scope = $GLOBALS['registry']->hasInterface('contacts');
                     $shares = $GLOBALS['injector']->getInstance('Horde_Share')->getScope($scope);
-                    $this->_contact_shares = $shares->listShares(Horde_Auth::getAuth(), Horde_Perms::SHOW, Horde_Auth::getAuth());
+                    $this->_contact_shares = $shares->listShares($GLOBALS['registry']->getAuth(), Horde_Perms::SHOW, $GLOBALS['registry']->getAuth());
                 }
                 // Contruct a list of owner ids to use
                 foreach ($this->_contact_shares as $id => $share) {
@@ -350,7 +350,7 @@ class Horde_Group_Contactlists extends Horde_Group
                     }
                 }
             } else {
-                $owners = array(Horde_Auth::getAuth());
+                $owners = array($GLOBALS['registry']->getAuth());
             }
             $owner_ids = array();
             foreach ($owners as $owner) {
index 6cf25c7..1c472e1 100644 (file)
@@ -107,7 +107,7 @@ abstract class Horde_History
         $history = $this->getHistory($guid);
 
         if (!isset($attributes['who'])) {
-            $attributes['who'] = Horde_Auth::getAuth();
+            $attributes['who'] = $GLOBALS['registry']->getAuth();
         }
         if (!isset($attributes['ts'])) {
             $attributes['ts'] = time();
index 6116de7..1686dc6 100644 (file)
@@ -114,7 +114,7 @@ class Horde_Kolab_FreeBusy_Driver_Freebusy_Kolab extends Horde_Kolab_FreeBusy_Dr
             );
         } else {
             $params = array(
-                'user' => Horde_Auth::getAuth(),
+                'user' => $GLOBALS['registry']->getAuth(),
                 'pass' => Horde_Auth::getCredential('password'),
             );
         }
index ae3198c..d9e22c3 100644 (file)
@@ -35,6 +35,6 @@ implements Horde_Kolab_Session_Auth_Interface
      */
     public function getCurrentUser()
     {
-        return Horde_Auth::getAuth();
+        return $GLOBALS['registry']->getAuth();
     }
 }
index 83f5bef..33c7011 100644 (file)
@@ -127,7 +127,7 @@ class Horde_Kolab_Storage
         if (isset($this->_params['owner'])) {
             $this->_owner = $this->_params['owner'];
         } else if (class_exists('Horde_Auth')) {
-            $this->_owner = Horde_Auth::getAuth();
+            $this->_owner = $GLOBALS['registry']->getAuth();
         } else {
             $this->_owner = '';
         }
@@ -410,7 +410,7 @@ class Horde_Kolab_Storage
     {
         // Handle default shares
         if (class_exists('Horde_Auth')
-            && $share == Horde_Auth::getAuth()) {
+            && $share == $GLOBALS['registry']->getAuth()) {
             $result = $this->getDefault($type);
             if (!empty($result)) {
                 return $result->name;
index 39004d9..b884f08 100644 (file)
@@ -174,7 +174,7 @@ class Horde_Kolab_Storage_Data
 
             $pos = strpos($this->_folder->name, $search_prefix);
             if ($pos !== false && $pos == 0) {
-                $key = 'user/' . Horde_Auth::getBareAuth() . '/'
+                $key = 'user/' . $GLOBALS['registry']->getAuth('bare') . '/'
                            . substr($this->_folder->name,
                                     strlen($search_prefix))
                            . $this->_type_key;
index bbaeeca..aba5f6f 100644 (file)
@@ -308,7 +308,7 @@ implements Horde_Kolab_Storage_Folder
      */
     function getShareId()
     {
-        $current_user = Horde_Auth::getAuth();
+        $current_user = $GLOBALS['registry']->getAuth();
         if ($this->isDefault() && $this->getOwner() == $current_user) {
             return $current_user;
         }
index fa45be7..7cca2f4 100644 (file)
@@ -256,7 +256,7 @@ extends Horde_Kolab_Storage_Folder_Decorator_Base
 
         require_once 'HTTP/Request.php';
         $http = new HTTP_Request($url, $options);
-        $http->setBasicAuth(Horde_Auth::getAuth(), Horde_Auth::getCredential('password'));
+        $http->setBasicAuth($GLOBALS['registry']->getAuth(), Horde_Auth::getCredential('password'));
         @$http->sendRequest();
         if ($http->getResponseCode() != 200) {
             return PEAR::raiseError(sprintf(_("Unable to trigger URL %s. Response: %s"),
index dea10c3..93e9966 100644 (file)
@@ -167,7 +167,7 @@ class Net_IMSP_Utils {
             }
         }
 
-        $shares = &$share_obj->listShares(Horde_Auth::getAuth());
+        $shares = &$share_obj->listShares($GLOBALS['registry']->getAuth());
         // A share for each IMSP adress book we can see.
         foreach ($abooks as $abook_uid) {
             $found = false;
@@ -195,7 +195,7 @@ class Net_IMSP_Utils {
                 if (Net_IMSP_Utils::_isOwner($abook_uid,
                                              $serverInfo['params']['username'],
                                              $params['acl'])) {
-                    $params['owner'] = Horde_Auth::getAuth();
+                    $params['owner'] = $GLOBALS['registry']->getAuth();
                 } else {
                     // TODO: What to do for the owner when it's not current user?
                     //       We'd have to try to match the owner per IMSP
@@ -215,7 +215,7 @@ class Net_IMSP_Utils {
         }
 
         // Now prune any shares that no longer exist on the IMSP server.
-        $existing = $share_obj->listShares(Horde_Auth::getAuth(), Horde_Perms::READ);
+        $existing = $share_obj->listShares($GLOBALS['registry']->getAuth(), Horde_Perms::READ);
         foreach ($existing as $key => $share) {
             $temp = unserialize($share->get('params'));
             if (is_array($temp)) {
@@ -296,7 +296,7 @@ class Net_IMSP_Utils {
          if (strpos($acl, 'l') !== false) {
              $hPerms |= Horde_Perms::SHOW;
          }
-        $share->addUserPermission(Horde_Auth::getAuth(), $hPerms);
+        $share->addUserPermission($GLOBALS['registry']->getAuth(), $hPerms);
     }
 
     /**
index 45f75e4..427c528 100644 (file)
@@ -338,7 +338,7 @@ class Horde_Perms
         }
 
         if (is_null($user)) {
-            $user = Horde_Auth::getAuth();
+            $user = $GLOBALS['registry']->getAuth();
         }
 
         // If this is a guest user, only check guest permissions.
index 9e55159..150f64e 100644 (file)
@@ -13,7 +13,7 @@
  *                                'contacts.search',
  *                                array(array('jan'), array('localsql'),
  *                                      array('name', 'email')),
- *                                array('user' => Horde_Auth::getAuth(),
+ *                                array('user' => $GLOBALS['registry']->getAuth(),
  *                                      'pass' => Horde_Auth::getCredential('password')));
  * </code>
  *
index 05429c6..ec60526 100644 (file)
@@ -91,7 +91,7 @@ class Horde_Rpc_Soap extends Horde_Rpc
                     $GLOBALS['__horde_rpc_PhpSoap']['lastMethodCalled'],
                     implode(', ', array_map(create_function('$a', 'return is_array($a) ? "Array" : $a;'),
                                             $GLOBALS['__horde_rpc_PhpSoap']['lastMethodParams'])),
-                    Horde_Auth::getAuth(),
+                    $GLOBALS['registry']->getAuth(),
                     time() - $beginTime,
                     ob_get_length()),
             'INFO');
index 9004528..27bab4c 100644 (file)
@@ -709,7 +709,7 @@ class Horde_Rpc_Webdav extends Horde_Rpc
         }
 
         try {
-            $lockid = $locks->setLock(Horde_Auth::getAuth(), 'webdav', $params['path'],
+            $lockid = $locks->setLock($GLOBALS['registry']->getAuth(), 'webdav', $params['path'],
                                       $timeout, $locktype);
         } catch (Horde_Lock_Exception $e) {
             Horde::logMessage($e, 'ERR');
@@ -721,7 +721,7 @@ class Horde_Rpc_Webdav extends Horde_Rpc
         }
 
         $params['locktoken'] = $lockid;
-        $params['owner'] = Horde_Auth::getAuth();
+        $params['owner'] = $GLOBALS['registry']->getAuth();
         $params['timeout'] = $timeout;
 
         return "200";
index 3f9e75d..74e4886 100644 (file)
@@ -296,7 +296,7 @@ class Horde_Share
         }
         $share = $this->_newShare($name);
         $share->setShareOb($this);
-        $share->set('owner', Horde_Auth::getAuth());
+        $share->set('owner', $GLOBALS['registry']->getAuth());
 
         return $share;
     }
index a2cf09a..d40301c 100644 (file)
@@ -323,7 +323,7 @@ class Horde_Share_kolab extends Horde_Share
         }
 
         /** Okay, no default folder yet */
-        $share = $this->newShare(Horde_Auth::getAuth());
+        $share = $this->newShare($GLOBALS['registry']->getAuth());
 
         /** The value does not matter here as the share will rewrite it */
         $share->set('name', '');
index 054898f..820d784 100644 (file)
@@ -269,7 +269,7 @@ class Horde_Share_Object
                 return false;
             }
             // Try to place the item lock at app:shareid scope.
-            return $locks->setLock(Horde_Auth::getAuth(), $itemscope, $item_uid,
+            return $locks->setLock($GLOBALS['registry']->getAuth(), $itemscope, $item_uid,
                                    $timeout, $locktype);
         } else {
             // Share lock requested. Check for locked items.
@@ -283,7 +283,7 @@ class Horde_Share_Object
                 return false;
             }
             // Try to place the share lock
-            return $locks->setLock(Horde_Auth::getAuth(), $this->_shareOb->getApp(),
+            return $locks->setLock($GLOBALS['registry']->getAuth(), $this->_shareOb->getApp(),
                                    $shareid, $timeout, $locktype);
         }
     }
index eb4490f..b50b9de 100644 (file)
@@ -56,7 +56,7 @@ class Horde_Share_Object_Kolab extends Horde_Share_Object
         // We actually ignore the random id string that all horde apps provide
         // as initial name and wait for a set('name', 'xyz') call. But we want
         // to know if we should create a default share.
-        if ($id == Horde_Auth::getAuth()) {
+        if ($id == $GLOBALS['registry']->getAuth()) {
             $this->_data['default'] = true;
         } else {
             $this->_data['default'] = false;
index 4fb21f0..7da82e2 100644 (file)
@@ -40,7 +40,7 @@ class Horde_Share_Object_Sql_Hierarchical extends Horde_Share_Object_Sql
      */
     public function countChildren($perm = Horde_Perms::SHOW, $allLevels = true)
     {
-        return $this->_shareOb->countShares(Horde_Auth::getAuth(), $perm, null, $this, $allLevels);
+        return $this->_shareOb->countShares($GLOBALS['registry']->getAuth(), $perm, null, $this, $allLevels);
     }
 
     /**
@@ -54,7 +54,7 @@ class Horde_Share_Object_Sql_Hierarchical extends Horde_Share_Object_Sql
      */
     public function getChildren($perm = Horde_Perms::SHOW, $allLevels = true)
     {
-        return $this->_shareOb->listShares(Horde_Auth::getAuth(), $perm, null, 0, 0,
+        return $this->_shareOb->listShares($GLOBALS['registry']->getAuth(), $perm, null, 0, 0,
              null, 1, $this, $allLevels, is_null($perm));
 
     }
@@ -105,7 +105,7 @@ class Horde_Share_Object_Sql_Hierarchical extends Horde_Share_Object_Sql
         /* If we are an existing share, check for any children */
         if ($this->getId()) {
             $children = $this->_shareOb->listShares(
-                Horde_Auth::getAuth(), Horde_Perms::EDIT, null, 0, 0, null, 0,
+                $GLOBALS['registry']->getAuth(), Horde_Perms::EDIT, null, 0, 0, null, 0,
                 $this->getId());
         } else {
             $children = array();
index a379d1a..08fd380 100644 (file)
@@ -26,7 +26,7 @@ class Horde_Share_Sql_Hierarchical extends Horde_Share_Sql
         $share = $this->_newShare();
         $share->setShareOb($this);
         //@TODO: inject the Auth object
-        $share->set('owner', Horde_Auth::getAuth());
+        $share->set('owner', $GLOBALS['registry']->getAuth());
 
         return $share;
     }
@@ -310,7 +310,7 @@ class Horde_Share_Sql_Hierarchical extends Horde_Share_Sql
                                $from = 0, $count = 0)
     {
         $sql = 'SELECT DISTINCT(s.share_owner) '
-                . $this->getShareCriteria(Horde_Auth::getAuth(), $perm, null,
+                . $this->getShareCriteria($GLOBALS['registry']->getAuth(), $perm, null,
                                            $parent, $allLevels);
 
         if ($count) {
@@ -325,7 +325,7 @@ class Horde_Share_Sql_Hierarchical extends Horde_Share_Sql
 
         $owners = array();
         foreach ($allowners as $owner) {
-            if ($this->countShares(Horde_Auth::getAuth(), $perm, $owner, $parent,
+            if ($this->countShares($GLOBALS['registry']->getAuth(), $perm, $owner, $parent,
                                    $allLevels)) {
 
                 $owners[] = $owner;
@@ -350,7 +350,7 @@ class Horde_Share_Sql_Hierarchical extends Horde_Share_Sql
     public function countOwners($perm = Horde_Perms::SHOW, $parent = null, $allLevels = true)
     {
         $sql = 'SELECT COUNT(DISTINCT(s.share_owner)) '
-               . $this->getShareCriteria(Horde_Auth::getAuth(), $perm, null, $parent,
+               . $this->getShareCriteria($GLOBALS['registry']->getAuth(), $perm, null, $parent,
                                           $allLevels);
 
         return $this->_db->queryOne($sql);
index 0c5bf61..cdd867a 100644 (file)
@@ -22,7 +22,7 @@ class Perms_mock
     function &newPermission($name) {
         $perms = array(
             'users' => array(
-                Horde_Auth::getAuth() => Horde_Perms::SHOW | Horde_Perms::READ |
+                $GLOBALS['registry']->getAuth() => Horde_Perms::SHOW | Horde_Perms::READ |
                 Horde_Perms::EDIT | Horde_Perms::DELETE));
         $result = &new Horde_Perms_Permission($name, $perms);
         return $result;
index 6f163df..81933fc 100644 (file)
@@ -484,7 +484,7 @@ class SyncML_Backend_Horde extends SyncML_Backend {
     {
         $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getOb();
         return $auth->authenticate($username, array('password' => $password))
-            ? Horde_Auth::getAuth()
+            ? $GLOBALS['registry']->getAuth()
             : false;
     }
 
@@ -502,7 +502,7 @@ class SyncML_Backend_Horde extends SyncML_Backend {
     function setAuthenticated($username, $credData)
     {
         Horde_Auth::setAuth($username, $credData);
-        return Horde_Auth::getAuth();
+        return $GLOBALS['registry']->getAuth();
     }
 
     /**
index ad3d995..53d795f 100644 (file)
@@ -254,7 +254,7 @@ class VFS_kolab extends VFS
                 $filenames = $this->_getAppUids($app);
             }
 
-            $owner = Horde_Auth::getAuth();
+            $owner = $GLOBALS['registry']->getAuth();
 
             $file = $files = array();
             foreach ($filenames as $filename) {
@@ -279,7 +279,7 @@ class VFS_kolab extends VFS
             return $files;
         }
 
-        $owner = Horde_Auth::getAuth();
+        $owner = $GLOBALS['registry']->getAuth();
 
         $file = $files = array();
 
@@ -348,7 +348,7 @@ class VFS_kolab extends VFS
         $mime_message = Horde_Mime_Part::parseMessage($raw_message);
         $parts = $mime_message->contentTypeMap();
 
-        $owner = Horde_Auth::getAuth();
+        $owner = $GLOBALS['registry']->getAuth();
 
         $file = $files = array();
 
@@ -399,7 +399,7 @@ class VFS_kolab extends VFS
         $mime_message = Horde_Mime_Part::parseMessage($raw_message);
         $parts = $mime_message->contentTypeMap();
 
-        $owner = Horde_Auth::getAuth();
+        $owner = $GLOBALS['registry']->getAuth();
 
         foreach ($parts as $part_id => $disposition) {
             $part = $mime_message->getPart($part_id);
index 5b0b777..3096bf9 100644 (file)
@@ -240,7 +240,7 @@ $backends['sqlhome'] = array(
     // ),
     'loginparams' => array(),
     'root' => '/home',
-    'home' => '/home/' . Horde_Auth::getAuth(),
+    'home' => '/home/' . $GLOBALS['registry']->getAuth(),
     // 'createhome' => false,
     // 'filter' => '^regex$',
     // 'quota' => false,
@@ -265,7 +265,7 @@ $backends['file'] = array(
     ),
     'loginparams' => array(),
     'root' => '/',
-    'home' => Horde_Auth::getAuth(),
+    'home' => $GLOBALS['registry']->getAuth(),
     // 'createhome' => false,
     // 'filter' => '^regex$',
     // 'quota' => false,
index 2930802..cd457fa 100644 (file)
@@ -153,7 +153,7 @@ class Gollem_Auth
         }
 
         return (((count($auto_server) == 1) || $force) &&
-                Horde_Auth::getAuth() &&
+                $GLOBALS['registry']->getAuth() &&
                 empty($GLOBALS['gollem_backends'][$key]['loginparams']) &&
                 !empty($GLOBALS['gollem_backends'][$key]['hordeauth']));
     }
@@ -231,7 +231,7 @@ class Gollem_Auth
         /* Set username now. Don't set the current username if the backend
          * already has a username defined. */
         if (empty($ptr['params']['username'])) {
-            $ptr['params']['username'] = ($user === null) ? Horde_Auth::getBareAuth() : $user;
+            $ptr['params']['username'] = ($user === null) ? $GLOBALS['registry']->getAuth('bare') : $user;
         }
 
         /* Set password now. The password should always be encrypted within
index b586c2b..325207b 100644 (file)
@@ -252,7 +252,7 @@ class Gollem
     static protected function _getCacheID($dir)
     {
         global $prefs;
-        return implode('|', array(Horde_Auth::getAuth(), $_SESSION['gollem']['backend_key'], $prefs->getValue('show_dotfiles'), $prefs->getValue('sortdirsfirst'), $prefs->getValue('sortby'), $prefs->getValue('sortdir'), $dir));
+        return implode('|', array($GLOBALS['registry']->getAuth(), $_SESSION['gollem']['backend_key'], $prefs->getValue('show_dotfiles'), $prefs->getValue('sortdirsfirst'), $prefs->getValue('sortby'), $prefs->getValue('sortdir'), $dir));
     }
 
     /**
@@ -613,7 +613,7 @@ class Gollem
     static public function checkPermissions($filter, $permission = Horde_Perms::READ,
                                             $backend = null)
     {
-        $userID = Horde_Auth::getAuth();
+        $userID = $GLOBALS['registry']->getAuth();
         if ($backend === null) {
             $backend = $_SESSION['gollem']['backend_key'];
         }
@@ -774,8 +774,8 @@ class Gollem
     {
         return (!empty($GLOBALS['gollem_backends'][$backend]['hordeauth']) &&
                 (strcasecmp($GLOBALS['gollem_backends'][$backend]['hordeauth'], 'full') === 0))
-            ? Horde_Auth::getAuth()
-            : Horde_Auth::getBareAuth();
+            ? $GLOBALS['registry']->getAuth()
+            : $GLOBALS['registry']->getAuth('bare');
     }
 
     /**
index a14af6a..7fdbd42 100644 (file)
@@ -167,7 +167,7 @@ class Horde_Hooks
 //    // in production, by virtue of demonstrating all those. :)
 //    public function prefs_hook_theme($username = null)
 //    {
-//        if (Horde_Auth::getAuth() != 'chuck') {
+//        if ($GLOBALS['registry']->getAuth() != 'chuck') {
 //            return 'mozilla';
 //        }
 //
@@ -206,7 +206,7 @@ class Horde_Hooks
 //    {
 //        // Example #1
 //        if (is_null($name)) {
-//            $name = Horde_Auth::getAuth();
+//            $name = $GLOBALS['registry']->getAuth();
 //        }
 //
 //        if (!empty($name)) {
@@ -216,7 +216,7 @@ class Horde_Hooks
 //            // You will probably need to replace cd= with uid=; this syntax
 //            // is for Netware 5.1 nldap.
 //            $cmd  = '/usr/bin/ldapsearch -b ' . $base_context . ' -s ' . $scope . ' cn=' .
-//                escapeShellCmd(Horde_Auth::getAuth()) .
+//                escapeShellCmd($GLOBALS['registry']->getAuth()) .
 //                ' | /usr/bin/grep mail | /usr/bin/awk \'{print $2}\'';
 //            $mails = `$cmd`;
 //            $mail_array = explode("\n", $mails);
@@ -240,7 +240,7 @@ class Horde_Hooks
 //        $ds = @ldap_connect($ldapServer, $ldapPort);
 //
 //        if (is_null($name)) {
-//            $name = Horde_Auth::getAuth();
+//            $name = $GLOBALS['registry']->getAuth();
 //            if ($name === false) {
 //                return '';
 //            }
@@ -270,7 +270,7 @@ class Horde_Hooks
 //        // Example #1: Set the fullname from the GECOS information in the
 //        // passwd file.
 //        if (is_null($user)) {
-//            $user = Horde_Auth::getBareAuth();
+//            $user = $GLOBALS['registry']->getAuth('bare');
 //            if ($user === false) {
 //                return '';
 //            }
@@ -293,7 +293,7 @@ class Horde_Hooks
 //        $ds = @ldap_connect($ldapServer, $ldapPort);
 //
 //        if (is_null($user)) {
-//            $user = Horde_Auth::getAuth();
+//            $user = $GLOBALS['registry']->getAuth();
 //            if ($user === false) {
 //                return '';
 //            }
index b776b71..a274468 100644 (file)
@@ -50,7 +50,7 @@ if (!empty($main_page)) {
 if (!$main_page) {
     /* Always redirect to login page if there is no incoming URL and nobody
      * is authenticated. */
-    if (!Horde_Auth::getAuth()) {
+    if (!$registry->getAuth()) {
         $main_page = Horde::applicationUrl('login.php', true);
     } else {
         /* Search for a user-specified initial application. */
@@ -81,9 +81,9 @@ if (!$main_page) {
  * there is no authenticated user, and conf->menu->always is true; or if
  * 'force_sidebar' GET parameter is set. */
 if ((Horde_Util::getFormData('force_sidebar') ||
-    !Horde_Util::nonInputVar('horde_login_nosidebar', Horde_Auth::getAuth())) &&
+    !Horde_Util::nonInputVar('horde_login_nosidebar', $registry->getAuth())) &&
     ($conf['menu']['always'] ||
-     (Horde_Auth::getAuth() && $prefs->getValue('show_sidebar')))) {
+     ($registry->getAuth() && $prefs->getValue('show_sidebar')))) {
     $scrollbar = $browser->hasQuirk('scrollbar_in_way') ? 'yes' : 'auto';
     require HORDE_TEMPLATES . '/index/frames_index.inc';
 } else {
index 1b399d4..9a45204 100644 (file)
@@ -203,7 +203,7 @@ class Horde_Api extends Horde_Registry_Api
     public function removeUserData($user)
     {
         if (!$GLOBALS['registry']->isAdmin() &&
-            $user != Horde_Auth::getAuth()) {
+            $user != $GLOBALS['registry']->getAuth()) {
             throw new Horde_Exception(_("You are not allowed to remove user data."));
         }
 
index 96b1fc3..6d10df4 100644 (file)
@@ -152,7 +152,7 @@ class Accounts_Driver {
      */
     function getUsername()
     {
-        return Horde_String::lower(Horde_Auth::getBareAuth());
+        return Horde_String::lower($GLOBALS['registry']->getAuth('bare'));
     }
 
     /**
@@ -162,7 +162,7 @@ class Accounts_Driver {
      */
     function getRealm()
     {
-        return (string)Horde_Auth::getAuthDomain();
+        return strval($GLOBALS['registry']->getAuth('domain'));
     }
 
     /**
@@ -571,7 +571,7 @@ class Accounts_Driver_ldap extends Accounts_Driver {
      */
     function getUsername()
     {
-        return $this->_params['strip'] ? Horde_Auth::getBareAuth() : Horde_Auth::getAuth();
+        return $GLOBALS['registry']->getAuth($this->_params['strip'] ? 'bare' : null);
     }
 
     /**
index 61ffd6d..8c5af89 100644 (file)
@@ -29,7 +29,7 @@ class Horde_Prefs_Ui
                 foreach ($apps as $a) {
                     $perms = $GLOBALS['injector']->getInstance('Horde_Perms');
                     if (file_exists($registry->get('fileroot', $a)) &&
-                        (($perms->exists($a) && ($perms->hasPermission($a, Horde_Auth::getAuth(), Horde_Perms::READ) || $registry->isAdmin())) ||
+                        (($perms->exists($a) && ($perms->hasPermission($a, $GLOBALS['registry']->getAuth(), Horde_Perms::READ) || $registry->isAdmin())) ||
                          !$perms->exists($a))) {
                         $out[$a] = $registry->get('name', $a);
                     }
@@ -370,7 +370,7 @@ class Horde_Prefs_Ui
     protected function _syncmlManagement($ui)
     {
         Horde::addScriptFile('syncmlprefs.js', 'horde');
-        $devices = SyncML_Backend::factory('Horde')->getUserAnchors(Horde_Auth::getAuth());
+        $devices = SyncML_Backend::factory('Horde')->getUserAnchors($GLOBALS['registry']->getAuth());
 
         $t = $GLOBALS['injector']->createInstance('Horde_Template');
         $t->setOption('gettext', true);
@@ -416,12 +416,12 @@ class Horde_Prefs_Ui
         $t->setOption('gettext', true);
         $selfurl = $ui->selfUrl();
         $t->set('reset', $selfurl->copy()->add('reset', 1));
-        $devices = $stateMachine->listDevices(Horde_Auth::getAuth());
+        $devices = $stateMachine->listDevices($GLOBALS['registry']->getAuth());
         $devs = array();
         $i = 1;
         foreach ($devices as $device) {
             $device['class'] = fmod($i++, 2) ? 'rowOdd' : 'rowEven';
-            $stateMachine->loadDeviceInfo($device['device_id'], Horde_Auth::getAuth());
+            $stateMachine->loadDeviceInfo($device['device_id'], $GLOBALS['registry']->getAuth());
             $ts = $stateMachine->getLastSyncTimestamp();
             $device['ts'] = empty($ts) ? _("None") : strftime($GLOBALS['prefs']->getValue('date_format') . ' %H:%M', $ts);
             switch ($device['device_rwstatus']) {
@@ -667,14 +667,14 @@ class Horde_Prefs_Ui
         $backend = SyncML_Backend::factory('Horde');
 
         if ($ui->vars->removedb && $ui->vars->removedevice) {
-            $res = $backend->removeAnchor(Horde_Auth::getAuth(), $ui->vars->removedevice, $ui->vars->removedb);
+            $res = $backend->removeAnchor($GLOBALS['registry']->getAuth(), $ui->vars->removedevice, $ui->vars->removedb);
             if ($res instanceof PEAR_Error) {
                 $GLOBALS['notification']->push(_("Error deleting synchronization session:") . ' ' . $res->getMessage(), 'horde.error');
             } else {
                 $GLOBALS['notification']->push(sprintf(_("Deleted synchronization session for device \"%s\" and database \"%s\"."), $ui->vars->deviceid, $ui->vars->db), 'horde.success');
             }
         } elseif ($ui->vars->deleteall) {
-            $res = $backend->removeAnchor(Horde_Auth::getAuth());
+            $res = $backend->removeAnchor($GLOBALS['registry']->getAuth());
             if ($res instanceof PEAR_Error) {
                 $GLOBALS['notification']->push(_("Error deleting synchronization sessions:") . ' ' . $res->getMessage(), 'horde.error');
             } else {
@@ -695,21 +695,21 @@ class Horde_Prefs_Ui
         $stateMachine = new Horde_ActiveSync_State_History($state_params);
         $stateMachine->setLogger($GLOBALS['injector']->getInstance('Horde_Log_Logger'));
         if ($ui->vars->wipeid) {
-            $stateMachine->loadDeviceInfo($ui->vars->wipeid, Horde_Auth::getAuth());
+            $stateMachine->loadDeviceInfo($ui->vars->wipeid, $GLOBALS['registry']->getAuth());
             $stateMachine->setDeviceRWStatus($ui->vars->wipeid, Horde_ActiveSync::RWSTATUS_PENDING);
             $GLOBALS['notification']->push(sprintf(_("A Remote Wipe for device id %s has been initiated. The device will be wiped during the next SYNC request."), $ui->vars->wipe));
         } elseif ($ui->vars->cancelwipe) {
-            $stateMachine->loadDeviceInfo($ui->vars->cancelwipe, Horde_Auth::getAuth());
+            $stateMachine->loadDeviceInfo($ui->vars->cancelwipe, $GLOBALS['registry']->getAuth());
             $stateMachine->setDeviceRWStatus($ui->vars->cancelwipe, Horde_ActiveSync::RWSTATUS_OK);
             $GLOBALS['notification']->push(sprintf(_("The Remote Wipe for device id %s has been cancelled."), $ui->vars->wipe));
         } elseif ($ui->vars->reset) {
-            $devices = $stateMachine->listDevices(Horde_Auth::getAuth());
+            $devices = $stateMachine->listDevices($GLOBALS['registry']->getAuth());
             foreach ($devices as $device) {
-                $stateMachine->removeState(null, $device['device_id'], Horde_Auth::getAuth());
+                $stateMachine->removeState(null, $device['device_id'], $GLOBALS['registry']->getAuth());
             }
             $GLOBALS['notification']->push(_("All state removed for your devices. They will resynchronize next time they connect to the server."));
         } elseif ($ui->vars->removedevice) {
-            $stateMachine->removeState(null, $ui->vars->removedevice, Horde_Auth::getAuth());
+            $stateMachine->removeState(null, $ui->vars->removedevice, $GLOBALS['registry']->getAuth());
         }
     }
 
index 66065f4..8489684 100644 (file)
@@ -93,7 +93,7 @@ $horde_login_nosidebar = false;
 
 /* Initialize the Auth credentials key. */
 if (!$is_auth) {
-    $GLOBALS['injector']->getInstance('Horde_Secret')->setKey('auth');
+    $injector->getInstance('Horde_Secret')->setKey('auth');
 }
 
 /* Get an Auth object. */
@@ -152,7 +152,7 @@ if ($error_reason) {
 
     $language = $prefs->getValue('language');
 
-    $entry = sprintf('User %s [%s] logged out of Horde', Horde_Auth::getAuth(), $_SERVER['REMOTE_ADDR']);
+    $entry = sprintf('User %s [%s] logged out of Horde', $registry->getAuth(), $_SERVER['REMOTE_ADDR']);
     Horde::logMessage($entry, 'NOTICE');
     $registry->clearAuth();
 
@@ -196,7 +196,7 @@ if ($error_reason) {
     }
 
     if ($auth->authenticate(Horde_Util::getPost('horde_user'), $auth_params)) {
-        $entry = sprintf('Login success for %s [%s] to %s.', Horde_Auth::getAuth(), $_SERVER['REMOTE_ADDR'], ($app && $is_auth) ? $app : 'horde');
+        $entry = sprintf('Login success for %s [%s] to %s.', $registry->getAuth(), $_SERVER['REMOTE_ADDR'], ($app && $is_auth) ? $app : 'horde');
         Horde::logMessage($entry, 'NOTICE');
 
         if (!empty($url_in)) {
@@ -207,7 +207,7 @@ if ($error_reason) {
 
         /* Do password change request on initial login only. */
         if (!$is_auth && Horde_Auth::passwordChangeRequested()) {
-            $GLOBALS['notification']->push(_("Your password has expired."), 'horde.message');
+            $notification->push(_("Your password has expired."), 'horde.message');
 
             if ($auth->hasCapability('update')) {
                 $change_url = Horde::applicationUrl('services/changepassword.php');
index 1d8c91e..d145c28 100644 (file)
@@ -48,7 +48,7 @@ if ($vars->exists('formname')) {
              *                                  $conf['auth']['password_policy']);
              */
             try {
-                $auth->updateUser(Horde_Auth::getAuth(), Horde_Auth::getAuth(), array('password' => $info['password_1']));
+                $auth->updateUser($registry->getAuth(), $registry->getAuth(), array('password' => $info['password_1']));
 
                 $notification->push(_("Password changed successfully."), 'horde.success');
 
index 81395b7..2bfe441 100644 (file)
@@ -15,7 +15,7 @@ Horde_Registry::appInit('horde');
 $identity = $injector->getInstance('Horde_Prefs_Identity')->getIdentity();
 $fullname = $identity->getValue('fullname');
 if (empty($fullname)) {
-    $fullname = $registry->convertUsername(Horde_Auth::getAuth(), false);
+    $fullname = $registry->convertUsername($registry->getAuth(), false);
 }
 
 // Get refresh interval.
index 38ad126..681142f 100644 (file)
@@ -16,7 +16,7 @@ Horde_Registry::appInit('horde');
 $identity = $injector->getInstance('Horde_Prefs_Identity')->getIdentity();
 $fullname = $identity->getValue('fullname');
 if (empty($fullname)) {
-    $fullname = Horde_Auth::getAuth();
+    $fullname = $registry->getAuth();
 }
 
 $links = array();
index 221fd2d..c5ed37d 100644 (file)
@@ -35,7 +35,7 @@ function canSee($app, $params, &$hasChildren)
     // the first call.
     if (is_null($isAdmin)) {
         $isAdmin = $registry->isAdmin();
-        $user = Horde_Auth::getAuth();
+        $user = $registry->getAuth();
     }
 
     // Check if the current user has permisson to see this application, and if
@@ -188,7 +188,7 @@ function buildMenu()
         }
     }
 
-    if (Horde_Auth::getAuth()) {
+    if ($registry->getAuth()) {
         $menu['logout'] = array('name' => _("Log out"),
                                 'status' => 'active',
                                 'icon' => (string)Horde_Themes::img('logout.png'),
@@ -207,7 +207,7 @@ function buildMenu()
 require_once dirname(__FILE__) . '/../../lib/Application.php';
 Horde_Registry::appInit('horde', array('authentication' => 'none'));
 
-if (!Horde_Auth::getAuth() && !$conf['menu']['always']) {
+if (!$registry->getAuth() && !$conf['menu']['always']) {
     $registry->authenticateFailure();
 }
 
index 58eacd1..97c9347 100644 (file)
@@ -26,7 +26,7 @@ if (!Horde_Menu::showService('problem')) {
 $identity = $injector->getInstance('Horde_Prefs_Identity')->getIdentity();
 $email = $identity->getValue('from_addr');
 if (!$email) {
-    $email = Horde_Util::getFormData('email', Horde_Auth::getAuth());
+    $email = Horde_Util::getFormData('email', $registry->getAuth());
 }
 $message = Horde_Util::getFormData('message', '');
 $name = Horde_Util::getFormData('name', $identity->getValue('fullname'));
@@ -54,7 +54,7 @@ case 'send_problem_report':
         $attachment = null;
         if (!empty($conf['problems']['attachments'])) {
             try {
-                $GLOBALS['browser']->wasFileUploaded('attachment', _("attachment"));
+                $browser->wasFileUploaded('attachment', _("attachment"));
                 $attachment = $_FILES['attachment'];
             } catch (Horde_Browser_Exception $e) {
                 if ($e->getCode() != UPLOAD_ERR_NO_FILE) {
@@ -112,7 +112,7 @@ case 'send_problem_report':
             }
 
             try {
-                $mail->send($GLOBALS['injector']->getInstance('Horde_Mail'));
+                $mail->send($injector->getInstance('Horde_Mail'));
 
                 /* We succeeded. */
                 Horde::logMessage(
index edfe2bf..2caaa2a 100644 (file)
@@ -24,7 +24,7 @@ $fieldsList = array(
 );
 
 $app = Horde_Util::getFormData('app');
-$shares = $GLOBALS['injector']->getInstance('Horde_Share')->getScope($app);
+$shares = $injector->getInstance('Horde_Share')->getScope($app);
 $groups = Horde_Group::singleton();
 $auth = $injector->getInstance('Horde_Auth')->getOb();
 if ($registry->hasMethod('shareHelp', $app)) {
@@ -54,10 +54,10 @@ case 'edit':
         }
     }
 
-    if (!Horde_Auth::getAuth() ||
+    if (!$registry->getAuth() ||
               (isset($share) &&
                !$registry->isAdmin() &&
-               Horde_Auth::getAuth() != $share->get('owner'))) {
+               $registry->getAuth() != $share->get('owner'))) {
         exit('permission denied');
     }
     break;
@@ -70,9 +70,9 @@ case 'editform':
     }
 
     if (!empty($share)) {
-        if (!Horde_Auth::getAuth() ||
+        if (!$registry->getAuth() ||
             (!$registry->isAdmin() &&
-             Horde_Auth::getAuth() != $share->get('owner'))) {
+             $registry->getAuth() != $share->get('owner'))) {
             exit('permission denied');
         }
         $perm = &$share->getPermission();
@@ -82,7 +82,7 @@ case 'editform':
         $new_owner_backend = Horde_Util::getFormData('owner_select', Horde_Util::getFormData('owner_input', $old_owner));
         $new_owner = $registry->convertUsername($new_owner_backend, true);
         if ($old_owner !== $new_owner && !empty($new_owner)) {
-            if ($old_owner != Horde_Auth::getAuth() && !$registry->isAdmin()) {
+            if ($old_owner != $registry->getAuth() && !$registry->isAdmin()) {
                 $notification->push(_("Only the owner or system administrator may change ownership or owner permissions for a share"), 'horde.error');
             } elseif ($auth->hasCapability('list') && !$auth->exists($new_owner_backend)) {
                 $notification->push(sprintf(_("The user \"%s\" does not exist."), $new_owner_backend), 'horde.error');
@@ -93,7 +93,7 @@ case 'editform':
         }
 
         if ($registry->isAdmin() ||
-            !empty($GLOBALS['conf']['share']['world'])) {
+            !empty($conf['share']['world'])) {
             // Process default permissions.
             if (Horde_Util::getFormData('default_show')) {
                 $perm->addDefaultPermission(Horde_Perms::SHOW, false);
@@ -278,7 +278,7 @@ if ($auth->hasCapability('list') &&
 
 try {
     $groupList = empty($conf['share']['any_group'])
-        ? $groups->getGroupMemberships(Horde_Auth::getAuth(), true)
+        ? $groups->getGroupMemberships($registry->getAuth(), true)
         : $groups->listGroups();
     asort($groupList);
 } catch (Horde_Group_Exception $e) {
index 7f00b55..b4b7c1c 100644 (file)
@@ -17,7 +17,7 @@ $snooze = Horde_Util::getPost('snooze');
 
 if ($id && $snooze) {
     try {
-        $alarm->snooze($id, Horde_Auth::getAuth(), (int)$snooze);
+        $alarm->snooze($id, $registry->getAuth(), (int)$snooze);
     } catch (Horde_Alarm_Exception $e) {
         header('HTTP/1.0 500 ' . $e->getMessage());
     }
index 19683a7..bae0af9 100644 (file)
@@ -277,7 +277,7 @@ class Hylax_Storage_sql extends Hylax_Storage {
 
         $sql = 'INSERT INTO swoosh_messages (message_id, user_uid, gateway_id, message_batch_id, message_text, message_params, message_submitted) VALUES (?, ?, ?, ?, ?, ?, ?)';
         $values = array((int)$message_id,
-                        Horde_Auth::getAuth(),
+                        $GLOBALS['registry']->getAuth(),
                         (int)$gateway_id,
                         is_null($message_batch_id) ? 'NULL' : (int)$message_batch_id,
                         $message_text,
@@ -335,7 +335,7 @@ class Hylax_Storage_sql extends Hylax_Storage {
     function _getMessages()
     {
         $sql = 'SELECT * FROM swoosh_messages WHERE user_uid = ?';
-        $values = array(Horde_Auth::getAuth());
+        $values = array($GLOBALS['registry']->getAuth());
         Horde::logMessage('SQL Query by Hylax_Storage_sql::_getMessages(): ' . $sql, 'DEBUG');
         $result = $this->_db->getAssoc($sql, false, $values, DB_FETCHMODE_ASSOC);
         if (is_a($result, 'PEAR_Error')) {
index 4d32807..1a68a85 100644 (file)
@@ -733,7 +733,7 @@ if ($redirect) {
         'mailbox' => htmlspecialchars(IMP::$mailbox),
         'oldrtemode' => $rtemode,
         'rtemode' => $rtemode,
-        'user' => Horde_Auth::getAuth()
+        'user' => $registry->getAuth()
     );
 
     if ($_SESSION['imp']['file_upload']) {
@@ -953,7 +953,7 @@ if ($redirect) {
     if ($_SESSION['imp']['file_upload']) {
         $localeinfo = Horde_Nls::getLocaleInfo();
         try {
-            $t->set('selectlistlink', $GLOBALS['registry']->call('files/selectlistLink', array(_("Attach Files"), 'widget', 'compose', true)));
+            $t->set('selectlistlink', $registry->call('files/selectlistLink', array(_("Attach Files"), 'widget', 'compose', true)));
         } catch (Horde_Exception $e) {
             $t->set('selectlistlink', null);
         }
index 736a622..51c6c32 100644 (file)
@@ -546,7 +546,7 @@ class IMP_Hooks
 //    {
 //        // Example #1: Create e-mail for DSPAM setup.
 //        $prefix = ($action == 'spam') ? 'spam-' : 'fp-';
-//        return $prefix . Horde_Auth::getBareAuth() . '@example.com';
+//        return $prefix . $GLOBALS['registry']->getAuth('bare') . '@example.com';
 //    }
 
 
index f258fd5..7c7a15e 100644 (file)
  *           To restrict logging to a certain user ('foo'), and to log this
  *           output to the file '/tmp/imaplog', the following can be used:
  *
- *             ((Horde_Auth::getAuth() == 'foo') ? '/tmp/imaplog' : false)
+ *             (($GLOBALS['registry']->getAuth() == 'foo') ? '/tmp/imaplog' : false)
  *
  * quota: (array) Use this if you want to display a user's quota status on
  *        various IMP pages. Set to an empty value to disable quota status
index 7b6e3a7..eb989eb 100644 (file)
@@ -331,7 +331,7 @@ class IMP_Application extends Horde_Registry_Application
      */
     public function authAuthenticateCallback()
     {
-        if (Horde_Auth::getAuth()) {
+        if ($GLOBALS['registry']->getAuth()) {
             $this->init();
             IMP_Auth::authenticateCallback();
         }
index 3211cd5..5651e95 100644 (file)
@@ -37,7 +37,7 @@ class IMP_Auth
         $imp_app = $GLOBALS['registry']->getApiInstance('imp', 'application');
         if (!empty($imp_app->initParams['authentication']) &&
             ($imp_app->initParams['authentication'] == 'horde')) {
-            if (Horde_Auth::getAuth()) {
+            if ($GLOBALS['registry']->getAuth()) {
                 return false;
             }
             throw new Horde_Auth_Exception('', Horde_Auth::REASON_FAILED);
@@ -142,7 +142,7 @@ class IMP_Auth
             break;
         }
 
-        $auth_id = Horde_Auth::getAuth();
+        $auth_id = $GLOBALS['registry']->getAuth();
         $imap_ob = $GLOBALS['injector']->getInstance('IMP_Imap')->getOb();
 
         $msg = sprintf(
@@ -302,12 +302,10 @@ class IMP_Auth
         }
 
         if ((!empty($auto_server) || $force) &&
-            Horde_Auth::getAuth() &&
+            $GLOBALS['registry']->getAuth() &&
             !empty($servers[$server_key]['hordeauth'])) {
             return array(
-                'userId' => ((strcasecmp($servers[$server_key]['hordeauth'], 'full') == 0)
-                    ? Horde_Auth::getAuth()
-                    : Horde_Auth::getBareAuth()),
+                'userId' => $GLOBALS['registry']->getAuth((strcasecmp($servers[$server_key]['hordeauth'], 'full') == 0) ? null : 'bare'),
                 'password' => Horde_Auth::getCredential('password'),
                 'server' => $server_key
             );
index 10c9e7f..98f29bc 100644 (file)
@@ -623,7 +623,7 @@ class IMP_Compose
             }
         }
 
-        $entry = sprintf("%s Message sent to %s from %s", $_SERVER['REMOTE_ADDR'], $recipients, Horde_Auth::getAuth());
+        $entry = sprintf("%s Message sent to %s from %s", $_SERVER['REMOTE_ADDR'], $recipients, $GLOBALS['registry']->getAuth());
         Horde::logMessage($entry, 'INFO');
 
         /* Should we save this message in the sent mail folder? */
@@ -1641,7 +1641,7 @@ class IMP_Compose
             throw new IMP_Compose_Exception($e);
         }
 
-        Horde::logMessage(sprintf("%s Redirected message sent to %s from %s", $_SERVER['REMOTE_ADDR'], $recipients, Horde_Auth::getAuth()), 'INFO');
+        Horde::logMessage(sprintf("%s Redirected message sent to %s from %s", $_SERVER['REMOTE_ADDR'], $recipients, $GLOBALS['registry']->getAuth()), 'INFO');
 
         /* Store history information. */
         if (!empty($GLOBALS['conf']['maillog']['use_maillog'])) {
@@ -2345,7 +2345,7 @@ class IMP_Compose
             throw new IMP_Compose_Exception(_("Linked attachments are forbidden."));
         }
 
-        $auth = Horde_Auth::getAuth();
+        $auth = $GLOBALS['registry']->getAuth();
         $baseurl = Horde::applicationUrl('attachment.php', true)->setRaw(true);
 
         try {
@@ -2665,7 +2665,7 @@ class IMP_Compose
             return;
         }
 
-        $filename = hash('md5', Horde_Auth::getAuth());
+        $filename = hash('md5', $GLOBALS['registry']->getAuth());
 
         try {
             $vfs = $GLOBALS['injector']->getInstance('Horde_Vfs')->getVfs();
index 23021ad..4820d14 100644 (file)
@@ -20,7 +20,7 @@ class IMP_Injector_Binder_Folder implements Horde_Injector_Binder
     {
         $cacheid = empty($GLOBALS['conf']['server']['cache_folders'])
             ? null
-            : 'imp_folder_cache|' . Horde_Auth::getAuth() . '|' . $_SESSION['imp']['server_key'];
+            : 'imp_folder_cache|' . $GLOBALS['registry']->getAuth() . '|' . $_SESSION['imp']['server_key'];
 
         return new IMP_Folder($cacheid);
     }
index 3fa46eb..db0ab5b 100644 (file)
@@ -25,7 +25,7 @@ class IMP_Injector_Binder_Imaptree implements Horde_Injector_Binder
 
         if (empty($_SESSION['imp']['cache']['tree'])) {
             if (!($cache instanceof Horde_Cache_Null)) {
-                $_SESSION['imp']['cache']['tree'] = uniqid(mt_rand() . Horde_Auth::getAuth());
+                $_SESSION['imp']['cache']['tree'] = uniqid(mt_rand() . $GLOBALS['registry']->getAuth());
             }
         } else {
             $instance = @unserialize($cache->get($_SESSION['imp']['cache']['tree'], 86400));
index ffe6816..6f6d4ab 100644 (file)
@@ -40,7 +40,7 @@ class IMP_LoginTasks_Task_DeleteAttachmentsMonthly extends Horde_LoginTasks_Task
         } catch (VFS_Exception $e) {
             return false;
         }
-        $path = IMP_Compose::VFS_LINK_ATTACH_PATH . '/' . Horde_Auth::getAuth();
+        $path = IMP_Compose::VFS_LINK_ATTACH_PATH . '/' . $GLOBALS['registry']->getAuth();
 
         /* Make sure cleaning is done recursively. */
         try {
index 707b280..1a82f0d 100644 (file)
@@ -213,7 +213,7 @@ class IMP_Maillog
             return '';
         }
 
-        return implode('.', array('imp', str_replace('.', '*', Horde_Auth::getAuth()), $msgid));
+        return implode('.', array('imp', str_replace('.', '*', $GLOBALS['registry']->getAuth()), $msgid));
     }
 
 }
index ad591fd..81c6549 100644 (file)
@@ -203,7 +203,7 @@ class Imp_Prefs_Identity extends Horde_Prefs_Identity
         if (!isset($this->_cached['fromList'][$ident])) {
             $val = $this->getValue('from_addr', $ident);
             if (empty($val)) {
-                $val = Horde_Auth::getBareAuth();
+                $val = $GLOBALS['registry']->getAuth('bare');
             }
 
             if (!strstr($val, '@')) {
index b3e62ad..dcb9f39 100644 (file)
@@ -645,7 +645,7 @@ class IMP_Prefs_Ui
             $GLOBALS['notification']->notify($e);
             return '';
         }
-        $canEdit = $ACL->canEdit($folder, Horde_Auth::getAuth());
+        $canEdit = $ACL->canEdit($folder, $GLOBALS['registry']->getAuth());
 
         $t = $GLOBALS['injector']->createInstance('Horde_Template');
         $t->setOption('gettext', true);
index 93a114e..2301d4e 100644 (file)
@@ -82,7 +82,7 @@ class IMP_Sentmail_Sql extends IMP_Sentmail_Driver
         /* Build the SQL query. */
         $query = sprintf('INSERT INTO %s (sentmail_who, sentmail_ts, sentmail_messageid, sentmail_action, sentmail_recipient, sentmail_success) VALUES (?, ?, ?, ?, ?, ?)', $this->_params['table']);
         $values = array(
-            Horde_Auth::getAuth(),
+            $GLOBALS['registry']->getAuth(),
             time(),
             $message_id,
             $action,
@@ -117,7 +117,7 @@ class IMP_Sentmail_Sql extends IMP_Sentmail_Driver
 
         $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(Horde_Auth::getAuth()),
+                         $this->_db->quote($GLOBALS['registry']->getAuth()),
                          $where,
                          $limit);
 
@@ -145,7 +145,7 @@ class IMP_Sentmail_Sql extends IMP_Sentmail_Driver
         $query = sprintf('SELECT COUNT(*) FROM %s WHERE sentmail_ts > ?',
                          $this->_params['table']);
         if ($user) {
-            $query .= sprintf(' AND sentmail_who = %s', $this->_db->quote(Horde_Auth::getAuth()));
+            $query .= sprintf(' AND sentmail_who = %s', $this->_db->quote($GLOBALS['registry']->getAuth()));
         }
 
         /* Execute the query. */
index ac61efc..cef418a 100644 (file)
@@ -67,9 +67,9 @@ class IMP_Spam
                      * be secure. */
                     $prog = str_replace(array('%u','%l', '%d'),
                         array(
-                            escapeshellarg(Horde_Auth::getAuth()),
-                            escapeshellarg(Horde_Auth::getBareAuth()),
-                            escapeshellarg(Horde_Auth::getAuthDomain())
+                            escapeshellarg($GLOBALS['registry']->getAuth()),
+                            escapeshellarg($GLOBALS['registry']->getAuth('bare')),
+                            escapeshellarg($GLOBALS['registry']->getAuth('domain'))
                         ), $GLOBALS['conf'][$action]['program']);
                     $proc = proc_open($prog,
                         array(
@@ -136,7 +136,7 @@ class IMP_Spam
                     if (!is_null($from_line)) {
                         $spam_headers->addHeader('From', $from_line);
                     }
-                    $spam_headers->addHeader('Subject', sprintf(_("%s report from %s"), $action, Horde_Auth::getAuth()));
+                    $spam_headers->addHeader('Subject', sprintf(_("%s report from %s"), $action, $GLOBALS['registry']->getAuth()));
 
                     /* Send the message. */
                     try {
index afdc099..fbaf7e3 100644 (file)
@@ -239,7 +239,7 @@ case 'print_attach':
                 $user_identity = $injector->getInstance('IMP_Identity');
                 $headers[] = array(
                     'header' => htmlspecialchars(_("Printed By")),
-                    'value' => htmlspecialchars($user_identity->getFullname() ? $user_identity->getFullname() : Horde_Auth::getAuth())
+                    'value' => htmlspecialchars($user_identity->getFullname() ? $user_identity->getFullname() : $registry->getAuth())
                 );
             }
 
index 3a1c99b..4756b82 100644 (file)
@@ -131,7 +131,7 @@ class Ingo_Api extends Horde_Registry_Api
             /* Remove empty lines. */
             $info['addresses'] = preg_replace('/\n{2,}/', "\n", implode("\n", $identity->getAll('from_addr')));
             if (empty($addresses)) {
-                $info['addresses'] = Horde_Auth::getAuth();
+                $info['addresses'] = $GLOBALS['registry']->getAuth();
             }
         }
 
index ffc3f09..c573162 100644 (file)
@@ -68,12 +68,12 @@ class Ingo_Application extends Horde_Registry_Application
             $GLOBALS['all_rulesets'] = Ingo::listRulesets();
 
             /* If personal share doesn't exist then create it. */
-            $signature = $_SESSION['ingo']['backend']['id'] . ':' . Horde_Auth::getAuth();
+            $signature = $_SESSION['ingo']['backend']['id'] . ':' . $GLOBALS['registry']->getAuth();
             if (!$GLOBALS['ingo_shares']->exists($signature)) {
                 $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity();
                 $name = $identity->getValue('fullname');
                 if (trim($name) == '') {
-                    $name = Horde_Auth::getOriginalAuth();
+                    $name = $GLOBALS['registry']->getAuth('original');
                 }
                 $share = $GLOBALS['ingo_shares']->newShare($signature);
                 $share->set('name', $name);
@@ -85,7 +85,7 @@ class Ingo_Application extends Horde_Registry_Application
             $_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(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+                !$GLOBALS['all_rulesets'][$_SESSION['ingo']['current_share']]->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
                 $_SESSION['ingo']['current_share'] = $signature;
             }
         } else {
@@ -162,7 +162,7 @@ class Ingo_Application extends Horde_Registry_Application
     public function removeUserData($user)
     {
         if (!$GLOBALS['registry']->isAdmin() &&
-            ($user != Horde_Auth::getAuth())) {
+            ($user != $GLOBALS['registry']->getAuth())) {
             throw new Horde_Auth_Exception(_("You are not allowed to remove user data."));
         }
 
index 4d3d6f5..71692d6 100644 (file)
@@ -174,11 +174,10 @@ class Ingo
     static public function getUser($full = true)
     {
         if (empty($GLOBALS['ingo_shares'])) {
-            $user = ($full ||
-                     (isset($_SESSION['ingo']['backend']['hordeauth']) &&
-                      $_SESSION['ingo']['backend']['hordeauth'] === 'full'))
-                ? Horde_Auth::getAuth()
-                : Horde_Auth::getBareAuth();
+            $baseuser = ($full ||
+                        (isset($_SESSION['ingo']['backend']['hordeauth']) &&
+                         $_SESSION['ingo']['backend']['hordeauth'] === 'full'));
+            $user = $GLOBALS['registry']->getAuth($baseuser ? null : 'bare');
         } else {
             list(, $user) = explode(':', $_SESSION['ingo']['current_share'], 2);
         }
@@ -348,15 +347,14 @@ class Ingo
 
         // Set authentication parameters.
         if (!empty($_SESSION['ingo']['backend']['hordeauth'])) {
-            $params['username'] = ($_SESSION['ingo']['backend']['hordeauth'] === 'full')
-                        ? Horde_Auth::getAuth() : Horde_Auth::getBareAuth();
+            $params['username'] = $GLOBALS['registry']->getAuth(($_SESSION['ingo']['backend']['hordeauth'] === 'full') ? null : 'bare');
             $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'] = Horde_Auth::getBareAuth();
+            $params['username'] = $GLOBALS['registry']->getAuth('bare');
             $params['password'] = Horde_Auth::getCredential('password');
         }
 
@@ -377,7 +375,7 @@ class Ingo
                                         $permission = Horde_Perms::SHOW)
     {
         try {
-            $rulesets = $GLOBALS['ingo_shares']->listShares(Horde_Auth::getAuth(), $permission, $owneronly ? Horde_Auth::getAuth() : null);
+            $rulesets = $GLOBALS['ingo_shares']->listShares($GLOBALS['registry']->getAuth(), $permission, $owneronly ? $GLOBALS['registry']->getAuth() : null);
         } catch (Horde_Share_Exception $e) {
             Horde::logMessage($e, 'ERR');
             return array();
@@ -396,7 +394,7 @@ class Ingo
         }
 
         if (is_null(self::$_shareCache)) {
-            self::$_shareCache = $GLOBALS['ingo_shares']->getPermissions($_SESSION['ingo']['current_share'], Horde_Auth::getAuth());
+            self::$_shareCache = $GLOBALS['ingo_shares']->getPermissions($_SESSION['ingo']['current_share'], $GLOBALS['registry']->getAuth());
         }
 
         return self::$_shareCache & $mask;
@@ -446,7 +444,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', Horde_Themes::img(null, 'horde'), '', Horde::popupJs(Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/shares/edit.php', true), array('params' => array('app' => 'ingo', 'share' => $_SESSION['ingo']['backend']['id'] . ':' . Horde_Auth::getAuth()), 'urlencode' => true)) . 'return false;');
+            $menu->add('#', _("_Permissions"), 'perms.png', Horde_Themes::img(null, 'horde'), '', Horde::popupJs(Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/shares/edit.php', true), array('params' => array('app' => 'ingo', 'share' => $_SESSION['ingo']['backend']['id'] . ':' . $GLOBALS['registry']->getAuth()), 'urlencode' => true)) . 'return false;');
         }
 
         return $menu;
index e52aef0..b3e69de 100644 (file)
@@ -392,7 +392,7 @@ class Ingo_Storage_Sql extends Ingo_Storage
     public function removeUserData($user)
     {
         if (!$GLOBALS['registry']->isAdmin() &&
-            $user != Horde_Auth::getAuth()) {
+            $user != $GLOBALS['registry']->getAuth()) {
             throw new Ingo_Exception(_("Permission Denied"));
         }
 
index f6abdc0..22d091c 100644 (file)
@@ -110,7 +110,7 @@ if (!$vacation->getVacationAddresses()) {
     /* Remove empty lines. */
     $addresses = preg_replace('/\n+/', "\n", $addresses);
     if (empty($addresses)) {
-        $addresses = Horde_Auth::getAuth();
+        $addresses = $GLOBALS['registry']->getAuth();
     }
     $vacation->setVacationAddresses($addresses);
 }
index 91075dd..23b35fb 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')) ? Horde_Auth::getAuth() : Horde_Auth::getBareAuth()
+            'SSH.user' => $GLOBALS['registry']->getAuth((empty($GLOBALS['conf']['user']['hordeauth']) || ($GLOBALS['conf']['user']['hordeauth'] === 'full')) ? null : 'bare');
         );
 
         foreach ($this->_jtaParams as $key => $val) {
index 8097290..dadd8d5 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')) ? Horde_Auth::getAuth() : Horde_Auth::getBareAuth()
+            'sshapps.connection.userName' => $GLOBALS['registry']->getAuth((empty($GLOBALS['conf']['user']['hordeauth']) || ($GLOBALS['conf']['user']['hordeauth'] === 'full')) ? null : 'bare');
         );
 
         foreach ($this->_sshtoolsParams as $key => $val) {
index 06b039e..db113a2 100644 (file)
@@ -137,12 +137,12 @@ class Jonah {
         case 'internal_channels':
         case 'external_channels':
             if (empty($in) || !$perms->exists('jonah:news:' . $filter . ':' . $in)) {
-                return $perms->hasPermission('jonah:news:' . $filter, Horde_Auth::getAuth(), $permission);
+                return $perms->hasPermission('jonah:news:' . $filter, $GLOBALS['registry']->getAuth(), $permission);
             } elseif (!is_array($in)) {
-                return $perms->hasPermission('jonah:news:' . $filter . ':' . $in, Horde_Auth::getAuth(), $permission);
+                return $perms->hasPermission('jonah:news:' . $filter . ':' . $in, $GLOBALS['registry']->getAuth(), $permission);
             } else {
                 foreach ($in as $key => $val) {
-                    if ($perms->hasPermission('jonah:news:' . $filter . ':' . $val, Horde_Auth::getAuth(), $permission)) {
+                    if ($perms->hasPermission('jonah:news:' . $filter . ':' . $val, $GLOBALS['registry']->getAuth(), $permission)) {
                         $out[$key] = $val;
                     }
                 }
@@ -152,15 +152,15 @@ class Jonah {
         case 'channels':
             foreach ($in as $key => $val) {
                 $perm_name = Jonah::typeToPermName($val['channel_type']);
-                if ($perms->hasPermission('jonah:news:' . $perm_name,  Horde_Auth::getAuth(), $permission) ||
-                    $perms->hasPermission('jonah:news:' . $perm_name . ':' . $val['channel_id'], Horde_Auth::getAuth(), $permission)) {
+                if ($perms->hasPermission('jonah:news:' . $perm_name,  $GLOBALS['registry']->getAuth(), $permission) ||
+                    $perms->hasPermission('jonah:news:' . $perm_name . ':' . $val['channel_id'], $GLOBALS['registry']->getAuth(), $permission)) {
                     $out[$key] = $in[$key];
                 }
             }
             break;
 
         default:
-            return $perms->hasPermission($filter, Horde_Auth::getAuth(), Horde_Perms::EDIT);
+            return $perms->hasPermission($filter, $GLOBALS['registry']->getAuth(), Horde_Perms::EDIT);
         }
 
         return $out;
index 9c2040b..c7f258d 100644 (file)
@@ -267,7 +267,7 @@ class Jonah_News_sql extends Jonah_News {
             $channel = $this->getChannel($info['channel_id']);
             $permalink = $this->getStoryLink($channel, $info);
             $sql = 'INSERT INTO jonah_stories (story_id, channel_id, story_title, story_desc, story_body_type, story_body, story_url, story_published, story_updated, story_read, story_permalink, story_author) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';
-            $values = array($permalink, Horde_Auth::getAuth());
+            $values = array($permalink, $GLOBALS['registry']->getAuth());
         } else {
             $sql = 'UPDATE jonah_stories SET story_id = ?, channel_id = ?, story_title = ?, story_desc = ?, story_body_type = ?, story_body = ?, story_url = ?, story_published = ?, story_updated = ?, story_read = ? WHERE story_id = ?';
             $values = array((int)$info['story_id']);
index bf51b33..2005c82 100644 (file)
@@ -77,7 +77,7 @@ $form->setButtons(_("Send"));
 $form->addHidden('', 'channel_id', 'int', false);
 $form->addHidden('', 'story_id', 'int', false);
 $v = &$form->addVariable(_("From"), 'from', 'email', true, false);
-if (Horde_Auth::getAuth()) {
+if ($GLOBALS['registry']->getAuth()) {
     $v->setDefault($injector->getInstance('Horde_Prefs_Identity')->getIdentity()->getValue('from_addr'));
 }
 $form->addVariable(_("To"), 'recipients', 'email', true, false, _("Separate multiple email addresses with commas."), true);
index 9f79b15..8f8c395 100755 (executable)
@@ -23,10 +23,10 @@ require(KASTALIA_BASE . '/config/conf.php');
 
 
 
-echo Horde_Auth::getAuth();
+echo $GLOBALS['registry']->getAuth();
 
-echo $registry->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT);
-if($registry->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+echo $registry->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT);
+if($registry->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
    echo "TASTA";
    exit(0);
 }
index 8dcaf67..0348dcf 100644 (file)
@@ -87,7 +87,7 @@ class Koward {
     public function getServer()
     {
         if (!isset(self::$server)) {
-            self::$server = Horde_Kolab_Server::singleton(array('user' => Horde_Auth::getAuth(),
+            self::$server = Horde_Kolab_Server::singleton(array('user' => $GLOBALS['registry']->getAuth(),
                                                                 'pass' => Horde_Auth::getCredential('password')));
         }
 
index fb14d24..d6661cb 100644 (file)
@@ -39,7 +39,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 = Horde_Auth::getAuth();
+        $this->current_user = $GLOBALS['registry']->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', Horde_Themes::img(null, 'horde'));
         }
-        if (Horde_Auth::getAuth()) {
+        if ($GLOBALS['registry']->getAuth()) {
             $menu->add($this->urlFor(array('controller' => 'index', 'action' => 'logout')),
                        _("_Logout"), 'logout.png', Horde_Themes::img(null, 'horde'));
         }
@@ -98,8 +98,8 @@ 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!', Horde_Auth::getAuth(), $id), 'NOTICE');
-            if (Horde_Auth::getAuth()) {
+            Horde::logMessage(sprintf('User %s does not have access to action %s!', $GLOBALS['registry']->getAuth(), $id), 'NOTICE');
+            if ($GLOBALS['registry']->getAuth()) {
                 $url = $this->urlFor(array('controller' => 'index', 'action' => 'index'));
             } else {
                 $url = $this->urlFor(array('controller' => 'index', 'action' => 'login'));
index ce97b18..ec6413b 100644 (file)
@@ -17,7 +17,7 @@ class IndexController extends Koward_Controller_Application
 
     public function login()
     {
-        $auth = Horde_Auth::getAuth();
+        $auth = $GLOBALS['registry']->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',
-                                 Horde_Auth::getAuth(), $_SERVER['REMOTE_ADDR']);
+                                 $GLOBALS['registry']->getAuth(), $_SERVER['REMOTE_ADDR']);
                 Horde::logMessage($entry, 'NOTICE');
 
                 $type = $this->koward->getType();
@@ -64,7 +64,7 @@ class IndexController extends Koward_Controller_Application
     public function logout()
     {
         $entry = sprintf('User %s [%s] logged out of Horde',
-                         Horde_Auth::getAuth(), $_SERVER['REMOTE_ADDR']);
+                         $GLOBALS['registry']->getAuth(), $_SERVER['REMOTE_ADDR']);
         Horde::logMessage($entry, 'NOTICE');
         $GLOBALS['registry']->clearAuth();
 
index c5f1a17..c525c22 100644 (file)
@@ -15,15 +15,15 @@ if (!Horde_Util::getFormData('cancel')) {
         list($calendar_id, $user) = explode(':', $targetcalendar, 2);
     } else {
         $calendar_id = $targetcalendar;
-        $user = Horde_Auth::getAuth();
+        $user = $GLOBALS['registry']->getAuth();
     }
     try {
         $share = Kronolith::getInternalCalendar($calendar_id);
-        if ($user != Horde_Auth::getAuth() &&
-            !$share->hasPermission(Horde_Auth::getAuth(), Kronolith::PERMS_DELEGATE, Horde_Auth::getAuth())) {
+        if ($user != $GLOBALS['registry']->getAuth() &&
+            !$share->hasPermission($GLOBALS['registry']->getAuth(), Kronolith::PERMS_DELEGATE, $GLOBALS['registry']->getAuth())) {
             $notification->push(sprintf(_("You do not have permission to delegate events to %s."), Kronolith::getUserName($user)), 'horde.warning');
-        } elseif ($user == Horde_Auth::getAuth() &&
-                  !$share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT, Horde_Auth::getAuth())) {
+        } elseif ($user == $GLOBALS['registry']->getAuth() &&
+                  !$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT, $GLOBALS['registry']->getAuth())) {
             $notification->push(sprintf(_("You do not have permission to add events to %s."), $share->get('name')), 'horde.warning');
         } elseif ($GLOBALS['injector']->getInstance('Horde_Perms')->hasAppPermission('max_events') === true ||
                   $GLOBALS['injector']->getInstance('Horde_Perms')->hasAppPermission('max_events') > Kronolith::countEvents()) {
index 56322d1..3cee261 100644 (file)
@@ -201,12 +201,12 @@ if (!is_array($cal)) {
 if (!$cal) {
     $cal = $prefs->getValue('default_share');
     if (!$cal) {
-        $cal = Horde_Auth::getAuth();
+        $cal = $GLOBALS['registry']->getAuth();
     }
     $cal = array($cal);
 }
 try {
-    $vfb = Kronolith_FreeBusy::generate($cal, null, null, true, Horde_Auth::getAuth());
+    $vfb = Kronolith_FreeBusy::generate($cal, null, null, true, $GLOBALS['registry']->getAuth());
     $attendee_view->addRequiredMember($vfb);
 } catch (Exception $e) {
     $notification->push(sprintf(_("Error retrieving your free/busy information: %s"), $e->getMessage()));
index b9819dc..a637faf 100644 (file)
@@ -15,7 +15,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 (!Horde_Auth::getAuth() || $prefs->isLocked('default_share')) {
+if (!$GLOBALS['registry']->getAuth() || $prefs->isLocked('default_share')) {
     header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true));
     exit;
 }
index 281cf89..ddc7dd8 100644 (file)
@@ -14,14 +14,14 @@ Horde_Registry::appInit('kronolith');
 require_once KRONOLITH_BASE . '/lib/Forms/DeleteCalendar.php';
 
 // Exit if this isn't an authenticated user.
-if (!Horde_Auth::getAuth()) {
+if (!$GLOBALS['registry']->getAuth()) {
     header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true));
     exit;
 }
 
 $vars = Horde_Variables::getDefaultVariables();
 $calendar_id = $vars->get('c');
-if ($calendar_id == Horde_Auth::getAuth()) {
+if ($calendar_id == $GLOBALS['registry']->getAuth()) {
     $notification->push(_("This calendar cannot be deleted."), 'horde.warning');
     header('Location: ' . Horde::applicationUrl('calendars/', true));
     exit;
@@ -33,7 +33,7 @@ try {
     header('Location: ' . Horde::applicationUrl('calendars/', true));
     exit;
 }
-if ($calendar->get('owner') != Horde_Auth::getAuth() &&
+if ($calendar->get('owner') != $GLOBALS['registry']->getAuth() &&
     (!is_null($calendar->get('owner')) || !$registry->isAdmin())) {
     $notification->push(_("You are not allowed to delete this calendar."), 'horde.error');
     header('Location: ' . Horde::applicationUrl('calendars/', true));
index c77947b..3f7966d 100644 (file)
@@ -14,7 +14,7 @@ Horde_Registry::appInit('kronolith');
 require_once KRONOLITH_BASE . '/lib/Forms/EditCalendar.php';
 
 // Exit if this isn't an authenticated user.
-if (!Horde_Auth::getAuth()) {
+if (!$GLOBALS['registry']->getAuth()) {
     header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true));
     exit;
 }
@@ -27,7 +27,7 @@ try {
     header('Location: ' . Horde::applicationUrl('calendars/', true));
     exit;
 }
-if ($calendar->get('owner') != Horde_Auth::getAuth() &&
+if ($calendar->get('owner') != $GLOBALS['registry']->getAuth() &&
     (!is_null($calendar->get('owner')) || !$registry->isAdmin())) {
     $notification->push(_("You are not allowed to change this calendar."), 'horde.error');
     header('Location: ' . Horde::applicationUrl('calendars/', true));
index 81f323d..6e939de 100644 (file)
@@ -25,7 +25,7 @@ require_once dirname(__FILE__) . '/../lib/Application.php';
 Horde_Registry::appInit('kronolith');
 
 // Exit if this isn't an authenticated user.
-if (!Horde_Auth::getAuth()) {
+if (!$GLOBALS['registry']->getAuth()) {
     header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php'));
     exit;
 }
index 97b1a8b..52cb368 100644 (file)
@@ -10,7 +10,7 @@ require_once dirname(__FILE__) . '/../lib/Application.php';
 Horde_Registry::appInit('kronolith');
 
 // Exit if this isn't an authenticated user.
-if (!Horde_Auth::getAuth()) {
+if (!$GLOBALS['registry']->getAuth()) {
     exit;
 }
 
index 2c71b71..17f0c37 100644 (file)
@@ -15,7 +15,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 (!Horde_Auth::getAuth() || $prefs->isLocked('remote_cals')) {
+if (!$GLOBALS['registry']->getAuth() || $prefs->isLocked('remote_cals')) {
     header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true));
     exit;
 }
index ae96400..0f5dcd8 100644 (file)
@@ -15,7 +15,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 (!Horde_Auth::getAuth() || $prefs->isLocked('remote_cals')) {
+if (!$GLOBALS['registry']->getAuth() || $prefs->isLocked('remote_cals')) {
     header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true));
     exit;
 }
index 1beab91..c8dd328 100644 (file)
@@ -15,7 +15,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 (!Horde_Auth::getAuth() || $prefs->isLocked('remote_cals')) {
+if (!$GLOBALS['registry']->getAuth() || $prefs->isLocked('remote_cals')) {
     header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true));
     exit;
 }
index 904e811..2fd6aaa 100644 (file)
@@ -205,7 +205,7 @@ $_prefs['show_shared_side_by_side'] = array(
 // default calendar
 // Set locked to true if you don't want users to have multiple calendars.
 $_prefs['default_share'] = array(
-    'value' => Horde_Auth::getAuth() ? Horde_Auth::getAuth() : 0,
+    'value' => $GLOBALS['registry']->getAuth() ? $GLOBALS['registry']->getAuth() : 0,
     'type' => 'enum',
     'desc' => _("Your default calendar:")
 );
@@ -341,7 +341,7 @@ $_prefs['search_fields'] = array(
 );
 
 $_prefs['fb_url'] = array(
-    'value' => '<strong>' . _("My Free/Busy URL") . '</strong><div class="fburl"><div>' . _("Copy this URL for use wherever you need your Free/Busy URL:") . '</div><div class="fixed">' . Horde::applicationUrl('fb.php', true, -1)->add('u', Horde_Auth::getAuth()) . '</div></div>',
+    'value' => '<strong>' . _("My Free/Busy URL") . '</strong><div class="fburl"><div>' . _("Copy this URL for use wherever you need your Free/Busy URL:") . '</div><div class="fixed">' . Horde::applicationUrl('fb.php', true, -1)->add('u', $GLOBALS['registry']->getAuth()) . '</div></div>',
     'type' => 'rawhtml'
 );
 
index 0b7ea8d..ce401b6 100644 (file)
@@ -9,7 +9,7 @@
 require_once dirname(__FILE__) . '/lib/Application.php';
 Horde_Registry::appInit('kronolith');
 
-if (!Horde_Auth::getAuth()) {
+if (!$GLOBALS['registry']->getAuth()) {
     echo Horde::wrapInlineScript(array('window.close();'));
     exit;
 }
index aa9bb0e..77d5aad 100644 (file)
@@ -190,7 +190,7 @@ if (!$error) {
             $cleanup = true;
             try {
                 $share = $kronolith_shares->getShare($_SESSION['import_data']['import_cal']);
-                if (!$share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+                if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
                     $notification->push(_("You do not have permission to add events to the selected calendar."), 'horde.error');
                 } else {
                     $next_step = $data->nextStep($actionID, $param);
@@ -310,10 +310,10 @@ if (Horde_Util::getFormData('import_ajax')) {
 }
 
 $import_calendars = $export_calendars = array();
-if (Horde_Auth::getAuth()) {
+if ($GLOBALS['registry']->getAuth()) {
     $calendars = Kronolith::listCalendars(false, Horde_Perms::EDIT);
     foreach ($calendars as $id => $calendar) {
-        if ($calendar->get('owner') != Horde_Auth::getAuth() &&
+        if ($calendar->get('owner') != $GLOBALS['registry']->getAuth() &&
             !empty($GLOBALS['conf']['share']['hidden']) &&
             !in_array($calendar->getName(), $GLOBALS['display_calendars'])) {
             continue;
@@ -323,7 +323,7 @@ if (Horde_Auth::getAuth()) {
 }
 $calendars = Kronolith::listCalendars(false, Horde_Perms::READ);
 foreach ($calendars as $id => $calendar) {
-    if ($calendar->get('owner') != Horde_Auth::getAuth() &&
+    if ($calendar->get('owner') != $GLOBALS['registry']->getAuth() &&
         !empty($GLOBALS['conf']['share']['hidden']) &&
         !in_array($calendar->getName(), $GLOBALS['display_calendars'])) {
         continue;
index 1306149..0d52176 100644 (file)
@@ -31,7 +31,7 @@ if ($eventID = Horde_Util::getFormData('eventID')) {
     }
     if ($driver != 'Resource') {
         $share = $kronolith_shares->getShare($event->calendar);
-        if (!$share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE, $event->creator)) {
+        if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE, $event->creator)) {
             $notification->push(_("You do not have permission to delete this event."), 'horde.warning');
         } else {
             $have_perms = true;
index 8d706d9..ae8b436 100644 (file)
@@ -65,7 +65,7 @@ if ($exception = Horde_Util::getFormData('del_exception')) {
         list($target, $user) = explode(':', $targetcalendar, 2);
     } else {
         $target = $targetcalendar;
-        $user = Horde_Auth::getAuth();
+        $user = $GLOBALS['registry']->getAuth();
     }
     try {
         $share = Kronolith::getInternalCalendar($target);
@@ -139,11 +139,11 @@ if ($exception = Horde_Util::getFormData('del_exception')) {
                 // has permissions to do so.
                 try {
                     $sourceShare = Kronolith::getInternalCalendar($source);
-                    if ($sourceShare->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE) &&
-                        (($user == Horde_Auth::getAuth() &&
-                          $share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) ||
-                         ($user != Horde_Auth::getAuth() &&
-                          $share->hasPermission(Horde_Auth::getAuth(), Kronolith::PERMS_DELEGATE)))) {
+                    if ($sourceShare->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE) &&
+                        (($user == $GLOBALS['registry']->getAuth() &&
+                          $share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) ||
+                         ($user != $GLOBALS['registry']->getAuth() &&
+                          $share->hasPermission($GLOBALS['registry']->getAuth(), Kronolith::PERMS_DELEGATE)))) {
                         $kronolith_driver->open($source);
                         try {
                             $res = $kronolith_driver->move(Horde_Util::getFormData('eventID'), $target);
@@ -162,13 +162,13 @@ if ($exception = Horde_Util::getFormData('del_exception')) {
 
         if ($event) {
             if (isset($sourceShare)
-                && !$sourceShare->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE)) {
+                && !$sourceShare->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
                 $notification->push(_("You do not have permission to move this event."), 'horde.warning');
-            } elseif ($user != Horde_Auth::getAuth() &&
-                      !$share->hasPermission(Horde_Auth::getAuth(), Kronolith::PERMS_DELEGATE, $event->creator)) {
+            } elseif ($user != $GLOBALS['registry']->getAuth() &&
+                      !$share->hasPermission($GLOBALS['registry']->getAuth(), Kronolith::PERMS_DELEGATE, $event->creator)) {
                 $notification->push(sprintf(_("You do not have permission to delegate events to %s."), Kronolith::getUserName($user)), 'horde.warning');
-            } elseif ($user == Horde_Auth::getAuth() &&
-                      !$share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT, $event->creator)) {
+            } elseif ($user == $GLOBALS['registry']->getAuth() &&
+                      !$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT, $event->creator)) {
                 $notification->push(_("You do not have permission to edit this event."), 'horde.warning');
             } else {
                 $event->readForm();
index 0265648..fac4fc5 100644 (file)
@@ -33,7 +33,7 @@ case 'DeleteEvent':
 
 case 'EditEvent':
     if ($view->event->private &&
-        $view->event->creator != Horde_Auth::getAuth()) {
+        $view->event->creator != $GLOBALS['registry']->getAuth()) {
         $url = $url = Horde_Util::getFormData('url');
         if (!empty($url)) {
             $url = new Horde_Url($url, true);
index cae5ec4..a7ce9fd 100644 (file)
@@ -32,8 +32,8 @@ try {
                sprintf(_("The requested feed (%s) was not found on this server."),
                        htmlspecialchars($calendar)));
 }
-if (!$share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
-    if (Horde_Auth::getAuth()) {
+if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
+    if ($GLOBALS['registry']->getAuth()) {
         _no_access(403, 'Forbidden',
                    sprintf(_("Permission denied for the requested feed (%s)."),
                            htmlspecialchars($calendar)));
index 1065f96..13f8190 100644 (file)
@@ -486,7 +486,7 @@ class Kronolith_Ajax_Application extends Horde_Ajax_Application_Base
         $tagger = new Kronolith_Tagger();
         $result = new stdClass;
         $result->tags = array();
-        $tags = $tagger->getCloud(Horde_Auth::getAuth(), 10);
+        $tags = $tagger->getCloud($GLOBALS['registry']->getAuth(), 10);
         foreach ($tags as $tag) {
             $result->tags[] = $tag['tag_name'];
         }
@@ -535,7 +535,7 @@ class Kronolith_Ajax_Application extends Horde_Ajax_Application_Base
 
             // Create a calendar.
             if (!$calendar_id) {
-                if (!Horde_Auth::getAuth() ||
+                if (!$GLOBALS['registry']->getAuth() ||
                     $GLOBALS['prefs']->isLocked('default_share')) {
                     return $result;
                 }
@@ -582,7 +582,7 @@ class Kronolith_Ajax_Application extends Horde_Ajax_Application_Base
 
             // Create a task list.
             if (!$calendar_id) {
-                if (!Horde_Auth::getAuth() ||
+                if (!$GLOBALS['registry']->getAuth() ||
                     $GLOBALS['prefs']->isLocked('default_share')) {
                     return $result;
                 }
@@ -724,7 +724,7 @@ class Kronolith_Ajax_Application extends Horde_Ajax_Application_Base
             'bg' => Kronolith::backgroundColor($calendar),
             'show' => false,
             'perms' => $calendar->getPermission()->data,
-            'edit' => $calendar->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT),
+            'edit' => $calendar->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT),
             'tg' => array_values($tagger->getTags($calendar->getName(), 'calendar')));
         return $result;
     }
index af263f6..4580d5a 100644 (file)
@@ -60,7 +60,7 @@ class Kronolith_Ajax_Imple_TagActions extends Horde_Ajax_Imple_Base
         // otherwise, make sure the resource owner is the current user
         $perm = empty($owner)
             ? $GLOBALS['registry']->isAdmin()
-            : $owner == Horde_Auth::getAuth();
+            : $owner == $GLOBALS['registry']->getAuth();
 
         if ($perm) {
             $tagger = Kronolith::getTagger();
@@ -102,10 +102,10 @@ class Kronolith_Ajax_Imple_TagActions extends Horde_Ajax_Imple_Base
 
         if ($type == 'calendar') {
             $cal = $GLOBALS['kronolith_shares']->getShare($id);
-            $hasEdit = $cal->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT);
+            $hasEdit = $cal->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT);
         } elseif ($type == 'event') {
             $event = Kronolith::getDriver()->getByUID($id);
-            $hasEdit = $event->hasPermission(Horde_Perms::EDIT, Horde_Auth::getAuth());
+            $hasEdit = $event->hasPermission(Horde_Perms::EDIT, $GLOBALS['registry']->getAuth());
         }
 
         foreach ($tags as $tag_id => $tag) {
index 2b1080e..7385026 100644 (file)
@@ -75,7 +75,7 @@ class Kronolith_Api extends Horde_Registry_Api
             $calendars = Kronolith::listCalendars(false, Horde_Perms::READ);
             $owners = array();
             foreach ($calendars as $calendar) {
-                if ($calendar->get('owner') != Horde_Auth::getAuth() &&
+                if ($calendar->get('owner') != $GLOBALS['registry']->getAuth() &&
                     !empty($GLOBALS['conf']['share']['hidden']) &&
                     !in_array($calendar->getName(), $GLOBALS['display_calendars'])) {
                     continue;
@@ -127,7 +127,7 @@ class Kronolith_Api extends Horde_Registry_Api
 
         } elseif (count($parts) == 1) {
             // This request is for all calendars owned by the requested user
-            $calendars = $GLOBALS['kronolith_shares']->listShares(Horde_Auth::getAuth(),
+            $calendars = $GLOBALS['kronolith_shares']->listShares($GLOBALS['registry']->getAuth(),
                                                                   Horde_Perms::SHOW,
                                                                   $parts[0]);
             $results = array();
@@ -146,7 +146,7 @@ class Kronolith_Api extends Horde_Registry_Api
                     $results[$retpath . '.ics']['icon'] = Horde_Themes::img('mime/icalendar.png');
                 }
                 if (in_array('browseable', $properties)) {
-                    $results[$retpath]['browseable'] = $calendar->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ);
+                    $results[$retpath]['browseable'] = $calendar->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ);
                     $results[$retpath . '.ics']['browseable'] = false;
                 }
                 if (in_array('contenttype', $properties)) {
@@ -894,7 +894,7 @@ class Kronolith_Api extends Horde_Registry_Api
         $event = Kronolith::getDriver()->getByUID($uid);
 
         if (!$event->hasPermission(Horde_Perms::EDIT) ||
-            ($event->private && $event->creator != Horde_Auth::getAuth())) {
+            ($event->private && $event->creator != $GLOBALS['registry']->getAuth())) {
             throw new Horde_Exception_PermissionDenied();
         }
 
@@ -1036,7 +1036,7 @@ class Kronolith_Api extends Horde_Registry_Api
         }
 
         if (empty($event) ||
-            ($event->private && $event->creator != Horde_Auth::getAuth())) {
+            ($event->private && $event->creator != $GLOBALS['registry']->getAuth())) {
             throw new Horde_Exception_PermissionDenied();
         }
 
@@ -1133,7 +1133,7 @@ class Kronolith_Api extends Horde_Registry_Api
      */
     public function listAlarms($time, $user = null)
     {
-        $current_user = Horde_Auth::getAuth();
+        $current_user = $GLOBALS['registry']->getAuth();
         if ((empty($user) || $user != $current_user) && !$GLOBALS['registry']->isAdmin()) {
             throw new Horde_Exception_PermissionDenied();
         }
index 1934be5..6bcca8c 100644 (file)
@@ -136,7 +136,7 @@ class Kronolith_Application extends Horde_Registry_Application
 
                 foreach ($all_shares as $id => $share) {
                     if (!empty($conf['share']['hidden']) &&
-                        ($share->get('owner') != Horde_Auth::getAuth()) &&
+                        ($share->get('owner') != $GLOBALS['registry']->getAuth()) &&
                         !in_array($share->getName(), $GLOBALS['display_calendars'])) {
                         continue;
                     }
@@ -431,7 +431,7 @@ class Kronolith_Application extends Horde_Registry_Application
     public function removeUserData($user)
     {
         if (!$GLOBALS['registry']->isAdmin() &&
-            $user != Horde_Auth::getAuth()) {
+            $user != $GLOBALS['registry']->getAuth()) {
             throw new Kronolith_Exception(_("You are not allowed to remove user data."));
         }
 
index 3d871bb..2df4191 100644 (file)
@@ -20,7 +20,7 @@ class Horde_Block_Kronolith_month extends Horde_Block {
                                             'default' => '__all'));
         $params['calendar']['values']['__all'] = _("All Visible");
         foreach (Kronolith::listCalendars() as $id => $cal) {
-            if ($cal->get('owner') != Horde_Auth::getAuth() &&
+            if ($cal->get('owner') != $GLOBALS['registry']->getAuth() &&
                 !empty($GLOBALS['conf']['share']['hidden']) &&
                 !in_array($cal->getName(), $GLOBALS['display_calendars'])) {
                 continue;
@@ -86,7 +86,7 @@ class Horde_Block_Kronolith_month extends Horde_Block {
                     return _(sprintf("There was an error accessing the calendar: %s", $e->getMessage()));
                 }
             }
-            if (!$this->_share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::SHOW)) {
+            if (!$this->_share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::SHOW)) {
                 return _("Permission Denied");
             }
         }
index 2494e3d..36db981 100644 (file)
@@ -28,7 +28,7 @@ class Horde_Block_Kronolith_monthlist extends Horde_Block {
                                           'default' => 0));
         $params['calendar']['values']['__all'] = _("All Visible");
         foreach (Kronolith::listCalendars() as $id => $cal) {
-            if ($cal->get('owner') != Horde_Auth::getAuth() &&
+            if ($cal->get('owner') != $GLOBALS['registry']->getAuth() &&
                 !empty($GLOBALS['conf']['share']['hidden']) &&
                 !in_array($cal->getName(), $GLOBALS['display_calendars'])) {
                 continue;
@@ -93,7 +93,7 @@ class Horde_Block_Kronolith_monthlist extends Horde_Block {
                 } else {
                     try {
                         $calendar = $GLOBALS['kronolith_shares']->getShare($this->_params['calendar']);
-                        if (!$calendar->hasPermission(Horde_Auth::getAuth(), Horde_Perms::SHOW)) {
+                        if (!$calendar->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::SHOW)) {
                             return _("Permission Denied");
                         }
                     } catch (Exception $e) {}
index f9164b0..1e18a8d 100644 (file)
@@ -25,7 +25,7 @@ class Horde_Block_Kronolith_prevmonthlist extends Horde_Block {
                                           'default' => 0));
         $params['calendar']['values']['__all'] = _("All Visible");
         foreach (Kronolith::listCalendars() as $id => $cal) {
-            if ($cal->get('owner') != Horde_Auth::getAuth() &&
+            if ($cal->get('owner') != $GLOBALS['registry']->getAuth() &&
                 !empty($GLOBALS['conf']['share']['hidden']) &&
                 !in_array($cal->getName(), $GLOBALS['display_calendars'])) {
                 continue;
@@ -74,7 +74,7 @@ class Horde_Block_Kronolith_prevmonthlist extends Horde_Block {
                 $this->_params['calendar'] != '__all') {
                 try {
                     $calendar = $GLOBALS['kronolith_shares']->getShare($this->_params['calendar']);
-                    if (!$calendar->hasPermission(Horde_Auth::getAuth(), Horde_Perms::SHOW)) {
+                    if (!$calendar->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::SHOW)) {
                         return _("Permission Denied");
                     }
                 } catch (Exception $e) {
index 48d3ef9..ca74e44 100644 (file)
@@ -46,7 +46,7 @@ class Horde_Block_Kronolith_summary extends Horde_Block {
                                           'default' => 0));
         $params['calendar']['values']['__all'] = _("All Visible");
         foreach (Kronolith::listCalendars() as $id => $cal) {
-            if ($cal->get('owner') != Horde_Auth::getAuth() &&
+            if ($cal->get('owner') != $GLOBALS['registry']->getAuth() &&
                 !empty($GLOBALS['conf']['share']['hidden']) &&
                 !in_array($cal->getName(), $GLOBALS['display_calendars'])) {
                 continue;
@@ -110,7 +110,7 @@ class Horde_Block_Kronolith_summary extends Horde_Block {
                 } else {
                     try {
                         $calendar = $GLOBALS['kronolith_shares']->getShare($this->_params['calendar']);
-                        if (!$calendar->hasPermission(Horde_Auth::getAuth(), Horde_Perms::SHOW)) {
+                        if (!$calendar->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::SHOW)) {
                             return _("Permission Denied");
                         }
                     } catch (Exception $e) {
index fc34cff..994f35e 100644 (file)
@@ -24,7 +24,7 @@ class Horde_Block_kronolith_tree_alarms extends Horde_Block {
         }
         foreach ($alarms as $calId => $calAlarms) {
             foreach ($calAlarms as $event) {
-                if ($horde_alarm->isSnoozed($event->uid, Horde_Auth::getAuth())) {
+                if ($horde_alarm->isSnoozed($event->uid, $GLOBALS['registry']->getAuth())) {
                     continue;
                 }
                 $alarmCount++;
index 16d4f0f..9bc31e8 100644 (file)
@@ -232,7 +232,7 @@ class Kronolith_Driver_Ical extends Kronolith_Driver
 
         /* Log fetch at DEBUG level. */
         Horde::logMessage(sprintf('Retrieved remote calendar for %s: url = "%s"',
-                                  Horde_Auth::getAuth(), $url), 'DEBUG');
+                                  $GLOBALS['registry']->getAuth(), $url), 'DEBUG');
 
         $data = $response->getBody();
         $_SESSION['kronolith']['remote'][$signature] = new Horde_iCalendar();
index 1e95205..148264e 100644 (file)
@@ -217,7 +217,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"',
-                                  Horde_Auth::getAuth(), $query), 'DEBUG');
+                                  $GLOBALS['registry']->getAuth(), $query), 'DEBUG');
 
         $event = $this->_db->getRow($query, $values, DB_FETCHMODE_ASSOC);
         $this->handleError($event);
@@ -348,7 +348,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"',
-                                  Horde_Auth::getAuth(), $q, implode(',', $values)), 'DEBUG');
+                                  $GLOBALS['registry']->getAuth(), $q, implode(',', $values)), 'DEBUG');
 
         /* Run the query. */
         $qr = $this->_db->query($q, $values);
@@ -368,7 +368,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"',
-                                          Horde_Auth::getAuth(), $query, implode(',', $values)), 'DEBUG');
+                                          $GLOBALS['registry']->getAuth(), $query, implode(',', $values)), 'DEBUG');
 
                 $result = $this->_write_db->query($query, $values);
                 if ($result instanceof PEAR_Error) {
@@ -408,7 +408,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"',
-                                  Horde_Auth::getAuth(), $query, $this->calendar), 'DEBUG');
+                                  $GLOBALS['registry']->getAuth(), $query, $this->calendar), 'DEBUG');
 
         /* Run the query. */
         $result = $this->_db->getOne($query, array($this->calendar));
@@ -443,7 +443,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"',
-                                  Horde_Auth::getAuth(), $query, implode(',', $values)), 'DEBUG');
+                                  $GLOBALS['registry']->getAuth(), $query, implode(',', $values)), 'DEBUG');
 
         $event = $this->_db->getRow($query, $values, DB_FETCHMODE_ASSOC);
         $this->handleError($event);
@@ -492,7 +492,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"',
-                                  Horde_Auth::getAuth(), $query, implode(',', $values)), 'DEBUG');
+                                  $GLOBALS['registry']->getAuth(), $query, implode(',', $values)), 'DEBUG');
 
         $events = $this->_db->getAll($query, $values, DB_FETCHMODE_ASSOC);
         $this->handleError($events);
@@ -567,7 +567,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"',
-                                      Horde_Auth::getAuth(), $query, implode(',', $values)), 'DEBUG');
+                                      $GLOBALS['registry']->getAuth(), $query, implode(',', $values)), 'DEBUG');
 
             $result = $this->_write_db->query($query, $values);
             $this->handleError($result);
@@ -647,7 +647,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"',
-                            Horde_Auth::getAuth(), $query, implode(',', $values)), 'DEBUG');
+                            $GLOBALS['registry']->getAuth(), $query, implode(',', $values)), 'DEBUG');
 
         $result = $this->_write_db->query($query, $values);
         $this->handleError($result);
@@ -727,7 +727,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"',
-                                  Horde_Auth::getAuth(), $query, implode(',', $values)), 'DEBUG');
+                                  $GLOBALS['registry']->getAuth(), $query, implode(',', $values)), 'DEBUG');
 
         $result = $this->_write_db->query($query, $values);
         $this->handleError($result);
@@ -756,7 +756,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"',
-                                  Horde_Auth::getAuth(), $query, implode(',', $values)), 'DEBUG');
+                                  $GLOBALS['registry']->getAuth(), $query, implode(',', $values)), 'DEBUG');
 
         $result = $this->_write_db->query($query, $values);
         $this->handleError($result);
@@ -821,7 +821,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"',
-                                      Horde_Auth::getAuth(), $query, implode(',', $values)), 'DEBUG');
+                                      $GLOBALS['registry']->getAuth(), $query, implode(',', $values)), 'DEBUG');
 
             $result = $this->_db->getCol($query, 0, $values);
             $this->handleError($result);
@@ -920,7 +920,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"',
-                                      Horde_Auth::getAuth(), $query), 'DEBUG');
+                                      $GLOBALS['registry']->getAuth(), $query), 'DEBUG');
 
             $db->query($query);
             break;
@@ -930,7 +930,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"',
-                                      Horde_Auth::getAuth(), $query), 'DEBUG');
+                                      $GLOBALS['registry']->getAuth(), $query), 'DEBUG');
 
             $db->query($query);
             break;
index 2d68ace..30e3d76 100644 (file)
@@ -348,7 +348,7 @@ abstract class Kronolith_Event
         switch ($name) {
         case 'creator':
             if (empty($this->_creator)) {
-                $this->_creator = Horde_Auth::getAuth();
+                $this->_creator = $GLOBALS['registry']->getAuth();
             }
             // Fall through.
         case 'id':
@@ -407,7 +407,7 @@ abstract class Kronolith_Event
     public function hasPermission($permission, $user = null)
     {
         if ($user === null) {
-            $user = Horde_Auth::getAuth();
+            $user = $GLOBALS['registry']->getAuth();
         }
         try {
             $share = $this->getShare();
@@ -446,7 +446,7 @@ abstract class Kronolith_Event
             /* Lock the resource and get the response */
             if ($resource->get('response_type') == Kronolith_Resource::RESPONSETYPE_AUTO) {
                 $principle = 'calendar/' . $rcal;
-                $lock[$resource->getId()] = $locks->setLock(Horde_Auth::getAuth(), 'kronolith', $principle, 5, Horde_Lock::TYPE_EXCLUSIVE);
+                $lock[$resource->getId()] = $locks->setLock($GLOBALS['registry']->getAuth(), 'kronolith', $principle, 5, Horde_Lock::TYPE_EXCLUSIVE);
                 $haveLock = true;
             } else {
                 $haveLock = false;
@@ -558,7 +558,7 @@ abstract class Kronolith_Event
         $vEvent->setAttribute('ORGANIZER',
                               'mailto:' . Kronolith::getUserEmail($this->creator),
                               array('CN' => $name));
-        if (!$this->private || $this->creator == Horde_Auth::getAuth()) {
+        if (!$this->private || $this->creator == $GLOBALS['registry']->getAuth()) {
             if (!empty($this->description)) {
                 $vEvent->setAttribute('DESCRIPTION', $v1 ? $this->description : Horde_String::convertCharset($this->description, Horde_Nls::getCharset(), 'utf-8'));
             }
@@ -997,7 +997,7 @@ abstract class Kronolith_Event
 
         /* New event? */
         if ($this->id === null) {
-            $this->creator = Horde_Auth::getAuth();
+            $this->creator = $GLOBALS['registry']->getAuth();
         }
         if ($title = Horde_String::convertCharset($message->getSubject(), 'utf-8', $charset)) {
             $this->title = $title;
@@ -1284,7 +1284,7 @@ abstract class Kronolith_Event
     {
         // See if it's a new event.
         if ($this->id === null) {
-            $this->creator = Horde_Auth::getAuth();
+            $this->creator = $GLOBALS['registry']->getAuth();
         }
         if (!empty($hash['title'])) {
             $this->title = $hash['title'];
@@ -1414,7 +1414,7 @@ abstract class Kronolith_Event
         }
 
         if (empty($user)) {
-            $user = Horde_Auth::getAuth();
+            $user = $GLOBALS['registry']->getAuth();
         }
         if (empty($prefs)) {
             $prefs = $GLOBALS['prefs'];
@@ -1745,7 +1745,7 @@ abstract class Kronolith_Event
         }
 
         if ($user === null) {
-            $user = Horde_Auth::getAuth();
+            $user = $GLOBALS['registry']->getAuth();
         }
 
         $twentyFour = $GLOBALS['prefs']->getValue('twentyFour');
@@ -1869,7 +1869,7 @@ abstract class Kronolith_Event
         if (strpos($targetcalendar, ':')) {
             list(, $this->creator) = explode(':', $targetcalendar, 2);
         } elseif (!isset($this->id)) {
-            $this->creator = Horde_Auth::getAuth();
+            $this->creator = $GLOBALS['registry']->getAuth();
         }
 
         // Basic fields.
@@ -2603,7 +2603,7 @@ abstract class Kronolith_Event
             }
 
             if (!$this->private ||
-                $this->creator == Horde_Auth::getAuth()) {
+                $this->creator == $GLOBALS['registry']->getAuth()) {
                 $link .= $this->getEditUrl(
                     array('datetime' => $datetime->strftime('%Y%m%d%H%M%S'),
                           'url' => $from_url))
@@ -2651,10 +2651,10 @@ abstract class Kronolith_Event
     public function getTooltip()
     {
         $tooltip = $this->getTimeRange()
-            . "\n" . sprintf(_("Owner: %s"), ($this->creator == Horde_Auth::getAuth() ?
+            . "\n" . sprintf(_("Owner: %s"), ($this->creator == $GLOBALS['registry']->getAuth() ?
                                               _("Me") : Kronolith::getUserName($this->creator)));
 
-        if (!$this->private || $this->creator == Horde_Auth::getAuth()) {
+        if (!$this->private || $this->creator == $GLOBALS['registry']->getAuth()) {
             if ($this->location) {
                 $tooltip .= "\n" . _("Location") . ': ' . $this->location;
             }
index e60024f..aef65d9 100644 (file)
@@ -63,8 +63,8 @@ class Kronolith_Event_Kolab extends Kronolith_Event
         }
 
         if (isset($event['organizer']['smtp-address'])) {
-            if (Kronolith::isUserEmail(Horde_Auth::getAuth(), $event['organizer']['smtp-address'])) {
-                $this->creator = Horde_Auth::getAuth();
+            if (Kronolith::isUserEmail($GLOBALS['registry']->getAuth(), $event['organizer']['smtp-address'])) {
+                $this->creator = $GLOBALS['registry']->getAuth();
             } else {
                 $this->creator = $event['organizer']['smtp-address'];
             }
index 3adf6e0..1bbd5a9 100644 (file)
@@ -46,7 +46,7 @@ class Kronolith_DeleteResourceForm extends Horde_Form
             return;
         }
 
-        if (!($this->_resource->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE))) {
+        if (!($this->_resource->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE))) {
             throw new Kronolith_Exception(_("Permission denied"));
         }
 
index 65d45e1..9290c08 100644 (file)
@@ -46,7 +46,7 @@ class Kronolith_DeleteResourceGroupForm extends Horde_Form
             return;
         }
 
-        if (!($this->_resource->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE))) {
+        if (!($this->_resource->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE))) {
             throw new Kronolith_Exception(_("Permission denied"));
         }
 
index 8333e47..92cd486 100644 (file)
@@ -28,7 +28,7 @@ class Kronolith_Geo_Mysql extends Kronolith_Geo_Sql
         /* First make sure it doesn't already exist */
         $sql = 'SELECT COUNT(*) FROM kronolith_events_geo WHERE event_id = ?';
         Horde::logMessage(sprintf('Kronolith_Geo_Mysql::setLocation(): user = "%s"; query = "%s"; values = "%s"',
-            Horde_Auth::getAuth(), $sql, $event_id), 'DEBUG');
+            $GLOBALS['registry']->getAuth(), $sql, $event_id), 'DEBUG');
         $count = $this->_db->getOne($sql, array($event_id));
         if ($count instanceof PEAR_Error) {
             Horde::logMessage($count, 'ERR');
@@ -51,7 +51,7 @@ class Kronolith_Geo_Mysql extends Kronolith_Geo_Sql
             $sql = sprintf('INSERT into kronolith_events_geo (event_id, event_coordinates) VALUES(?, GeomFromText(\'POINT(%F %F)\'))', $point['lat'], $point['lon']);
         }
         Horde::logMessage(sprintf('Kronolith_Geo_Mysql::setLocation(): user = "%s"; query = "%s"; values = "%s"',
-            Horde_Auth::getAuth(), $sql, $event_id), 'DEBUG');
+            $GLOBALS['registry']->getAuth(), $sql, $event_id), 'DEBUG');
         $result = $this->_write_db->query($sql, array($event_id));
         if ($result instanceof PEAR_Error) {
             Horde::logMessage($result, 'ERR');
@@ -71,7 +71,7 @@ class Kronolith_Geo_Mysql extends Kronolith_Geo_Sql
     {
         $sql = 'SELECT x(event_coordinates) as lat, y(event_coordinates) as lon FROM kronolith_events_geo WHERE event_id = ?';
         Horde::logMessage(sprintf('Kronolith_Geo_Mysql::getLocation(): user = "%s"; query = "%s"; values = "%s"',
-            Horde_Auth::getAuth(), $sql, $event_id), 'DEBUG');
+            $GLOBALS['registry']->getAuth(), $sql, $event_id), 'DEBUG');
         $result = $this->_db->getRow($sql, array($event_id), DB_FETCHMODE_ASSOC);
         if ($result instanceof PEAR_Error) {
             Horde::logMessage($result, 'ERR');
@@ -108,7 +108,7 @@ class Kronolith_Geo_Mysql extends Kronolith_Geo_Sql
                . "x(event_coordinates) as lat, y(event_coordinates) as lon FROM kronolith_events_geo HAVING distance < ?  ORDER BY distance ASC LIMIT ?";
 
         Horde::logMessage(sprintf('Kronolith_Geo_Mysql::search(): user = "%s"; query = "%s"; values = "%s"',
-            Horde_Auth::getAuth(), $sql, print_r($params, true)), 'DEBUG');
+            $GLOBALS['registry']->getAuth(), $sql, print_r($params, true)), 'DEBUG');
 
         $results = $this->_db->getAssoc($sql, false, $params, DB_FETCHMODE_ASSOC);
         if ($results instanceof PEAR_Error) {
index 9774dee..a3bf944 100644 (file)
@@ -88,7 +88,7 @@ class Kronolith_Geo_Sql extends Kronolith_Geo
         /* First make sure it doesn't already exist */
         $sql = 'SELECT COUNT(*) FROM kronolith_events_geo WHERE event_id = ?';
         Horde::logMessage(sprintf('Kronolith_Geo_Sql::setLocation(): user = "%s"; query = "%s"; values = "%s"',
-            Horde_Auth::getAuth(), $sql, $event_id), 'DEBUG');
+            $GLOBALS['registry']->getAuth(), $sql, $event_id), 'DEBUG');
         $count = $this->_db->getOne($sql, array($event_id));
         if ($count instanceof PEAR_Error) {
             Horde::logMessage($count, 'ERR');
@@ -114,7 +114,7 @@ class Kronolith_Geo_Sql extends Kronolith_Geo
             $sql = 'INSERT into kronolith_events_geo (event_lat, event_lon, event_id) VALUES(?, ?, ?)';
         }
         Horde::logMessage(sprintf('Kronolith_Geo_Sql::setLocation(): user = "%s"; query = "%s"; values = "%s"',
-                    Horde_Auth::getAuth(), $sql, print_r($params, true)), 'DEBUG');
+                    $GLOBALS['registry']->getAuth(), $sql, print_r($params, true)), 'DEBUG');
         $result = $this->_write_db->query($sql, $params);
         if ($result instanceof PEAR_Error) {
             Horde::logMessage($result, 'ERR');
@@ -134,7 +134,7 @@ class Kronolith_Geo_Sql extends Kronolith_Geo
     {
         $sql = 'SELECT event_lat as lat, event_lon as lon FROM kronolith_events_geo WHERE event_id = ?';
         Horde::logMessage(sprintf('Kronolith_Geo_Sql::getLocation(): user = "%s"; query = "%s"; values = "%s"',
-                    Horde_Auth::getAuth(), $sql, $event_id), 'DEBUG');
+                    $GLOBALS['registry']->getAuth(), $sql, $event_id), 'DEBUG');
         $result = $this->_db->getRow($sql, array($event_id), DB_FETCHMODE_ASSOC);
         if ($result instanceof PEAR_Error) {
             Horde::logMessage($result, 'ERR');
@@ -157,7 +157,7 @@ class Kronolith_Geo_Sql extends Kronolith_Geo
     {
         $sql = 'DELETE FROM kronolith_events_geo WHERE event_id = ?';
         Horde::logMessage(sprintf('Kronolith_Geo_Sql::deleteLocation(): user = "%s"; query = "%s"; values = "%s"',
-                    Horde_Auth::getAuth(), $sql, $event_id), 'DEBUG');
+                    $GLOBALS['registry']->getAuth(), $sql, $event_id), 'DEBUG');
         $result = $this->_write_db->query($sql, array($event_id));
         if ($result instanceof PEAR_Error) {
             Horde::logMessage($result, 'ERR');
index 8fae644..5244754 100644 (file)
@@ -193,7 +193,7 @@ class Kronolith
             'URI_EVENT_EXPORT' => str_replace(array('%23', '%7B', '%7D'), array('#', '{', '}'), Horde::url('event.php', true)->add(array('view' => 'ExportEvent', 'eventID' => '#{id}', 'calendar' => '#{calendar}', 'type' => '#{type}'))),
             'SESSION_ID' => defined('SID') ? SID : '',
 
-            'user' => Horde_Auth::getAuth(),
+            'user' => $GLOBALS['registry']->getAuth(),
             'prefs_url' => str_replace('&amp;', '&', Horde::getServiceLink('options', 'kronolith')),
             'app_urls' => $app_urls,
             'name' => $registry->get('name'),
@@ -246,13 +246,13 @@ class Kronolith
         // Calendars
         foreach (array(true, false) as $my) {
             foreach ($GLOBALS['all_calendars'] as $id => $calendar) {
-                if ($calendar->get('owner') != Horde_Auth::getAuth() &&
+                if ($calendar->get('owner') != $GLOBALS['registry']->getAuth() &&
                     !empty($GLOBALS['conf']['share']['hidden']) &&
                     !in_array($calendar->getName(), $GLOBALS['display_calendars'])) {
                     continue;
                 }
-                $owner = Horde_Auth::getAuth() &&
-                    $calendar->get('owner') == Horde_Auth::getAuth();
+                $owner = $GLOBALS['registry']->getAuth() &&
+                    $calendar->get('owner') == $GLOBALS['registry']->getAuth();
                 if (($my && $owner) || (!$my && !$owner)) {
                     $code['conf']['calendars']['internal'][$id] = array(
                         'name' => ($owner || !$calendar->get('owner') ? '' : '[' . $GLOBALS['registry']->convertUsername($calendar->get('owner'), false) . '] ')
@@ -263,7 +263,7 @@ class Kronolith
                         'bg' => self::backgroundColor($calendar),
                         'show' => in_array($id, $GLOBALS['display_calendars']),
                         'perms' => $calendar->getPermission()->data,
-                        'edit' => $calendar->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT),
+                        'edit' => $calendar->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT),
                         'sub' => $subscriptionCals . ($calendar->get('owner') ? $calendar->get('owner') : '-system-') . '/' . $calendar->getName() . '.ics',
                         'feed' => (string)Kronolith::feedUrl($calendar->getName()),
                         'tg' => array_values($tagger->getTags($calendar->getName(), 'calendar')));
@@ -275,13 +275,13 @@ class Kronolith
                 continue;
             }
             foreach ($registry->tasks->listTasklists($my, Horde_Perms::SHOW) as $id => $tasklist) {
-                if ($tasklist->get('owner') != Horde_Auth::getAuth() &&
+                if ($tasklist->get('owner') != $GLOBALS['registry']->getAuth() &&
                     !empty($GLOBALS['conf']['share']['hidden']) &&
                     !in_array('tasks/' . $id, $GLOBALS['display_external_calendars'])) {
                     continue;
                 }
-                $owner = Horde_Auth::getAuth() &&
-                    $tasklist->get('owner') == Horde_Auth::getAuth();
+                $owner = $GLOBALS['registry']->getAuth() &&
+                    $tasklist->get('owner') == $GLOBALS['registry']->getAuth();
                 if (($my && $owner) || (!$my && !$owner)) {
                     $code['conf']['calendars']['tasklists']['tasks/' . $id] = array(
                         'name' => ($owner || !$tasklist->get('owner') ? '' : '[' . $GLOBALS['registry']->convertUsername($tasklist->get('owner'), false) . '] ')
@@ -292,7 +292,7 @@ class Kronolith
                         'bg' => self::backgroundColor($tasklist),
                         'show' => in_array('tasks/' . $id, $GLOBALS['display_external_calendars']),
                         'perms' => $tasklist->getPermission()->data,
-                        'edit' => $tasklist->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT),
+                        'edit' => $tasklist->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT),
                         'sub' => $subscriptionTasks . ($tasklist->get('owner') ? $tasklist->get('owner') : '-system-') . '/' . $tasklist->getName() . '.ics');
                 }
             }
@@ -1142,22 +1142,22 @@ class Kronolith
 
         /* If an authenticated user has no calendars visible and their
          * personal calendar doesn't exist, create it. */
-        if (Horde_Auth::getAuth() &&
+        if ($GLOBALS['registry']->getAuth() &&
             !count($GLOBALS['display_calendars']) &&
-            !$GLOBALS['kronolith_shares']->exists(Horde_Auth::getAuth())) {
+            !$GLOBALS['kronolith_shares']->exists($GLOBALS['registry']->getAuth())) {
             $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity();
             $name = $identity->getValue('fullname');
             if (trim($name) == '') {
-                $name = Horde_Auth::getOriginalAuth();
+                $name = $GLOBALS['registry']->getAuth('original');
             }
-            $share = &$GLOBALS['kronolith_shares']->newShare(Horde_Auth::getAuth());
+            $share = &$GLOBALS['kronolith_shares']->newShare($GLOBALS['registry']->getAuth());
             $share->set('name', sprintf(_("%s's Calendar"), $name));
             $GLOBALS['kronolith_shares']->addShare($share);
-            $GLOBALS['all_calendars'][Horde_Auth::getAuth()] = &$share;
+            $GLOBALS['all_calendars'][$GLOBALS['registry']->getAuth()] = &$share;
 
             /* Make sure the personal calendar is displayed by default. */
-            if (!in_array(Horde_Auth::getAuth(), $GLOBALS['display_calendars'])) {
-                $GLOBALS['display_calendars'][] = Horde_Auth::getAuth();
+            if (!in_array($GLOBALS['registry']->getAuth(), $GLOBALS['display_calendars'])) {
+                $GLOBALS['display_calendars'][] = $GLOBALS['registry']->getAuth();
             }
 
             /* Calendar auto-sharing with the user's groups */
@@ -1177,11 +1177,11 @@ class Kronolith
 
                 try {
                     $groups = Horde_Group::singleton();
-                    $group_list = $groups->getGroupMemberships(Horde_Auth::getAuth());
+                    $group_list = $groups->getGroupMemberships($GLOBALS['registry']->getAuth());
                     if (count($group_list)) {
                         $perm = $share->getPermission();
                         // Add the default perm, not added otherwise
-                        $perm->addUserPermission(Horde_Auth::getAuth(), Horde_Perms::ALL, false);
+                        $perm->addUserPermission($GLOBALS['registry']->getAuth(), Horde_Perms::ALL, false);
                         foreach ($group_list as $group_id => $group_name) {
                             $perm->addGroupPermission($group_id, $perm_value, false);
                         }
@@ -1444,12 +1444,12 @@ class Kronolith
      */
     public static function listCalendars($owneronly = false, $permission = Horde_Perms::SHOW)
     {
-        if ($owneronly && !Horde_Auth::getAuth()) {
+        if ($owneronly && !$GLOBALS['registry']->getAuth()) {
             return array();
         }
 
         try {
-            $calendars = $GLOBALS['kronolith_shares']->listShares(Horde_Auth::getAuth(), $permission, $owneronly ? Horde_Auth::getAuth() : null, 0, 0, 'name');
+            $calendars = $GLOBALS['kronolith_shares']->listShares($GLOBALS['registry']->getAuth(), $permission, $owneronly ? $GLOBALS['registry']->getAuth() : null, 0, 0, 'name');
         } catch (Horde_Share_Exception $e) {
             Horde::logMessage($e, 'ERR');
             return array();
@@ -1472,9 +1472,9 @@ class Kronolith
         if (isset($calendars[$default_share]) ||
             $prefs->isLocked('default_share')) {
             return $default_share;
-        } elseif (isset($GLOBALS['all_calendars'][Horde_Auth::getAuth()]) &&
-                  $GLOBALS['all_calendars'][Horde_Auth::getAuth()]->hasPermission(Horde_Auth::getAuth(), $permission)) {
-            return Horde_Auth::getAuth();
+        } elseif (isset($GLOBALS['all_calendars'][$GLOBALS['registry']->getAuth()]) &&
+                  $GLOBALS['all_calendars'][$GLOBALS['registry']->getAuth()]->hasPermission($GLOBALS['registry']->getAuth(), $permission)) {
+            return $GLOBALS['registry']->getAuth();
         } elseif (count($calendars)) {
             return key($calendars);
         }
@@ -1529,8 +1529,8 @@ class Kronolith
      */
     public static function updateShare(&$calendar, $info)
     {
-        if (!Horde_Auth::getAuth() ||
-            ($calendar->get('owner') != Horde_Auth::getAuth() &&
+        if (!$GLOBALS['registry']->getAuth() ||
+            ($calendar->get('owner') != $GLOBALS['registry']->getAuth() &&
              (!is_null($calendar->get('owner')) || !$GLOBALS['registry']->isAdmin()))) {
             throw new Kronolith_Exception(_("You are not allowed to change this calendar."));
         }
@@ -1539,7 +1539,7 @@ class Kronolith
         $calendar->set('name', $info['name']);
         $calendar->set('color', $info['color']);
         $calendar->set('desc', $info['description']);
-        $calendar->set('owner', empty($info['system']) ? Horde_Auth::getAuth() : null);
+        $calendar->set('owner', empty($info['system']) ? $GLOBALS['registry']->getAuth() : null);
 
         try {
             $result = $calendar->save();
@@ -1560,12 +1560,12 @@ class Kronolith
      */
     public static function deleteShare($calendar)
     {
-        if ($calendar->getName() == Horde_Auth::getAuth()) {
+        if ($calendar->getName() == $GLOBALS['registry']->getAuth()) {
             throw new Kronolith_Exception(_("This calendar cannot be deleted."));
         }
 
-        if (!Horde_Auth::getAuth() ||
-            ($calendar->get('owner') != Horde_Auth::getAuth() &&
+        if (!$GLOBALS['registry']->getAuth() ||
+            ($calendar->get('owner') != $GLOBALS['registry']->getAuth() &&
              (!is_null($calendar->get('owner')) || !$GLOBALS['registry']->isAdmin()))) {
             throw new Kronolith_Exception(_("You are not allowed to delete this calendar."));
         }
@@ -1616,7 +1616,7 @@ class Kronolith
         $new_owner_backend = Horde_Util::getFormData('owner_select', Horde_Util::getFormData('owner_input', $old_owner));
         $new_owner = $GLOBALS['registry']->convertUsername($new_owner_backend, true);
         if ($old_owner !== $new_owner && !empty($new_owner)) {
-            if ($old_owner != Horde_Auth::getAuth() && !$GLOBALS['registry']->isAdmin()) {
+            if ($old_owner != $GLOBALS['registry']->getAuth() && !$GLOBALS['registry']->isAdmin()) {
                 $errors[] = _("Only the owner or system administrator may change ownership or owner permissions for a share");
             } elseif ($auth->hasCapability('list') && !$auth->exists($new_owner_backend)) {
                 $errors[] = sprintf(_("The user \"%s\" does not exist."), $new_owner_backend);
@@ -2437,7 +2437,7 @@ class Kronolith
                       'df' => $prefs->getValue('date_format'));
 
         if ($prefs->getValue('event_notification_exclude_self') &&
-            $user == Horde_Auth::getAuth()) {
+            $user == $GLOBALS['registry']->getAuth()) {
             return false;
         }
 
@@ -2525,7 +2525,7 @@ class Kronolith
         /* We check for read permissions, because we can always save a copy if
          * we can read the event. */
         if ((!$event->private ||
-             $event->creator == Horde_Auth::getAuth()) &&
+             $event->creator == $GLOBALS['registry']->getAuth()) &&
             $event->hasPermission(Horde_Perms::READ)) {
             $tabs->addTab(
                 $event->hasPermission(Horde_Perms::EDIT) ? _("_Edit") : _("Save As New"),
@@ -2809,7 +2809,7 @@ class Kronolith
 
         /* Check here for guest calendars so that we don't get multiple
          * messages after redirects, etc. */
-        if (!Horde_Auth::getAuth() && !count($GLOBALS['all_calendars'])) {
+        if (!$GLOBALS['registry']->getAuth() && !count($GLOBALS['all_calendars'])) {
             $GLOBALS['notification']->push(_("No calendars are available to guests."));
         }
 
index c009e7f..619ef9d 100644 (file)
@@ -51,7 +51,7 @@ class Kronolith_LoginTasks_Task_PurgeEvents extends Horde_LoginTasks_Task
         $query->end = $del_time;
         $query->status = null;
         $query->calendars = array(Horde_String::ucfirst($GLOBALS['conf']['calendar']['driver']) => array_keys($calendars));
-        $query->creator = Horde_Auth::getAuth();
+        $query->creator = $GLOBALS['registry']->getAuth();
 
         /* Perform the search */
         $days = Kronolith::search($query);
index 9d40fa8..b610f44 100644 (file)
@@ -33,7 +33,7 @@ abstract class Kronolith_Storage
     public static function factory($user = null, $driver = null, $params = null)
     {
         if (is_null($user)) {
-            $user = Horde_Auth::getAuth();
+            $user = $GLOBALS['registry']->getAuth();
         }
 
         if (is_null($driver)) {
index c819d07..9cd8496 100644 (file)
@@ -47,7 +47,7 @@ class Kronolith_Storage_kolab extends Kronolith_Storage
         }
 
         $http = new HTTP_Request($fb_url, $options);
-        $http->setBasicAuth(Horde_Auth::getAuth(), Horde_Auth::getCredential('password'));
+        $http->setBasicAuth($GLOBALS['registry']->getAuth(), Horde_Auth::getCredential('password'));
         @$http->sendRequest();
         if ($http->getResponseCode() != 200) {
             throw new Horde_Exception_NotFound();
index 017dc94..f05cd72 100644 (file)
@@ -125,7 +125,7 @@ class Kronolith_Storage_sql extends Kronolith_Storage
 
         /* Log the query at debug level. */
         Horde::logMessage(sprintf('SQL search by %s: query = "%s"',
-                                  Horde_Auth::getAuth(), $query), 'DEBUG');
+                                  $GLOBALS['registry']->getAuth(), $query), 'DEBUG');
 
         /* Execute the query. */
         $result = $this->_db->query($query, $values);
@@ -160,7 +160,7 @@ class Kronolith_Storage_sql extends Kronolith_Storage
 
         /* Log the query at debug level. */
         Horde::logMessage(sprintf('SQL insert by %s: query = "%s"',
-                                  Horde_Auth::getAuth(), $query), 'DEBUG');
+                                  $GLOBALS['registry']->getAuth(), $query), 'DEBUG');
 
         /* Execute the query. */
         $result = $this->_write_db->query($query, $values);
index 15abbf7..dc92edf 100644 (file)
@@ -182,7 +182,7 @@ class Kronolith_Tagger
                 $calendars = $GLOBALS['kronolith_shares']->listSystemShares();
                 $args['calendarId'] = array();
                 foreach ($calendars as $name => $share) {
-                    if ($share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+                    if ($share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
                         $args['calendarId'][] = $name;
                     }
                 }
@@ -233,7 +233,7 @@ class Kronolith_Tagger
     public function listTags($token)
     {
         return $GLOBALS['injector']->getInstance('Content_Tagger')->getTags(
-                array('q' => $token, 'userId' => Horde_Auth::getAuth()));
+                array('q' => $token, 'userId' => $GLOBALS['registry']->getAuth()));
     }
 
     /**
index 5f51b8a..5a85fbb 100644 (file)
@@ -71,13 +71,13 @@ class Kronolith_View_EditEvent {
 
         $url = Horde_Util::getFormData('url');
         $perms = Horde_Perms::EDIT;
-        if ($this->event->creator == Horde_Auth::getAuth()) {
+        if ($this->event->creator == $GLOBALS['registry']->getAuth()) {
             $perms |= Kronolith::PERMS_DELEGATE;
         }
         $all_calendars = Kronolith::listCalendars(false, $perms);
         $calendars = array();
         foreach ($all_calendars as $id => $calendar) {
-            if ($calendar->get('owner') != Horde_Auth::getAuth() &&
+            if ($calendar->get('owner') != $GLOBALS['registry']->getAuth() &&
                 !empty($GLOBALS['conf']['share']['hidden']) &&
                 !in_array($calendar->getName(), $GLOBALS['display_calendars'])) {
                 continue;
index 3a0d1c8..2f73c17 100644 (file)
@@ -48,7 +48,7 @@ class Kronolith_View_Event {
 
         $createdby = '';
         $modifiedby = '';
-        $userId = Horde_Auth::getAuth();
+        $userId = $GLOBALS['registry']->getAuth();
         if ($this->event->uid) {
             /* Get the event's history. */
             try {
@@ -82,7 +82,7 @@ class Kronolith_View_Event {
         $description = $this->event->description;
         $location = $this->event->location;
         $eventurl = $this->event->url;
-        $private = $this->event->private && $creatorId != Horde_Auth::getAuth();
+        $private = $this->event->private && $creatorId != $GLOBALS['registry']->getAuth();
         $owner = Kronolith::getUserName($creatorId);
         $status = Kronolith::statusToString($this->event->status);
         $attendees = $this->event->attendees;
index 3418d2e..200856d 100644 (file)
@@ -67,7 +67,7 @@ if (isset($url)) {
 $all_calendars = Kronolith::listCalendars(false, Horde_Perms::EDIT | Kronolith::PERMS_DELEGATE);
 $calendars = array();
 foreach ($all_calendars as $id => $calendar) {
-    if ($calendar->get('owner') != Horde_Auth::getAuth() &&
+    if ($calendar->get('owner') != $GLOBALS['registry']->getAuth() &&
         !empty($GLOBALS['conf']['share']['hidden']) &&
         !in_array($calendar->getName(), $GLOBALS['display_calendars'])) {
         continue;
index c38d404..43048c2 100644 (file)
@@ -40,10 +40,10 @@ case 'edit':
         }
     }
 
-    if (!Horde_Auth::getAuth() ||
+    if (!$GLOBALS['registry']->getAuth() ||
         (isset($share) &&
          !$registry->isAdmin() &&
-         Horde_Auth::getAuth() != $share->get('owner'))) {
+         $GLOBALS['registry']->getAuth() != $share->get('owner'))) {
         exit('permission denied');
     }
     break;
@@ -51,9 +51,9 @@ case 'edit':
 case 'editform':
     try {
         $share = $shares->getShareById(Horde_Util::getFormData('cid'));
-        if (!Horde_Auth::getAuth() ||
+        if (!$GLOBALS['registry']->getAuth() ||
             (!$registry->isAdmin() &&
-             Horde_Auth::getAuth() != $share->get('owner'))) {
+             $GLOBALS['registry']->getAuth() != $share->get('owner'))) {
             exit('permission denied');
         }
         try {
@@ -101,7 +101,7 @@ if ($auth->hasCapability('list') &&
 $groupList = array();
 try {
     $groupList = empty($conf['share']['any_group'])
-        ? $groups->getGroupMemberships(Horde_Auth::getAuth(), true)
+        ? $groups->getGroupMemberships($GLOBALS['registry']->getAuth(), true)
         : $groups->listGroups();
     asort($groupList);
 } catch (Horde_Group_Exception $e) {
index ddef5c2..26dac08 100644 (file)
@@ -22,7 +22,7 @@ if (!$registry->isAdmin()) {
 $vars = Horde_Variables::getDefaultVariables();
 try {
     $resource = Kronolith::getDriver('Resource')->getResource($vars->get('c'));
-    if (!$resource->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE)) {
+    if (!$resource->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
         $notification->push(_("You are not allowed to delete this resource."), 'horde.error');
         header('Location: ' . Horde::applicationUrl('resources/', true));
         exit;
index c465a91..849ac9d 100644 (file)
@@ -22,7 +22,7 @@ if (!$registry->isAdmin()) {
 $vars = Horde_Variables::getDefaultVariables();
 try {
     $resource = Kronolith::getDriver('Resource')->getResource($vars->get('c'));
-    if (!$resource->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+    if (!$resource->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
         $notification->push(_("You are not allowed to change this resource."), 'horde.error');
         header('Location: ' . Horde::applicationUrl('resources/', true));
         exit;
index 1003c40..af8ee4c 100644 (file)
@@ -22,7 +22,7 @@ if (!$registry->isAdmin()) {
 $vars = Horde_Variables::getDefaultVariables();
 try {
     $resource = Kronolith::getDriver('Resource')->getResource($vars->get('c'));
-    if (!$resource->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE)) {
+    if (!$resource->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
         $notification->push(_("You are not allowed to delete this resource group."), 'horde.error');
         header('Location: ' . Horde::applicationUrl('resources/groups/', true));
         exit;
index 9c2bf75..bfd05b0 100644 (file)
@@ -22,7 +22,7 @@ if (!$registry->isAdmin()) {
 $vars = Horde_Variables::getDefaultVariables();
 try {
     $group = Kronolith::getDriver('Resource')->getResource($vars->get('c'));
-    if (!$group->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+    if (!$group->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
         $notification->push(_("You are not allowed to change this resource."), 'horde.error');
         header('Location: ' . Horde::applicationUrl('resources/groups/', true));
         exit;
index 4005031..bfc9583 100644 (file)
@@ -13,7 +13,7 @@ require KRONOLITH_TEMPLATES . '/common-header.inc';
 require KRONOLITH_TEMPLATES . '/menu.inc';
 
 // Exit if this isn't an authenticated user.
-if (!Horde_Auth::getAuth()) {
+if (!$GLOBALS['registry']->getAuth()) {
     header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php'));
     exit;
 }
index 42ddd1b..717de86 100644 (file)
@@ -13,7 +13,7 @@ require KRONOLITH_TEMPLATES . '/common-header.inc';
 require KRONOLITH_TEMPLATES . '/menu.inc';
 
 // Exit if this isn't an authenticated user.
-if (!Horde_Auth::getAuth()) {
+if (!$GLOBALS['registry']->getAuth()) {
     header('Location: ' . Horde::applicationUrl($prefs->getValue('defaultview') . '.php'));
     exit;
 }
index cebd69a..53b3b27 100644 (file)
@@ -65,7 +65,7 @@ if ($search_mode == 'basic') {
     }
 
     $optgroup = $GLOBALS['browser']->hasFeature('optgroup');
-    $current_user = Horde_Auth::getAuth();
+    $current_user = $GLOBALS['registry']->getAuth();
     $calendars = array();
     foreach (Kronolith::listCalendars(false, Horde_Perms::READ) as $id => $cal) {
         if ($cal->get('owner') && $cal->get('owner') == $current_user) {
index 7ce65a0..ff723c3 100644 (file)
@@ -5,7 +5,7 @@ $horde_groups = Horde_Group::singleton();
 $groups = array();
 try {
     $groups = empty($GLOBALS['conf']['share']['any_group'])
-        ? $horde_groups->getGroupMemberships(Horde_Auth::getAuth(), true)
+        ? $horde_groups->getGroupMemberships($GLOBALS['registry']->getAuth(), true)
         : $horde_groups->listGroups();
     asort($groups);
 } catch (Horde_Group_Exception $e) {}
index ff28fdd..0763cda 100644 (file)
@@ -71,11 +71,11 @@ if (count($groups) > 1) {
           <select name="owner_select">
            <option value=""><?php echo _("Select a new owner:") ?></option>
 <?php foreach ($auth->listUsers() as $user): ?>
-           <option value="<?php echo htmlspecialchars($user) ?>"<?php if ($user == Horde_Auth::getAuth()) echo ' selected="selected"' ?>><?php echo htmlspecialchars($user) ?></option>
+           <option value="<?php echo htmlspecialchars($user) ?>"<?php if ($user == $GLOBALS['registry']->getAuth()) echo ' selected="selected"' ?>><?php echo htmlspecialchars($user) ?></option>
 <?php endforeach; ?>
           </select>
 <?php else: ?>
-          <input type="text" name="owner_input" size="50" value="<?php echo htmlspecialchars(Horde_Auth::getAuth()) ?>" class="kronolithLongField" />
+          <input type="text" name="owner_input" size="50" value="<?php echo htmlspecialchars($GLOBALS['registry']->getAuth()) ?>" class="kronolithLongField" />
 <?php endif; ?>
           </td>
         </tr>
@@ -195,7 +195,7 @@ if (count($groups) > 1) {
           <select id="kronolithC<?php echo $type ?>PUNew" name="u_names[||new]">
             <option value=""><?php echo _("Select a user") ?></option>
             <?php foreach ($auth->listUsers() as $user): ?>
-            <?php if ($user != Horde_Auth::getAuth()): ?>
+            <?php if ($user != $GLOBALS['registry']->getAuth()): ?>
             <option value="<?php echo htmlspecialchars($user) ?>"><?php echo htmlspecialchars($user) ?></option>
             <?php endif; ?>
             <?php endforeach; ?>
index 76d8021..731735e 100644 (file)
@@ -80,7 +80,7 @@
         // Normal view
         foreach ($calendars as $id => $cal) {
             $delegates = array();
-            if ($cal->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT, $event->creator)) {
+            if ($cal->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT, $event->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 740dc50..a9b5fe8 100644 (file)
@@ -91,7 +91,7 @@
 
   <div id="kronolithMenuCalendars">
   <h3 id="kronolithCalendarsFirst">
-    <?php if (Horde_Auth::getAuth() && !$prefs->isLocked('default_share')): ?>
+    <?php if ($GLOBALS['registry']->getAuth() && !$prefs->isLocked('default_share')): ?>
     <a href="#" id="kronolithAddinternal" class="kronolithAdd" title="<?php echo _("New Calendar") ?>">+</a>
     <?php endif; ?>
     <span><?php echo _("My Calendars") ?></span>
 
   <?php if ($GLOBALS['registry']->hasInterface('tasks')): ?>
   <h3>
-    <?php if (Horde_Auth::getAuth() && !$prefs->isLocked('default_share')): ?>
+    <?php if ($GLOBALS['registry']->getAuth() && !$prefs->isLocked('default_share')): ?>
     <a href="#" id="kronolithAddtasklists" class="kronolithAdd" title="<?php echo _("New Task List") ?>">+</a>
     <?php endif; ?>
     <span><?php echo _("My Task Lists") ?></span>
index 39420fe..b41e408 100644 (file)
@@ -13,7 +13,7 @@ Horde::addScriptFile('calendar-panel.js', 'kronolith');
 
 $info_img = Horde::img('info_icon.png', _("Calendar Information"), array('class' => 'calendar-info'));
 
-$current_user = Horde_Auth::getAuth();
+$current_user = $GLOBALS['registry']->getAuth();
 $my_calendars = array();
 $shared_calendars = array();
 foreach (Kronolith::listCalendars() as $id => $cal) {
@@ -49,7 +49,7 @@ $tagger = Kronolith::getTagger();
  <a id="sbarShow" href="#" onclick="sbarToggle(); return false;"><?php echo _("Calendars") ?></a>
  <a id="sbarHide" href="#" onclick="sbarToggle(); return false;"><?php echo _("Calendars") ?></a>
  <?php if (!empty($_SESSION['kronolith']['display_cal'])): ?>
-   <a id="sbarClose" href="<?php echo Horde::selfUrl(true)->add('display_cal', '') ?>"><?php echo Horde_Auth::getAuth() ? _("Return to my calendars") : _("Return to calendars") ?></a>
+   <a id="sbarClose" href="<?php echo Horde::selfUrl(true)->add('display_cal', '') ?>"><?php echo $GLOBALS['registry']->getAuth() ? _("Return to my calendars") : _("Return to calendars") ?></a>
  <?php endif; ?>
 <div id="pageControlsInner">
 <?php if (!empty($_SESSION['kronolith']['display_cal'])): ?>
@@ -65,7 +65,7 @@ $tagger = Kronolith::getTagger();
   <input id="calendarSearch" type="text" for="mycalendars,sharedcalendars,remotecalendars,externalcalendars" />
  </p>
 
-<?php if (Horde_Auth::getAuth()): ?>
+<?php if ($GLOBALS['registry']->getAuth()): ?>
  <p>
   <a href="<?php echo Horde::applicationUrl('calendars/') ?>"><?php echo _("[Manage Calendars]") ?></a><br />
   <a href="<?php echo Horde::applicationUrl('resources/')?>"><?php echo ($GLOBALS['registry']->isAdmin() ? _("[Manage Resource Calendars]") : _("[Resource Calendars]"))?></a>
@@ -87,7 +87,7 @@ $tagger = Kronolith::getTagger();
          <li class="panel-tags">
 <?php
 echo htmlspecialchars($tag);
-if ($cal->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+if ($cal->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
     echo '<a href="#" id="remove' . md5($id . $tag_id) . '">'
         . Horde::img('delete-small.png', _("Remove Tag"))
         . '</a>';
index 916c3fa..ba11e8d 100644 (file)
@@ -76,7 +76,7 @@ $_prefs['memo_colors'] = array(
 // default notepad
 // Set locked to true if you don't want users to have multiple notepads.
 $_prefs['default_notepad'] = array(
-    'value' => Horde_Auth::getAuth() ? Horde_Auth::getAuth() : 0,
+    'value' => $GLOBALS['registry']->getAuth() ? $GLOBALS['registry']->getAuth() : 0,
     'type' => 'enum',
     'desc' => _("Your default notepad:")
 );
index b47d917..5640b63 100644 (file)
@@ -61,7 +61,7 @@ case 'export':
     $exportID = Horde_Util::getFormData('exportID');
 
     /* Create a Mnemo storage instance. */
-    $storage = &Mnemo_Driver::singleton(Horde_Auth::getAuth());
+    $storage = &Mnemo_Driver::singleton($GLOBALS['registry']->getAuth());
     $storage->retrieve();
 
     /* Get the full, sorted memo list. */
index 0ae0208..78f6ce4 100644 (file)
@@ -27,7 +27,7 @@ class Mnemo_Api extends Horde_Registry_Api {
      */
     public function removeUserData($user)
     {
-        if (!$GLOBALS['registry']->isAdmin() && $user != Horde_Auth::getAuth()) {
+        if (!$GLOBALS['registry']->isAdmin() && $user != $GLOBALS['registry']->getAuth()) {
             return PEAR::raiseError(_("You are not allowed to remove user data."));
         }
 
index eacaac6..b9edcca 100644 (file)
@@ -29,7 +29,7 @@ class Horde_Block_mnemo_tree_menu extends Horde_Block {
                              'url' => $add));
 
         foreach (Mnemo::listNotepads() as $name => $notepad) {
-           if ($notepad->get('owner') != Horde_Auth::getAuth() &&
+           if ($notepad->get('owner') != $GLOBALS['registry']->getAuth() &&
                !empty($GLOBALS['conf']['share']['hidden']) &&
                !in_array($notepad->getName(), $GLOBALS['display_notepads'])) {
                continue;
index 6cbe7d1..643f333 100644 (file)
@@ -37,7 +37,7 @@ class Mnemo_Driver_kolab extends Mnemo_Driver {
     function Mnemo_Driver_kolab($notepad, $params = array())
     {
         if (empty($notepad)) {
-            $notepad = Horde_Auth::getAuth();
+            $notepad = $GLOBALS['registry']->getAuth();
         }
 
         $this->_notepad = $notepad;
@@ -514,7 +514,7 @@ class Mnemo_Driver_kolab_wrapper_new extends Mnemo_Driver_kolab_wrapper {
         if (count($split) == 2) {
             list($id, $notepad) = $split;
         } else if (count($split) == 1) {
-            $notepad = Horde_Auth::getAuth();
+            $notepad = $GLOBALS['registry']->getAuth();
         }
         return array($id, $notepad);
     }
@@ -530,7 +530,7 @@ class Mnemo_Driver_kolab_wrapper_new extends Mnemo_Driver_kolab_wrapper {
      */
     function _uniqueId($id)
     {
-        if ($this->_notepad == Horde_Auth::getAuth()) {
+        if ($this->_notepad == $GLOBALS['registry']->getAuth()) {
             return $id;
         }
         return $id . '@' . $this->_notepad;
index a2c8e80..167a951 100644 (file)
@@ -49,8 +49,8 @@ class Mnemo_DeleteNotepadForm extends Horde_Form {
             return false;
         }
 
-        if (!Horde_Auth::getAuth() ||
-            $this->_notepad->get('owner') != Horde_Auth::getAuth()) {
+        if (!$GLOBALS['registry']->getAuth() ||
+            $this->_notepad->get('owner') != $GLOBALS['registry']->getAuth()) {
             return PEAR::raiseError(_("Permission denied"));
         }
 
@@ -72,15 +72,15 @@ class Mnemo_DeleteNotepadForm extends Horde_Form {
         // Make sure we still own at least one notepad.
         if (count(Mnemo::listNotepads(true)) == 0) {
             // If the default share doesn't exist then create it.
-            if (!$GLOBALS['mnemo_shares']->exists(Horde_Auth::getAuth())) {
+            if (!$GLOBALS['mnemo_shares']->exists($GLOBALS['registry']->getAuth())) {
 
                 $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity();
                 $name = $identity->getValue('fullname');
                 if (trim($name) == '') {
-                    $name = Horde_Auth::getAuth();
+                    $name = $GLOBALS['registry']->getAuth();
                 }
                 try {
-                    $notepad = $GLOBALS['mnemo_shares']->newShare(Horde_Auth::getAuth());
+                    $notepad = $GLOBALS['mnemo_shares']->newShare($GLOBALS['registry']->getAuth());
                 } catch (Horde_Share_Exception $e) {
                     return;
                 }
index e6abb03..0ce11c9 100644 (file)
@@ -170,11 +170,11 @@ class Mnemo {
      */
     public static function listNotepads($owneronly = false, $permission = Horde_Perms::SHOW)
     {
-        if ($owneronly && !Horde_Auth::getAuth()) {
+        if ($owneronly && !$GLOBALS['registry']->getAuth()) {
             return array();
         }
         try {
-            $notepads = $GLOBALS['mnemo_shares']->listShares(Horde_Auth::getAuth(), $permission, $owneronly ? Horde_Auth::getAuth() : null, 0, 0, 'name');
+            $notepads = $GLOBALS['mnemo_shares']->listShares($GLOBALS['registry']->getAuth(), $permission, $owneronly ? $GLOBALS['registry']->getAuth() : null, 0, 0, 'name');
         } catch (Horde_Share_Exception $e) {
             Horde::logMessage($e->getMessage(), 'ERR');
             return array();
@@ -197,7 +197,7 @@ class Mnemo {
         if (isset($notepads[$default_notepad])) {
             return $default_notepad;
         } elseif ($prefs->isLocked('default_notepad')) {
-            return Horde_Auth::getAuth();
+            return $GLOBALS['registry']->getAuth();
         } elseif (count($notepads)) {
            reset($notepads);
             return key($notepads);
@@ -434,7 +434,7 @@ class Mnemo {
 
         if (count($GLOBALS['display_notepads']) == 0) {
             $lists = Mnemo::listNotepads(true);
-            if (!Horde_Auth::getAuth()) {
+            if (!$GLOBALS['registry']->getAuth()) {
                 /* All notepads for guests. */
                 $GLOBALS['display_notepads'] = array_keys($lists);
             } else {
@@ -445,19 +445,19 @@ class Mnemo {
                 }
 
                 /* If the user's personal notepad doesn't exist, then create it. */
-                if (!$GLOBALS['mnemo_shares']->exists(Horde_Auth::getAuth())) {
+                if (!$GLOBALS['mnemo_shares']->exists($GLOBALS['registry']->getAuth())) {
                     $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity();
                     $name = $identity->getValue('fullname');
                     if (trim($name) == '') {
-                        $name = Horde_Auth::getAuth();
+                        $name = $GLOBALS['registry']->getAuth();
                     }
-                    $share = $GLOBALS['mnemo_shares']->newShare(Horde_Auth::getAuth());
+                    $share = $GLOBALS['mnemo_shares']->newShare($GLOBALS['registry']->getAuth());
                     $share->set('name', sprintf(_("%s's Notepad"), $name));
                     $GLOBALS['mnemo_shares']->addShare($share);
 
                     /* Make sure the personal notepad is displayed by default. */
-                    if (!in_array(Horde_Auth::getAuth(), $GLOBALS['display_notepads'])) {
-                        $GLOBALS['display_notepads'][] = Horde_Auth::getAuth();
+                    if (!in_array($GLOBALS['registry']->getAuth(), $GLOBALS['display_notepads'])) {
+                        $GLOBALS['display_notepads'][] = $GLOBALS['registry']->getAuth();
                     }
                 }
             }
index cbc49d9..bde5856 100644 (file)
@@ -135,7 +135,7 @@ case 'save_memo':
         throw new Mnemo_Exception($e);
     }
 
-    if (!$share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+    if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
         $notification->push(sprintf(_("Access denied saving note to %s."), $share->get('name')), 'horde.error');
     } elseif ($memo_passphrase != $memo_passphrase2) {
         $notification->push(_("The passwords don't match."), 'horde.error');
@@ -177,13 +177,13 @@ case 'save_memo':
                 } catch (Horde_Share_Exception $e) {
                     throw new Mnemo_Exception($e);
                 }
-                if ($share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE)) {
+                if ($share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
                     try {
                         $share = &$GLOBALS['mnemo_shares']->getShare($notepad_target);
                     } catch (Horde_Share_Exception $e) {
                         throw new Mnemo_Exception($e);
                     }
-                    if ($share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+                    if ($share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
                         $result = $storage->move($memo_id, $notepad_target);
                         $storage = &Mnemo_Driver::singleton($notepad_target);
                     } else {
@@ -237,7 +237,7 @@ case 'delete_memos':
         } catch (Horde_Share_Exception $e) {
             throw new Mnemo_Exception($e);
         }
-        if ($share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE)) {
+        if ($share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
             $storage = &Mnemo_Driver::singleton($memolist_id);
             $result = $storage->delete($memo_id);
             if ($result instanceof PEAR_Error) {
index c721bbe..04b7057 100644 (file)
@@ -47,7 +47,7 @@ try {
     header('Location: ' . Horde::applicationUrl('list.php', true));
     exit;
 }
-if (!$share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
     $notification->push(sprintf(_("You do not have permission to view the notepad %s."), $share->get('name')), 'horde.error');
     header('Location: ' . Horde::applicationUrl('list.php', true));
     exit;
index 9fb8ce9..402f23d 100644 (file)
@@ -16,7 +16,7 @@ require_once MNEMO_BASE . '/lib/Forms/CreateNotepad.php';
 
 // Exit if this isn't an authenticated user or if the user can't
 // create new notepads (default share is locked).
-if (!Horde_Auth::getAuth() || $prefs->isLocked('default_notepad')) {
+if (!$GLOBALS['registry']->getAuth() || $prefs->isLocked('default_notepad')) {
     header('Location: ' . Horde::applicationUrl('list.php', true));
     exit;
 }
index 71249f9..2deadf8 100644 (file)
@@ -15,14 +15,14 @@ Horde_Registry::appInit('mnemo');
 require_once MNEMO_BASE . '/lib/Forms/DeleteNotepad.php';
 
 // Exit if this isn't an authenticated user.
-if (!Horde_Auth::getAuth()) {
+if (!$GLOBALS['registry']->getAuth()) {
     header('Location: ' . Horde::applicationUrl('list.php', true));
     exit;
 }
 
 $vars = Horde_Variables::getDefaultVariables();
 $notepad_id = $vars->get('n');
-if ($notepad_id == Horde_Auth::getAuth()) {
+if ($notepad_id == $GLOBALS['registry']->getAuth()) {
     $notification->push(_("This notepad cannot be deleted"), 'horde.warning');
     header('Location: ' . Horde::applicationUrl('notepads/', true));
     exit;
@@ -34,7 +34,7 @@ try {
     header('Location: ' . Horde::applicationUrl('notepads/', true));
     exit;
 }
-if (!Horde_Auth::getAuth() || $notepad->get('owner') != Horde_Auth::getAuth()) {
+if (!$GLOBALS['registry']->getAuth() || $notepad->get('owner') != $GLOBALS['registry']->getAuth()) {
     $notification->push(_("You are not allowed to delete this notepad."), 'horde.error');
     header('Location: ' . Horde::applicationUrl('notepads/', true));
     exit;
index eef01e9..5cb9196 100644 (file)
@@ -15,7 +15,7 @@ Horde_Registry::appInit('mnemo');
 require_once MNEMO_BASE . '/lib/Forms/EditNotepad.php';
 
 // Exit if this isn't an authenticated user.
-if (!Horde_Auth::getAuth()) {
+if (!$GLOBALS['registry']->getAuth()) {
     header('Location: ' . Horde::applicationUrl('list.php', true));
     exit;
 }
@@ -28,8 +28,8 @@ try {
     header('Location: ' . Horde::applicationUrl('notepads/', true));
     exit;
 }
-if (!Horde_Auth::getAuth() ||
-    $notepad->get('owner') != Horde_Auth::getAuth()) {
+if (!$GLOBALS['registry']->getAuth() ||
+    $notepad->get('owner') != $GLOBALS['registry']->getAuth()) {
 
     $notification->push(_("You are not allowed to change this notepad."), 'horde.error');
     header('Location: ' . Horde::applicationUrl('notepads/', true));
index 99bd004..c92acef 100644 (file)
@@ -13,7 +13,7 @@ require_once MNEMO_BASE . '/lib/Application.php';
 Horde_Registry::appInit('mnemo');
 
 // Exit if this isn't an authenticated user.
-if (!Horde_Auth::getAuth()) {
+if (!$GLOBALS['registry']->getAuth()) {
     require MNEMO_BASE . '/list.php';
     exit;
 }
index deb98ca..f5ae31b 100644 (file)
@@ -39,7 +39,7 @@ function doPrefsUpdate(column, sortDown)
   <th id="s<?php echo Mnemo::SORT_CATEGORY ?>"<?php if ($sortby == Mnemo::SORT_CATEGORY) echo ' class="' . $sortdirclass . '"' ?> width="15%">
     <?php
     echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter('list.php', 'sortby', Mnemo::SORT_CATEGORY)), _("Sort by Category"), 'sortlink', '', '', _("_Category"));
-    if (Horde_Auth::getAuth() && (!$GLOBALS['prefs']->isLocked('categories') ||
+    if ($GLOBALS['registry']->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"), '') . '</a>';
index e9350b0..095478d 100644 (file)
@@ -1,7 +1,7 @@
  <tr>
   <td>
 <?php
-if ($share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+if ($share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
     $label = sprintf(_("Edit \"%s\""), $memo['desc']);
     echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($memourl, 'actionID', 'modify_memo')), $label) .
         Horde::img('edit.png', $label, '') . '</a>';
index b597160..4b52c49 100644 (file)
@@ -7,7 +7,7 @@ if ($memo_id):
                                                     'memolist' => $memolist_id));
 
     $share = $GLOBALS['mnemo_shares']->getShare($memolist_id);
-    if ($share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE)): ?>
+    if ($share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)): ?>
  <span class="rightFloat"><input type="button" class="button" value="<?php echo _("Delete this note") ?>" onclick="window.location='<?php echo addslashes(Horde::applicationUrl(Horde_Util::addParameter($memourl, 'actionID', 'delete_memos'))) ?>';" /></span>
 <?php endif; endif; ?>
 
index f67608a..4bf38af 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-$current_user = Horde_Auth::getAuth();
+$current_user = $GLOBALS['registry']->getAuth();
 $my_notepads = array();
 $shared_notepads = array();
 $all_notepads = Mnemo::listNotepads();
@@ -41,7 +41,7 @@ function sbarToggle()
   <input id="notepadSearch" type="text" for="mynotepads,sharednotepads" />
  </p>
 
-<?php if (Horde_Auth::getAuth()): ?>
+<?php if ($GLOBALS['registry']->getAuth()): ?>
  <p>
   <a href="<?php echo Horde::applicationUrl('notepads/') ?>"><?php echo _("[Manage Notepads]") ?></a>
  </p>
index 761b907..431d4aa 100644 (file)
@@ -9,10 +9,10 @@ $share = $GLOBALS['mnemo_shares']->getShare($memolist_id);
 <?php
 if (!$print_view) {
     echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter('note/pdf.php', array('note' => $memo_id, 'notepad' => $memolist_id))), _("Save as PDF"), 'smallheader');
-    if ($share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+    if ($share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
         echo ' | ' . Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($memourl, 'actionID', 'modify_memo')), _("Edit"), 'smallheader', '', '', _("_Edit"));
     }
-    if ($share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE)) {
+    if ($share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
         echo ' | ' . Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($memourl, 'actionID', 'delete_memos')), _("Delete"), 'smallheader', '', $prefs->getValue('delete_opt') ? 'return window.confirm(\'' . addslashes(_("Really delete this note?")) . '\');' : '', _("_Delete"));
     }
 }
index 4ee5609..a21d94f 100644 (file)
@@ -45,7 +45,7 @@ try {
     header('Location: ' . Horde::applicationUrl('list.php', true));
     exit;
 }
-if (!$share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
     $notification->push(sprintf(_("You do not have permission to view the notepad %s."), $share->get('name')), 'horde.error');
     header('Location: ' . Horde::applicationUrl('list.php', true));
     exit;
@@ -59,7 +59,7 @@ if (!$memo || !isset($memo['memo_id'])) {
 }
 
 /* Get the note's history. */
-$userId = Horde_Auth::getAuth();
+$userId = $GLOBALS['registry']->getAuth();
 $createdby = '';
 $modifiedby = '';
 if (!empty($memo['uid'])) {
index e572716..b4362f8 100644 (file)
@@ -199,7 +199,7 @@ $_prefs['task_categories'] = array(
 // default tasklists
 // Set locked to true if you don't want users to have multiple task lists.
 $_prefs['default_tasklist'] = array(
-    'value' => Horde_Auth::getAuth() ? Horde_Auth::getAuth() : 0,
+    'value' => $GLOBALS['registry']->getAuth() ? $GLOBALS['registry']->getAuth() : 0,
     'type' => 'enum',
     'desc' => _("Your default task list:")
 );
index 9340066..9cbd933 100644 (file)
@@ -193,7 +193,7 @@ if (is_array($next_step)) {
                                 $row['estimate'], $row['completed'],
                                 $row['category'], $row['alarm'], $row['uid'],
                                 isset($row['parent']) ? $row['parent'] : '',
-                                $row['private'], Horde_Auth::getAuth(),
+                                $row['private'], $GLOBALS['registry']->getAuth(),
                                 $row['assignee']);
         if (is_a($result, 'PEAR_Error')) {
             break;
@@ -223,10 +223,10 @@ if (is_array($next_step)) {
 }
 
 $import_tasklists = $export_tasklists = array();
-if (Horde_Auth::getAuth()) {
+if ($GLOBALS['registry']->getAuth()) {
     $tasklists = Nag::listTasklists(false, Horde_Perms::EDIT);
     foreach ($tasklists as $id => $tasklist) {
-        if ($tasklist->get('owner') != Horde_Auth::getAuth() &&
+        if ($tasklist->get('owner') != $GLOBALS['registry']->getAuth() &&
             !empty($GLOBALS['conf']['share']['hidden']) &&
             !in_array($tasklist->getName(), $GLOBALS['display_tasklists'])) {
             continue;
@@ -236,7 +236,7 @@ if (Horde_Auth::getAuth()) {
 }
 $tasklists = Nag::listTasklists(false, Horde_Perms::READ);
 foreach ($tasklists as $id => $tasklist) {
-    if ($tasklist->get('owner') != Horde_Auth::getAuth() &&
+    if ($tasklist->get('owner') != $GLOBALS['registry']->getAuth() &&
         !empty($GLOBALS['conf']['share']['hidden']) &&
         !in_array($tasklist->getName(), $GLOBALS['display_tasklists'])) {
         continue;
index 7f83795..bd95ff9 100644 (file)
@@ -203,7 +203,7 @@ class Nag_Api extends Horde_Registry_Api
             $tasklists = Nag::listTasklists(false, Horde_Perms::READ);
             $owners = array();
             foreach ($tasklists as $tasklist) {
-                if ($tasklist->get('owner') != Horde_Auth::getAuth() &&
+                if ($tasklist->get('owner') != $GLOBALS['registry']->getAuth() &&
                     !empty($GLOBALS['conf']['share']['hidden']) &&
                     !in_array($tasklist->getName(), $GLOBALS['display_tasklists'])) {
                     continue;
@@ -265,7 +265,7 @@ class Nag_Api extends Horde_Registry_Api
                     $results[$retpath . '.ics']['icon'] = Horde_Themes::img('mime/icalendar.png');
                 }
                 if (in_array('browseable', $properties)) {
-                    $results[$retpath]['browseable'] = $tasklist->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ);
+                    $results[$retpath]['browseable'] = $tasklist->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ);
                     $results[$retpath . '.ics']['browseable'] = false;
                 }
                 if (in_array('contenttype', $properties)) {
@@ -473,7 +473,7 @@ class Nag_Api extends Horde_Registry_Api
                             unset($uids_remove[$task->uid]);
                         }
                         if ($existing->private &&
-                            $existing->owner != Horde_Auth::getAuth()) {
+                            $existing->owner != $GLOBALS['registry']->getAuth()) {
                             continue;
                         }
                         // Check if our task is newer then the existing - get
@@ -542,7 +542,7 @@ class Nag_Api extends Horde_Registry_Api
                             isset($task->uid) ? $task->uid : null,
                             isset($task->parent_id) ? $task->parent_id : '',
                             !empty($task->private),
-                            Horde_Auth::getAuth(),
+                            $GLOBALS['registry']->getAuth(),
                             isset($task->assignee) ? $task->assignee : null);
                         if (is_a($newTask, 'PEAR_Error')) {
                             $newtask->code = 500;
@@ -825,7 +825,7 @@ class Nag_Api extends Horde_Registry_Api
                                 isset($task->uid) ? $task->uid : null,
                                 isset($task->parent_id) ? $task->parent_id : '',
                                 !empty($task->private),
-                                Horde_Auth::getAuth(),
+                                $GLOBALS['registry']->getAuth(),
                                 isset($task->assignee) ? $task->assignee : null);
                             if (is_a($newTask, 'PEAR_Error')) {
                                 return $newTask;
@@ -859,7 +859,7 @@ class Nag_Api extends Horde_Registry_Api
                         isset($task->uid) ? $task->uid : null,
                         isset($task->parent_id) ? $task->parent_id : '',
                         !empty($task->private),
-                        Horde_Auth::getAuth(),
+                        $GLOBALS['registry']->getAuth(),
                         isset($task->assignee) ? $task->assignee : null);
 
             /* array index 0 is id, 1 is uid */
@@ -898,7 +898,7 @@ class Nag_Api extends Horde_Registry_Api
             isset($task['uid']) ? $task['uid'] : null,
             isset($task['parent_id']) ? $task['parent_id'] : '',
             !empty($task['private']),
-            Horde_Auth::getAuth(),
+            $GLOBALS['registry']->getAuth(),
             isset($task['assignee']) ? $task['assignee'] : null);
     }
 
@@ -1370,7 +1370,7 @@ class Nag_Api extends Horde_Registry_Api
      */
     public function listAlarms($time, $user = null)
     {
-        if ((empty($user) || $user != Horde_Auth::getAuth()) &&
+        if ((empty($user) || $user != $GLOBALS['registry']->getAuth()) &&
             !$GLOBALS['registry']->isAdmin()) {
             return PEAR::raiseError(_("Permission Denied"));
         }
index 6248879..1475e35 100644 (file)
@@ -108,7 +108,7 @@ class Nag_Application extends Horde_Registry_Application
 
                 foreach ($all_tasklists as $id => $tasklist) {
                     if (!empty($conf['share']['hidden']) &&
-                        ($tasklist->get('owner') != Horde_Auth::getAuth()) &&
+                        ($tasklist->get('owner') != $GLOBALS['registry']->getAuth()) &&
                         !in_array($tasklist->getName(), $GLOBALS['display_tasklists'])) {
                         continue;
                     }
@@ -234,7 +234,7 @@ class Nag_Application extends Horde_Registry_Application
      */
     public function removeUserData($user)
     {
-        if (!$GLOBALS['registry']->isAdmin() && $user != Horde_Auth::getAuth()) {
+        if (!$GLOBALS['registry']->isAdmin() && $user != $GLOBALS['registry']->getAuth()) {
             return PEAR::raiseError(_("You are not allowed to remove user data."));
         }
 
index dd0cb72..c8d707d 100644 (file)
@@ -32,7 +32,7 @@ class Horde_Block_nag_summary extends Horde_Block {
 
         $tasklists = array();
         foreach (Nag::listTasklists() as $id => $tasklist) {
-            if ($tasklist->get('owner') != Horde_Auth::getAuth() &&
+            if ($tasklist->get('owner') != $GLOBALS['registry']->getAuth() &&
                 !empty($GLOBALS['conf']['share']['hidden']) &&
                 !in_array($tasklist->getName(), $GLOBALS['display_tasklists'])) {
                 continue;
@@ -79,7 +79,7 @@ class Horde_Block_nag_summary extends Horde_Block {
                      'show_tasklists' => array(
                          'type' => 'multienum',
                          'name' => _("Show tasks from these tasklists"),
-                         'default' => array(Horde_Auth::getAuth()),
+                         'default' => array($GLOBALS['registry']->getAuth()),
                          'values' => $tasklists),
                      'show_categories' => array(
                          'type' => 'multienum',
index 1ef6e42..ffe4cb2 100644 (file)
@@ -23,7 +23,7 @@ class Horde_Block_nag_tree_alarms extends Horde_Block {
 
         $alarmCount = 0;
         foreach ($alarms as $taskId => $task) {
-            if ($horde_alarm->isSnoozed($task->uid, Horde_Auth::getAuth())) {
+            if ($horde_alarm->isSnoozed($task->uid, $GLOBALS['registry']->getAuth())) {
                 continue;
             }
             $alarmCount++;
index 81c3af5..5bd1737 100644 (file)
@@ -27,7 +27,7 @@ class Horde_Block_nag_tree_menu extends Horde_Block {
                              'url' => $add));
 
         foreach (Nag::listTasklists() as $name => $tasklist) {
-            if ($tasklist->get('owner') != Horde_Auth::getAuth() &&
+            if ($tasklist->get('owner') != $GLOBALS['registry']->getAuth() &&
                 !empty($GLOBALS['conf']['share']['hidden']) &&
                 !in_array($tasklist->getName(), $GLOBALS['display_tasklists'])) {
                 continue;
index 500df70..69dfc0f 100644 (file)
@@ -214,7 +214,7 @@ class Nag_Driver
             $uid = $this->generateUID();
         }
         if (is_null($owner)) {
-            $owner = Horde_Auth::getAuth();
+            $owner = $GLOBALS['registry']->getAuth();
         }
 
         $taskId = $this->_add($name, $desc, $start, $due, $priority, $estimate,
@@ -316,7 +316,7 @@ class Nag_Driver
                 throw new Nag_Exception($e);
             }
 
-            if (!$share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE)) {
+            if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
                 $GLOBALS['notification']->push(sprintf(_("Access denied removing task from %s."), $share->get('name')), 'horde.error');
                 return false;
             }
@@ -328,7 +328,7 @@ class Nag_Driver
                 throw new Nag_Exception($e);
             }
 
-            if (!$share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+            if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
                 $GLOBALS['notification']->push(sprintf(_("Access denied moving the task to %s."), $share->get('name')), 'horde.error');
             }
 
index bd11167..d6bcd28 100644 (file)
@@ -37,7 +37,7 @@ class Nag_Driver_Kolab extends Nag_Driver
     public function __construct($tasklist, $params = array())
     {
         if (empty($tasklist)) {
-            $tasklist = Horde_Auth::getAuth();
+            $tasklist = $GLOBALS['registry']->getAuth();
         }
 
         $this->_tasklist = $tasklist;
@@ -312,7 +312,7 @@ class Nag_Driver_kolab_wrapper_old extends Nag_Driver_kolab_wrapper {
             'tasklist_id' => $this->_tasklist,
             'task_id' => $this->_kolab->getUID(),
             'uid' => $this->_kolab->getUID(),
-            'owner' => Horde_Auth::getAuth(),
+            'owner' => $GLOBALS['registry']->getAuth(),
             'name' => $this->_kolab->getStr('summary'),
             'desc' => $this->_kolab->getStr('body'),
             'category' => $this->_kolab->getStr('categories'),
@@ -695,7 +695,7 @@ class Nag_Driver_kolab_wrapper_new extends Nag_Driver_kolab_wrapper {
         if (count($split) == 2) {
             list($id, $tasklist) = $split;
         } else if (count($split) == 1) {
-            $tasklist = Horde_Auth::getAuth();
+            $tasklist = $GLOBALS['registry']->getAuth();
         }
         return array($id, $tasklist);
     }
@@ -711,7 +711,7 @@ class Nag_Driver_kolab_wrapper_new extends Nag_Driver_kolab_wrapper {
      */
     function _uniqueId($id)
     {
-        if ($this->_tasklist == Horde_Auth::getAuth()) {
+        if ($this->_tasklist == $GLOBALS['registry']->getAuth()) {
             return $id;
         }
         return $id . '@' . $this->_tasklist;
index 628fef6..6eb18aa 100644 (file)
@@ -504,7 +504,7 @@ class Nag_Driver_Sql extends Nag_Driver {
 
         /* Log the query at a DEBUG log level. */
         Horde::logMessage(sprintf('SQL alarms list by %s: table = %s; query = "%s"',
-                                  Horde_Auth::getAuth(), $this->_params['table'], $q), 'DEBUG');
+                                  $GLOBALS['registry']->getAuth(), $this->_params['table'], $q), 'DEBUG');
 
         /* Run the query. */
         $result = $this->_db->query($q, $values);
index d9e998a..0b8aa9e 100644 (file)
@@ -26,7 +26,7 @@ class Nag_TaskForm extends Horde_Form {
         $tasklists = Nag::listTasklists(false, Horde_Perms::EDIT);
         $tasklist_enums = array();
         foreach ($tasklists as $tl_id => $tl) {
-            if ($tl->get('owner') != Horde_Auth::getAuth() &&
+            if ($tl->get('owner') != $GLOBALS['registry']->getAuth() &&
                 !empty($GLOBALS['conf']['share']['hidden']) &&
                 !in_array($tl->getName(), $GLOBALS['display_tasklists'])) {
                 continue;
index caffe3c..463b4cd 100644 (file)
@@ -365,11 +365,11 @@ class Nag
     public static function listTasklists($owneronly = false,
                                          $permission = Horde_Perms::SHOW)
     {
-        if ($owneronly && !Horde_Auth::getAuth()) {
+        if ($owneronly && !$GLOBALS['registry']->getAuth()) {
             return array();
         }
         try {
-            $tasklists = $GLOBALS['nag_shares']->listShares(Horde_Auth::getAuth(), $permission, $owneronly ? Horde_Auth::getAuth() : null, 0, 0, 'name');
+            $tasklists = $GLOBALS['nag_shares']->listShares($GLOBALS['registry']->getAuth(), $permission, $owneronly ? $GLOBALS['registry']->getAuth() : null, 0, 0, 'name');
         } catch (Horde_Share_Exception $e) {
             Horde::logMessage($e->getMessage(), 'ERR');
             return array();
@@ -421,7 +421,7 @@ class Nag
         if (isset($tasklists[$default_tasklist])) {
             return $default_tasklist;
         } elseif ($prefs->isLocked('default_tasklist')) {
-            return Horde_Auth::getAuth();
+            return $GLOBALS['registry']->getAuth();
         } elseif (count($tasklists)) {
             reset($tasklists);
             return key($tasklists);
@@ -467,8 +467,8 @@ class Nag
      */
     public static function updateTasklist(&$tasklist, $info)
     {
-        if (!Horde_Auth::getAuth() ||
-            ($tasklist->get('owner') != Horde_Auth::getAuth() &&
+        if (!$GLOBALS['registry']->getAuth() ||
+            ($tasklist->get('owner') != $GLOBALS['registry']->getAuth() &&
              (!is_null($tasklist->get('owner')) || !$GLOBALS['registry']->isAdmin()))) {
             return PEAR::raiseError(_("You are not allowed to change this task list."));
         }
@@ -476,7 +476,7 @@ class Nag
         $tasklist->set('name', $info['name']);
         $tasklist->set('color', $info['color']);
         $tasklist->set('desc', $info['description']);
-        $tasklist->set('owner', empty($info['system']) ? Horde_Auth::getAuth() : null);
+        $tasklist->set('owner', empty($info['system']) ? $GLOBALS['registry']->getAuth() : null);
         $result = $tasklist->save();
         if (is_a($result, 'PEAR_Error')) {
             return PEAR::raiseError(sprintf(_("Unable to save task list \"%s\": %s"), $info['name'], $result->getMessage()));
@@ -490,12 +490,12 @@ class Nag
      */
     public static function deleteTasklist($tasklist)
     {
-        if ($tasklist->getName() == Horde_Auth::getAuth()) {
+        if ($tasklist->getName() == $GLOBALS['registry']->getAuth()) {
             return PEAR::raiseError(_("This task list cannot be deleted."));
         }
 
-        if (!Horde_Auth::getAuth() ||
-            ($tasklist->get('owner') != Horde_Auth::getAuth() &&
+        if (!$GLOBALS['registry']->getAuth() ||
+            ($tasklist->get('owner') != $GLOBALS['registry']->getAuth() &&
              (!is_null($tasklist->get('owner')) || !$GLOBALS['registry']->isAdmin()))) {
             return PEAR::raiseError(_("You are not allowed to delete this task list."));
         }
@@ -707,7 +707,7 @@ class Nag
 
         if (count($GLOBALS['display_tasklists']) == 0) {
             $lists = Nag::listTasklists(true);
-            if (!Horde_Auth::getAuth()) {
+            if (!$GLOBALS['registry']->getAuth()) {
                 /* All tasklists for guests. */
                 $GLOBALS['display_tasklists'] = array_keys($lists);
             } else {
@@ -718,19 +718,19 @@ class Nag
                 }
 
                 /* If the user's personal tasklist doesn't exist, then create it. */
-                if (!$GLOBALS['nag_shares']->exists(Horde_Auth::getAuth())) {
+                if (!$GLOBALS['nag_shares']->exists($GLOBALS['registry']->getAuth())) {
                     $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity();
                     $name = $identity->getValue('fullname');
                     if (trim($name) == '') {
-                        $name = Horde_Auth::getOriginalAuth();
+                        $name = $GLOBALS['registry']->getAuth('original');
                     }
-                    $share = $GLOBALS['nag_shares']->newShare(Horde_Auth::getAuth());
+                    $share = $GLOBALS['nag_shares']->newShare($GLOBALS['registry']->getAuth());
                     $share->set('name', sprintf(_("%s's Task List"), $name));
                     $GLOBALS['nag_shares']->addShare($share);
 
                     /* Make sure the personal tasklist is displayed by default. */
-                    if (!in_array(Horde_Auth::getAuth(), $GLOBALS['display_tasklists'])) {
-                        $GLOBALS['display_tasklists'][] = Horde_Auth::getAuth();
+                    if (!in_array($GLOBALS['registry']->getAuth(), $GLOBALS['display_tasklists'])) {
+                        $GLOBALS['display_tasklists'][] = $GLOBALS['registry']->getAuth();
                     }
                 }
             }
@@ -805,7 +805,7 @@ class Nag
 
         // Check here for guest task lists so that we don't get multiple
         // messages after redirects, etc.
-        if (!Horde_Auth::getAuth() && !count(Nag::listTasklists())) {
+        if (!$GLOBALS['registry']->getAuth() && !count(Nag::listTasklists())) {
             $notification->push(_("No task lists are available to guests."));
         }
 
@@ -1089,7 +1089,7 @@ class Nag
                       'df' => $prefs->getValue('date_format'));
 
         if ($prefs->getValue('task_notification_exclude_self') &&
-            $user == Horde_Auth::getAuth()) {
+            $user == $GLOBALS['registry']->getAuth()) {
             return false;
         }
 
index 39c206a..1ca6900 100644 (file)
@@ -516,7 +516,7 @@ class Nag_Task {
         }
 
         /* Obscure private tasks. */
-        if ($this->private && $this->owner != Horde_Auth::getAuth()) {
+        if ($this->private && $this->owner != $GLOBALS['registry']->getAuth()) {
             $this->name = _("Private Task");
             $this->desc = '';
             $this->category = _("Private");
@@ -711,8 +711,8 @@ class Nag_Task {
                 Horde::logMessage($e->getMessage(), 'ERR');
                 throw new Nag_Exception($e);
             }
-            $json->pe = $share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT);
-            $json->pd = $share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE);
+            $json->pe = $share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT);
+            $json->pd = $share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE);
         }
 
         return $json;
@@ -733,7 +733,7 @@ class Nag_Task {
         }
 
         if (empty($user)) {
-            $user = Horde_Auth::getAuth();
+            $user = $GLOBALS['registry']->getAuth();
         }
         if (empty($prefs)) {
             $prefs = $GLOBALS['prefs'];
index 9b6c2df..21d0d1c 100644 (file)
@@ -23,7 +23,7 @@ function _delete($task_id, $tasklist_id)
             } catch (Horde_Share_Exception $e) {
                 throw new Nag_Exception($e);
             }
-            if (!$share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE)) {
+            if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
                 $GLOBALS['notification']->push(_("Access denied deleting task."), 'horde.error');
             } else {
                 $storage = Nag_Driver::singleton($tasklist_id);
@@ -91,19 +91,19 @@ case 'modify_task':
     } catch (Horde_Share_Exception $e) {
         $notification->push(sprintf(_("Access denied editing task: %s"), $e->getMessage()), 'horde.error');
     }
-    if (!$share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+    if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
         $notification->push(_("Access denied editing task."), 'horde.error');
     } else {
         $task = Nag::getTask($tasklist_id, $task_id);
         if (!isset($task) || !isset($task->id)) {
             $notification->push(_("Task not found."), 'horde.error');
-        } elseif ($task->private && $task->owner != Horde_Auth::getAuth()) {
+        } elseif ($task->private && $task->owner != $GLOBALS['registry']->getAuth()) {
             $notification->push(_("Access denied editing task."), 'horde.error');
         } else {
             $vars = new Horde_Variables($task->toHash());
             $vars->set('actionID', 'save_task');
             $vars->set('old_tasklist', $task->tasklist);
-            $form = new Nag_TaskForm($vars, sprintf(_("Edit: %s"), $task->name), $share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE));
+            $form = new Nag_TaskForm($vars, sprintf(_("Edit: %s"), $task->name), $share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE));
             break;
         }
     }
@@ -134,7 +134,7 @@ case 'save_task':
         header('Location: ' . Horde::applicationUrl('list.php', true));
         exit;
     }
-    if (!$share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+    if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
         $notification->push(sprintf(_("Access denied saving task to %s."), $share->get('name')), 'horde.error');
         header('Location: ' . Horde::applicationUrl('list.php', true));
         exit;
@@ -159,7 +159,7 @@ case 'save_task':
                                    $info['category']['value'],
                                    $info['alarm'], $info['methods'],
                                    $info['parent'], (int)$info['private'],
-                                   Horde_Auth::getAuth(), $info['assignee'], null,
+                                   $GLOBALS['registry']->getAuth(), $info['assignee'], null,
                                    $info['tasklist_id']);
     } else {
         /* Check permissions. */
@@ -179,7 +179,7 @@ case 'save_task':
                                 $info['category']['value'],
                                 $info['alarm'], $info['methods'], null,
                                 $info['parent'], (int)$info['private'],
-                                Horde_Auth::getAuth(), $info['assignee']);
+                                $GLOBALS['registry']->getAuth(), $info['assignee']);
     }
 
     /* Check our results. */
@@ -206,7 +206,7 @@ case 'complete_task':
     if (isset($task_id)) {
         $share = $GLOBALS['nag_shares']->getShare($tasklist_id);
         $task = Nag::getTask($tasklist_id, $task_id);
-        if (!$share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+        if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
             $notification->push(sprintf(_("Access denied completing task %s."), $task->name), 'horde.error');
         } else {
             $task->completed = !$task->completed;
index e2ea100..7271587 100644 (file)
@@ -13,7 +13,7 @@ require_once NAG_BASE . '/lib/Forms/CreateTaskList.php';
 
 // Exit if this isn't an authenticated user or if the user can't
 // create new task lists (default share is locked).
-if (!Horde_Auth::getAuth() || $prefs->isLocked('default_tasklist')) {
+if (!$GLOBALS['registry']->getAuth() || $prefs->isLocked('default_tasklist')) {
     header('Location: ' . Horde::applicationUrl('list.php', true));
     exit;
 }
index df83ef7..89b9d62 100644 (file)
@@ -12,14 +12,14 @@ Horde_Registry::appInit('nag');
 require_once NAG_BASE . '/lib/Forms/DeleteTaskList.php';
 
 // Exit if this isn't an authenticated user.
-if (!Horde_Auth::getAuth()) {
+if (!$GLOBALS['registry']->getAuth()) {
     header('Location: ' . Horde::applicationUrl('list.php', true));
     exit;
 }
 
 $vars = Horde_Variables::getDefaultVariables();
 $tasklist_id = $vars->get('t');
-if ($tasklist_id == Horde_Auth::getAuth()) {
+if ($tasklist_id == $GLOBALS['registry']->getAuth()) {
     $notification->push(_("This task list cannot be deleted."), 'horde.warning');
     header('Location: ' . Horde::applicationUrl('tasklists/', true));
     exit;
@@ -31,7 +31,7 @@ try {
     header('Location: ' . Horde::applicationUrl('tasklists/', true));
     exit;
 }
-if ($tasklist->get('owner') != Horde_Auth::getAuth() &&
+if ($tasklist->get('owner') != $GLOBALS['registry']->getAuth() &&
     (!is_null($tasklist->get('owner')) || !$GLOBALS['registry']->isAdmin())) {
     $notification->push(_("You are not allowed to delete this task list."), 'horde.error');
     header('Location: ' . Horde::applicationUrl('tasklists/', true));
index 4c7e375..31a8b40 100644 (file)
@@ -12,7 +12,7 @@ Horde_Registry::appInit('nag');
 require_once NAG_BASE . '/lib/Forms/EditTaskList.php';
 
 // Exit if this isn't an authenticated user.
-if (!Horde_Auth::getAuth()) {
+if (!$GLOBALS['registry']->getAuth()) {
     header('Location: ' . Horde::applicationUrl('list.php', true));
     exit;
 }
@@ -25,7 +25,7 @@ try {
     header('Location: ' . Horde::applicationUrl('tasklists/', true));
     exit;
 }
-if ($tasklist->get('owner') != Horde_Auth::getAuth() &&
+if ($tasklist->get('owner') != $GLOBALS['registry']->getAuth() &&
     (!is_null($tasklist->get('owner')) || !$GLOBALS['registry']->isAdmin())) {
     $notification->push(_("You are not allowed to change this task list."), 'horde.error');
     header('Location: ' . Horde::applicationUrl('tasklists/', true));
index 3574baf..1cb8ea8 100644 (file)
@@ -25,7 +25,7 @@ require_once dirname(__FILE__) . '/../lib/Application.php';
 Horde_Registry::appInit('nag');
 
 /* Exit if this isn't an authenticated user. */
-if (!Horde_Auth::getAuth()) {
+if (!$GLOBALS['registry']->getAuth()) {
     require NAG_BASE . '/list.php';
     exit;
 }
index 1a48d4e..474dfea 100644 (file)
@@ -10,7 +10,7 @@ require_once dirname(__FILE__) . '/../lib/Application.php';
 Horde_Registry::appInit('nag');
 
 // Exit if this isn't an authenticated user.
-if (!Horde_Auth::getAuth()) {
+if (!$registry->getAuth()) {
     exit;
 }
 
@@ -27,7 +27,7 @@ $subscribe_url = Horde::url($registry->get('webroot', 'horde') . '/rpc.php/nag/'
 $identity = $injector->getInstance('Horde_Prefs_Identity')->getIdentity($tasklist->get('owner'));
 $owner_name = $identity->getValue('fullname');
 if (trim($owner_name) == '') {
-    $owner_name = Horde_Auth::getOriginalAuth();
+    $owner_name = $registry->getAuth('original');
 }
 
 
index b854069..93c440f 100644 (file)
@@ -63,7 +63,7 @@ function doPrefsUpdate(column, sortDown)
   <th id="s<?php echo Nag::SORT_CATEGORY ?>"<?php if ($sortby == Nag::SORT_CATEGORY) echo ' class="' . $sortdirclass . '"' ?> width="10%">
    <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby', Nag::SORT_CATEGORY)), _("Sort by Category"), 'sortlink', '', '', _("Cat_egory")) ?>&nbsp;
    <?php
-   if (Horde_Auth::getAuth() &&
+   if ($GLOBALS['registry']->getAuth() &&
        (!$GLOBALS['prefs']->isLocked('categories') ||
         !$GLOBALS['prefs']->isLocked('category_colors'))) {
        $categoryUrl = Horde_Util::addParameter(Horde::getServiceLink('options', 'horde'), array('group' => 'categories'));
index 97cc7be..95fa818 100644 (file)
@@ -1,7 +1,7 @@
 <tr class="<?php echo $style ?>">
   <td>
 <?php
-if ($share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+if ($share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
     if (!$task->completed) {
         if (!$task->childrenCompleted()) {
             $label = _("Incomplete sub tasks, complete them first");
@@ -32,8 +32,8 @@ if ($share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
 <?php endif; ?>
   <td>
     <?php
-    if ($share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT) &&
-        (!$task->private || $task->owner == Horde_Auth::getAuth())) {
+    if ($share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT) &&
+        (!$task->private || $task->owner == $GLOBALS['registry']->getAuth())) {
         $label = sprintf(_("Edit \"%s\""), $task->name);
         echo Horde::link($task->edit_link, $label) . Horde::img('edit.png', $label) . '</a>';
     }
@@ -45,7 +45,7 @@ if ($share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
     $task_name = strlen($task->name)
         ? htmlspecialchars($task->name)
         : _("[none]");
-    if ($share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+    if ($share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
         echo Horde::link($task->view_link, '', '', '', '', $task->desc)
             . $task_name . '</a>';
     } else {
index 399dd14..e570756 100644 (file)
@@ -4,7 +4,7 @@ Horde::addScriptFile('redbox.js', 'horde');
 
 $info_img = Horde::img('info_icon.png', _("Task List Information"), array('class' => 'tasklist-info'));
 
-$current_user = Horde_Auth::getAuth();
+$current_user = $GLOBALS['registry']->getAuth();
 $my_tasklists = array();
 $shared_tasklists = array();
 foreach (Nag::listTasklists() as $id => $tl) {
@@ -66,7 +66,7 @@ document.observe('dom:loaded', function() {
   <input id="tasklistSearch" type="text" for="mytasklists,sharedtasklists" />
  </p>
 
-<?php if (Horde_Auth::getAuth()): ?>
+<?php if ($GLOBALS['registry']->getAuth()): ?>
  <p>
   <a href="<?php echo Horde::applicationUrl('tasklists/') ?>"><?php echo _("[Manage Task Lists]") ?></a>
  </p>
index 393ad38..8a4a8e6 100644 (file)
@@ -41,7 +41,7 @@
  <tr>
   <td class="rightAlign" valign="top"><strong><?php echo _("Completed?") ?></strong></td>
   <td>
-  <?php if ($share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+  <?php if ($share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
             if (empty($task->completed)) {
                 echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($taskurl, 'actionID', 'complete_task')), _("Complete Task"), 'widget') . Horde::img('unchecked.png', _("Complete Task")) . '</a>';
             } else {
index 447ce01..84627fc 100644 (file)
@@ -47,7 +47,7 @@ $task->loadChildren();
 
 /* Check permissions on $tasklist_id. */
 $share = $GLOBALS['nag_shares']->getShare($tasklist_id);
-if (!$share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
     $notification->push(_("You do not have permission to view this tasklist."), 'horde.error');
     header('Location: ' . Horde::applicationUrl('list.php', true));
     exit;
@@ -57,7 +57,7 @@ if (!$share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
 $created = null;
 $modified = null;
 $completed = null;
-$userId = Horde_Auth::getAuth();
+$userId = $GLOBALS['registry']->getAuth();
 $createdby = '';
 $modifiedby = '';
 if (!empty($task->uid)) {
@@ -105,15 +105,15 @@ try {
     Horde::logMessage($e->getMessage(), 'ERR');
     throw new Nag_Exception($e);
 }
-if ($share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+if ($share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
     if (!$task->completed) {
         $links[] = Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($taskurl, 'actionID', 'complete_task')), _("Complete"), 'smallheader', '', '', _("_Complete"));
     }
-    if (!$task->private || $task->owner == Horde_Auth::getAuth()) {
+    if (!$task->private || $task->owner == $GLOBALS['registry']->getAuth()) {
         $links[] = Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($taskurl, 'actionID', 'modify_task')), _("Edit"), 'smallheader', '', '', _("_Edit"));
     }
 }
-if ($share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE)) {
+if ($share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
     $links[] = Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($taskurl, 'actionID', 'delete_tasks')), _("Delete"), 'smallheader', '', $prefs->getValue('delete_opt') ? 'return window.confirm(\'' . addslashes(_("Really delete this task?")) . '\');' : '', _("_Delete"));
 }
 
index f6ef15b..35be075 100644 (file)
@@ -282,7 +282,7 @@ if ($form->validate()) {
 
     if (!empty($allowed_cats) &&
         (in_array($info['category1'], $allowed_cats) || in_array($info['category2'], $allowed_cats))) {
-        $info['editor'] = Horde_Auth::getAuth();
+        $info['editor'] = $GLOBALS['registry']->getAuth();
         $info['status'] = News::CONFIRMED;
     }
 
@@ -348,7 +348,7 @@ if ($form->validate()) {
         $data = array($info['sortorder'],
                       $info['status'],
                       $info['publish'],
-                      Horde_Auth::getAuth(),
+                      $GLOBALS['registry']->getAuth(),
                       $info['editor'],
                       @$info['sourcelink'],
                       isset($info['source']) ? $info['source'] : '',
@@ -527,7 +527,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, Horde_Auth::getAuth(), serialize($info['body'])));
+                                array($id, $version + 1, $status_version, $GLOBALS['registry']->getAuth(), serialize($info['body'])));
     if ($result instanceof PEAR_Error) {
         $notification->push($result);
     }
index 34008e8..c4ac01c 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, Horde_Auth::getAuth()));
+                                        array($id, $version + 1, $actionID, $GLOBALS['registry']->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, Horde_Auth::getAuth(), serialize($new_version)));
+                                array($id, $version, $GLOBALS['registry']->getAuth(), serialize($new_version)));
 
     $notification->push(sprintf(_("News \"%s\" (%s): %s"), $article['title'], $id, _("renewed")), 'horde.success');
     header('Location: ' . $browse_url);
index 1ae4439..61ae08c 100644 (file)
@@ -55,7 +55,7 @@ class Horde_Block_news_my_comments extends Horde_Block {
 
         try {
             $threads = $GLOBALS['registry']->call('forums/getThreadsByForumOwner',
-                                        array(Horde_Auth::getAuth(), 'message_timestamp', 1, false,
+                                        array($GLOBALS['registry']->getAuth(), 'message_timestamp', 1, false,
                                                 'news', 0, $this->_params['limit']));
         } catch (Horde_Exception $e) {
             return $e->getMessage();
index 270ce00..842354e 100644 (file)
@@ -241,15 +241,15 @@ class News_Categories {
         $perms = $GLOBALS['injector']->getInstance('Horde_Perms');
 
         if ($GLOBALS['registry']->isAdmin(array('permission' => 'news:admin')) ||
-            $perms->hasPermission('news', Horde_Auth::getAuth(), $perm)) {
+            $perms->hasPermission('news', $GLOBALS['registry']->getAuth(), $perm)) {
             return $cats;
         }
 
         foreach ($cats as $key => $value) {
             // user has access?
-            if (!$perms->hasPermission('news:categories', Horde_Auth::getAuth(), $perm)  && // master
-                !$perms->hasPermission('news:categories:' . $key, Horde_Auth::getAuth(), $perm) && // child
-                !$perms->hasPermission('news:categories:' . $this->_nodes[$key]['category_parentid'], Horde_Auth::getAuth(), $perm) // father
+            if (!$perms->hasPermission('news:categories', $GLOBALS['registry']->getAuth(), $perm)  && // master
+                !$perms->hasPermission('news:categories:' . $key, $GLOBALS['registry']->getAuth(), $perm) && // child
+                !$perms->hasPermission('news:categories:' . $this->_nodes[$key]['category_parentid'], $GLOBALS['registry']->getAuth(), $perm) // father
                 ) {
                 unset($cats[$key]);
             }
index cef316f..4cefb37 100644 (file)
@@ -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, Horde_Auth::getAuth(), $_SERVER['REMOTE_ADDR'], $_SERVER['HTTP_USER_AGENT']));
+        $result = $this->write_db->query($sql, array($id, $GLOBALS['registry']->getAuth(), $_SERVER['REMOTE_ADDR'], $_SERVER['HTTP_USER_AGENT']));
         if ($result instanceof PEAR_Error) {
             return $result;
         }
index 68e5818..1d93e91 100644 (file)
@@ -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"),
-                Horde_Auth::getAuth(),
+                $GLOBALS['registry']->getAuth(),
                 $row['title'],
                 $row['publish'],
                 News::getUrlFor('news', $id, true, -1));
index e6e9b0e..2d54a9c 100644 (file)
@@ -47,9 +47,9 @@ class Operator_Driver {
         $perms = $GLOBALS['injector']->getInstance('Horde_Perms');
         if ($GLOBALS['registry']->isAdmin() ||
             $perms->hasPermission('operator:accountcodes',
-                                              Horde_Auth::getAuth(),
+                                              $GLOBALS['registry']->getAuth(),
                                               Horde_Perms::READ) ||
-            $perms->hasPermission($permentry, Horde_Auth::getAuth(),
+            $perms->hasPermission($permentry, $GLOBALS['registry']->getAuth(),
                                               Horde_Perms::READ)) {
             return $this->_getRecords($start, $end, $accountcode, $dcontext,
                                       $rowstart, $rowlimit);
@@ -84,9 +84,9 @@ class Operator_Driver {
         $perms = $GLOBALS['injector']->getInstance('Horde_Perms');
         if ($GLOBALS['registry']->isAdmin() ||
             $perms->hasPermission('operator:accountcodes',
-                                              Horde_Auth::getAuth(),
+                                              $GLOBALS['registry']->getAuth(),
                                               Horde_Perms::READ) ||
-            $perms->hasPermission($permentry, Horde_Auth::getAuth(),
+            $perms->hasPermission($permentry, $GLOBALS['registry']->getAuth(),
                                               Horde_Perms::READ)) {
             return $this->_getMonthlyCallStats($start, $end, $accountcode,
                                                $dcontext);
index 6c6b37c..137ddcb 100644 (file)
@@ -103,14 +103,14 @@ class Operator {
 
         if ($GLOBALS['registry']->isAdmin() ||
             $perms->hasPermission('operator:accountcodes',
-                                             Horde_Auth::getAuth(),
+                                             $GLOBALS['registry']->getAuth(),
                                              Horde_Perms::READ)) {
             $permfilter = false;
         }
 
         if (!$permfilter ||
             $perms->hasPermission('operator:accountcodes:%',
-                                             Horde_Auth::getAuth(),
+                                             $GLOBALS['registry']->getAuth(),
                                              Horde_Perms::READ)) {
 
             // Add an option to select all accounts
@@ -135,7 +135,7 @@ class Operator {
                 }
 
                 if ($GLOBALS['registry']->isAdmin() ||
-                    $perms->hasPermission($permitem, Horde_Auth::getAuth(), Horde_Perms::SHOW)) {
+                    $perms->hasPermission($permitem, $GLOBALS['registry']->getAuth(), Horde_Perms::SHOW)) {
                     $accountcodes[$accountcode] = $values[$index];
                 }
             }
index 6a84047..7889ed2 100644 (file)
@@ -47,10 +47,8 @@ do {
             $userid = Horde::callHook('_passwd_hook_default_username',
                                       array(Auth::getAuth()),
                                       'passwd');
-        } elseif ($conf['hooks']['full_name']) {
-            $userid = Auth::getAuth();
         } else {
-            $userid = Auth::getBareAuth();
+            $userid = $registry->getAuth($conf['hooks']['full_name'] ? null : 'bare');
         }
     }
 
@@ -265,14 +263,8 @@ if (empty($userid)) {
         $userid = Horde::callHook('_passwd_hook_default_username',
                                   array(Auth::getAuth()),
                                   'passwd');
-    } elseif ($conf['hooks']['full_name']) {
-        $userid = Auth::getAuth();
     } else {
-        $userid = Auth::getBareAuth();
-    }
-    if (is_a($userid, 'PEAR_Error')) {
-        Horde::logMessage($userid, __FILE__, __LINE__);
-        $userid = '';
+        $userid = $registry->getAuth($conf['hooks']['full_name'] ? null : 'bare');
     }
 }
 
index c837e0c..fa517a2 100644 (file)
@@ -96,7 +96,7 @@ class Pastie_Driver_Sql extends Pastie_Driver
                       $title,
                       $syntax,
                       $paste,
-                      Horde_Auth::getAuth(),
+                      $GLOBALS['registry']->getAuth(),
                       time()
         );
 
index 97f34c2..8701a7b 100644 (file)
@@ -86,11 +86,11 @@ class Shout
 
         $perms = $GLOBALS['injector']->getInstance('Horde_Perms');
         $superadmin = $perms->hasPermission('shout:superadmin',
-            Horde_Auth::getAuth(), $permmask);
+            $GLOBALS['registry']->getAuth(), $permmask);
 
         while ($numparents >= 0) {
             $tmpuser = $perms->hasPermission($permname,
-                Horde_Auth::getAuth(), $permmask);
+                $GLOBALS['registry']->getAuth(), $permmask);
 
             $user = $user | $tmpuser;
             if ($numparents > 0) {
index 07a220f..bc78aa8 100644 (file)
@@ -13,7 +13,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, Horde_Perms::EDIT)) == 0 && Horde_Auth::getAuth()) {
+if (count(Skoli::listClasses(false, Horde_Perms::EDIT)) == 0 && $GLOBALS['registry']->getAuth()) {
     $notification->push(_("Please create a new Class first."), 'horde.message');
     header('Location: ' . Horde::applicationUrl('classes/create.php', true));
     exit;
index 79df405..4cab4e3 100644 (file)
@@ -11,7 +11,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 (!Horde_Auth::getAuth()) {
+if (!$GLOBALS['registry']->getAuth()) {
     header('Location: ' . Horde::applicationUrl('list.php', true));
     exit;
 }
index b269e2e..e043597 100644 (file)
@@ -11,7 +11,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 (!Horde_Auth::getAuth()) {
+if (!$GLOBALS['registry']->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(Horde_Auth::getAuth(), Horde_Perms::DELETE)) {
+} elseif (!$class->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
     $notification->push(_("You are not allowed to delete this class."), 'horde.error');
     header('Location: ' . Horde::applicationUrl('classes/', true));
     exit;
index 6ca92b8..02423db 100644 (file)
@@ -11,7 +11,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 (!Horde_Auth::getAuth()) {
+if (!$GLOBALS['registry']->getAuth()) {
     header('Location: ' . Horde::applicationUrl('list.php', true));
     exit;
 }
@@ -22,7 +22,7 @@ if (is_a($class, 'PEAR_Error')) {
     $notification->push($class, 'horde.error');
     header('Location: ' . Horde::applicationUrl('classes/', true));
     exit;
-} elseif (!$class->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+} elseif (!$class->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
     $notification->push(_("You are not allowed to change this class."), 'horde.error');
     header('Location: ' . Horde::applicationUrl('classes/', true));
     exit;
index 26898b5..459df31 100644 (file)
@@ -10,7 +10,7 @@
 require_once SKOLI_BASE . '/lib/base.php';
 
 // Exit if this isn't an authenticated user.
-if (!Horde_Auth::getAuth()) {
+if (!$GLOBALS['registry']->getAuth()) {
     header('Location: ' . Horde::applicationUrl('list.php', true));
     exit;
 }
index 5695d08..6f4a186 100644 (file)
@@ -12,7 +12,7 @@
 require_once SKOLI_BASE . '/lib/base.php';
 
 // Exit if this isn't an authenticated user.
-if (!Horde_Auth::getAuth()) {
+if (!$GLOBALS['registry']->getAuth()) {
     header('Location: ' . Horde::applicationUrl('list.php', true));
     exit;
 }
@@ -28,7 +28,7 @@ if (is_a($entry, 'PEAR_Error') || !count($entry)) {
 $share = $GLOBALS['skoli_shares']->getShare($entry['class_id']);
 
 // Check permissions
-if (!$share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_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;
@@ -83,10 +83,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(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+if ($share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
     $tabs->addTab(_("Edit"), $url, array('tabname' => 'EditEntry', 'id' => 'tabEditEntry'));
 }
-if ($share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE)) {
+if ($share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
     $tabs->addTab(_("Delete"), $url, array('tabname' => 'DeleteEntry', 'id' => 'tabDeleteEntry'));
 }
 
index 668ea61..fbb5f53 100644 (file)
@@ -505,7 +505,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, Horde_Auth::getAuth(), $this->generateUID(), $this->_class, $studentid, $date->datestamp(), $vars->get('object_type'));
+            $values = array($entryId, $GLOBALS['registry']->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), 'DEBUG');
index 8a87712..c0ac3e1 100644 (file)
@@ -46,8 +46,8 @@ class Skoli_DeleteClassForm extends Horde_Form {
             return false;
         }
 
-        if (!Horde_Auth::getAuth() ||
-            $this->_class->get('owner') != Horde_Auth::getAuth()) {
+        if (!$GLOBALS['registry']->getAuth() ||
+            $this->_class->get('owner') != $GLOBALS['registry']->getAuth()) {
             return PEAR::raiseError(_("Permission denied"));
         }
 
index bbd195f..d020ebf 100644 (file)
@@ -43,7 +43,7 @@ class Skoli_EntryForm extends Horde_Form {
         $classes = Skoli::listClasses(false, Horde_Perms::EDIT);
         $classes_enums = array();
         foreach ($classes as $class) {
-            if ($class->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+            if ($class->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
                 $classes_enums[$class->getName()] = $class->get('name');
             }
         }
index 8c1174d..d069be1 100644 (file)
@@ -132,11 +132,11 @@ class Skoli {
      */
     function listClasses($owneronly = false, $permission = Horde_Perms::SHOW)
     {
-        if ($owneronly && !Horde_Auth::getAuth()) {
+        if ($owneronly && !$GLOBALS['registry']->getAuth()) {
             return array();
         }
 
-        $classes = $GLOBALS['skoli_shares']->listShares(Horde_Auth::getAuth(), $permission, $owneronly ? Horde_Auth::getAuth() : null, 0, 0, 'name');
+        $classes = $GLOBALS['skoli_shares']->listShares($GLOBALS['registry']->getAuth(), $permission, $owneronly ? $GLOBALS['registry']->getAuth() : null, 0, 0, 'name');
         if (is_a($classes, 'PEAR_Error')) {
             Horde::logMessage($classes, 'ERR');
             return array();
@@ -208,13 +208,13 @@ class Skoli {
             $share = $GLOBALS['skoli_shares']->getShare($class);
 
             /* Check permissions */
-            if (!$share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ) || !isset($addressbooks[$share->get('address_book')])) {
+            if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ) || !isset($addressbooks[$share->get('address_book')])) {
                 continue;
             }
 
             $list[$i] = $share->datatreeObject->data;
             $list[$i]['_id'] = $class;
-            $list[$i]['_edit'] = $share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT);
+            $list[$i]['_edit'] = $share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT);
 
             /* Add all students to the list */
             $driver = &Skoli_Driver::singleton($class);
@@ -333,12 +333,12 @@ class Skoli {
         $addressbooks = $registry->call('contacts/sources');
         foreach ($classes as $class_id=>$share) {
             /* Check permissions */
-            if (!$share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ) || !isset($addressbooks[$share->get('address_book')])) {
+            if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ) || !isset($addressbooks[$share->get('address_book')])) {
                 continue;
             }
 
-            $share_permissions_edit = $share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT);
-            $share_permissions_delete = $share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE);
+            $share_permissions_edit = $share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT);
+            $share_permissions_delete = $share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE);
 
             $driver = &Skoli_Driver::singleton($class_id);
             $entries = $driver->getEntries($studentid, $type, $searchparams);
index 4dddfae..fa27b2c 100644 (file)
@@ -52,7 +52,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 && Horde_Auth::getAuth()) {
+if (count(Skoli::listClasses()) == 0 && $GLOBALS['registry']->getAuth()) {
     $notification->push(_("Please create a new Class first."), 'horde.message');
     header('Location: ' . Horde::applicationUrl('classes/create.php', true));
     exit;
index 490e909..4b557c8 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 (Horde_Auth::getAuth() && (!$GLOBALS['prefs']->isLocked('categories') ||
+   if ($GLOBALS['registry']->getAuth() && (!$GLOBALS['prefs']->isLocked('categories') ||
                            !$GLOBALS['prefs']->isLocked('category_colors'))) {
        $categoryUrl = Horde_Util::addParameter(Horde::getServiceLink('options', 'horde'), array('group' => 'categories'));
        echo ' ' . Horde::link($categoryUrl, _("Edit categories and colors"), '', '_blank', Horde::popupJs($categoryUrl, array('urlencode' => true)) . 'return false;') . Horde::img('colorpicker.png', _("Edit categories and colors")) . '</a>';
index 31133b9..164d3f7 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 Horde::addScriptFile('quickfinder.js', 'horde');
 
-$current_user = Horde_Auth::getAuth();
+$current_user = $GLOBALS['registry']->getAuth();
 $my_classes = array();
 $shared_classes = array();
 foreach (Skoli::listClasses() as $id => $cl) {
@@ -43,7 +43,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 (Horde_Auth::getAuth()): ?>
+<?php if ($GLOBALS['registry']->getAuth()): ?>
  <p>
   <a href="<?php echo Horde::applicationUrl('classes/') ?>"><?php echo _("[Manage Classes]") ?></a>
  </p>
index aac8467..eee5d36 100644 (file)
@@ -15,7 +15,7 @@ require_once TURBA_BASE . '/lib/Forms/CreateAddressBook.php';
 
 // Exit if this isn't an authenticated user, or if there's no source
 // configured for shares.
-if (!Horde_Auth::getAuth() || empty($_SESSION['turba']['has_share'])) {
+if (!$GLOBALS['registry']->getAuth() || empty($_SESSION['turba']['has_share'])) {
     require TURBA_BASE . '/'
         . ($browse_source_count ? basename($prefs->getValue('initial_page')) : 'search.php');
     exit;
index d56ab7b..16b644d 100644 (file)
@@ -15,7 +15,7 @@ require_once TURBA_BASE . '/lib/Forms/DeleteAddressBook.php';
 
 // Exit if this isn't an authenticated user, or if there's no source
 // configured for shares.
-if (!Horde_Auth::getAuth() || empty($_SESSION['turba']['has_share'])) {
+if (!$GLOBALS['registry']->getAuth() || empty($_SESSION['turba']['has_share'])) {
     require TURBA_BASE . '/'
         . ($browse_source_count ? basename($prefs->getValue('initial_page')) : 'search.php');
     exit;
@@ -23,7 +23,7 @@ if (!Horde_Auth::getAuth() || empty($_SESSION['turba']['has_share'])) {
 
 $vars = Horde_Variables::getDefaultVariables();
 $addressbook_id = $vars->get('a');
-if ($addressbook_id == Horde_Auth::getAuth()) {
+if ($addressbook_id == $GLOBALS['registry']->getAuth()) {
     $notification->push(_("This addressbook cannot be deleted"), 'horde.warning');
     header('Location: ' . Horde::applicationUrl('addressbooks/', true));
     exit;
@@ -36,8 +36,8 @@ try {
     header('Location: ' . Horde::applicationUrl('addressbooks/', true));
     exit;
 }
-if (!Horde_Auth::getAuth() ||
-    $addressbook->get('owner') != Horde_Auth::getAuth()) {
+if (!$GLOBALS['registry']->getAuth() ||
+    $addressbook->get('owner') != $GLOBALS['registry']->getAuth()) {
 
     $notification->push(_("You are not allowed to delete this addressbook."), 'horde.error');
     header('Location: ' . Horde::applicationUrl('addressbooks/', true));
index a60f2ca..7e86608 100644 (file)
@@ -15,7 +15,7 @@ require_once TURBA_BASE . '/lib/Forms/EditAddressBook.php';
 
 // Exit if this isn't an authenticated user, or if there's no source
 // configured for shares.
-if (!Horde_Auth::getAuth() || empty($_SESSION['turba']['has_share'])) {
+if (!$GLOBALS['registry']->getAuth() || empty($_SESSION['turba']['has_share'])) {
     require TURBA_BASE . '/'
         . ($browse_source_count ? basename($prefs->getValue('initial_page')) : 'search.php');
     exit;
@@ -29,8 +29,8 @@ try {
     header('Location: ' . Horde::applicationUrl('addressbooks/', true));
     exit;
 }
-if (!Horde_Auth::getAuth() ||
-    $addressbook->get('owner') != Horde_Auth::getAuth()) {
+if (!$GLOBALS['registry']->getAuth() ||
+    $addressbook->get('owner') != $GLOBALS['registry']->getAuth()) {
 
     $notification->push(_("You are not allowed to change this addressbook."), 'horde.error');
     header('Location: ' . Horde::applicationUrl('addressbooks/', true));
index 054345c..07d31f4 100644 (file)
@@ -13,7 +13,7 @@ Horde_Registry::appInit('turba');
 
 // Exit if this isn't an authenticated user, or if there's no source
 // configured for shares.
-if (!Horde_Auth::getAuth() || empty($_SESSION['turba']['has_share'])) {
+if (!$GLOBALS['registry']->getAuth() || empty($_SESSION['turba']['has_share'])) {
     require TURBA_BASE . '/'
         . ($browse_source_count ? basename($prefs->getValue('initial_page')) : 'search.php');
     exit;
index e9886c5..6977eaf 100644 (file)
@@ -429,7 +429,7 @@ $cfgSources['localsql'] = array(
  * turba/scripts/ldap/rfc2739.schema in your LDAP configuration.
  */
 /* First we need to get the uid. */
-// $_ldap_uid = Horde_Auth::getBareAuth();
+// $_ldap_uid = $GLOBALS['registry']->getAuth('bare');
 // $_ldap_basedn = 'dc=example,dc=com';
 // $cfgSources['personal_ldap'] = array(
 //     'title' => _("My Address Book"),
@@ -702,7 +702,7 @@ $cfgSources['favourites'] = array(
 //);
 
 //$_group_driver = &Group::singleton();
-//$_group_list = $_group_driver->getGroupMemberships(Horde_Auth::getAuth());
+//$_group_list = $_group_driver->getGroupMemberships($GLOBALS['registry']->getAuth());
 //foreach ($_group_list as $_group_id => $_group_name) {
 //    $cfgSources['group_' . $_group_id] = $grpSource;
 //    $cfgSources['group_' . $_group_id]['params'] = array('gid' => $_group_id);
@@ -765,7 +765,7 @@ if (!empty($GLOBALS['conf']['imsp']['enabled']) ||
     $_imsp_auth_user = $GLOBALS['prefs']->getValue('imsp_auth_user');
     $_imsp_auth_pass = $GLOBALS['prefs']->getValue('imsp_auth_pass');
     if (!strlen($_imsp_auth_user)) {
-        $_imsp_auth_user = Horde_Auth::getBareAuth();
+        $_imsp_auth_user = $GLOBALS['registry']->getAuth('bare');
         $_imsp_auth_pass = Horde_Auth::getCredential('password');
     }
     $cfgSources['imsp'] = array(
index 56848b5..ae5ddf7 100644 (file)
@@ -1681,7 +1681,7 @@ class Turba_Api extends Horde_Registry_Api
             $ob->setValue($field, $value);
             $ob->store();
         } else {
-            return $driver->add(array('email' => $address, 'name' => $name, $field => $value, '__owner' => Horde_Auth::getAuth()));
+            return $driver->add(array('email' => $address, 'name' => $name, $field => $value, '__owner' => $GLOBALS['registry']->getAuth()));
         }
 
         return;
index d6103a3..297fcdf 100644 (file)
@@ -380,7 +380,7 @@ class Turba_Application extends Horde_Registry_Application
     public function removeUserData($user)
     {
         if (!$GLOBALS['registry']->isAdmin() &&
-            $user != Horde_Auth::getAuth()) {
+            $user != $GLOBALS['registry']->getAuth()) {
             return PEAR::raiseError(_("You are not allowed to remove user data."));
         }
 
index 642112b..519ff9a 100644 (file)
@@ -2551,7 +2551,7 @@ class Turba_Driver
     {
         $perms = $GLOBALS['injector']->getInstance('Horde_Perms');
         return $perms->exists('turba:sources:' . $this->name)
-            ? $perms->hasPermission('turba:sources:' . $this->name, Horde_Auth::getAuth(), $perm)
+            ? $perms->hasPermission('turba:sources:' . $this->name, $GLOBALS['registry']->getAuth(), $perm)
             // Assume we have permissions if they're not explicitly set.
             : true;
     }
@@ -2583,7 +2583,7 @@ class Turba_Driver
 
     function _getContactOwner()
     {
-        return Horde_Auth::getAuth();
+        return $GLOBALS['registry']->getAuth();
     }
 
     /**
@@ -2814,7 +2814,7 @@ class Turba_Driver
     {
         $params = @unserialize($share->get('params'));
         if (!isset($params['default'])) {
-            $params['default'] = ($params['name'] == Horde_Auth::getAuth());
+            $params['default'] = ($params['name'] == $GLOBALS['registry']->getAuth());
             $share->set('params', serialize($params));
             $share->save();
         }
index 7d2651e..9f27cdc 100644 (file)
@@ -171,7 +171,7 @@ class Turba_Driver_Imsp extends Turba_Driver
                 $temp['fullname'] = $temp['name'];
                 $isIMSPGroup = false;
                 if (!isset($temp['__owner'])) {
-                    $temp['__owner'] = Horde_Auth::getAuth();
+                    $temp['__owner'] = $GLOBALS['registry']->getAuth();
                 }
 
                 if ((isset($temp[$this->_groupField])) &&
index a9e36a4..4427bd4 100644 (file)
@@ -168,7 +168,7 @@ class Turba_Driver_Kolab extends Turba_Driver
     function createShare($share_id, $params)
     {
         if (isset($params['params']['default']) && $params['params']['default'] === true) {
-            $share_id = Horde_Auth::getAuth();
+            $share_id = $GLOBALS['registry']->getAuth();
         }
 
         $result = Turba::createShare($share_id, $params);
@@ -277,7 +277,7 @@ class Turba_Driver_Kolab_Wrapper_Old extends Turba_Driver_Kolab_Wrapper {
 
         $contact = array(
             'uid' => $k->getUID(),
-            'owner' => Horde_Auth::getAuth(),
+            'owner' => $GLOBALS['registry']->getAuth(),
             'job-title' => $k->getStr('job-title'),
             'organization' => $k->getStr('organization'),
             'body' => $k->getStr('body'),
index ef9142d..43493d1 100644 (file)
@@ -185,7 +185,7 @@ class Turba_Driver_Ldap extends Turba_Driver
 
         /* Log the query at a DEBUG log level. */
         Horde::logMessage(sprintf('LDAP query by Turba_Driver_ldap::_search(): user = %s, root = %s (%s); filter = "%s"; attributes = "%s"; deref = "%s"  ; sizelimit = %d',
-                                  Horde_Auth::getAuth(), $this->_params['root'], $this->_params['server'], $filter, implode(', ', $attr), $this->_params['deref'], $sizelimit), 'DEBUG');
+                                  $GLOBALS['registry']->getAuth(), $this->_params['root'], $this->_params['server'], $filter, implode(', ', $attr), $this->_params['deref'], $sizelimit), 'DEBUG');
 
         /* Send the query to the LDAP server and fetch the matching
          * entries. */
index d6b25c8..61c9ab4 100644 (file)
@@ -46,7 +46,7 @@ class Turba_Driver_Share extends Turba_Driver
      */
     function hasPermission($perm)
     {
-        return $this->_share->hasPermission(Horde_Auth::getAuth(), $perm);
+        return $this->_share->hasPermission($GLOBALS['registry']->getAuth(), $perm);
     }
 
     /**
index b05ae78..a78fc44 100644 (file)
@@ -333,13 +333,13 @@ class Turba_Driver_Sql extends Turba_Driver
      */
     function _deleteAll($sourceName = null)
     {
-        if (!Horde_Auth::getAuth()) {
+        if (!$GLOBALS['registry']->getAuth()) {
             return PEAR::raiseError('permission denied');
         }
 
         /* Get owner id */
         if (empty($sourceName)) {
-            $values = array(Horde_Auth::getAuth());
+            $values = array($GLOBALS['registry']->getAuth());
         } else {
             $values = array($sourceName);
         }
index e8f4d5d..94075fc 100644 (file)
@@ -46,8 +46,8 @@ class Turba_DeleteAddressBookForm extends Horde_Form {
             return false;
         }
 
-        if (!Horde_Auth::getAuth() ||
-            $this->_addressbook->get('owner') != Horde_Auth::getAuth()) {
+        if (!$GLOBALS['registry']->getAuth() ||
+            $this->_addressbook->get('owner') != $GLOBALS['registry']->getAuth()) {
             return PEAR::raiseError(_("You do not have permissions to delete this address book."));
         }
 
index 3c8006a..7608361 100644 (file)
@@ -431,7 +431,7 @@ class Turba {
             if (isset($sortedSources[$source])) {
                 $newSources = array_merge($newSources, $sortedSources[$source]);
             }
-            if (Horde_Auth::getAuth() && empty($defaults[$source])) {
+            if ($GLOBALS['registry']->getAuth() && empty($defaults[$source])) {
                 // User's default share is missing.
                 $driver = Turba_Driver::singleton($source);
                 if (!($driver instanceof PEAR_Error)) {
@@ -441,7 +441,7 @@ class Turba {
                             $sourceKey,
                             array('params' => array('source' => $source,
                                                     'default' => true,
-                                                    'name' => Horde_Auth::getAuth())));
+                                                    'name' => $GLOBALS['registry']->getAuth())));
                     } catch (Horde_Share_Exception $e) {
                         Horde::logMessage($e, 'ERR');
                         continue;
@@ -514,14 +514,14 @@ class Turba {
             // No backends are configured to provide shares
             return array();
         }
-        if ($owneronly && !Horde_Auth::getAuth()) {
+        if ($owneronly && !$GLOBALS['registry']->getAuth()) {
             return array();
         }
 
         try {
             $sources = $GLOBALS['turba_shares']->listShares(
-                Horde_Auth::getAuth(), $permission,
-                $owneronly ? Horde_Auth::getAuth() : null);
+                $GLOBALS['registry']->getAuth(), $permission,
+                $owneronly ? $GLOBALS['registry']->getAuth() : null);
         } catch (Horde_Share_Exception $e) {
             Horde::logMessage($e, 'ERR');
             return array();
@@ -544,7 +544,7 @@ class Turba {
             $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity();
             $name = $identity->getValue('fullname');
             if (trim($name) == '') {
-                $name = Horde_Auth::getOriginalAuth();
+                $name = $GLOBALS['registry']->getAuth('original');
             }
             $name = sprintf(_("%s's Address Book"), $name);
         } else {
index 2dcf22c..a44eb3a 100644 (file)
@@ -42,7 +42,7 @@ class Turba_View_Contact {
 
         $vars = new Horde_Variables();
         $form = new Turba_ContactForm($vars, $this->contact);
-        $userId = Horde_Auth::getAuth();
+        $userId = $GLOBALS['registry']->getAuth();
 
         /* Get the contact's history. */
         if ($this->contact->getValue('__uid')) {
index 191784e..4d82022 100644 (file)
@@ -251,7 +251,7 @@ class Turba_TestBase extends PHPUnit_Framework_TestCase {
          * state. */
         $_SESSION['__auth'] = array('authenticated' => true,
                                     'userId' => '1');
-        $this->assertEqual('1', Horde_Auth::getAuth());
+        $this->assertEqual('1', $GLOBALS['registry']->getAuth());
     }
 
     /**
index 3d6f5a3..ed2e8f1 100644 (file)
@@ -39,9 +39,9 @@ class Vilma {
 
         $perms = $GLOBALS['injector']->getInstance('Horde_Perms');
         $superadmin = $perms->hasPermission('vilma:domains',
-                                            Horde_Auth::getAuth(), $permmask);
+                                            $GLOBALS['registry']->getAuth(), $permmask);
 
-        $user = $perms->hasPermission($permname, Horde_Auth::getAuth(), $permmask);
+        $user = $perms->hasPermission($permname, $GLOBALS['registry']->getAuth(), $permmask);
 
         return ($superadmin | $user);
     }
index e627d09..6a5b282 100644 (file)
@@ -13,7 +13,7 @@ Horde_Registry::appInit('whups');
 
 require WHUPS_BASE . '/config/templates.php';
 
-if (!Horde_Auth::getAuth()) {
+if (!$GLOBALS['registry']->getAuth()) {
     header('Location: ' . Horde::applicationUrl('search.php', true));
     exit;
 }
index 9794617..66f4328 100644 (file)
@@ -94,7 +94,7 @@ class Whups_Api extends Horde_Registry_Api
     {
         global $whups_driver;
 
-        $info = array('owner' => 'user:' . Horde_Auth::getAuth(), 'nores' => true);
+        $info = array('owner' => 'user:' . $GLOBALS['registry']->getAuth(), 'nores' => true);
         $tickets = $whups_driver->getTicketsByProperties($info);
         if (is_a($tickets, 'PEAR_Error')) {
             return $tickets;
@@ -115,7 +115,7 @@ class Whups_Api extends Horde_Registry_Api
     {
         global $whups_driver;
 
-        $info = array('requester' => Horde_Auth::getAuth(), 'nores' => true);
+        $info = array('requester' => $GLOBALS['registry']->getAuth(), 'nores' => true);
         $tickets = $whups_driver->getTicketsByProperties($info);
         if (is_a($tickets, 'PEAR_Error')) {
             return $tickets;
@@ -177,7 +177,7 @@ class Whups_Api extends Horde_Registry_Api
         $form3->getInfo($vars, $info);
 
         // More checks if we're assigning the ticket at create-time.
-        if (Horde_Auth::getAuth() && $whups_driver->isCategory('assigned', $vars->get('state'))) {
+        if ($GLOBALS['registry']->getAuth() && $whups_driver->isCategory('assigned', $vars->get('state'))) {
             $form4 = new CreateStep4Form($vars);
         }
         if (Auth::getAuth() && $whups_driver->isCategory('assigned', $vars->get('state'))) {
@@ -190,7 +190,7 @@ class Whups_Api extends Horde_Registry_Api
             $form4->getInfo($vars, $info);
         }
 
-        $ticket = Whups_Ticket::newTicket($info, Horde_Auth::getAuth());
+        $ticket = Whups_Ticket::newTicket($info, $GLOBALS['registry']->getAuth());
         if (is_a($ticket, 'PEAR_Error')) {
             return $ticket;
         } else {
@@ -221,7 +221,7 @@ class Whups_Api extends Horde_Registry_Api
         }
 
         // Check that we have permission to update the ticket
-        if (!Horde_Auth::getAuth() ||
+        if (!$GLOBALS['registry']->getAuth() ||
             !Whups::hasPermission($ticket->get('queue'), 'queue', 'update')) {
             return PEAR::raiseError(_('You do not have permission to update this ticket.'));
         }
@@ -422,7 +422,7 @@ class Whups_Api extends Horde_Registry_Api
         switch ($type) {
         case 'taskHash':
             global $whups_driver;
-            $info = array('owner' => 'user:' . Horde_Auth::getAuth(),
+            $info = array('owner' => 'user:' . $GLOBALS['registry']->getAuth(),
                           'nores' => true);
             $tickets = $whups_driver->getTicketsByProperties($info);
             if (is_a($tickets, 'PEAR_Error')) {
@@ -630,7 +630,7 @@ class Whups_Api extends Horde_Registry_Api
 
         $info = array();
         if (!empty($criteria['user'])) {
-            $info['owner'] = 'user:' . Horde_Auth::getAuth();
+            $info['owner'] = 'user:' . $GLOBALS['registry']->getAuth();
         }
         if (!empty($criteria['active'])) {
             $info['nores'] = true;
@@ -702,7 +702,7 @@ class Whups_Api extends Horde_Registry_Api
         $end = new Horde_Date($end);
         $end_ts = $end->timestamp();
 
-        $criteria['owner'] = Whups::getOwnerCriteria(Horde_Auth::getAuth());
+        $criteria['owner'] = Whups::getOwnerCriteria($GLOBALS['registry']->getAuth());
 
         /* @TODO Use $categories */
         $category = 'due';
index 0ce899e..a5a54a7 100644 (file)
@@ -32,7 +32,7 @@ class Horde_Block_Whups_myqueries extends Horde_Block {
         require_once WHUPS_BASE . '/lib/Query.php';
 
         $qManager = new Whups_QueryManager();
-        $queries = $qManager->listQueries(Horde_Auth::getAuth(), true);
+        $queries = $qManager->listQueries($GLOBALS['registry']->getAuth(), true);
         if (is_a($queries, 'PEAR_Error')) {
             return $queries;
         }
index 390bea2..f1b64ef 100644 (file)
@@ -32,8 +32,8 @@ class Horde_Block_Whups_myrequests extends Horde_Block {
         global $whups_driver, $prefs;
 
         $queue_ids = array_keys(Whups::permissionsFilter($whups_driver->getQueues(), 'queue', Horde_Perms::READ));
-        $info = array('requester' => Horde_Auth::getAuth(),
-                      'notowner' => 'user:' . Horde_Auth::getAuth(),
+        $info = array('requester' => $GLOBALS['registry']->getAuth(),
+                      'notowner' => 'user:' . $GLOBALS['registry']->getAuth(),
                       'nores' => true,
                       'queue' => $queue_ids);
         $requests = $whups_driver->getTicketsByProperties($info);
index 398bf09..40deb1e 100644 (file)
@@ -32,7 +32,7 @@ class Horde_Block_Whups_mytickets extends Horde_Block {
         global $whups_driver, $prefs;
 
         $queue_ids = array_keys(Whups::permissionsFilter($whups_driver->getQueues(), 'queue', Horde_Perms::READ));
-        $info = array('owner' => Whups::getOwnerCriteria(Horde_Auth::getAuth()),
+        $info = array('owner' => Whups::getOwnerCriteria($GLOBALS['registry']->getAuth()),
                       'nores' => true,
                       'queue' => $queue_ids);
         $assigned = $whups_driver->getTicketsByProperties($info);
index 9175be0..fa64bf7 100644 (file)
@@ -18,7 +18,7 @@ class Horde_Block_Whups_query extends Horde_Block {
 
         $qManager = new Whups_QueryManager();
         $qDefault = null;
-        $qParams = $qManager->listQueries(Horde_Auth::getAuth());
+        $qParams = $qManager->listQueries($GLOBALS['registry']->getAuth());
         if (count($qParams)) {
             $qType = 'enum';
         } else {
@@ -99,7 +99,7 @@ class Horde_Block_Whups_query extends Horde_Block {
         if (is_a($query, 'PEAR_Error')) {
             return false;
         }
-        if (!$query->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+        if (!$query->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
             return false;
         }
 
index cf4e038..e21b581 100644 (file)
@@ -41,7 +41,7 @@ class Whups_Driver {
                 $attribute_id = (int)substr($name, 10);
                 $ticket->change($name, $value);
                 $this->_setAttributeValue($ticket_id, $attribute_id, $value);
-                $this->updateLog($ticket_id, Horde_Auth::getAuth(), array('attribute' => $attribute_id . ':' . $value));
+                $this->updateLog($ticket_id, $GLOBALS['registry']->getAuth(), array('attribute' => $attribute_id . ':' . $value));
             }
         }
     }
@@ -417,7 +417,7 @@ class Whups_Driver {
         $seen_email_addresses = array();
 
         foreach ($recipients as $user) {
-            if ($user == $from && $user == Horde_Auth::getAuth() &&
+            if ($user == $from && $user == $GLOBALS['registry']->getAuth() &&
                 $prefs->getValue('email_others_only')) {
                 continue;
             }
@@ -494,7 +494,7 @@ class Whups_Driver {
                 $mail->send($GLOBALS['injector']->getInstance('Horde_Mail'), true);
                 $entry = sprintf('%s Message sent to %s from "%s"',
                                  $_SERVER['REMOTE_ADDR'], $to,
-                                 Horde_Auth::getAuth());
+                                 $GLOBALS['registry']->getAuth());
                 Horde::logMessage($entry, 'INFO');
             } catch (Horde_Mime_Exception $e) {
                 Horde::logMessage($e, 'ERR');
index d43924a..148cee0 100644 (file)
@@ -1069,7 +1069,7 @@ class Whups_Driver_sql extends Whups_Driver {
                                             $ticket));
         } else {
             $queues = Whups::permissionsFilter(
-                $this->getQueues(), 'queue', Horde_Perms::READ, Horde_Auth::getAuth(),
+                $this->getQueues(), 'queue', Horde_Perms::READ, $GLOBALS['registry']->getAuth(),
                 $result[0]['user_id_requester']);
             if ($checkPerms &&
                   !in_array($result[0]['queue'], array_flip($queues))) {
index a569eac..175c606 100644 (file)
@@ -12,7 +12,7 @@ class AddCommentForm extends Horde_Form {
 
         $this->addHidden('', 'id', 'int', true, true);
 
-        if (!Horde_Auth::getAuth()) {
+        if (!$GLOBALS['registry']->getAuth()) {
             $this->addVariable(_("Your Email Address"), 'user_email', 'email', true);
             if (!empty($conf['guests']['captcha'])) {
                 $this->addVariable(_("Spam protection"), 'captcha', 'figlet', true, null, null, array(Whups::getCAPTCHA(!$this->isSubmitted()), $conf['guests']['figlet_font']));
@@ -24,9 +24,9 @@ class AddCommentForm extends Horde_Form {
 
         /* Group restrictions. */
         if ($GLOBALS['registry']->isAdmin(array('permission' => 'whups:admin')) ||
-            $GLOBALS['injector']->getInstance('Horde_Perms')->hasPermission('whups:hiddenComments', Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+            $GLOBALS['injector']->getInstance('Horde_Perms')->hasPermission('whups:hiddenComments', $GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
             $groups = Horde_Group::singleton();
-            $mygroups = $groups->getGroupMemberships(Horde_Auth::getAuth());
+            $mygroups = $groups->getGroupMemberships($GLOBALS['registry']->getAuth());
             if ($mygroups) {
                 foreach (array_keys($mygroups) as $gid) {
                     $grouplist[$gid] = $groups->getGroupName($gid, true);
@@ -43,7 +43,7 @@ class AddCommentForm extends Horde_Form {
         global $conf;
 
         if (!parent::validate($vars, $canAutoFill)) {
-            if (!Horde_Auth::getAuth() && !empty($conf['guests']['captcha'])) {
+            if (!$GLOBALS['registry']->getAuth() && !empty($conf['guests']['captcha'])) {
                 $vars->remove('captcha');
                 $this->removeVariable($varname = 'captcha');
                 $this->insertVariableBefore('newcomment', _("Spam protection"), 'captcha', 'figlet', true, null, null, array(Whups::getCAPTCHA(true), $conf['guests']['figlet_font']));
index aa8c877..343fe09 100644 (file)
@@ -120,7 +120,7 @@ class CreateStep3Form extends Horde_Form {
         $queue = $vars->get('queue');
         $info = $whups_driver->getQueue($queue);
 
-        if (Horde_Auth::getAuth()) {
+        if ($GLOBALS['registry']->getAuth()) {
             $states2 = $whups_driver->getStates($vars->get('type'),
                                                 array('new', 'assigned'));
             if (is_array($states2)) {
@@ -131,7 +131,7 @@ class CreateStep3Form extends Horde_Form {
         if (Whups::hasPermission($queue, 'queue', 'requester')) {
             $this->addVariable(_("The Requester's Email Address"), 'user_email',
                                'whups_email', false);
-        } elseif (!Horde_Auth::getAuth()) {
+        } elseif (!$GLOBALS['registry']->getAuth()) {
             $this->addVariable(_("Your Email Address"), 'user_email', 'email',
                                true);
             if (!empty($conf['guests']['captcha'])) {
@@ -179,7 +179,7 @@ class CreateStep3Form extends Horde_Form {
         global $conf;
 
         if (!parent::validate($vars, $canAutoFill)) {
-            if (!Horde_Auth::getAuth() && !empty($conf['guests']['captcha'])) {
+            if (!$GLOBALS['registry']->getAuth() && !empty($conf['guests']['captcha'])) {
                 $vars->remove('captcha');
                 $this->removeVariable($varname = 'captcha');
                 $this->insertVariableBefore(
@@ -215,7 +215,7 @@ class CreateStep4Form extends Horde_Form {
         if ($conf['prefs']['assign_all_groups']) {
             $mygroups = $groups->listGroups();
         } else {
-            $mygroups = $groups->getGroupMemberships(Horde_Auth::getAuth());
+            $mygroups = $groups->getGroupMemberships($GLOBALS['registry']->getAuth());
         }
 
         $users = $whups_driver->getQueueUsers($vars->get('queue'));
index 040225e..f1705e6 100644 (file)
@@ -99,7 +99,7 @@ class EditTicketForm extends Horde_Form {
                         if ($GLOBALS['conf']['prefs']['assign_all_groups']) {
                             $mygroups = $groups->listGroups();
                         } else {
-                            $mygroups = $groups->getGroupMemberships(Horde_Auth::getAuth());
+                            $mygroups = $groups->getGroupMemberships($GLOBALS['registry']->getAuth());
                         }
 
                         $f_users = array();
@@ -173,7 +173,7 @@ class EditTicketForm extends Horde_Form {
 
                     /* Comment permissions. */
                     $groups = Horde_Group::singleton();
-                    $mygroups = $groups->getGroupMemberships(Horde_Auth::getAuth());
+                    $mygroups = $groups->getGroupMemberships($GLOBALS['registry']->getAuth());
                     if ($mygroups) {
                         foreach (array_keys($mygroups) as $gid) {
                             $grouplist[$gid] = $groups->getGroupName($gid, true);
@@ -209,7 +209,7 @@ class EditTicketForm extends Horde_Form {
 
     function validate(&$vars)
     {
-        if (!Horde_Auth::getAuth()) {
+        if (!$GLOBALS['registry']->getAuth()) {
             $this->setError('_auth', _("Permission Denied."));
         }
 
index cc88c47..d7dba67 100644 (file)
@@ -414,7 +414,7 @@ class ChooseQueryNameForLoadForm extends Horde_Form {
         parent::Horde_Form($vars, _("Load Query"));
 
         $qManager = new Whups_QueryManager();
-        $qParams = $qManager->listQueries(Horde_Auth::getAuth());
+        $qParams = $qManager->listQueries($GLOBALS['registry']->getAuth());
         if (count($qParams)) {
             $qType = 'enum';
         } else {
@@ -458,7 +458,7 @@ class DeleteQueryForm extends Horde_Form {
         global $notification;
 
         if ($vars->get('yesno')) {
-            if (!$GLOBALS['whups_query']->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE)) {
+            if (!$GLOBALS['whups_query']->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
                 $notifications->push(sprintf(_("Permission denied.")), 'horde.error');
             } else {
                 $result = $GLOBALS['whups_query']->delete();
index afaca9b..946be11 100644 (file)
@@ -75,7 +75,7 @@ class SearchForm extends Horde_Form {
         parent::getInfo($vars, $info);
 
         if (empty($info['queue'])) {
-            $info['queue'] = array_keys(Whups::permissionsFilter($GLOBALS['whups_driver']->getQueues(), 'queue', Horde_Perms::READ, Horde_Auth::getAuth(), Horde_Auth::getAuth()));
+            $info['queue'] = array_keys(Whups::permissionsFilter($GLOBALS['whups_driver']->getQueues(), 'queue', Horde_Perms::READ, $GLOBALS['registry']->getAuth(), $GLOBALS['registry']->getAuth()));
         }
 
         if (empty($info['states'])) {
index e831611..ad85e20 100644 (file)
@@ -28,7 +28,7 @@ class Whups_Mail {
      * @param string $auth_user  This will be the Horde user that creates the
      *                           ticket. If null, we will try to deduce from
      *                           the message's From: header. We do NOT default
-     *                           to Horde_Auth::getAuth().
+     *                           to $GLOBALS['registry']->getAuth().
      *
      * @return Whups_Ticket | PEAR_Error  Ticket or Error object.
      */
@@ -104,7 +104,7 @@ class Whups_Mail {
         }
 
         // Authenticate as the correct Horde user.
-        if (!empty($auth_user) && $auth_user != Horde_Auth::getAuth()) {
+        if (!empty($auth_user) && $auth_user != $GLOBALS['registry']->getAuth()) {
             Horde_Auth::setAuth($auth_user, array());
         }
 
index 277e8e9..200832a 100644 (file)
@@ -204,8 +204,8 @@ class Whups_Query {
     {
         // Create a few variables that are reused.
         $queryurl = Horde::applicationUrl('query/index.php');
-        $edit = $this->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT);
-        $delete = $this->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE);
+        $edit = $this->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT);
+        $delete = $this->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE);
 
         $tabs = new Horde_Ui_Tabs('action', $vars);
         $tabs->addTab(_("Ne_w Query"), $queryurl, 'new');
@@ -224,7 +224,7 @@ class Whups_Query {
         }
         $tabs->addTab(_("E_xecute Query"), Horde::applicationUrl('query/run.php'), 'run');
         $tabs->addTab(_("_Load Query"), $queryurl, 'load');
-        if ((!$this->id && Horde_Auth::getAuth()) ||
+        if ((!$this->id && $GLOBALS['registry']->getAuth()) ||
             ($this->id && $edit)) {
             $tabs->addTab(_("Sa_ve Query"), $queryurl, 'save');
         }
@@ -908,7 +908,7 @@ class Whups_QueryManager {
     function getQueryBySlug($slug)
     {
         try {
-            $shares = $this->_shareManager->listShares(Horde_Auth::getAuth(), Horde_Perms::READ,
+            $shares = $this->_shareManager->listShares($GLOBALS['registry']->getAuth(), Horde_Perms::READ,
                                                        array('slug' => $slug));
         } catch (Horde_Share_Exception $e) {
             throw new Whups_Exception($e);
index 13c96df..d60f5b6 100755 (executable)
@@ -28,7 +28,7 @@ class Horde_Form_Renderer_Comment extends Horde_Form_Renderer {
         static $canUpdate, $comment_count = 0;
 
         if (!isset($canUpdate)) {
-            $canUpdate = Horde_Auth::getAuth() &&
+            $canUpdate = $GLOBALS['registry']->getAuth() &&
                 Whups::hasPermission($vars->get('queue'), 'queue', 'update');
         }
 
index d159b55..c0b0d3e 100644 (file)
@@ -248,7 +248,7 @@ class Whups_Ticket {
         }
 
         if (is_null($user)) {
-            $user = Horde_Auth::getAuth();
+            $user = $GLOBALS['registry']->getAuth();
         }
         $author_email = isset($this->_changes['comment-email']['to'])
             ? $this->_changes['comment-email']['to']
@@ -729,7 +729,7 @@ class Whups_Ticket {
         $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity();
         $name = $identity->getValue('fullname');
         if (empty($name)) {
-            $name = Horde_Auth::getBareAuth();
+            $name = $GLOBALS['registry']->getAuth('bare');
         }
 
         /* Get queue specific notification message text, if available. */
index 81a6172..9bf8b01 100644 (file)
@@ -339,7 +339,7 @@ class Whups {
     function hasPermission($in, $filter, $permission, $user = null)
     {
         if (is_null($user)) {
-            $user = Horde_Auth::getAuth();
+            $user = $GLOBALS['registry']->getAuth();
         }
 
         if ($permission == 'update' ||
@@ -382,7 +382,7 @@ class Whups {
                     // If the sub-permission doesn't exist, use the queue
                     // permission at an EDIT level and lock out guests.
                     if ($permission != 'requester' &&
-                        Horde_Auth::getAuth() &&
+                        $GLOBALS['registry']->getAuth() &&
                         $perms->hasPermission('whups:queues:' . $in, $user,
                                               Horde_Perms::EDIT)) {
                         return true;
@@ -415,7 +415,7 @@ class Whups {
                                $user = null, $creator = null)
     {
         if (is_null($user)) {
-            $user = Horde_Auth::getAuth();
+            $user = $GLOBALS['registry']->getAuth();
         }
 
         $admin = $GLOBALS['registry']->isAdmin(array('permission' => 'whups:admin', 'permlevel' => $permission, 'user' => $user));
@@ -504,7 +504,7 @@ class Whups {
     {
         $criteria = array('user:' . $user);
         $groups = Horde_Group::singleton();
-        $mygroups = $groups->getGroupMemberships(Horde_Auth::getAuth());
+        $mygroups = $groups->getGroupMemberships($GLOBALS['registry']->getAuth());
         foreach ($mygroups as $id => $group) {
             $criteria[] = 'group:' . $id;
         }
@@ -519,7 +519,7 @@ class Whups {
         static $results;
 
         if (is_null($user)) {
-            $user = Horde_Auth::getAuth();
+            $user = $GLOBALS['registry']->getAuth();
         } elseif (empty($user)) {
             return array('user' => '',
                          'name' => '',
@@ -761,7 +761,7 @@ class Whups {
     {
         $menu = new Horde_Menu();
 
-        if (Horde_Auth::getAuth()) {
+        if ($GLOBALS['registry']->getAuth()) {
             $menu->add(Horde::applicationUrl('mybugs.php'), sprintf(_("_My %s"), $GLOBALS['registry']->get('name')), 'whups.png', null, null, null, $GLOBALS['prefs']->getValue('whups_default_view') == 'mybugs' && strpos($_SERVER['PHP_SELF'], $GLOBALS['registry']->get('webroot') . '/index.php') !== false ? 'current' : null);
         }
         $menu->add(Horde::applicationUrl('search.php'), _("_Search"), 'search.png', null, null, null, $GLOBALS['prefs']->getValue('whups_default_view') == 'search' && strpos($_SERVER['PHP_SELF'], $GLOBALS['registry']->get('webroot') . '/index.php') !== false ? 'current' : null);
index f51fbf4..4ca716a 100644 (file)
@@ -15,7 +15,7 @@ require_once 'Horde/Block/Layout/View.php';
 
 // @TODO: remove this when there are blocks useful to guests
 // available.
-if (!Horde_Auth::getAuth()) {
+if (!$GLOBALS['registry']->getAuth()) {
     require WHUPS_BASE . '/search.php';
     exit;
 }
index 28b82a3..bc6e96e 100644 (file)
@@ -26,7 +26,7 @@ $showExtraForm = null;
 // Find our current query.
 if (isset($_SESSION['whups']['query'])) {
     $whups_query = unserialize($_SESSION['whups']['query']);
-    if (!$whups_query->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+    if (!$whups_query->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
         $notification->push(_("Permission denied."), 'horde.error');
         header('Location: ' . Horde::applicationUrl($prefs->getValue('whups_default_view') . '.php', true));
         exit;
index 2b3fede..b7116bf 100644 (file)
@@ -31,7 +31,7 @@ if ($slug) {
 if (!isset($whups_query) ||
     is_a($whups_query, 'PEAR_Error') ||
     $whups_query->parameters ||
-    !$whups_query->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+    !$whups_query->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
     exit;
 }
 
index 7526c00..8631149 100644 (file)
@@ -36,7 +36,7 @@ if ($vars->exists('slug')) {
 // read permissions on the requested query, go to the initial Whups page.
 if (!isset($whups_query) ||
     is_a($whups_query, 'PEAR_Error') ||
-    !$whups_query->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) {
+    !$whups_query->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
     if (is_a($whups_query, 'PEAR_Error')) {
         $notification->push($whups_query);
     } elseif (isset($whups_query)) {
index 15dcb11..a0a7d36 100644 (file)
@@ -173,8 +173,8 @@ if (!$beendone) {
 $qManager = new Whups_QueryManager();
 $myqueries = Whups_View::factory(
     'SavedQueries',
-    array('title' => Horde_Auth::getAuth() ? _("My Queries") : _("Public Queries"),
-          'results' => $qManager->listQueries(Horde_Auth::getAuth(), true)));
+    array('title' => $GLOBALS['registry']->getAuth() ? _("My Queries") : _("Public Queries"),
+          'results' => $qManager->listQueries($GLOBALS['registry']->getAuth(), true)));
 $myqueries->html();
 
 require $registry->get('templates', 'horde') . '/common-footer.inc';
index e459343..c139864 100755 (executable)
@@ -80,7 +80,7 @@ function doResort(column, sortDown)
 ?>
 </tbody>
 </table>
-<?php if (Horde_Auth::getAuth()): ?>
+<?php if ($GLOBALS['registry']->getAuth()): ?>
 <table width="100%" cellspacing="0">
  <tr>
   <td class="smallheader nowrap">
index a86bfe3..af26ce9 100644 (file)
@@ -25,7 +25,7 @@ if ($tid = $vars->get('transaction')) {
         $private = false;
         foreach ($history[$tid]['changes'] as $change) {
             if (!empty($change['private'])) {
-                if (!$GLOBALS['injector']->getInstance('Horde_Perms')->hasPermission('whups:comments:' . $change['value'], Horde_Auth::getAuth(), Horde_Perms::READ)) {
+                if (!$GLOBALS['injector']->getInstance('Horde_Perms')->hasPermission('whups:comments:' . $change['value'], $GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {
                     $private = true;
                     break;
                 }
index 37a8110..e2d3d17 100644 (file)
@@ -32,7 +32,7 @@ $valid4 = $form4->validate($vars) &&
 $valid3 = $form3->validate($vars, true);
 $valid2 = $form2->validate($vars, !$form1->isSubmitted());
 $valid1 = $form1->validate($vars, true);
-$doAssignForm = Horde_Auth::getAuth() &&
+$doAssignForm = $GLOBALS['registry']->getAuth() &&
     $whups_driver->isCategory('assigned', $vars->get('state'));
 
 if ($valid1 && $valid2 && $valid3 &&
@@ -46,7 +46,7 @@ if ($valid1 && $valid2 && $valid3 &&
         $form4->getInfo($vars, $info);
     }
 
-    $ticket = Whups_Ticket::newTicket($info, Horde_Auth::getAuth());
+    $ticket = Whups_Ticket::newTicket($info, $GLOBALS['registry']->getAuth());
     if (is_a($ticket, 'PEAR_Error')) {
         Horde::logMessage($ticket, 'ERR');
         $notification->push(sprintf(_("Adding your ticket failed: %s."),
index a2a9ff9..3bdfb4d 100644 (file)
@@ -33,9 +33,9 @@ class SetQueueStep1Form extends Horde_Form {
         /* Group restrictions. */
         if ($GLOBALS['registry']->isAdmin(array('permission' => 'whups:admin', 'permlevel' => Horde_Perms::EDIT)) ||
             $GLOBALS['injector']->getInstance('Horde_Perms')->hasPermission('whups:hiddenComments',
-                                             Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
+                                             $GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
             $groups = Horde_Group::singleton();
-            $mygroups = $groups->getGroupMemberships(Horde_Auth::getAuth());
+            $mygroups = $groups->getGroupMemberships($GLOBALS['registry']->getAuth());
             if ($mygroups) {
                 foreach (array_keys($mygroups) as $gid) {
                     $grouplist[$gid] = $groups->getGroupName($gid, true);
index 7c83ab2..6e2fee0 100644 (file)
@@ -29,7 +29,7 @@ class SetTypeStep1Form extends Horde_Form {
 
         /* Group restrictions. */
         $groups = Horde_Group::singleton();
-        $mygroups = $groups->getGroupMemberships(Horde_Auth::getAuth());
+        $mygroups = $groups->getGroupMemberships($GLOBALS['registry']->getAuth());
         if ($mygroups) {
             foreach (array_keys($mygroups) as $gid) {
                 $grouplist[$gid] = $groups->getGroupName($gid, true);
index 30cbcb2..b4ba0c1 100644 (file)
@@ -303,7 +303,7 @@ class Wicked_Driver {
         }
 
         if (!isset($file['change_author'])) {
-            $file['change_author'] = Horde_Auth::getAuth();
+            $file['change_author'] = $GLOBALS['registry']->getAuth();
         }
 
         $result = $this->_attachFile($file);
index 2a99442..1f83df1 100644 (file)
@@ -568,7 +568,7 @@ class Wicked_Driver_sql extends Wicked_Driver {
             return PEAR::raiseError(_("Robots are not allowed to create pages"));
         }
 
-        $author = Horde_Auth::getAuth();
+        $author = $GLOBALS['registry']->getAuth();
         if ($author === false) {
             $author = null;
         }
@@ -691,7 +691,7 @@ class Wicked_Driver_sql extends Wicked_Driver {
             $versionchange = 'page_majorversion = page_majorversion + 1, page_minorversion = 0';
         }
 
-        $author = Horde_Auth::getAuth();
+        $author = $GLOBALS['registry']->getAuth();
         if ($author === false) {
             $author = null;
         }
index d9052e5..538c7df 100644 (file)
@@ -77,7 +77,7 @@ class Page {
         } elseif ($perms->exists('wicked:pages')) {
             return $perms->getPermissions('wicked:pages');
         } else {
-            if (!Horde_Auth::getAuth()) {
+            if (!$GLOBALS['registry']->getAuth()) {
                 return Horde_Perms::SHOW | Horde_Perms::READ;
             } else {
                 return Horde_Perms::SHOW | Horde_Perms::READ | Horde_Perms::EDIT | Horde_Perms::DELETE;
@@ -119,7 +119,7 @@ class Page {
             if ($perms->exists($permName)) {
                 return $perms->getPermissions($permName) & Horde_Perms::EDIT;
             } else {
-                return Horde_Auth::getAuth();
+                return $GLOBALS['registry']->getAuth();
             }
             break;
 
index 32b7dc8..486053a 100644 (file)
@@ -157,7 +157,7 @@ class EditPage extends Page {
             $notification->push(sprintf(_("You don't have permission to edit \"%s\"."), $page->pageName()));
         } else {
             if (!empty($GLOBALS['conf']['wicked']['captcha']) &&
-                !Horde_Auth::getAuth() &&
+                !$GLOBALS['registry']->getAuth() &&
                 (Horde_String::lower(Horde_Util::getFormData('wicked_captcha')) != Horde_String::lower(Wicked::getCAPTCHA()))) {
                 $notification->push(_("Random string did not match."), 'horde.error');
                 return;
index 5df0f45..8a4242d 100644 (file)
@@ -42,7 +42,7 @@ class Wicked_Sync {
         }
 
         if (empty($params['user'])) {
-            $params['user'] = Horde_Auth::getAuth();
+            $params['user'] = $GLOBALS['registry']->getAuth();
         }
 
         if (empty($params['password'])) {
index 76972f3..d792c17 100644 (file)
@@ -143,8 +143,8 @@ class Wicked {
             return;
         }
 
-        if (Horde_Auth::getAuth()) {
-            $prefix = Horde_Auth::getAuth();
+        if ($GLOBALS['registry']->getAuth()) {
+            $prefix = $GLOBALS['registry']->getAuth();
         } else {
             $prefix = 'guest [' . $_SERVER['REMOTE_ADDR'] . ']';
         }
@@ -159,7 +159,7 @@ class Wicked {
         $default_from_addr = !empty($conf['wicked']['guest_address']) ?
             $conf['wicked']['guest_address'] :
             $conf['wicked']['notify_address'];
-        if (Horde_Auth::getAuth()) {
+        if ($GLOBALS['registry']->getAuth()) {
             $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity();
             $from = $identity->getValue('fullname');
             if (empty($from)) {
@@ -220,7 +220,7 @@ class Wicked {
      */
     function lockUser()
     {
-        return Horde_Auth::getAuth() ? Horde_Auth::getAuth() : $GLOBALS['browser']->getIPAddress();
+        return $GLOBALS['registry']->getAuth() ? $GLOBALS['registry']->getAuth() : $GLOBALS['browser']->getIPAddress();
     }
 
 }
index af8c5f8..12c0210 100644 (file)
@@ -31,7 +31,7 @@ function preview()
 </div>
 
 <?php
-if (!empty($GLOBALS['conf']['wicked']['captcha']) && !Horde_Auth::getAuth()):
+if (!empty($GLOBALS['conf']['wicked']['captcha']) && !$GLOBALS['registry']->getAuth()):
     require_once 'Text/Figlet.php';
     $figlet = new Text_Figlet();
     $result = $figlet->loadFont($GLOBALS['conf']['wicked']['figlet_font']);