From 97fd203dcaaf5ddf7c9c2252eb44ac76e8d84846 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Sun, 7 Mar 2010 20:15:31 -0700 Subject: [PATCH] Add Horde_Themes:: library. Move all themes related code to a single place (includes both image and sound). Horde::img(), through Horde_Themes::img(), will now attempt to auto determine a graphic location. It looks in the following directories with this priority: 1. App theme 2. Horde theme 3. App default 4. Horde default This prevents us from having to copy all over all graphics for a theme - now, only need the graphics that differ from defaults (caveat: if loading graphics from CSS, copies of graphics need to continue to live in theme directory). --- agora/lib/Agora.php | 10 +- agora/lib/Messages.php | 2 +- agora/templates/common-header.inc | 4 +- ansel/faces/gallery.php | 4 +- ansel/faces/image.php | 2 +- ansel/lib/Ajax/Imple/EditFaces.php | 2 +- ansel/lib/Ajax/Imple/TagActions.php | 2 +- ansel/lib/Ansel.php | 8 +- ansel/lib/Api.php | 6 +- ansel/lib/Block/random_photo.php | 4 +- ansel/lib/Tags.php | 2 +- ansel/lib/Tile/DateGallery.php | 2 +- ansel/lib/Tile/Gallery.php | 6 +- ansel/lib/View/EmbeddedRenderer/Mini.php | 2 +- ansel/lib/View/GalleryRenderer/GalleryLightbox.php | 2 +- ansel/lib/Widget/Actions.php | 20 +- ansel/lib/Widget/Links.php | 4 +- ansel/lib/Widget/Tags.php | 4 +- ansel/map_edit.php | 2 +- ansel/rss.php | 3 +- ansel/templates/common-header.inc | 3 +- ansel/templates/faces/define.inc | 2 +- ansel/templates/faces/index.inc | 2 +- ansel/templates/gallery/gallery.inc | 2 +- ansel/templates/group/header.inc | 2 +- ansel/templates/image/crop_image.inc | 16 +- ansel/templates/image/edit_image.inc | 16 +- ansel/templates/image/preview_cropimage.inc | 4 +- ansel/templates/image/preview_image.inc | 4 +- ansel/templates/image/resize_image.inc | 16 +- ansel/templates/image/upload.inc | 6 +- ansel/templates/list/header.inc | 2 +- ansel/templates/view/image.inc | 8 +- ansel/templates/view/list.inc | 6 +- ansel/templates/view/slideshow.inc | 2 +- ansel/themes/silver/themed_graphics | 0 ansel/themes/tango-blue/themed_graphics | 0 ansel/xppublish.php | 2 +- babel/lib/Display.php | 52 +-- babel/templates/common-header.inc | 2 +- beatnik/lib/Beatnik.php | 4 +- beatnik/listzones.php | 2 +- beatnik/templates/common-header.inc | 4 +- beatnik/templates/listzones/header.inc | 2 +- beatnik/templates/menu.inc | 2 +- beatnik/viewzone.php | 2 +- chora/lib/Block/tree_menu.php | 2 +- chora/templates/checkout/checkout.inc | 2 +- chora/templates/common-header.inc | 4 +- chora/templates/diff/hr/header.inc | 2 +- chora/themes/silver/themed_graphics | 0 crumb/lib/Crumb.php | 4 +- crumb/templates/common-header.inc | 4 +- fima/ledgers/index.php | 10 +- fima/lib/Block/tree_menu.php | 6 +- fima/lib/Fima.php | 11 +- fima/postings.php | 2 +- fima/templates/accounts/accounts.inc | 8 +- fima/templates/common-header.inc | 4 +- fima/templates/postings/header.inc | 12 +- fima/templates/postings/posting_headers.inc | 4 +- fima/templates/reports/table.inc | 2 +- fima/templates/search/search.inc | 2 +- fima/themes/silver/themed_graphics | 0 folks/edit/activity.php | 2 +- folks/edit/friends/blacklist.php | 4 +- folks/edit/friends/for.php | 10 +- folks/edit/friends/friends.php | 8 +- folks/edit/friends/from.php | 6 +- folks/edit/friends/groups.php | 8 +- folks/edit/friends/index.php | 8 +- folks/edit/friends/know.php | 8 +- folks/edit/friends/of.php | 6 +- folks/lib/Folks.php | 2 +- folks/templates/common-header.inc | 4 +- folks/templates/edit/activity.php | 2 +- folks/templates/edit/header.php | 2 +- folks/templates/feed/activities.php | 2 +- folks/templates/feed/feed.php | 2 +- folks/templates/list/list.php | 2 +- folks/templates/list/search.php | 2 +- folks/templates/services/services.php | 2 +- folks/templates/user/actions.php | 14 +- folks/templates/user/authenticated.php | 4 +- folks/templates/user/deleted.php | 2 +- folks/templates/user/friends.php | 6 +- folks/templates/user/inactive.php | 2 +- folks/templates/user/private.php | 6 +- folks/templates/user/user.php | 38 +- .../Ajax/lib/Horde/Ajax/Imple/AutoCompleter.php | 2 +- framework/Block/lib/Horde/Block/Layout.php | 6 +- framework/Block/lib/Horde/Block/Layout/Manager.php | 2 +- framework/Core/lib/Horde.php | 274 ++------------ .../Core/lib/Horde/Core/Notification/Status.php | 2 +- framework/Core/lib/Horde/Help.php | 2 +- framework/Core/lib/Horde/Menu.php | 13 +- framework/Core/lib/Horde/Registry.php | 58 +-- framework/Core/lib/Horde/Themes.php | 394 +++++++++++++++++++++ framework/Core/lib/Horde/Themes/Element.php | 64 ++++ framework/Core/lib/Horde/Themes/Image.php | 14 + framework/Core/lib/Horde/Themes/Sound.php | 14 + framework/Core/package.xml | 13 +- framework/Form/Form/Renderer.php | 2 +- framework/Form/Form/Type.php | 4 +- framework/Mime/lib/Horde/Mime/Viewer.php | 2 +- .../Model/lib/Horde/Form/VarRenderer/Xhtml.php | 28 +- framework/Nls/lib/Horde/Nls.php | 2 +- framework/Perms/lib/Horde/Perms/Ui.php | 10 +- .../lib/Horde/Text/Filter/Emoticons.php | 2 +- framework/Tree/lib/Horde/Tree.php | 2 +- framework/Ui/lib/Horde/Ui/VarRenderer/Html.php | 28 +- gollem/lib/Block/tree_menu.php | 2 +- gollem/lib/Gollem.php | 4 +- gollem/manager.php | 2 +- gollem/selectlist.php | 2 +- gollem/templates/common-header.inc | 4 +- gollem/templates/prefs/columnselect.inc | 9 +- gollem/themes/silver/themed_graphics | 0 horde/admin/groups.php | 2 +- horde/admin/sessions.php | 4 +- horde/admin/setup/index.php | 8 +- horde/services/help/index.php | 2 +- horde/services/portal/cloud_search.php | 2 +- horde/services/portal/sidebar.php | 12 +- horde/templates/admin/menu.inc | 2 +- horde/templates/common-header.inc | 4 +- horde/templates/index/frames_index.inc | 2 +- horde/templates/javascript/open_html_helper.js | 2 +- horde/templates/menu/menu.inc | 2 +- horde/templates/prefs/alarm.inc | 8 +- horde/templates/prefs/categorymanagement.inc | 6 +- horde/templates/shares/edit.inc | 14 +- horde/themes/silver/themed_graphics | 0 horde/themes/tango-blue/themed_graphics | 0 horde/util/icon_browser.php | 2 +- hylax/folder.php | 10 +- hylax/lib/Hylax.php | 6 +- hylax/templates/common-header.inc | 4 +- imp/config/hooks.php.dist | 18 +- imp/lib/Ajax/Application.php | 2 +- imp/lib/Block/tree_folders.php | 2 +- imp/lib/Contents.php | 2 +- imp/lib/IMP.php | 2 +- imp/lib/Imap/Tree.php | 2 +- imp/lib/Mime/Viewer/Html.php | 4 +- imp/lib/Mime/Viewer/Images.php | 2 +- imp/lib/Mime/Viewer/Itip.php | 12 +- imp/lib/Mime/Viewer/Mdn.php | 2 +- imp/lib/Mime/Viewer/Partial.php | 2 +- imp/lib/Mime/Viewer/Pdf.php | 2 +- imp/lib/Mime/Viewer/Pgp.php | 5 +- imp/lib/Mime/Viewer/Plain.php | 2 +- imp/lib/Mime/Viewer/Smime.php | 7 +- imp/lib/Mime/Viewer/Status.php | 4 +- imp/lib/Notification/Event/Status.php | 2 +- imp/mailbox.php | 25 +- imp/message.php | 8 +- imp/saveimage.php | 2 +- imp/templates/common-header.inc | 8 +- imp/templates/index/index-dimp.inc | 4 +- imp/templates/prefs/flagmanagement.inc | 2 +- imp/templates/prefs/soundselect.inc | 8 +- imp/templates/prefs/sourceselect.inc | 13 +- imp/themes/silver/themed_graphics | 0 imp/themes/tango-blue/themed_graphics | 0 imp/thread.php | 2 +- imp/view.php | 2 +- ingo/filters.php | 6 +- ingo/lib/Ingo.php | 2 +- ingo/templates/common-header.inc | 4 +- ingo/templates/rule/filter.inc | 2 +- ingo/themes/silver/themed_graphics | 0 ingo/themes/tango-blue/themed_graphics | 0 jeta/templates/common-header.inc | 4 +- kastalia/lib/Block/tree_menu.php | 4 +- kastalia/lib/Kastalia.php | 2 +- kastalia/templates/common-header.inc | 4 +- koward/lib/Koward/Controller/Application.php | 14 +- koward/lib/Koward/Controller/ObjectController.php | 15 +- koward/lib/Koward/View/Object/listall.html.php | 12 +- koward/lib/Koward/View/Object/search.html.php | 12 +- koward/lib/Koward/View/shared/_header.html.php | 6 +- .../www/htdocs/horde/themes/silver/themed_graphics | 0 kronolith/attendees.php | 3 +- kronolith/calendars/index.php | 6 +- kronolith/feed/index.php | 2 +- kronolith/index.php | 8 +- kronolith/lib/Ajax/Imple/TagActions.php | 2 +- kronolith/lib/Api.php | 9 +- kronolith/lib/Block/tree_alarms.php | 2 +- kronolith/lib/Block/tree_menu.php | 4 +- kronolith/lib/Event.php | 6 +- kronolith/lib/FreeBusy/View/Day.php | 4 +- kronolith/lib/FreeBusy/View/Month.php | 6 +- kronolith/lib/FreeBusy/View/Week.php | 6 +- kronolith/lib/Kronolith.php | 12 +- kronolith/resources/groups/index.php | 4 +- kronolith/resources/index.php | 4 +- kronolith/templates/attendees/attendees.inc | 4 +- kronolith/templates/chunks/calendar.php | 28 +- kronolith/templates/common-header.inc | 4 +- kronolith/templates/day/head.inc | 4 +- kronolith/templates/edit/edit.inc | 14 +- kronolith/templates/edit/edit_timespan.inc | 4 +- kronolith/templates/edit/javascript.inc | 2 +- kronolith/templates/index/index.inc | 4 +- kronolith/templates/month/head.inc | 4 +- kronolith/templates/month/head_side_by_side.inc | 4 +- kronolith/templates/panel.inc | 4 +- kronolith/templates/perms/perms.inc | 14 +- kronolith/templates/prefs/sourceselect.inc | 8 +- kronolith/templates/week/head.inc | 4 +- kronolith/templates/year/head.inc | 4 +- kronolith/themes/silver/themed_graphics | 0 kronolith/themes/tango-blue/themed_graphics | 0 nag/lib/Api.php | 9 +- nag/lib/Block/summary.php | 3 +- nag/lib/Block/tree_alarms.php | 2 +- nag/lib/Block/tree_menu.php | 6 +- nag/lib/Nag.php | 4 +- nag/lib/Task.php | 6 +- nag/lib/Ui/VarRenderer/Nag.php | 4 +- nag/tasklists/index.php | 6 +- nag/templates/common-header.inc | 4 +- nag/templates/list/header.inc | 2 +- nag/templates/list/task_headers.inc | 4 +- nag/templates/list/task_summaries.inc | 2 +- nag/templates/panel.inc | 2 +- nag/themes/silver/themed_graphics | 0 nag/themes/tango-blue/themed_graphics | 0 news/admin/categories/index.php | 4 +- news/admin/sources/index.php | 6 +- news/diff.php | 2 +- news/edit.php | 2 +- news/lib/Categories.php | 2 +- news/lib/News.php | 10 +- news/reads.php | 2 +- news/templates/common-header.inc | 4 +- news/templates/news/mail.php | 2 +- news/templates/news/today.php | 4 +- news/templates/news/tools.php | 8 +- operator/lib/Operator.php | 4 +- operator/templates/common-header.inc | 4 +- operator/themes/silver/themed_graphics | 0 shout/templates/common-header.inc | 33 +- shout/templates/dialplan/edit.inc | 9 +- shout/templates/extensions/list.inc | 26 +- skeleton/lib/Skeleton.php | 2 +- skeleton/templates/common-header.inc | 4 +- skoli/classes/index.php | 6 +- skoli/lib/Block/tree_menu.php | 6 +- skoli/lib/Skoli.php | 4 +- skoli/list.php | 2 +- skoli/templates/common-header.inc | 4 +- skoli/templates/list/classes.inc | 4 +- skoli/templates/list/header.inc | 2 +- skoli/templates/list/headers.inc | 6 +- skoli/templates/list/students.inc | 4 +- skoli/templates/search/entries.inc | 4 +- skoli/templates/search/header.inc | 2 +- skoli/templates/search/headers.inc | 2 +- timeobjects/lib/Driver/Weatherdotcom.php | 2 +- turba/addressbooks/index.php | 8 +- turba/contact.php | 3 +- turba/lib/Api.php | 6 +- turba/lib/Block/tree_menu.php | 4 +- turba/lib/ListView.php | 2 +- turba/lib/Object.php | 4 +- turba/lib/Turba.php | 4 +- turba/templates/block/minisearch.inc | 2 +- turba/templates/browse/column_headers.inc | 4 +- turba/templates/browse/header.inc | 2 +- turba/templates/browse/row.inc | 9 +- turba/templates/common-header.inc | 4 +- turba/templates/prefs/addressbookselect.inc | 8 +- turba/themes/silver/themed_graphics | 0 turba/themes/tango-blue/themed_graphics | 0 vilma/domains/index.php | 4 +- vilma/lib/Driver.php | 32 +- vilma/lib/Vilma.php | 2 +- vilma/templates/common-header.inc | 4 +- vilma/users/index.php | 4 +- vilma/virtuals/index.php | 4 +- whups/lib/Api.php | 2 +- whups/lib/Block/tree_menu.php | 4 +- whups/lib/Forms/VarRenderer.php | 3 +- whups/lib/Renderer/Comment.php | 2 +- whups/lib/Renderer/Query.php | 2 +- whups/lib/Whups.php | 8 +- whups/query/run.php | 3 +- whups/templates/common-header.inc | 4 +- whups/templates/prefs/sourceselect.inc | 8 +- whups/themes/silver/themed_graphics | 0 wicked/lib/Page/AttachedFiles.php | 9 +- wicked/lib/Page/MergeOrRename.php | 3 +- wicked/templates/common-header.inc | 4 +- wicked/templates/display/title.inc | 2 +- wicked/templates/edit/standard.inc | 2 +- wicked/templates/history/header.inc | 6 +- wicked/templates/history/summary.inc | 4 +- 300 files changed, 1259 insertions(+), 1102 deletions(-) delete mode 100644 ansel/themes/silver/themed_graphics delete mode 100644 ansel/themes/tango-blue/themed_graphics delete mode 100644 chora/themes/silver/themed_graphics delete mode 100644 fima/themes/silver/themed_graphics create mode 100644 framework/Core/lib/Horde/Themes.php create mode 100644 framework/Core/lib/Horde/Themes/Element.php create mode 100644 framework/Core/lib/Horde/Themes/Image.php create mode 100644 framework/Core/lib/Horde/Themes/Sound.php delete mode 100644 gollem/themes/silver/themed_graphics delete mode 100644 horde/themes/silver/themed_graphics delete mode 100644 horde/themes/tango-blue/themed_graphics delete mode 100644 imp/themes/silver/themed_graphics delete mode 100644 imp/themes/tango-blue/themed_graphics delete mode 100644 ingo/themes/silver/themed_graphics delete mode 100644 ingo/themes/tango-blue/themed_graphics delete mode 100644 koward/www/htdocs/horde/themes/silver/themed_graphics delete mode 100644 kronolith/themes/silver/themed_graphics delete mode 100644 kronolith/themes/tango-blue/themed_graphics delete mode 100644 nag/themes/silver/themed_graphics delete mode 100644 nag/themes/tango-blue/themed_graphics delete mode 100644 operator/themes/silver/themed_graphics delete mode 100644 turba/themes/silver/themed_graphics delete mode 100644 turba/themes/tango-blue/themed_graphics delete mode 100644 whups/themes/silver/themed_graphics diff --git a/agora/lib/Agora.php b/agora/lib/Agora.php index abc315347..d3624f1d5 100644 --- a/agora/lib/Agora.php +++ b/agora/lib/Agora.php @@ -188,7 +188,7 @@ class Agora { $sort_img = ($sort_dir ? 'za.png' : 'az.png'); $sort_title = ($sort_dir ? _("Sort Ascending") : _("Sort Descending")); $col_arrow = Horde::link(Horde_Util::addParameter($url, array($view . '_sortby' => $col_name, $view . '_sortdir' => $sort_dir ? 0 : 1)), $sort_title) . - Horde::img($sort_img, $sort_title, null, $GLOBALS['registry']->getImageDir('horde')) . ' '; + Horde::img($sort_img, $sort_title) . ' '; $col_class = 'selected'; } else { /* Column not currently sorted, add link to sort by @@ -232,7 +232,7 @@ class Agora { function getMenu($returnType = 'object') { $menu = new Horde_Menu(); - $img_dir = $GLOBALS['registry']->getImageDir(); + $img_dir = Horde_Themes::img(); $scope = Horde_Util::getGet('scope', 'agora'); /* Agora Home. */ @@ -242,9 +242,9 @@ 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', $GLOBALS['registry']->getImageDir()); + $menu->add(Agora::setAgoraId($GLOBALS['forum_id'], null, Horde::applicationUrl('threads.php')), _("_Threads"), 'threads.png', Horde_Themes::img()); if ($scope == 'agora' && Horde_Auth::getAuth()) { - $menu->add(Agora::setAgoraId($GLOBALS['forum_id'], null, Horde::applicationUrl('messages/edit.php')), _("New Thread"), 'newmessage.png', $GLOBALS['registry']->getImageDir()); + $menu->add(Agora::setAgoraId($GLOBALS['forum_id'], null, Horde::applicationUrl('messages/edit.php')), _("New Thread"), 'newmessage.png', Horde_Themes::img()); } } @@ -262,7 +262,7 @@ class Agora { } $url = Horde_Util::addParameter(Horde::applicationUrl('search.php'), 'scope', $scope); - $menu->add($url, _("_Search"), 'search.png', $GLOBALS['registry']->getImageDir('horde')); + $menu->add($url, _("_Search"), 'search.png', Horde_Themes::img(null, 'horde')); if ($returnType == 'object') { return $menu; diff --git a/agora/lib/Messages.php b/agora/lib/Messages.php index 180147c29..24baadfe4 100644 --- a/agora/lib/Messages.php +++ b/agora/lib/Messages.php @@ -864,7 +864,7 @@ class Agora_Messages { $view_bodies = $GLOBALS['prefs']->getValue('thread_view_bodies'); $abuse_url = Horde::applicationUrl('messages/abuse.php'); $hot_img = Horde::img('hot.png', _("Hot thread"), array('title' => _("Hot thread"))); - $new_img = Horde::img('required.png', _("New posts"), array('title' => _("New posts")), $GLOBALS['registry']->getImageDir('horde')); + $new_img = Horde::img('required.png', _("New posts"), array('title' => _("New posts"))); $is_moderator = $this->hasPermission(Horde_Perms::DELETE); /* Loop through the threads and set up the array. */ diff --git a/agora/templates/common-header.inc b/agora/templates/common-header.inc index 18962dee5..2b57bc908 100644 --- a/agora/templates/common-header.inc +++ b/agora/templates/common-header.inc @@ -22,8 +22,8 @@ Horde::includeScriptFiles(); ?> <?php echo htmlspecialchars($page_title) ?> - - + + " href="" type="application/rss+xml" /> diff --git a/ansel/faces/gallery.php b/ansel/faces/gallery.php index 932966c53..bc237284c 100644 --- a/ansel/faces/gallery.php +++ b/ansel/faces/gallery.php @@ -36,8 +36,8 @@ $page = Horde_Util::getFormData('page', 0); $perpage = min($prefs->getValue('tilesperpage'), $conf['thumbnail']['perpage']); $images = $gallery->getImages($page * $perpage, $perpage); -$reloadimage = $registry->getImageDir('horde') . '/reload.png'; -$customimage = $registry->getImageDir('horde') . '/layout.png'; +$reloadimage = Horde_Themes::img('reload.png'); +$customimage = Horde_Themes::img('layout.png'); $customurl = Horde_Util::addParameter(Horde::applicationUrl('faces/custom.php'), 'page', $page); $face = Ansel_Faces::factory(); $autogenerate = $face->canAutogenerate(); diff --git a/ansel/faces/image.php b/ansel/faces/image.php index 734faa7e2..72c9680f1 100644 --- a/ansel/faces/image.php +++ b/ansel/faces/image.php @@ -35,7 +35,7 @@ if (($reload || empty($result))) { } if (!empty($result)) { - $imgdir = $registry->getImageDir('horde'); + $imgdir = Horde_Themes::img(null, 'horde'); $customurl = Horde::applicationUrl('faces/custom.php'); require_once ANSEL_TEMPLATES . '/faces/image.inc'; } else { diff --git a/ansel/lib/Ajax/Imple/EditFaces.php b/ansel/lib/Ajax/Imple/EditFaces.php index 0d800149a..1b43f309d 100644 --- a/ansel/lib/Ajax/Imple/EditFaces.php +++ b/ansel/lib/Ajax/Imple/EditFaces.php @@ -54,7 +54,7 @@ class Ansel_Ajax_Imple_EditFaces extends Horde_Ajax_Imple_Base $result = $faces->getFromPicture($image_id, $autocreate); } if (!empty($result)) { - $imgdir = $GLOBALS['registry']->getImageDir('horde'); + $imgdir = Horde_Themes::img(null, 'horde'); $customurl = Horde::applicationUrl('faces/custom.php'); $url = (!empty($args['url']) ? urldecode($args['url']) : ''); ob_start(); diff --git a/ansel/lib/Ajax/Imple/TagActions.php b/ansel/lib/Ajax/Imple/TagActions.php index 6bfd92a5b..a7bcd3e5c 100644 --- a/ansel/lib/Ajax/Imple/TagActions.php +++ b/ansel/lib/Ajax/Imple/TagActions.php @@ -108,7 +108,7 @@ class Ansel_Ajax_Imple_TagActions extends Horde_Ajax_Imple_Base $links = Ansel_Tags::getTagLinks($tags, 'add'); $html = ''; return $html; diff --git a/ansel/lib/Ansel.php b/ansel/lib/Ansel.php index c579fc638..47415602d 100644 --- a/ansel/lib/Ansel.php +++ b/ansel/lib/Ansel.php @@ -164,7 +164,7 @@ class Ansel */ static public function getErrorImage($view = 'screen') { - return $GLOBALS['registry']->getImageDir() . '/' . $view . '-error.png'; + return Horde_Themes::img($view . '-error.png'); } /** @@ -650,13 +650,13 @@ class Ansel } if ($conf['faces']['driver'] && Horde_Auth::isAuthenticated()) { - $menu->add(Horde::applicationUrl('faces/search/all.php'), _("_Faces"), 'user.png', $registry->getImageDir('horde')); + $menu->add(Horde::applicationUrl('faces/search/all.php'), _("_Faces"), 'user.png', Horde_Themes::img(null, 'horde')); } /* Print. */ if ($conf['menu']['print'] && ($pl = Horde_Util::nonInputVar('print_link'))) { $menu->add($pl, _("_Print"), 'print.png', - $registry->getImageDir('horde'), '_blank', + Horde_Themes::img(null, 'horde'), '_blank', Horde::popupJs($pl, array('urlencode' => true)) . 'return false;'); } @@ -959,7 +959,7 @@ class Ansel /* Use Horde's stylesheet code if we aren't ouputting css directly */ if (!$custom_only) { - Horde::includeStylesheetFiles(array('additional' => $css)); + Horde_Themes::includeStylesheetFiles(array('additional' => $css)); } else { foreach ($css as $file) { echo ''; } else { - $img = Horde::img( - $GLOBALS['registry']->getImageDir() . '/thumb-error.png', '', - '', ''); + $img = Horde::img('thumb-error.png'); } return Horde::link($viewurl, _("View Photo")) . $img . ''; } diff --git a/ansel/lib/Tags.php b/ansel/lib/Tags.php index f1903c1ed..f126e823a 100644 --- a/ansel/lib/Tags.php +++ b/ansel/lib/Tags.php @@ -594,7 +594,7 @@ class Ansel_Tags_Search { } $remove_url = Horde::applicationUrl($remove_url, true); $delete_label = sprintf(_("Remove %s from search"), htmlspecialchars($tags[$tagid])); - $html .= '
  • ' . htmlspecialchars($tags[$tagid]) . Horde::link($remove_url, $delete_label) . Horde::img('delete-small.png', $delete_label, '', $registry->getImageDir('horde')) . '
  • '; + $html .= '
  • ' . htmlspecialchars($tags[$tagid]) . Horde::link($remove_url, $delete_label) . Horde::img('delete-small.png', $delete_label) . '
  • '; } return $html . ''; diff --git a/ansel/lib/Tile/DateGallery.php b/ansel/lib/Tile/DateGallery.php index 4305c28c6..094a9fb0d 100644 --- a/ansel/lib/Tile/DateGallery.php +++ b/ansel/lib/Tile/DateGallery.php @@ -80,7 +80,7 @@ class Ansel_Tile_DateGallery { // horde from Horde_Date $gallery_image = '' . $caption . '' ; } else { - $gallery_image = Horde::img($GLOBALS['registry']->getImageDir() . '/thumb-error.png', '', '', ''); + $gallery_image = Horde::img('thumb-error.png'); } /* Check for being called via the api and generate correct view links */ diff --git a/ansel/lib/Tile/Gallery.php b/ansel/lib/Tile/Gallery.php index e3abc46a3..dd5ae87a1 100644 --- a/ansel/lib/Tile/Gallery.php +++ b/ansel/lib/Tile/Gallery.php @@ -48,7 +48,7 @@ class Ansel_Tile_Gallery { $thumbstyle = $mini ? 'mini' : $style['thumbstyle']; if ($gallery->hasPasswd()) { - $gallery_image = Horde::img($GLOBALS['registry']->getImageDir() . '/gallery-locked.png', '', '', ''); + $gallery_image = Horde::img('gallery-locked.png'); } else { $gallery_image = Ansel::getImageUrl( $gallery->getDefaultImage($style['name']), @@ -56,9 +56,7 @@ class Ansel_Tile_Gallery { $gallery_image = '' . htmlspecialchars($gallery->get('name')) . ''; } } else { - $gallery_image = Horde::img( - $GLOBALS['registry']->getImageDir() . '/thumb-error.png', '', - '', ''); + $gallery_image = Horde::img('thumb-error.png'); } /* Check for being called via the api and generate correct view links */ diff --git a/ansel/lib/View/EmbeddedRenderer/Mini.php b/ansel/lib/View/EmbeddedRenderer/Mini.php index eea439eb0..4ed350dc1 100644 --- a/ansel/lib/View/EmbeddedRenderer/Mini.php +++ b/ansel/lib/View/EmbeddedRenderer/Mini.php @@ -130,7 +130,7 @@ class Ansel_View_EmbeddedRenderer_Mini extends Ansel_View_Gallery EOT; /* Special requirements for lightbox */ if (!empty($lbjsurl)) { - $graphic_dir = Horde::applicationUrl($GLOBALS['registry']->getImageDir(), true, -1); + $graphic_dir = Horde::applicationUrl(Horde_Themes::img(), true, -1); $imageText = _("Photo"); $labelOf = _("of"); $html .= << Horde::applicationUrl($registry->getImageDir(), true, -1), + $jsvars = array('graphics_dir' => Horde::applicationUrl(Horde_Themes::img(), true, -1), 'image_text' => _("Photo"), 'of_text' => _("of"), 'start_page' => $page); diff --git a/ansel/lib/Widget/Actions.php b/ansel/lib/Widget/Actions.php index 8fa97f7d4..7beaf7edf 100644 --- a/ansel/lib/Widget/Actions.php +++ b/ansel/lib/Widget/Actions.php @@ -131,7 +131,7 @@ class Ansel_Widget_Actions extends Ansel_Widget_Base $url = $registry->bookmarks->getAddUrl($api_params); } catch (Horde_Exception $e) {} - $html .= '
  • ' . Horde::link($url, '', 'widget') . Horde::img('trean.png', '', '', $registry->getImageDir('trean')) . ' ' . _("Add to bookmarks") . '
  • '; + $html .= '
  • ' . Horde::link($url, '', 'widget') . Horde::img(Horde_Themes::img('trean.png', 'trean')) . ' ' . _("Add to bookmarks") . '
  • '; } /* Download as ZIP link */ @@ -141,13 +141,13 @@ class Ansel_Widget_Actions extends Ansel_Widget_Base $this->_view->gallery->hasFeature('zipdownload')) { $zip_params = array_merge(array('actionID' => 'downloadzip'), $date); - $html .= '
  • ' . Horde::link(Horde::applicationUrl(Horde_Util::addParameter($galleryurl, $zip_params)), '', 'widget') . Horde::img('mime/compressed.png', '', '', $GLOBALS['registry']->getImageDir('horde')) . ' ' . _("Download as zip file") . '
  • '; + $html .= '
  • ' . Horde::link(Horde::applicationUrl(Horde_Util::addParameter($galleryurl, $zip_params)), '', 'widget') . Horde::img('mime/compressed.png') . ' ' . _("Download as zip file") . '
  • '; } /* Image upload, subgalleries, captions etc... */ if ($this->_view->gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) { /* Properties */ - $html .= '
  • ' . Horde::link(Horde_Util::addParameter($galleryurl, array('actionID' => 'modify', 'url' => $selfurl)), '', 'widget') . Horde::img('edit.png', '', '', $GLOBALS['registry']->getImageDir('horde')) . ' ' . _("Change properties") . '
  • '; + $html .= '
  • ' . Horde::link(Horde_Util::addParameter($galleryurl, array('actionID' => 'modify', 'url' => $selfurl)), '', 'widget') . Horde::img('edit.png') . ' ' . _("Change properties") . '
  • '; if ($count) { /* Captions */ if ($this->_view->gallery->hasFeature('image_captions')) { @@ -162,26 +162,26 @@ class Ansel_Widget_Actions extends Ansel_Widget_Base } /* Regenerate Thumbnails */ - $html .= '
  • ' . Horde::link(Horde_Util::addParameter($galleryurl, array('actionID' => 'generateThumbs')), '', 'widget') . Horde::img('reload.png', '', '', $GLOBALS['registry']->getImageDir('horde')) . ' ' . _("Reset all thumbnails") . '
  • '; + $html .= '
  • ' . Horde::link(Horde_Util::addParameter($galleryurl, array('actionID' => 'generateThumbs')), '', 'widget') . Horde::img('reload.png') . ' ' . _("Reset all thumbnails") . '
  • '; /* Regenerate all views */ - $html .= '
  • ' . Horde::link(Horde_Util::addParameter($galleryurl, array('actionID' => 'deleteCache')), '', 'widget') . Horde::img('reload.png', '', '', $GLOBALS['registry']->getImageDir('horde')) . ' ' . _("Regenerate all photo views") . '
  • '; + $html .= '
  • ' . Horde::link(Horde_Util::addParameter($galleryurl, array('actionID' => 'deleteCache')), '', 'widget') . Horde::img('reload.png') . ' ' . _("Regenerate all photo views") . '
  • '; /* Find faces */ if ($conf['faces']['driver'] && $this->_view->gallery->hasFeature('faces')) { - $html .= '
  • ' . Horde::link(Horde::applicationUrl(Horde_Util::addParameter('faces/gallery.php', array_merge($date, array('gallery' => $id, 'page' => (!empty($this->_view->_params['page']) ? $this->_view->_params['page'] : 0))))), '', 'widget') . Horde::img('user.png','', '', $GLOBALS['registry']->getImageDir('horde')) . ' ' . _("Find faces") . '
  • '; + $html .= '
  • ' . Horde::link(Horde::applicationUrl(Horde_Util::addParameter('faces/gallery.php', array_merge($date, array('gallery' => $id, 'page' => (!empty($this->_view->_params['page']) ? $this->_view->_params['page'] : 0))))), '', 'widget') . Horde::img('user.png') . ' ' . _("Find faces") . '
  • '; } } /* end if ($count) {} */ if (Ansel::isAvailable('photo_stack') && $this->_view->gallery->hasFeature('stacks')) { - $html .= '
  • ' . Horde::link(Horde_Util::addParameter($galleryurl, array('actionID' => 'generateDefault', 'url' => $selfurl)), '', 'widget') . Horde::img('reload.png', '', '', $GLOBALS['registry']->getImageDir('horde')) . ' ' . _("Reset default photo") . '
  • '; + $html .= '
  • ' . Horde::link(Horde_Util::addParameter($galleryurl, array('actionID' => 'generateDefault', 'url' => $selfurl)), '', 'widget') . Horde::img('reload.png') . ' ' . _("Reset default photo") . '
  • '; } } if (Horde_Auth::getAuth() && $this->_view->gallery->get('owner') == Horde_Auth::getAuth()) { - $html .= '
  • ' . 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', '', '', $GLOBALS['registry']->getImageDir('horde')) . ' ' . _("Set permissions") . '
  • '; + $html .= '
  • ' . 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") . '
  • '; } elseif (!empty($conf['report_content']['driver']) && (($conf['report_content']['allow'] == 'authenticated' && Horde_Auth::isAuthenticated()) || $conf['report_content']['allow'] == 'all')) { @@ -192,8 +192,8 @@ class Ansel_Widget_Actions extends Ansel_Widget_Base } if ($this->_view->gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::DELETE)) { - $html .= '
  • ' . Horde::link(Horde_Util::addParameter($galleryurl, 'actionID', 'empty'), '', 'widget') . Horde::img('delete.png', '', '', $GLOBALS['registry']->getImageDir('horde')) . ' ' . _("Delete All Photos") . '
  • '; - $html .= '
  • ' . Horde::link(Horde_Util::addParameter($galleryurl, 'actionID', 'delete'), '', 'widget') . Horde::img('delete.png', '', '', $GLOBALS['registry']->getImageDir('horde')) . ' ' . _("Delete Entire Gallery") . '
  • '; + $html .= '
  • ' . Horde::link(Horde_Util::addParameter($galleryurl, 'actionID', 'empty'), '', 'widget') . Horde::img('delete.png') . ' ' . _("Delete All Photos") . '
  • '; + $html .= '
  • ' . Horde::link(Horde_Util::addParameter($galleryurl, 'actionID', 'delete'), '', 'widget') . Horde::img('delete.png', 'horde') . ' ' . _("Delete Entire Gallery") . '
  • '; } $html .= ''; diff --git a/ansel/lib/Widget/Links.php b/ansel/lib/Widget/Links.php index dc8fb7d27..080859957 100644 --- a/ansel/lib/Widget/Links.php +++ b/ansel/lib/Widget/Links.php @@ -22,9 +22,9 @@ class Ansel_Widget_Links extends Ansel_Widget_Base $feedurl = Horde::url('rss.php', true); $owner = $this->_view->gallery->get('owner'); $html = $this->_htmlBegin(); - $html .= Horde::link(Ansel::getUrlFor('rss_user', array('owner' => $owner))) . Horde::img('feed.png', '', '', $registry->getImageDir('horde')) . ' ' . ($owner ? sprintf(_("Recent photos by %s"), $owner) : _("Recent system photos")) . ''; + $html .= Horde::link(Ansel::getUrlFor('rss_user', array('owner' => $owner))) . Horde::img('feed.png') . ' ' . ($owner ? sprintf(_("Recent photos by %s"), $owner) : _("Recent system photos")) . ''; $slug = $this->_view->gallery->get('slug'); - $html .= '
    ' . Horde::link(Ansel::getUrlFor('rss_gallery', array('gallery' => $this->_view->gallery->id, 'slug' => $slug))) . ' ' . Horde::img('feed.png', '', '', $registry->getImageDir('horde')) . ' ' . sprintf(_("Recent photos in %s"), htmlspecialchars($this->_view->gallery->get('name'), ENT_COMPAT, Horde_Nls::getCharset())) . ''; + $html .= '
    ' . Horde::link(Ansel::getUrlFor('rss_gallery', array('gallery' => $this->_view->gallery->id, 'slug' => $slug))) . ' ' . Horde::img('feed.png') . ' ' . sprintf(_("Recent photos in %s"), htmlspecialchars($this->_view->gallery->get('name'), ENT_COMPAT, Horde_Nls::getCharset())) . ''; /* Embed html */ if (empty($this->_view->_params['image_id'])) { diff --git a/ansel/lib/Widget/Tags.php b/ansel/lib/Widget/Tags.php index ea1a3ba80..65a163564 100644 --- a/ansel/lib/Widget/Tags.php +++ b/ansel/lib/Widget/Tags.php @@ -81,11 +81,11 @@ class Ansel_Widget_Tags extends Ansel_Widget_Base $links = Ansel_Tags::getTagLinks($tags, 'add', $owner); $html = ''; return $html; } -} \ No newline at end of file +} diff --git a/ansel/map_edit.php b/ansel/map_edit.php index bb0b855ed..db4c835a7 100644 --- a/ansel/map_edit.php +++ b/ansel/map_edit.php @@ -75,7 +75,7 @@ $image_tag = 'getUrl(); -$loadingImg = Horde::img('loading.gif', _("Loading..."), '', $registry->getImageDir()); +$loadingImg = Horde::img('loading.gif', _("Loading...")); /* Obtain other geotagged images to possibly locate this image at */ $imgs = $GLOBALS['ansel_storage']->getRecentImagesGeodata(Horde_Auth::getAuth()); diff --git a/ansel/rss.php b/ansel/rss.php index 4b81e0391..3be99289e 100644 --- a/ansel/rss.php +++ b/ansel/rss.php @@ -32,8 +32,7 @@ if (empty($rss)) { 'name' => _("Error retrieving feed"), 'link' => '', 'desc' => _("Unable to retrieve requested feed"), - 'image_url' => Horde::img('alerts/error.png', '', '', - $registry->getImageDir('horde')), + 'image_url' => Horde::img('alerts/error.png'), 'image_link' => '', 'image_alt' => ''); $author = ''; diff --git a/ansel/templates/common-header.inc b/ansel/templates/common-header.inc index 34bb7373f..bccd5a7d7 100644 --- a/ansel/templates/common-header.inc +++ b/ansel/templates/common-header.inc @@ -20,8 +20,7 @@ if (!empty($refresh_time) && ($refresh_time > 0) && !empty($refresh_url)) { Horde::includeScriptFiles(); ?> <?php echo htmlspecialchars($page_title, ENT_COMPAT, Horde_Nls::getCharset()) ?> - - + diff --git a/ansel/templates/faces/define.inc b/ansel/templates/faces/define.inc index ee7b87de9..45b036bbe 100755 --- a/ansel/templates/faces/define.inc +++ b/ansel/templates/faces/define.inc @@ -1,6 +1,6 @@ render('image'); ?>

    - + <?php echo htmlspecialchars($page_title) ?> - - + + diff --git a/kronolith/templates/day/head.inc b/kronolith/templates/day/head.inc index fae90b096..230f63423 100644 --- a/kronolith/templates/day/head.inc +++ b/kronolith/templates/day/head.inc @@ -2,9 +2,9 @@ getTomorrow(); $yesterday = $this->getYesterday(); -echo $this->link(-1)->link(array('title' => _("Previous day"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Day\', \'' . $yesterday->dateString() . '\');')) . Horde::img('nav/left.png', '<', '', $GLOBALS['registry']->getImageDir('horde')) . ''; +echo $this->link(-1)->link(array('title' => _("Previous day"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Day\', \'' . $yesterday->dateString() . '\');')) . Horde::img('nav/left.png', '<') . ''; echo '' . htmlspecialchars($this->getTime($prefs->getValue('date_format'))) . ''; -echo $this->link(1)->link(array('title' => _("Next day"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Day\', \'' . $tomorrow->dateString() . '\');')) . Horde::img('nav/right.png', '>', '', $GLOBALS['registry']->getImageDir('horde')) . ''; +echo $this->link(1)->link(array('title' => _("Next day"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Day\', \'' . $tomorrow->dateString() . '\');')) . Horde::img('nav/right.png', '>') . ''; ?> diff --git a/kronolith/templates/edit/edit.inc b/kronolith/templates/edit/edit.inc index f7e55cc14..96c615177 100644 --- a/kronolith/templates/edit/edit.inc +++ b/kronolith/templates/edit/edit.inc @@ -156,7 +156,7 @@ if ($event->alarm) { ?> @@ -221,7 +221,7 @@ if ($event->alarm) { @@ -234,7 +234,7 @@ if ($event->alarm) { @@ -248,7 +248,7 @@ if ($event->alarm) { @@ -265,7 +265,7 @@ if ($event->alarm) { @@ -357,7 +357,7 @@ if ($event->alarm) { @@ -392,7 +392,7 @@ endif; diff --git a/kronolith/templates/edit/edit_timespan.inc b/kronolith/templates/edit/edit_timespan.inc index 3c6d9518b..c0d25b13d 100644 --- a/kronolith/templates/edit/edit_timespan.inc +++ b/kronolith/templates/edit/edit_timespan.inc @@ -26,7 +26,7 @@ @@ -76,7 +76,7 @@ diff --git a/kronolith/templates/edit/javascript.inc b/kronolith/templates/edit/javascript.inc index c6745328a..7a0125207 100644 --- a/kronolith/templates/edit/javascript.inc +++ b/kronolith/templates/edit/javascript.inc @@ -256,7 +256,7 @@ Event.observe(window, 'load', function() { KronolithEventForm.toggleSection = function(section) { - var dir = 'getImageDir() ?>'; + var dir = ''; if (!$('section_' + section)) { return; } diff --git a/kronolith/templates/index/index.inc b/kronolith/templates/index/index.inc index 8bc7863ff..8dba54e66 100644 --- a/kronolith/templates/index/index.inc +++ b/kronolith/templates/index/index.inc @@ -86,7 +86,7 @@ " default="" /> - +
    @@ -159,7 +159,7 @@
    getImageDir('horde')); +$img_blank = Horde::img('blank.gif', '', array('height' => 8, 'width' => 8)); require dirname(__FILE__) . '/month.inc'; require dirname(__FILE__) . '/week.inc'; require dirname(__FILE__) . '/day.inc'; diff --git a/kronolith/templates/month/head.inc b/kronolith/templates/month/head.inc index 6cca9b0a9..dd7cfc48b 100644 --- a/kronolith/templates/month/head.inc +++ b/kronolith/templates/month/head.inc @@ -2,9 +2,9 @@ getMonth(-1); $next = $this->getMonth(1); -echo $this->link(-1)->link(array('title' => _("Last Month"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Month\', \'' . $prev->dateString() . '\');')) . Horde::img('nav/left.png', '<', '', $GLOBALS['registry']->getImageDir('horde')) . ''; +echo $this->link(-1)->link(array('title' => _("Last Month"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Month\', \'' . $prev->dateString() . '\');')) . Horde::img('nav/left.png', '<') . ''; echo '' . htmlspecialchars($this->date->strftime('%B %Y')) . ''; -echo $this->link(1)->link(array('title' => _("Next Month"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Month\', \'' . $next->dateString() . '\');')) . Horde::img('nav/right.png', '>', '', $GLOBALS['registry']->getImageDir('horde')) . ''; +echo $this->link(1)->link(array('title' => _("Next Month"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Month\', \'' . $next->dateString() . '\');')) . Horde::img('nav/right.png', '>') . ''; ?> diff --git a/kronolith/templates/month/head_side_by_side.inc b/kronolith/templates/month/head_side_by_side.inc index 44e1a6a7c..b88f0dea2 100644 --- a/kronolith/templates/month/head_side_by_side.inc +++ b/kronolith/templates/month/head_side_by_side.inc @@ -2,9 +2,9 @@ getMonth(-1); $next = $this->getMonth(1); -echo $this->link(-1)->link(array('title' => _("Last Month"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Month\', \'' . $prev->dateString() . '\');')) . Horde::img('nav/left.png', '<', '', $GLOBALS['registry']->getImageDir('horde')) . ''; +echo $this->link(-1)->link(array('title' => _("Last Month"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Month\', \'' . $prev->dateString() . '\');')) . Horde::img('nav/left.png', '<') . ''; echo htmlspecialchars($this->date->strftime('%B %Y')); -echo $this->link(1)->link(array('title' => _("Next Month"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Month\', \'' . $next->dateString() . '\');')) . Horde::img('nav/right.png', '>', '', $GLOBALS['registry']->getImageDir('horde')) . ''; +echo $this->link(1)->link(array('title' => _("Next Month"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Month\', \'' . $next->dateString() . '\');')) . Horde::img('nav/right.png', '>') . ''; ?> diff --git a/kronolith/templates/panel.inc b/kronolith/templates/panel.inc index 64aa186e2..80bc4621c 100644 --- a/kronolith/templates/panel.inc +++ b/kronolith/templates/panel.inc @@ -11,7 +11,7 @@ Horde::addScriptFile('QuickFinder.js', 'horde'); Horde::addScriptFile('redbox.js', 'horde'); Horde::addScriptFile('calendar-panel.js', 'kronolith'); -$info_img = Horde::img('info_icon.png', _("Calendar Information"), array('class' => 'calendar-info'), $registry->getImageDir('horde')); +$info_img = Horde::img('info_icon.png', _("Calendar Information"), array('class' => 'calendar-info')); $current_user = Horde_Auth::getAuth(); $my_calendars = array(); @@ -89,7 +89,7 @@ $tagger = Kronolith::getTagger(); echo htmlspecialchars($tag); if ($cal->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) { echo '' - . Horde::img('delete-small.png', _("Remove Tag"), '', $registry->getImageDir('horde')) + . Horde::img('delete-small.png', _("Remove Tag")) . ''; } $ta = Horde_Ajax_Imple::factory(array('kronolith', 'TagActions'), diff --git a/kronolith/templates/perms/perms.inc b/kronolith/templates/perms/perms.inc index 6d31436e6..c66374663 100644 --- a/kronolith/templates/perms/perms.inc +++ b/kronolith/templates/perms/perms.inc @@ -6,9 +6,9 @@
    @@ -19,7 +19,7 @@ @@ -47,7 +47,7 @@ @@ -130,7 +130,7 @@ @@ -171,7 +171,7 @@ @@ -288,7 +288,7 @@ foreach ($userList as $user) { diff --git a/kronolith/templates/prefs/sourceselect.inc b/kronolith/templates/prefs/sourceselect.inc index 828a4ba24..774d5eb96 100644 --- a/kronolith/templates/prefs/sourceselect.inc +++ b/kronolith/templates/prefs/sourceselect.inc @@ -305,9 +305,9 @@ function changeSearchFields()
    - 'toggle_alarm'), $GLOBALS['registry']->getImageDir('horde')) . ' ' . Horde::label('alarm', _("_Alarm")) ?> + 'toggle_alarm')) . ' ' . Horde::label('alarm', _("_Alarm")) ?>
    - 'toggle_description'), $GLOBALS['registry']->getImageDir('horde')) . ' ' . Horde::label('description', _("Descri_ption")) ?> + 'toggle_description')) . ' ' . Horde::label('description', _("Descri_ption")) ?> description), 0, 80)) ?>
    - 'toggle_url'), $GLOBALS['registry']->getImageDir('horde')) . ' ' . Horde::label('url', _("URL")) ?> + 'toggle_url')) . ' ' . Horde::label('url', _("URL")) ?> url) ?>
    - 'toggle_attendees'), $GLOBALS['registry']->getImageDir('horde')) . ' ' . _("Attendees and Resources") ?> + 'toggle_attendees')) . ' ' . _("Attendees and Resources") ?>
    - 'toggle_recurrence'), $GLOBALS['registry']->getImageDir('horde')) . ' ' . _("Recurrence") ?> + 'toggle_recurrence')) . ' ' . _("Recurrence") ?> getRecurName(); if ($event->recurs()) echo $event->recurrence->hasRecurEnd() ? sprintf(_(" until %s"), $event->recurrence->recurEnd->strftime($GLOBALS['prefs']->getValue('date_format')) . ($this->event->recurrence->recurEnd->hour == 23 && $this->event->recurrence->recurEnd->min == 59 ? '' : ' ' . $this->event->recurrence->recurEnd->format($GLOBALS['prefs']->getValue('twentyFour') ? 'G:i' : 'g:ia'))) : ($event->recurrence->getRecurCount() ? sprintf(_(", %d times"), $event->recurrence->getRecurCount()) : _(" without end")) ?>
    false)); -echo Horde::url('#')->link(array('title' => _("Select a date"), 'onclick' => 'openCalendar(\'recur_endimg\', \'recur_end\', \'' . addslashes($event->js('recur_end')) . '\'); return false;')) . Horde::img('calendar.png', _("Set recurrence end date"), 'id="recur_endimg"', $GLOBALS['registry']->getImageDir('horde')) . ''; +echo Horde::url('#')->link(array('title' => _("Select a date"), 'onclick' => 'openCalendar(\'recur_endimg\', \'recur_end\', \'' . addslashes($event->js('recur_end')) . '\'); return false;')) . Horde::img('calendar.png', _("Set recurrence end date"), 'id="recur_endimg"') . ''; endif; ?>
    - 'toggle_tags'), $GLOBALS['registry']->getImageDir('horde')) . ' ' . _("Tags") ?> + 'toggle_tags')) . ' ' . _("Tags") ?>
    false)); ?> - link(array('title' => _("Select a date"), 'onclick' => 'openCalendar(\'startimg\', \'start\', \'' . addslashes($event->js('start')) . '\'); return false;')) . Horde::img('calendar.png', _("Set start date"), 'id="startimg"', $GLOBALS['registry']->getImageDir('horde')) . ''; endif; ?> + link(array('title' => _("Select a date"), 'onclick' => 'openCalendar(\'startimg\', \'start\', \'' . addslashes($event->js('start')) . '\'); return false;')) . Horde::img('calendar.png', _("Set start date"), 'id="startimg"') . ''; endif; ?>
    false)); -echo Horde::url('#')->link(array('title' => _("Select a date"), 'onclick' => 'openCalendar(\'endimg\', \'end\', \'' . addslashes($event->js('end')) . '\'); return false;')) . Horde::img('calendar.png', _("Set end date"), 'id="endimg"', $GLOBALS['registry']->getImageDir('horde')) . ''; +echo Horde::url('#')->link(array('title' => _("Select a date"), 'onclick' => 'openCalendar(\'endimg\', \'end\', \'' . addslashes($event->js('end')) . '\'); return false;')) . Horde::img('calendar.png', _("Set end date"), array('id' => 'endimg')) . ''; endif; ?>
    - getImageDir('horde')) ?> + - getImageDir('horde')) . ' ' . sprintf(_("Edit permissions for %s"), htmlspecialchars($share->get('name'))) . ' ' . Horde_Help::link('kronolith', 'shares') ?> + get('name'))) . ' ' . Horde_Help::link('kronolith', 'shares') ?>
     
    - getImageDir('horde')) . ' ' . _("Owner") ?> +
    - getImageDir('horde')) . ' ' . _("All Authenticated Users") ?> +
    - getImageDir('horde')) . ' ' . _("Object Creator") ?> +
    - getImageDir('horde')) . ' ' . _("Individual Users") ?> +
    - getImageDir('horde')) . ' ' . _("Groups") ?> + - getImageDir('horde')) ?> +
    - getImageDir('horde')) ?> +
    @@ -317,9 +317,9 @@ function changeSearchFields() - getImageDir('horde')) ?> +
    - getImageDir('horde')) ?> +
    diff --git a/kronolith/templates/week/head.inc b/kronolith/templates/week/head.inc index 95eaf06ae..aae93b362 100644 --- a/kronolith/templates/week/head.inc +++ b/kronolith/templates/week/head.inc @@ -3,9 +3,9 @@ $currentView = $this instanceof Kronolith_View_WorkWeek ? 'WorkWeek' : 'Week'; $prev = $this->getWeek(-1); $next = $this->getWeek(1); -echo $this->link(-1)->link(array('title' => _("Last week"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'' . $currentView . '\', \'' . $prev->dateString() . '\');')) . Horde::img('nav/left.png', '<', '', $GLOBALS['registry']->getImageDir('horde')) . ''; +echo $this->link(-1)->link(array('title' => _("Last week"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'' . $currentView . '\', \'' . $prev->dateString() . '\');')) . Horde::img('nav/left.png', '<') . ''; echo '' . htmlspecialchars($this->days[$this->startDay]->getTime($prefs->getValue('date_format')) . ' - ' . $this->days[$this->endDay]->getTime($prefs->getValue('date_format'))) . ''; -echo $this->link(1)->link(array('title' => _("Next week"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'' . $currentView . '\', \'' . $next->dateString() . '\');')) . Horde::img('nav/right.png', '>', '', $GLOBALS['registry']->getImageDir('horde')) . ''; +echo $this->link(1)->link(array('title' => _("Next week"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'' . $currentView . '\', \'' . $next->dateString() . '\');')) . Horde::img('nav/right.png', '>') . ''; ?> diff --git a/kronolith/templates/year/head.inc b/kronolith/templates/year/head.inc index e3fa8a769..40d1019a4 100644 --- a/kronolith/templates/year/head.inc +++ b/kronolith/templates/year/head.inc @@ -1,7 +1,7 @@

    link(-1)->link(array('title' => _("Last Year"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Year\', \'' . sprintf('%04d', $this->year - 1) . '0101\');')) . Horde::img('nav/left.png', '<', '', $GLOBALS['registry']->getImageDir('horde')) . ''; +echo $this->link(-1)->link(array('title' => _("Last Year"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Year\', \'' . sprintf('%04d', $this->year - 1) . '0101\');')) . Horde::img('nav/left.png', '<') . ''; echo '' . htmlspecialchars($this->year) . ''; -echo $this->link(1)->link(array('title' => _("Next Year"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Year\', \'' . sprintf('%04d', $this->year + 1) . '0101\');')) . Horde::img('nav/right.png', '>', '', $GLOBALS['registry']->getImageDir('horde')) . ''; +echo $this->link(1)->link(array('title' => _("Next Year"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Year\', \'' . sprintf('%04d', $this->year + 1) . '0101\');')) . Horde::img('nav/right.png', '>') . ''; ?>

    diff --git a/kronolith/themes/silver/themed_graphics b/kronolith/themes/silver/themed_graphics deleted file mode 100644 index e69de29bb..000000000 diff --git a/kronolith/themes/tango-blue/themed_graphics b/kronolith/themes/tango-blue/themed_graphics deleted file mode 100644 index e69de29bb..000000000 diff --git a/nag/lib/Api.php b/nag/lib/Api.php index 93c6632bf..588344523 100644 --- a/nag/lib/Api.php +++ b/nag/lib/Api.php @@ -214,8 +214,7 @@ class Nag_Api extends Horde_Registry_Api $results['nag/' . $owner]['name'] = $owner; } if (in_array('icon', $properties)) { - $results['nag/' . $owner]['icon'] = - $registry->getImageDir('horde') . '/user.png'; + $results['nag/' . $owner]['icon'] = Horde_Themes::img('user.png'); } if (in_array('browseable', $properties)) { $results['nag/' . $owner]['browseable'] = true; @@ -259,8 +258,8 @@ class Nag_Api extends Horde_Registry_Api $results[$retpath . '.ics']['name'] = $tasklist->get('name'); } if (in_array('icon', $properties)) { - $results[$retpath]['icon'] = $registry->getImageDir() . '/nag.png'; - $results[$retpath . '.ics']['icon'] = $registry->getImageDir() . '/mime/icalendar.png'; + $results[$retpath]['icon'] = Horde_Themes::img('nag.png'); + $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); @@ -318,7 +317,7 @@ class Nag_Api extends Horde_Registry_Api return $result; } - $icon = $registry->getImageDir() . '/nag.png'; + $icon = Horde_Themes::img('nag.png'); $results = array(); $storage->tasks->reset(); while ($task = $storage->tasks->each()) { diff --git a/nag/lib/Block/summary.php b/nag/lib/Block/summary.php index b7b20a999..42b52af28 100644 --- a/nag/lib/Block/summary.php +++ b/nag/lib/Block/summary.php @@ -182,8 +182,7 @@ class Horde_Block_nag_summary extends Horde_Block { $label = sprintf(_("Edit \"%s\""), $task->name); $html .= '' . Horde::link(htmlspecialchars(Horde::applicationUrl(Horde_Util::addParameter($taskurl, 'actionID', 'modify_task'), true)), $label) - . Horde::img('edit.png', $label, null, - $registry->getImageDir('horde')) + . Horde::img('edit.png', $label) . ''; if ($task->completed) { $html .= '' diff --git a/nag/lib/Block/tree_alarms.php b/nag/lib/Block/tree_alarms.php index 7a17dff01..e31610ce6 100644 --- a/nag/lib/Block/tree_alarms.php +++ b/nag/lib/Block/tree_alarms.php @@ -47,7 +47,7 @@ class Horde_Block_nag_tree_alarms extends Horde_Block { $indent + 1, false, array('icon' => 'alarm.png', - 'icondir' => $GLOBALS['registry']->getImageDir(), + 'icondir' => Horde_Themes::img(), 'title' => $title, 'url' => $url)); } diff --git a/nag/lib/Block/tree_menu.php b/nag/lib/Block/tree_menu.php index 844b66708..db78fbe08 100644 --- a/nag/lib/Block/tree_menu.php +++ b/nag/lib/Block/tree_menu.php @@ -14,8 +14,8 @@ class Horde_Block_nag_tree_menu extends Horde_Block { { global $registry; - $add = Horde::applicationUrl('task.php?actionID=add_task'); - $icondir = $registry->getImageDir(); + $add = Horde::applicationUrl('task.php')->add('actionID', 'add_task'); + $icondir = Horde_Themes::img(); $tree->addNode($parent . '__new', $parent, @@ -48,7 +48,7 @@ class Horde_Block_nag_tree_menu extends Horde_Block { $indent + 1, false, array('icon' => 'search.png', - 'icondir' => $registry->getImageDir('horde'), + 'icondir' => Horde_Themes::img(null, 'horde'), 'url' => Horde::applicationUrl('search.php'))); } diff --git a/nag/lib/Nag.php b/nag/lib/Nag.php index 1720aeec9..470f9e0dd 100644 --- a/nag/lib/Nag.php +++ b/nag/lib/Nag.php @@ -760,11 +760,11 @@ class Nag } /* Search. */ - $menu->add(Horde::applicationUrl('search.php'), _("_Search"), 'search.png', $registry->getImageDir('horde')); + $menu->add(Horde::applicationUrl('search.php'), _("_Search"), 'search.png', Horde_Themes::img(null, 'horde')); /* Import/Export. */ if ($conf['menu']['import_export']) { - $menu->add(Horde::applicationUrl('data.php'), _("_Import/Export"), 'data.png', $registry->getImageDir('horde')); + $menu->add(Horde::applicationUrl('data.php'), _("_Import/Export"), 'data.png', Horde_Themes::img(null, 'horde')); } return $menu; diff --git a/nag/lib/Task.php b/nag/lib/Task.php index ae5026f60..4b9975631 100644 --- a/nag/lib/Task.php +++ b/nag/lib/Task.php @@ -539,7 +539,7 @@ class Nag_Task { */ function treeIcons() { - $treedir = $GLOBALS['registry']->getImageDir('horde'); + $treedir = Horde_Themes::img(null, 'horde'); $html = ''; $parent = $this->parent; @@ -751,11 +751,11 @@ class Nag_Task { if (!empty($methods['notify']['sound'])) { if ($methods['notify']['sound'] == 'on') { // Handle boolean sound preferences; - $methods['notify']['sound'] = $GLOBALS['registry']->get('themesuri') . '/sounds/theetone.wav'; + $methods['notify']['sound'] = Horde_Themes::sound('theetone.wav'); } else { // Else we know we have a sound name that can be // served from Horde. - $methods['notify']['sound'] = $GLOBALS['registry']->get('themesuri', 'horde') . '/sounds/' . $methods['notify']['sound']; + $methods['notify']['sound'] = Horde_Themes::sound($methods['notify']['sound']); } } } diff --git a/nag/lib/Ui/VarRenderer/Nag.php b/nag/lib/Ui/VarRenderer/Nag.php index 2a893c8ca..cc30da360 100644 --- a/nag/lib/Ui/VarRenderer/Nag.php +++ b/nag/lib/Ui/VarRenderer/Nag.php @@ -107,7 +107,7 @@ class Horde_Ui_VarRenderer_Nag extends Horde_Ui_VarRenderer_Html hasFeature('javascript')) { Horde::addScriptFile('open_calendar.js', 'horde', array('direct' => false)); echo ''; -echo Horde::link('#', _("Select a date"), '', '', 'openCalendar(\'startimg\', \'start\', \'document.' . $form->getName() . '.start_date[1].checked = true;\'); return false;') . Horde::img('calendar.png', _("Calendar"), 'align="top" id="startimg"', $GLOBALS['registry']->getImageDir('horde')) . ''; +echo Horde::link('#', _("Select a date"), '', '', 'openCalendar(\'startimg\', \'start\', \'document.' . $form->getName() . '.start_date[1].checked = true;\'); return false;') . Horde::img('calendar.png', _("Calendar"), 'align="top" id="startimg"') . ''; } ?> buildDayWidget('due[day]', $due_date['mday'], $javascript_due) . ' ' . $this->buildMonthWidget('due[month]', $due_date['mon'], $javascript_due) . ' ' . $this->buildYearWidget('due[year]', 3, $due_date['year'], $javascript_due) ?> hasFeature('javascript')) { echo ''; -echo Horde::link('#', _("Select a date"), '', '', 'openCalendar(\'dueimg\', \'due\', \'document.' . $form->getName() . '.due_type[1].checked = true;\'); return false;') . Horde::img('calendar.png', _("Calendar"), 'align="top" id="dueimg"', $GLOBALS['registry']->getImageDir('horde')) . ''; +echo Horde::link('#', _("Select a date"), '', '', 'openCalendar(\'dueimg\', \'due\', \'document.' . $form->getName() . '.due_type[1].checked = true;\'); return false;') . Horde::img('calendar.png', _("Calendar"), 'align="top" id="dueimg"') . ''; } ?>
    diff --git a/nag/tasklists/index.php b/nag/tasklists/index.php index 403fd8a61..2e2b0984d 100644 --- a/nag/tasklists/index.php +++ b/nag/tasklists/index.php @@ -56,9 +56,9 @@ if (Horde_Auth::isAdmin()) { } asort($sorted_tasklists); -$edit_img = Horde::img('edit.png', _("Edit"), null, $registry->getImageDir('horde')); -$perms_img = Horde::img('perms.png', _("Change Permissions"), null, $registry->getImageDir('horde')); -$delete_img = Horde::img('delete.png', _("Delete"), null, $registry->getImageDir('horde')); +$edit_img = Horde::img('edit.png', _("Edit")); +$perms_img = Horde::img('perms.png', _("Change Permissions")); +$delete_img = Horde::img('delete.png', _("Delete")); Horde::addScriptFile('tables.js', 'horde'); $title = _("Manage Task Lists"); diff --git a/nag/templates/common-header.inc b/nag/templates/common-header.inc index af51d8348..9bd72bacb 100644 --- a/nag/templates/common-header.inc +++ b/nag/templates/common-header.inc @@ -23,8 +23,8 @@ $bc = $prefs->getValue('show_panel') ?> <?php echo htmlspecialchars($page_title) ?> - - + + diff --git a/nag/templates/list/header.inc b/nag/templates/list/header.inc index 469f4f837..143a10b57 100644 --- a/nag/templates/list/header.inc +++ b/nag/templates/list/header.inc @@ -1,6 +1,6 @@
    count() . ')' ?> - " onclick="$('quicksearchL').hide(); $('quicksearch').show(); $('quicksearchT').focus(); return false;">getImageDir('horde')) ?> + " onclick="$('quicksearchL').hide(); $('quicksearch').show(); $('quicksearchT').focus(); return false;"> diff --git a/wicked/templates/edit/standard.inc b/wicked/templates/edit/standard.inc index 7addca6ae..b228e61be 100644 --- a/wicked/templates/edit/standard.inc +++ b/wicked/templates/edit/standard.inc @@ -25,7 +25,7 @@ function preview() " class="button" /> " class="button" onclick="preview()" /> - getImageDir('horde')) ?> +
    diff --git a/wicked/templates/history/header.inc b/wicked/templates/history/header.inc index 7430ba824..feb75e64d 100644 --- a/wicked/templates/history/header.inc +++ b/wicked/templates/history/header.inc @@ -5,7 +5,7 @@

    pageUrl()) . htmlspecialchars($this->pageName()) . ''); - echo Horde::link($this->pageUrl('history.php')) . Horde::img('reload.png', _("Reload History"), '', $GLOBALS['registry']->getImageDir('horde')) ?> + echo Horde::link($this->pageUrl('history.php')) . Horde::img('reload.png', _("Reload History")) ?>

    @@ -13,9 +13,9 @@ allows(WICKED_MODE_REMOVE)): ?> - + allows(WICKED_MODE_EDIT)): ?> - + diff --git a/wicked/templates/history/summary.inc b/wicked/templates/history/summary.inc index b9d330219..6ede924a2 100644 --- a/wicked/templates/history/summary.inc +++ b/wicked/templates/history/summary.inc @@ -6,7 +6,7 @@ $text = sprintf(_("Delete Version %s"), $page->version()); $url = Horde_Util::addParameter(Wicked::url('DeletePage'), array('referrer' => $page->pageName(), 'version' => $page->version())); -echo Horde::link($url, $text) . Horde::img('delete.png', $text, '', $GLOBALS['registry']->getImageDir('horde')) . ''; +echo Horde::link($url, $text) . Horde::img('delete.png', $text) . ''; ?> allows(WICKED_MODE_EDIT)): ?> @@ -15,7 +15,7 @@ echo Horde::link($url, $text) . Horde::img('delete.png', $text, '', $GLOBALS['re if ($show_edit) { $text = sprintf(_("Edit Version %s"), $page->version()); $url = Horde_Util::addParameter(Wicked::url('EditPage'), array('referrer' => $page->pageName())); - echo Horde::link($url, $text) . Horde::img('edit.png', $text, '', $GLOBALS['registry']->getImageDir('horde')) . ''; + echo Horde::link($url, $text) . Horde::img('edit.png', $text) . ''; } ?> -- 2.11.0
    getImageDir('horde')) ?> getImageDir('horde')) ?>