From 4343b7a9079e436ff77770deb9adb6b1f38cc29c Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Wed, 2 Jun 2010 11:52:15 -0600 Subject: [PATCH] Move Horde_Auth::getAuth() to Horde_Registry::. Conversions: Horde_Auth::getAuth() -> $registry->getAuth() Horde_Auth::getBareAuth() -> $registry->getAuth('bare') Horde_Auth::getAuthDomain() -> $registry->getAuth('domain') Horde_Auth::getOriginalAuth() -> $registry->getAuth('original') --- agora/lib/Agora.php | 2 +- agora/lib/Forms/Message.php | 2 +- agora/lib/Messages.php | 20 +++---- agora/messages/abuse.php | 2 +- agora/owner.php | 2 +- ansel/config/hooks.php.dist | 4 +- ansel/edit_dates.php | 4 +- ansel/faces/custom.php | 4 +- ansel/faces/gallery.php | 4 +- ansel/faces/name.php | 4 +- ansel/faces/search/image.php | 2 +- ansel/faces/search/image_define.php | 2 +- ansel/faces/search/image_save.php | 6 +- ansel/faces/search/image_search.php | 2 +- ansel/faces/search/img.php | 2 +- ansel/faces/search/owner.php | 4 +- ansel/gallery.php | 16 ++--- ansel/gallery/captions.php | 2 +- ansel/gallery/delete.php | 8 +-- ansel/gallery/sort.php | 2 +- ansel/image.php | 24 ++++---- ansel/img/download.php | 4 +- ansel/img/full.php | 4 +- ansel/img/index.php | 4 +- ansel/img/mini.php | 4 +- ansel/img/prettythumb.php | 4 +- ansel/img/screen.php | 4 +- ansel/img/thumb.php | 4 +- ansel/img/upload_preview.php | 2 +- ansel/lib/Ajax/Imple/EditCaption.php | 4 +- ansel/lib/Ajax/Imple/EditFaces.php | 6 +- ansel/lib/Ajax/Imple/ImageSaveGeotag.php | 4 +- ansel/lib/Ajax/Imple/TagActions.php | 4 +- ansel/lib/Ansel.php | 16 ++--- ansel/lib/Api.php | 22 +++---- ansel/lib/Block/gallery.php | 6 +- ansel/lib/Block/my_galleries.php | 4 +- ansel/lib/Block/recent_comments.php | 4 +- ansel/lib/Block/recently_added.php | 4 +- ansel/lib/Block/recently_added_geodata.php | 4 +- ansel/lib/Faces/Base.php | 14 ++--- ansel/lib/Form/Ecard.php | 2 +- ansel/lib/Gallery.php | 20 +++---- ansel/lib/GalleryMode/Date.php | 8 +-- ansel/lib/GalleryMode/Normal.php | 10 ++-- ansel/lib/Image.php | 6 +- ansel/lib/Report.php | 2 +- ansel/lib/Storage.php | 14 ++--- ansel/lib/Tags.php | 10 ++-- ansel/lib/Tile/DateGallery.php | 2 +- ansel/lib/Tile/Gallery.php | 6 +- ansel/lib/Tile/Image.php | 4 +- ansel/lib/View/Base.php | 2 +- ansel/lib/View/EmbeddedRenderer/GalleryLink.php | 2 +- ansel/lib/View/EmbeddedRenderer/Mini.php | 2 +- ansel/lib/View/Gallery.php | 2 +- ansel/lib/View/GalleryRenderer/Base.php | 2 +- ansel/lib/View/GalleryRenderer/Gallery.php | 4 +- ansel/lib/View/GalleryRenderer/GalleryLightbox.php | 4 +- ansel/lib/View/Image.php | 4 +- ansel/lib/View/List.php | 8 +-- ansel/lib/View/Results.php | 2 +- ansel/lib/Widget/Actions.php | 10 ++-- ansel/lib/Widget/GalleryFaces.php | 2 +- ansel/lib/Widget/Geotag.php | 4 +- ansel/lib/Widget/ImageFaces.php | 2 +- ansel/lib/Widget/Tags.php | 4 +- ansel/map_edit.php | 4 +- ansel/perms.php | 10 ++-- ansel/preview.php | 2 +- ansel/rss.php | 6 +- ansel/scripts/ansel.php | 2 +- ansel/templates/gallery/gallery.inc | 2 +- ansel/templates/group/category.inc | 2 +- ansel/templates/group/owner.inc | 4 +- ansel/templates/image/preview_cropimage.inc | 4 +- ansel/templates/image/preview_image.inc | 4 +- ansel/templates/tile/image.inc | 4 +- ansel/templates/view/image.inc | 8 +-- ansel/templates/view/slideshow.inc | 4 +- ansel/xppublish.php | 2 +- babel/lib/Babel.php | 4 +- babel/view.php | 2 +- beatnik/lib/Beatnik.php | 4 +- beatnik/lib/Driver.php | 4 +- beatnik/templates/listzones/header.inc | 2 +- chora/lib/Chora.php | 2 +- fima/account.php | 12 ++-- fima/accounts.php | 2 +- fima/config/prefs.php.dist | 2 +- fima/ledgers/create.php | 2 +- fima/ledgers/delete.php | 6 +- fima/ledgers/edit.php | 4 +- fima/ledgers/index.php | 2 +- fima/lib/Block/summary.php | 2 +- fima/lib/Fima.php | 16 ++--- fima/lib/Forms/DeleteLedger.php | 8 +-- fima/postings.php | 10 ++-- fima/templates/accounts/accounts.inc | 4 +- folks/account/resetpassword.php | 2 +- folks/config/hooks.php.dist | 6 +- folks/edit/activity.php | 2 +- folks/edit/comments.php | 8 +-- folks/edit/edit.php | 6 +- folks/edit/friends/add.php | 10 ++-- folks/edit/friends/approve.php | 6 +- folks/edit/friends/invite.php | 6 +- folks/edit/friends/reject.php | 8 +-- folks/edit/password.php | 2 +- folks/edit/privacy.php | 2 +- folks/friends.php | 2 +- folks/lib/Api.php | 10 ++-- folks/lib/Block/my_comments.php | 4 +- folks/lib/Driver.php | 26 ++++---- folks/lib/Driver/sql.php | 14 ++--- folks/lib/Folks.php | 2 +- folks/lib/Friends.php | 4 +- folks/lib/Friends/prefs.php | 2 +- folks/lib/Friends/shared.php | 8 +-- folks/lib/Notification.php | 4 +- folks/login.php | 6 +- folks/perms.php | 12 ++-- folks/rss/activity.php | 2 +- folks/rss/friends.php | 2 +- folks/rss/know.php | 4 +- folks/scripts/online.php | 4 +- folks/templates/user/user.php | 14 ++--- folks/user.php | 4 +- framework/Ajax/lib/Horde/Ajax/Application/Base.php | 2 +- framework/Auth/lib/Horde/Auth.php | 67 +-------------------- framework/Auth/lib/Horde/Auth/Base.php | 2 +- framework/Auth/lib/Horde/Auth/Customsql.php | 2 +- framework/Auth/lib/Horde/Auth/Shibboleth.php | 2 +- framework/Auth/package.xml | 1 - framework/Core/lib/Horde/Core/Auth/Application.php | 2 +- framework/Core/lib/Horde/Core/Binder/Mail.php | 2 +- .../Core/lib/Horde/Core/Binder/Notification.php | 2 +- framework/Core/lib/Horde/Core/Factory/Identity.php | 4 +- .../Core/lib/Horde/Core/Factory/KolabStorage.php | 2 +- .../lib/Horde/Core/LoginTasks/Backend/Horde.php | 2 +- framework/Core/lib/Horde/Menu.php | 4 +- framework/Core/lib/Horde/Registry.php | 69 ++++++++++++++++++---- framework/DataTree/DataTree/sql.php | 2 +- framework/Group/lib/Horde/Group/Contactlists.php | 4 +- framework/History/lib/Horde/History.php | 2 +- .../Horde/Kolab/FreeBusy/Driver/Freebusy/Kolab.php | 2 +- .../lib/Horde/Kolab/Session/Auth/Horde.php | 2 +- .../Kolab_Storage/lib/Horde/Kolab/Storage.php | 4 +- .../Kolab_Storage/lib/Horde/Kolab/Storage/Data.php | 2 +- .../lib/Horde/Kolab/Storage/Folder/Base.php | 2 +- .../Kolab/Storage/Folder/Decorator/Trigger.php | 2 +- framework/Net_IMSP/IMSP/Utils.php | 8 +-- framework/Perms/lib/Horde/Perms.php | 2 +- framework/Rpc/lib/Horde/Rpc.php | 2 +- framework/Rpc/lib/Horde/Rpc/Soap.php | 2 +- framework/Rpc/lib/Horde/Rpc/Webdav.php | 4 +- framework/Share/lib/Horde/Share.php | 2 +- framework/Share/lib/Horde/Share/Kolab.php | 2 +- framework/Share/lib/Horde/Share/Object.php | 4 +- framework/Share/lib/Horde/Share/Object/Kolab.php | 2 +- .../lib/Horde/Share/Object/Sql/Hierarchical.php | 6 +- .../Share/lib/Horde/Share/Sql/Hierarchical.php | 8 +-- framework/Share/tests/kolab_createdefault.phpt | 2 +- framework/SyncML/SyncML/Backend/Horde.php | 4 +- framework/VFS/lib/VFS/kolab.php | 8 +-- gollem/config/backends.php.dist | 4 +- gollem/lib/Auth.php | 4 +- gollem/lib/Gollem.php | 8 +-- horde/config/hooks.php.dist | 12 ++-- horde/index.php | 6 +- horde/lib/Api.php | 2 +- horde/lib/Block/account.php | 6 +- horde/lib/Prefs/Ui.php | 22 +++---- horde/login.php | 8 +-- horde/services/changepassword.php | 2 +- horde/services/portal/index.php | 2 +- horde/services/portal/mobile.php | 2 +- horde/services/portal/sidebar.php | 6 +- horde/services/problem.php | 6 +- horde/services/shares/edit.php | 16 ++--- horde/services/snooze.php | 2 +- hylax/lib/Storage/sql.php | 4 +- imp/compose.php | 4 +- imp/config/hooks.php.dist | 2 +- imp/config/servers.php.dist | 2 +- imp/lib/Application.php | 2 +- imp/lib/Auth.php | 10 ++-- imp/lib/Compose.php | 8 +-- imp/lib/Injector/Binder/Folder.php | 2 +- imp/lib/Injector/Binder/Imaptree.php | 2 +- .../LoginTasks/Task/DeleteAttachmentsMonthly.php | 2 +- imp/lib/Maillog.php | 2 +- imp/lib/Prefs/Identity.php | 2 +- imp/lib/Prefs/Ui.php | 2 +- imp/lib/Sentmail/Sql.php | 6 +- imp/lib/Spam.php | 8 +-- imp/view.php | 2 +- ingo/lib/Api.php | 2 +- ingo/lib/Application.php | 8 +-- ingo/lib/Ingo.php | 20 +++---- ingo/lib/Storage/Sql.php | 2 +- ingo/vacation.php | 2 +- jeta/lib/Applet/jta.php | 2 +- jeta/lib/Applet/sshtools.php | 2 +- jonah/lib/Jonah.php | 12 ++-- jonah/lib/News/sql.php | 2 +- jonah/stories/share.php | 2 +- kastalia/main.php | 6 +- koward/lib/Koward.php | 2 +- koward/lib/Koward/Controller/Application.php | 8 +-- koward/lib/Koward/Controller/IndexController.php | 6 +- kronolith/add.php | 10 ++-- kronolith/attendees.php | 4 +- kronolith/calendars/create.php | 2 +- kronolith/calendars/delete.php | 6 +- kronolith/calendars/edit.php | 4 +- kronolith/calendars/index.php | 2 +- kronolith/calendars/info.php | 2 +- kronolith/calendars/remote_edit.php | 2 +- kronolith/calendars/remote_subscribe.php | 2 +- kronolith/calendars/remote_unsubscribe.php | 2 +- kronolith/config/prefs.php.dist | 4 +- kronolith/contacts.php | 2 +- kronolith/data.php | 8 +-- kronolith/delete.php | 2 +- kronolith/edit.php | 22 +++---- kronolith/event.php | 2 +- kronolith/feed/index.php | 4 +- kronolith/lib/Ajax/Application.php | 8 +-- kronolith/lib/Ajax/Imple/TagActions.php | 6 +- kronolith/lib/Api.php | 12 ++-- kronolith/lib/Application.php | 4 +- kronolith/lib/Block/month.php | 4 +- kronolith/lib/Block/monthlist.php | 4 +- kronolith/lib/Block/prevmonthlist.php | 4 +- kronolith/lib/Block/summary.php | 4 +- kronolith/lib/Block/tree_alarms.php | 2 +- kronolith/lib/Driver/Ical.php | 2 +- kronolith/lib/Driver/Sql.php | 26 ++++---- kronolith/lib/Event.php | 24 ++++---- kronolith/lib/Event/Kolab.php | 4 +- kronolith/lib/Forms/DeleteResource.php | 2 +- kronolith/lib/Forms/DeleteResourceGroup.php | 2 +- kronolith/lib/Geo/Mysql.php | 8 +-- kronolith/lib/Geo/Sql.php | 8 +-- kronolith/lib/Kronolith.php | 66 ++++++++++----------- kronolith/lib/LoginTasks/Task/PurgeEvents.php | 2 +- kronolith/lib/Storage.php | 2 +- kronolith/lib/Storage/kolab.php | 2 +- kronolith/lib/Storage/sql.php | 4 +- kronolith/lib/Tagger.php | 4 +- kronolith/lib/View/EditEvent.php | 4 +- kronolith/lib/View/Event.php | 4 +- kronolith/new.php | 2 +- kronolith/perms.php | 10 ++-- kronolith/resources/delete.php | 2 +- kronolith/resources/edit.php | 2 +- kronolith/resources/groups/delete.php | 2 +- kronolith/resources/groups/edit.php | 2 +- kronolith/resources/groups/index.php | 2 +- kronolith/resources/index.php | 2 +- kronolith/search.php | 2 +- kronolith/templates/chunks/calendar.php | 2 +- kronolith/templates/chunks/permissions.inc | 6 +- kronolith/templates/edit/edit.inc | 2 +- kronolith/templates/index/index.inc | 4 +- kronolith/templates/panel.inc | 8 +-- mnemo/config/prefs.php.dist | 2 +- mnemo/data.php | 2 +- mnemo/lib/Api.php | 2 +- mnemo/lib/Block/tree_menu.php | 2 +- mnemo/lib/Driver/kolab.php | 6 +- mnemo/lib/Forms/DeleteNotepad.php | 10 ++-- mnemo/lib/Mnemo.php | 18 +++--- mnemo/memo.php | 8 +-- mnemo/note/pdf.php | 2 +- mnemo/notepads/create.php | 2 +- mnemo/notepads/delete.php | 6 +- mnemo/notepads/edit.php | 6 +- mnemo/notepads/index.php | 2 +- mnemo/templates/list/memo_headers.inc | 2 +- mnemo/templates/list/memo_summaries.inc | 2 +- mnemo/templates/memo/memo.inc | 2 +- mnemo/templates/panel.inc | 4 +- mnemo/templates/view/memo.inc | 4 +- mnemo/view.php | 4 +- nag/config/prefs.php.dist | 2 +- nag/data.php | 8 +-- nag/lib/Api.php | 16 ++--- nag/lib/Application.php | 4 +- nag/lib/Block/summary.php | 4 +- nag/lib/Block/tree_alarms.php | 2 +- nag/lib/Block/tree_menu.php | 2 +- nag/lib/Driver.php | 6 +- nag/lib/Driver/Kolab.php | 8 +-- nag/lib/Driver/Sql.php | 2 +- nag/lib/Forms/task.php | 2 +- nag/lib/Nag.php | 34 +++++------ nag/lib/Task.php | 8 +-- nag/task.php | 16 ++--- nag/tasklists/create.php | 2 +- nag/tasklists/delete.php | 6 +- nag/tasklists/edit.php | 4 +- nag/tasklists/index.php | 2 +- nag/tasklists/info.php | 4 +- nag/templates/list/task_headers.inc | 2 +- nag/templates/list/task_summaries.inc | 8 +-- nag/templates/panel.inc | 4 +- nag/templates/view/task.inc | 2 +- nag/view.php | 10 ++-- news/add.php | 6 +- news/edit.php | 4 +- news/lib/Block/my_comments.php | 2 +- news/lib/Categories.php | 8 +-- news/lib/Driver/sql.php | 2 +- news/mail.php | 2 +- operator/lib/Driver.php | 8 +-- operator/lib/Operator.php | 6 +- passwd/main.php | 12 +--- pastie/lib/Driver/Sql.php | 2 +- shout/lib/Shout.php | 4 +- skoli/add.php | 2 +- skoli/classes/create.php | 2 +- skoli/classes/delete.php | 4 +- skoli/classes/edit.php | 4 +- skoli/classes/index.php | 2 +- skoli/entry.php | 8 +-- skoli/lib/Driver/sql.php | 2 +- skoli/lib/Forms/DeleteClass.php | 4 +- skoli/lib/Forms/Entry.php | 2 +- skoli/lib/Skoli.php | 14 ++--- skoli/list.php | 2 +- skoli/templates/list/headers.inc | 2 +- skoli/templates/panel.inc | 4 +- turba/addressbooks/create.php | 2 +- turba/addressbooks/delete.php | 8 +-- turba/addressbooks/edit.php | 6 +- turba/addressbooks/index.php | 2 +- turba/config/sources.php.dist | 6 +- turba/lib/Api.php | 2 +- turba/lib/Application.php | 2 +- turba/lib/Driver.php | 6 +- turba/lib/Driver/Imsp.php | 2 +- turba/lib/Driver/Kolab.php | 4 +- turba/lib/Driver/Ldap.php | 2 +- turba/lib/Driver/Share.php | 2 +- turba/lib/Driver/Sql.php | 4 +- turba/lib/Forms/DeleteAddressBook.php | 4 +- turba/lib/Turba.php | 12 ++-- turba/lib/View/Contact.php | 2 +- turba/lib/tests/TestBase.php | 2 +- vilma/lib/Vilma.php | 4 +- whups/data.php | 2 +- whups/lib/Api.php | 16 ++--- whups/lib/Block/myqueries.php | 2 +- whups/lib/Block/myrequests.php | 4 +- whups/lib/Block/mytickets.php | 2 +- whups/lib/Block/query.php | 4 +- whups/lib/Driver.php | 6 +- whups/lib/Driver/sql.php | 2 +- whups/lib/Forms/AddComment.php | 8 +-- whups/lib/Forms/CreateTicket.php | 8 +-- whups/lib/Forms/EditTicket.php | 6 +- whups/lib/Forms/Query.php | 4 +- whups/lib/Forms/Search.php | 2 +- whups/lib/Mail.php | 4 +- whups/lib/Query.php | 8 +-- whups/lib/Renderer/Comment.php | 2 +- whups/lib/Ticket.php | 4 +- whups/lib/Whups.php | 12 ++-- whups/mybugs.php | 2 +- whups/query/index.php | 2 +- whups/query/rss.php | 2 +- whups/query/run.php | 2 +- whups/search.php | 4 +- whups/templates/view/results.inc | 2 +- whups/ticket/comment.php | 2 +- whups/ticket/create.php | 4 +- whups/ticket/queue.php | 4 +- whups/ticket/type.php | 2 +- wicked/lib/Driver.php | 2 +- wicked/lib/Driver/sql.php | 4 +- wicked/lib/Page.php | 4 +- wicked/lib/Page/EditPage.php | 2 +- wicked/lib/Sync.php | 2 +- wicked/lib/Wicked.php | 8 +-- wicked/templates/edit/standard.inc | 2 +- 387 files changed, 1036 insertions(+), 1065 deletions(-) diff --git a/agora/lib/Agora.php b/agora/lib/Agora.php index f3649cd18..b35d6e101 100644 --- a/agora/lib/Agora.php +++ b/agora/lib/Agora.php @@ -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()); } } diff --git a/agora/lib/Forms/Message.php b/agora/lib/Forms/Message.php index 1b1f365de..9c78e8b40 100644 --- a/agora/lib/Forms/Message.php +++ b/agora/lib/Forms/Message.php @@ -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'])); diff --git a/agora/lib/Messages.php b/agora/lib/Messages.php index ee548f867..bf06e53e8 100644 --- a/agora/lib/Messages.php +++ b/agora/lib/Messages.php @@ -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); } /** diff --git a/agora/messages/abuse.php b/agora/messages/abuse.php index 66571d2ea..307b11d27 100644 --- a/agora/messages/abuse.php +++ b/agora/messages/abuse.php @@ -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())); diff --git a/agora/owner.php b/agora/owner.php index a9bbac700..d2512f696 100644 --- a/agora/owner.php +++ b/agora/owner.php @@ -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'); diff --git a/ansel/config/hooks.php.dist b/ansel/config/hooks.php.dist index f2cf5112a..61064fb3a 100644 --- a/ansel/config/hooks.php.dist +++ b/ansel/config/hooks.php.dist @@ -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; diff --git a/ansel/edit_dates.php b/ansel/edit_dates.php index cb612edb0..f2977d65e 100644 --- a/ansel/edit_dates.php +++ b/ansel/edit_dates.php @@ -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; } } diff --git a/ansel/faces/custom.php b/ansel/faces/custom.php index 21db99f88..9b600d9af 100644 --- a/ansel/faces/custom.php +++ b/ansel/faces/custom.php @@ -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']; diff --git a/ansel/faces/gallery.php b/ansel/faces/gallery.php index a93faf9ec..7a7516927 100644 --- a/ansel/faces/gallery.php +++ b/ansel/faces/gallery.php @@ -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(); diff --git a/ansel/faces/name.php b/ansel/faces/name.php index e85f5f23a..0af49df11 100644 --- a/ansel/faces/name.php +++ b/ansel/faces/name.php @@ -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); diff --git a/ansel/faces/search/image.php b/ansel/faces/search/image.php index c7893b158..c2edb416b 100644 --- a/ansel/faces/search/image.php +++ b/ansel/faces/search/image.php @@ -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 { diff --git a/ansel/faces/search/image_define.php b/ansel/faces/search/image_define.php index aac20fa45..2feef1abf 100644 --- a/ansel/faces/search/image_define.php +++ b/ansel/faces/search/image_define.php @@ -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")); diff --git a/ansel/faces/search/image_save.php b/ansel/faces/search/image_save.php index 691d3ff28..8fc5fdd5d 100644 --- a/ansel/faces/search/image_save.php +++ b/ansel/faces/search/image_save.php @@ -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; diff --git a/ansel/faces/search/image_search.php b/ansel/faces/search/image_search.php index a60838613..ae8b75f2a 100644 --- a/ansel/faces/search/image_search.php +++ b/ansel/faces/search/image_search.php @@ -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')); diff --git a/ansel/faces/search/img.php b/ansel/faces/search/img.php index b87e85175..87b7f5c44 100644 --- a/ansel/faces/search/img.php +++ b/ansel/faces/search/img.php @@ -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); diff --git a/ansel/faces/search/owner.php b/ansel/faces/search/owner.php index 9fe847529..806423796 100644 --- a/ansel/faces/search/owner.php +++ b/ansel/faces/search/owner.php @@ -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); diff --git a/ansel/gallery.php b/ansel/gallery.php index 8b0d91946..eb6f46367 100644 --- a/ansel/gallery.php +++ b/ansel/gallery.php @@ -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'); diff --git a/ansel/gallery/captions.php b/ansel/gallery/captions.php index 1381b8211..ee17799e6 100644 --- a/ansel/gallery/captions.php +++ b/ansel/gallery/captions.php @@ -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; diff --git a/ansel/gallery/delete.php b/ansel/gallery/delete.php index 7a9f2920a..7ccedd33c 100644 --- a/ansel/gallery/delete.php +++ b/ansel/gallery/delete.php @@ -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'); diff --git a/ansel/gallery/sort.php b/ansel/gallery/sort.php index 780c53a69..17c96f8be 100644 --- a/ansel/gallery/sort.php +++ b/ansel/gallery/sort.php @@ -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; diff --git a/ansel/image.php b/ansel/image.php index b468aa6ca..52a3fa2dd 100644 --- a/ansel/image.php +++ b/ansel/image.php @@ -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); diff --git a/ansel/img/download.php b/ansel/img/download.php index d50876011..0bd301339 100644 --- a/ansel/img/download.php +++ b/ansel/img/download.php @@ -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); diff --git a/ansel/img/full.php b/ansel/img/full.php index 3e64f7181..ffe1615d1 100644 --- a/ansel/img/full.php +++ b/ansel/img/full.php @@ -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); diff --git a/ansel/img/index.php b/ansel/img/index.php index 66e583ee8..7e7e2818a 100644 --- a/ansel/img/index.php +++ b/ansel/img/index.php @@ -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); diff --git a/ansel/img/mini.php b/ansel/img/mini.php index 81f18dd37..8ec563289 100644 --- a/ansel/img/mini.php +++ b/ansel/img/mini.php @@ -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); diff --git a/ansel/img/prettythumb.php b/ansel/img/prettythumb.php index 40a7bcfe9..1942c3091 100644 --- a/ansel/img/prettythumb.php +++ b/ansel/img/prettythumb.php @@ -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); diff --git a/ansel/img/screen.php b/ansel/img/screen.php index 9e7a17a90..1e7d83865 100644 --- a/ansel/img/screen.php +++ b/ansel/img/screen.php @@ -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); diff --git a/ansel/img/thumb.php b/ansel/img/thumb.php index f8a56cb6d..bb7b39cbb 100644 --- a/ansel/img/thumb.php +++ b/ansel/img/thumb.php @@ -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); diff --git a/ansel/img/upload_preview.php b/ansel/img/upload_preview.php index 1204a7bfb..4ecad89c5 100644 --- a/ansel/img/upload_preview.php +++ b/ansel/img/upload_preview.php @@ -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(); } diff --git a/ansel/lib/Ajax/Imple/EditCaption.php b/ansel/lib/Ajax/Imple/EditCaption.php index 8019c7f54..057903fc7 100644 --- a/ansel/lib/Ajax/Imple/EditCaption.php +++ b/ansel/lib/Ajax/Imple/EditCaption.php @@ -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(); diff --git a/ansel/lib/Ajax/Imple/EditFaces.php b/ansel/lib/Ajax/Imple/EditFaces.php index 2e1d0cb36..ce66ae86e 100644 --- a/ansel/lib/Ajax/Imple/EditFaces.php +++ b/ansel/lib/Ajax/Imple/EditFaces.php @@ -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'); } diff --git a/ansel/lib/Ajax/Imple/ImageSaveGeotag.php b/ansel/lib/Ajax/Imple/ImageSaveGeotag.php index 153c97ae8..85492728e 100644 --- a/ansel/lib/Ajax/Imple/ImageSaveGeotag.php +++ b/ansel/lib/Ajax/Imple/ImageSaveGeotag.php @@ -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 = '
'; foreach ($imgs as $id => $data) { diff --git a/ansel/lib/Ajax/Imple/TagActions.php b/ansel/lib/Ajax/Imple/TagActions.php index 6e6152c2b..ca5e2a33b 100644 --- a/ansel/lib/Ajax/Imple/TagActions.php +++ b/ansel/lib/Ajax/Imple/TagActions.php @@ -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; } diff --git a/ansel/lib/Ansel.php b/ansel/lib/Ansel.php index 686ef7d15..272fe6169 100644 --- a/ansel/lib/Ansel.php +++ b/ansel/lib/Ansel.php @@ -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'], diff --git a/ansel/lib/Api.php b/ansel/lib/Api.php index 6de9e1bb8..fef884928 100644 --- a/ansel/lib/Api.php +++ b/ansel/lib/Api.php @@ -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); } diff --git a/ansel/lib/Block/gallery.php b/ansel/lib/Block/gallery.php index 4ffd086af..9416068a5 100644 --- a/ansel/lib/Block/gallery.php +++ b/ansel/lib/Block/gallery.php @@ -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 .= '