Add Horde_Themes:: library.
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 8 Mar 2010 03:15:31 +0000 (20:15 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 9 Mar 2010 03:12:50 +0000 (20:12 -0700)
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).

300 files changed:
agora/lib/Agora.php
agora/lib/Messages.php
agora/templates/common-header.inc
ansel/faces/gallery.php
ansel/faces/image.php
ansel/lib/Ajax/Imple/EditFaces.php
ansel/lib/Ajax/Imple/TagActions.php
ansel/lib/Ansel.php
ansel/lib/Api.php
ansel/lib/Block/random_photo.php
ansel/lib/Tags.php
ansel/lib/Tile/DateGallery.php
ansel/lib/Tile/Gallery.php
ansel/lib/View/EmbeddedRenderer/Mini.php
ansel/lib/View/GalleryRenderer/GalleryLightbox.php
ansel/lib/Widget/Actions.php
ansel/lib/Widget/Links.php
ansel/lib/Widget/Tags.php
ansel/map_edit.php
ansel/rss.php
ansel/templates/common-header.inc
ansel/templates/faces/define.inc
ansel/templates/faces/index.inc
ansel/templates/gallery/gallery.inc
ansel/templates/group/header.inc
ansel/templates/image/crop_image.inc
ansel/templates/image/edit_image.inc
ansel/templates/image/preview_cropimage.inc
ansel/templates/image/preview_image.inc
ansel/templates/image/resize_image.inc
ansel/templates/image/upload.inc
ansel/templates/list/header.inc
ansel/templates/view/image.inc
ansel/templates/view/list.inc
ansel/templates/view/slideshow.inc
ansel/themes/silver/themed_graphics [deleted file]
ansel/themes/tango-blue/themed_graphics [deleted file]
ansel/xppublish.php
babel/lib/Display.php
babel/templates/common-header.inc
beatnik/lib/Beatnik.php
beatnik/listzones.php
beatnik/templates/common-header.inc
beatnik/templates/listzones/header.inc
beatnik/templates/menu.inc
beatnik/viewzone.php
chora/lib/Block/tree_menu.php
chora/templates/checkout/checkout.inc
chora/templates/common-header.inc
chora/templates/diff/hr/header.inc
chora/themes/silver/themed_graphics [deleted file]
crumb/lib/Crumb.php
crumb/templates/common-header.inc
fima/ledgers/index.php
fima/lib/Block/tree_menu.php
fima/lib/Fima.php
fima/postings.php
fima/templates/accounts/accounts.inc
fima/templates/common-header.inc
fima/templates/postings/header.inc
fima/templates/postings/posting_headers.inc
fima/templates/reports/table.inc
fima/templates/search/search.inc
fima/themes/silver/themed_graphics [deleted file]
folks/edit/activity.php
folks/edit/friends/blacklist.php
folks/edit/friends/for.php
folks/edit/friends/friends.php
folks/edit/friends/from.php
folks/edit/friends/groups.php
folks/edit/friends/index.php
folks/edit/friends/know.php
folks/edit/friends/of.php
folks/lib/Folks.php
folks/templates/common-header.inc
folks/templates/edit/activity.php
folks/templates/edit/header.php
folks/templates/feed/activities.php
folks/templates/feed/feed.php
folks/templates/list/list.php
folks/templates/list/search.php
folks/templates/services/services.php
folks/templates/user/actions.php
folks/templates/user/authenticated.php
folks/templates/user/deleted.php
folks/templates/user/friends.php
folks/templates/user/inactive.php
folks/templates/user/private.php
folks/templates/user/user.php
framework/Ajax/lib/Horde/Ajax/Imple/AutoCompleter.php
framework/Block/lib/Horde/Block/Layout.php
framework/Block/lib/Horde/Block/Layout/Manager.php
framework/Core/lib/Horde.php
framework/Core/lib/Horde/Core/Notification/Status.php
framework/Core/lib/Horde/Help.php
framework/Core/lib/Horde/Menu.php
framework/Core/lib/Horde/Registry.php
framework/Core/lib/Horde/Themes.php [new file with mode: 0644]
framework/Core/lib/Horde/Themes/Element.php [new file with mode: 0644]
framework/Core/lib/Horde/Themes/Image.php [new file with mode: 0644]
framework/Core/lib/Horde/Themes/Sound.php [new file with mode: 0644]
framework/Core/package.xml
framework/Form/Form/Renderer.php
framework/Form/Form/Type.php
framework/Mime/lib/Horde/Mime/Viewer.php
framework/Model/lib/Horde/Form/VarRenderer/Xhtml.php
framework/Nls/lib/Horde/Nls.php
framework/Perms/lib/Horde/Perms/Ui.php
framework/Text_Filter/lib/Horde/Text/Filter/Emoticons.php
framework/Tree/lib/Horde/Tree.php
framework/Ui/lib/Horde/Ui/VarRenderer/Html.php
gollem/lib/Block/tree_menu.php
gollem/lib/Gollem.php
gollem/manager.php
gollem/selectlist.php
gollem/templates/common-header.inc
gollem/templates/prefs/columnselect.inc
gollem/themes/silver/themed_graphics [deleted file]
horde/admin/groups.php
horde/admin/sessions.php
horde/admin/setup/index.php
horde/services/help/index.php
horde/services/portal/cloud_search.php
horde/services/portal/sidebar.php
horde/templates/admin/menu.inc
horde/templates/common-header.inc
horde/templates/index/frames_index.inc
horde/templates/javascript/open_html_helper.js
horde/templates/menu/menu.inc
horde/templates/prefs/alarm.inc
horde/templates/prefs/categorymanagement.inc
horde/templates/shares/edit.inc
horde/themes/silver/themed_graphics [deleted file]
horde/themes/tango-blue/themed_graphics [deleted file]
horde/util/icon_browser.php
hylax/folder.php
hylax/lib/Hylax.php
hylax/templates/common-header.inc
imp/config/hooks.php.dist
imp/lib/Ajax/Application.php
imp/lib/Block/tree_folders.php
imp/lib/Contents.php
imp/lib/IMP.php
imp/lib/Imap/Tree.php
imp/lib/Mime/Viewer/Html.php
imp/lib/Mime/Viewer/Images.php
imp/lib/Mime/Viewer/Itip.php
imp/lib/Mime/Viewer/Mdn.php
imp/lib/Mime/Viewer/Partial.php
imp/lib/Mime/Viewer/Pdf.php
imp/lib/Mime/Viewer/Pgp.php
imp/lib/Mime/Viewer/Plain.php
imp/lib/Mime/Viewer/Smime.php
imp/lib/Mime/Viewer/Status.php
imp/lib/Notification/Event/Status.php
imp/mailbox.php
imp/message.php
imp/saveimage.php
imp/templates/common-header.inc
imp/templates/index/index-dimp.inc
imp/templates/prefs/flagmanagement.inc
imp/templates/prefs/soundselect.inc
imp/templates/prefs/sourceselect.inc
imp/themes/silver/themed_graphics [deleted file]
imp/themes/tango-blue/themed_graphics [deleted file]
imp/thread.php
imp/view.php
ingo/filters.php
ingo/lib/Ingo.php
ingo/templates/common-header.inc
ingo/templates/rule/filter.inc
ingo/themes/silver/themed_graphics [deleted file]
ingo/themes/tango-blue/themed_graphics [deleted file]
jeta/templates/common-header.inc
kastalia/lib/Block/tree_menu.php
kastalia/lib/Kastalia.php
kastalia/templates/common-header.inc
koward/lib/Koward/Controller/Application.php
koward/lib/Koward/Controller/ObjectController.php
koward/lib/Koward/View/Object/listall.html.php
koward/lib/Koward/View/Object/search.html.php
koward/lib/Koward/View/shared/_header.html.php
koward/www/htdocs/horde/themes/silver/themed_graphics [deleted file]
kronolith/attendees.php
kronolith/calendars/index.php
kronolith/feed/index.php
kronolith/index.php
kronolith/lib/Ajax/Imple/TagActions.php
kronolith/lib/Api.php
kronolith/lib/Block/tree_alarms.php
kronolith/lib/Block/tree_menu.php
kronolith/lib/Event.php
kronolith/lib/FreeBusy/View/Day.php
kronolith/lib/FreeBusy/View/Month.php
kronolith/lib/FreeBusy/View/Week.php
kronolith/lib/Kronolith.php
kronolith/resources/groups/index.php
kronolith/resources/index.php
kronolith/templates/attendees/attendees.inc
kronolith/templates/chunks/calendar.php
kronolith/templates/common-header.inc
kronolith/templates/day/head.inc
kronolith/templates/edit/edit.inc
kronolith/templates/edit/edit_timespan.inc
kronolith/templates/edit/javascript.inc
kronolith/templates/index/index.inc
kronolith/templates/month/head.inc
kronolith/templates/month/head_side_by_side.inc
kronolith/templates/panel.inc
kronolith/templates/perms/perms.inc
kronolith/templates/prefs/sourceselect.inc
kronolith/templates/week/head.inc
kronolith/templates/year/head.inc
kronolith/themes/silver/themed_graphics [deleted file]
kronolith/themes/tango-blue/themed_graphics [deleted file]
nag/lib/Api.php
nag/lib/Block/summary.php
nag/lib/Block/tree_alarms.php
nag/lib/Block/tree_menu.php
nag/lib/Nag.php
nag/lib/Task.php
nag/lib/Ui/VarRenderer/Nag.php
nag/tasklists/index.php
nag/templates/common-header.inc
nag/templates/list/header.inc
nag/templates/list/task_headers.inc
nag/templates/list/task_summaries.inc
nag/templates/panel.inc
nag/themes/silver/themed_graphics [deleted file]
nag/themes/tango-blue/themed_graphics [deleted file]
news/admin/categories/index.php
news/admin/sources/index.php
news/diff.php
news/edit.php
news/lib/Categories.php
news/lib/News.php
news/reads.php
news/templates/common-header.inc
news/templates/news/mail.php
news/templates/news/today.php
news/templates/news/tools.php
operator/lib/Operator.php
operator/templates/common-header.inc
operator/themes/silver/themed_graphics [deleted file]
shout/templates/common-header.inc
shout/templates/dialplan/edit.inc
shout/templates/extensions/list.inc
skeleton/lib/Skeleton.php
skeleton/templates/common-header.inc
skoli/classes/index.php
skoli/lib/Block/tree_menu.php
skoli/lib/Skoli.php
skoli/list.php
skoli/templates/common-header.inc
skoli/templates/list/classes.inc
skoli/templates/list/header.inc
skoli/templates/list/headers.inc
skoli/templates/list/students.inc
skoli/templates/search/entries.inc
skoli/templates/search/header.inc
skoli/templates/search/headers.inc
timeobjects/lib/Driver/Weatherdotcom.php
turba/addressbooks/index.php
turba/contact.php
turba/lib/Api.php
turba/lib/Block/tree_menu.php
turba/lib/ListView.php
turba/lib/Object.php
turba/lib/Turba.php
turba/templates/block/minisearch.inc
turba/templates/browse/column_headers.inc
turba/templates/browse/header.inc
turba/templates/browse/row.inc
turba/templates/common-header.inc
turba/templates/prefs/addressbookselect.inc
turba/themes/silver/themed_graphics [deleted file]
turba/themes/tango-blue/themed_graphics [deleted file]
vilma/domains/index.php
vilma/lib/Driver.php
vilma/lib/Vilma.php
vilma/templates/common-header.inc
vilma/users/index.php
vilma/virtuals/index.php
whups/lib/Api.php
whups/lib/Block/tree_menu.php
whups/lib/Forms/VarRenderer.php
whups/lib/Renderer/Comment.php
whups/lib/Renderer/Query.php
whups/lib/Whups.php
whups/query/run.php
whups/templates/common-header.inc
whups/templates/prefs/sourceselect.inc
whups/themes/silver/themed_graphics [deleted file]
wicked/lib/Page/AttachedFiles.php
wicked/lib/Page/MergeOrRename.php
wicked/templates/common-header.inc
wicked/templates/display/title.inc
wicked/templates/edit/standard.inc
wicked/templates/history/header.inc
wicked/templates/history/summary.inc

index abc3153..d3624f1 100644 (file)
@@ -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')) . '</a> ';
+                    Horde::img($sort_img, $sort_title) . '</a> ';
                 $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;
index 180147c..24baadf 100644 (file)
@@ -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. */
index 18962de..2b57bc9 100644 (file)
@@ -22,8 +22,8 @@ Horde::includeScriptFiles();
 
 ?>
 <title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir() ?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
 <link rel="alternate" title="<?php echo _("Forums") ?>" href="<?php echo Horde_Util::addParameter(Horde::applicationUrl('rss/index.php', true, -1), 'scope', $scope) ?>" type="application/rss+xml" />
 </head>
 
index 932966c..bc23728 100644 (file)
@@ -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();
index 734faa7..72c9680 100644 (file)
@@ -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 {
index 0d80014..1b43f30 100644 (file)
@@ -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();
index 6bfd92a..a7bcd3e 100644 (file)
@@ -108,7 +108,7 @@ class Ansel_Ajax_Imple_TagActions extends Horde_Ajax_Imple_Base
         $links = Ansel_Tags::getTagLinks($tags, 'add');
         $html = '<ul>';
         foreach ($tags as $tag_id => $taginfo) {
-            $html .= '<li>' . Horde::link($links[$tag_id], sprintf(ngettext("%d photo", "%d photos", $taginfo['total']), $taginfo['total'])) . htmlspecialchars($taginfo['tag_name']) . '</a>' . ($hasEdit ? '<a href="#" onclick="removeTag(' . $tag_id . ');">' . Horde::img('delete-small.png', _("Remove Tag"), '', $registry->getImageDir('horde')) . '</a>' : '') . '</li>';
+            $html .= '<li>' . Horde::link($links[$tag_id], sprintf(ngettext("%d photo", "%d photos", $taginfo['total']), $taginfo['total'])) . htmlspecialchars($taginfo['tag_name']) . '</a>' . ($hasEdit ? '<a href="#" onclick="removeTag(' . $tag_id . ');">' . Horde::img('delete-small.png', _("Remove Tag")) . '</a>' : '') . '</li>';
         }
         $html .= '</ul>';
         return $html;
index c579fc6..4741560 100644 (file)
@@ -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 '<link href="' . $file['u']
index 59cfada..2af2a7a 100644 (file)
@@ -49,8 +49,7 @@ class Ansel_Api extends Horde_Registry_Api
                     $results['ansel/' . $owner]['name'] = $owner;
                 }
                 if (in_array('icon', $properties)) {
-                    $results['ansel/' . $owner]['icon'] =
-                        $registry->getImageDir('horde') . '/user.png';
+                    $results['ansel/' . $owner]['icon'] = Horde_Themes::img('user.png');
                 }
                 if (in_array('browseable', $properties)) {
                     $results['ansel/' . $owner]['browseable'] = true;
@@ -113,8 +112,7 @@ class Ansel_Api extends Horde_Registry_Api
                         $gallery->data['attribute_name']);
                 }
                 if (in_array('icon', $properties)) {
-                    $results[$retpath]['icon'] = $registry->getImageDir()
-                        . '/ansel.png';
+                    $results[$retpath]['icon'] = Horde_Themes::img('ansel.png');
                 }
                 if (in_array('browseable', $properties)) {
                     $results[$retpath]['browseable'] = $gallery->hasPermission(
index 33a0902..3ab6d54 100644 (file)
@@ -45,9 +45,7 @@ class Horde_Block_ansel_random_photo extends Horde_Block {
         if ($gallery->isOldEnough() && !$gallery->hasPasswd()) {
             $img = '<img src="' . Ansel::getImageUrl($imageId, 'thumb', true) . '" alt="[random photo]" />';
         } else {
-            $img = Horde::img(
-                $GLOBALS['registry']->getImageDir() . '/thumb-error.png', '',
-                '', '');
+            $img = Horde::img('thumb-error.png');
         }
         return Horde::link($viewurl, _("View Photo")) . $img . '</a>';
     }
index f1903c1..f126e82 100644 (file)
@@ -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 .= '<li>' . htmlspecialchars($tags[$tagid]) . Horde::link($remove_url, $delete_label) . Horde::img('delete-small.png', $delete_label, '', $registry->getImageDir('horde')) . '</a></li>';
+            $html .= '<li>' . htmlspecialchars($tags[$tagid]) . Horde::link($remove_url, $delete_label) . Horde::img('delete-small.png', $delete_label) . '</a></li>';
         }
 
         return $html . '</ul>';
index 4305c28..094a9fb 100644 (file)
@@ -80,7 +80,7 @@ class Ansel_Tile_DateGallery {
             // horde from Horde_Date
             $gallery_image = '<img src="' . $gallery_image . '" alt="' . $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 */
index e3abc46..dd5ae87 100644 (file)
@@ -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 = '<img src="' . $gallery_image . '" alt="' . 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 */
index eea439e..4ed350d 100644 (file)
@@ -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 .= <<<EOT
index 0278e43..1dad99e 100644 (file)
@@ -120,7 +120,7 @@ class Ansel_View_GalleryRenderer_GalleryLightbox extends Ansel_View_GalleryRende
         ob_start();
 
         /* Create the js variables to pass to the lightbox script */
-        $jsvars = array('graphics_dir' => 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);
index 8fa97f7..7beaf7e 100644 (file)
@@ -131,7 +131,7 @@ class Ansel_Widget_Actions extends Ansel_Widget_Base
                 $url = $registry->bookmarks->getAddUrl($api_params);
             } catch (Horde_Exception $e) {}
 
-            $html .= '<li>' . Horde::link($url, '', 'widget') . Horde::img('trean.png', '', '', $registry->getImageDir('trean')) . ' ' . _("Add to bookmarks") . '</a></li>';
+            $html .= '<li>' . Horde::link($url, '', 'widget') . Horde::img(Horde_Themes::img('trean.png', 'trean')) . ' ' . _("Add to bookmarks") . '</a></li>';
         }
 
         /* 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 .= '<li>' . Horde::link(Horde::applicationUrl(Horde_Util::addParameter($galleryurl, $zip_params)), '', 'widget') . Horde::img('mime/compressed.png', '', '', $GLOBALS['registry']->getImageDir('horde')) . ' ' .  _("Download as zip file") . '</a></li>';
+            $html .= '<li>' . Horde::link(Horde::applicationUrl(Horde_Util::addParameter($galleryurl, $zip_params)), '', 'widget') . Horde::img('mime/compressed.png') . ' ' .  _("Download as zip file") . '</a></li>';
         }
 
         /* Image upload, subgalleries, captions etc... */
         if ($this->_view->gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
             /* Properties */
-            $html .= '<li>' . Horde::link(Horde_Util::addParameter($galleryurl, array('actionID' => 'modify', 'url' => $selfurl)), '', 'widget') . Horde::img('edit.png', '', '', $GLOBALS['registry']->getImageDir('horde')) . ' ' . _("Change properties") . '</a></li>';
+            $html .= '<li>' . Horde::link(Horde_Util::addParameter($galleryurl, array('actionID' => 'modify', 'url' => $selfurl)), '', 'widget') . Horde::img('edit.png') . ' ' . _("Change properties") . '</a></li>';
             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 .= '<li>' . Horde::link(Horde_Util::addParameter($galleryurl, array('actionID' => 'generateThumbs')), '', 'widget') . Horde::img('reload.png', '', '', $GLOBALS['registry']->getImageDir('horde')) . ' ' . _("Reset all thumbnails") . '</a></li>';
+                $html .= '<li>' . Horde::link(Horde_Util::addParameter($galleryurl, array('actionID' => 'generateThumbs')), '', 'widget') . Horde::img('reload.png') . ' ' . _("Reset all thumbnails") . '</a></li>';
 
                 /* Regenerate all views  */
-                $html .= '<li>' . Horde::link(Horde_Util::addParameter($galleryurl, array('actionID' => 'deleteCache')), '', 'widget') . Horde::img('reload.png', '', '', $GLOBALS['registry']->getImageDir('horde')) . ' ' . _("Regenerate all photo views") . '</a></li>';
+                $html .= '<li>' . Horde::link(Horde_Util::addParameter($galleryurl, array('actionID' => 'deleteCache')), '', 'widget') . Horde::img('reload.png') . ' ' . _("Regenerate all photo views") . '</a></li>';
 
                 /* Find faces */
                 if ($conf['faces']['driver'] && $this->_view->gallery->hasFeature('faces')) {
-                    $html .= '<li>' . 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") . '</a></li>';
+                    $html .= '<li>' . 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") . '</a></li>';
                 }
 
             } /* end if ($count) {} */
 
             if (Ansel::isAvailable('photo_stack') && $this->_view->gallery->hasFeature('stacks')) {
-                $html .= '<li>' . Horde::link(Horde_Util::addParameter($galleryurl, array('actionID' => 'generateDefault', 'url' => $selfurl)), '', 'widget') . Horde::img('reload.png', '', '', $GLOBALS['registry']->getImageDir('horde')) . ' ' . _("Reset default photo") . '</a></li>';
+                $html .= '<li>' . Horde::link(Horde_Util::addParameter($galleryurl, array('actionID' => 'generateDefault', 'url' => $selfurl)), '', 'widget') . Horde::img('reload.png') . ' ' . _("Reset default photo") . '</a></li>';
             }
         }
 
         if (Horde_Auth::getAuth() &&
             $this->_view->gallery->get('owner') == Horde_Auth::getAuth()) {
-            $html .= '<li>' . Horde::link('#', '', 'popup widget', '', Horde::popupJs(Horde::applicationUrl('perms.php'), array('params' => array('cid' => $this->_view->gallery->id), 'urlencode' => true)) . 'return false;') . Horde::img('perms.png', '', '', $GLOBALS['registry']->getImageDir('horde')) . ' ' . _("Set permissions") . '</a></li>';
+            $html .= '<li>' . Horde::link('#', '', 'popup widget', '', Horde::popupJs(Horde::applicationUrl('perms.php'), array('params' => array('cid' => $this->_view->gallery->id), 'urlencode' => true)) . 'return false;') . Horde::img('perms.png') . ' ' . _("Set permissions") . '</a></li>';
         } elseif (!empty($conf['report_content']['driver']) &&
                   (($conf['report_content']['allow'] == 'authenticated' && 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 .= '<li>' . Horde::link(Horde_Util::addParameter($galleryurl, 'actionID', 'empty'), '', 'widget') . Horde::img('delete.png', '', '', $GLOBALS['registry']->getImageDir('horde')) . ' ' . _("Delete All Photos") . '</a></li>';
-            $html .= '<li>' . Horde::link(Horde_Util::addParameter($galleryurl, 'actionID', 'delete'), '', 'widget') . Horde::img('delete.png', '', '', $GLOBALS['registry']->getImageDir('horde')) . ' ' . _("Delete Entire Gallery") . '</a></li>';
+            $html .= '<li>' . Horde::link(Horde_Util::addParameter($galleryurl, 'actionID', 'empty'), '', 'widget') . Horde::img('delete.png') . ' ' . _("Delete All Photos") . '</a></li>';
+            $html .= '<li>' . Horde::link(Horde_Util::addParameter($galleryurl, 'actionID', 'delete'), '', 'widget') . Horde::img('delete.png', 'horde') . ' ' . _("Delete Entire Gallery") . '</a></li>';
         }
         $html .= '</ul></div>';
 
index dc8fb7d..0808599 100644 (file)
@@ -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")) . '</a>';
+        $html .= Horde::link(Ansel::getUrlFor('rss_user', array('owner' => $owner))) . Horde::img('feed.png') . ' ' . ($owner ? sprintf(_("Recent photos by %s"), $owner) : _("Recent system photos")) . '</a>';
         $slug = $this->_view->gallery->get('slug');
-        $html .= '<br />' . 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())) . '</a>';
+        $html .= '<br />' . 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())) . '</a>';
 
         /* Embed html */
         if (empty($this->_view->_params['image_id'])) {
index ea1a3ba..65a1635 100644 (file)
@@ -81,11 +81,11 @@ class Ansel_Widget_Tags extends Ansel_Widget_Base
         $links = Ansel_Tags::getTagLinks($tags, 'add', $owner);
         $html = '<ul>';
         foreach ($tags as $tag_id => $taginfo) {
-            $html .= '<li>' . Horde::link($links[$tag_id], sprintf(ngettext("%d photo", "%d photos", $taginfo['total']), $taginfo['total'])) . htmlspecialchars($taginfo['tag_name']) . '</a>' . ($hasEdit ? '<a href="#" onclick="removeTag(' . $tag_id . ');">' . Horde::img('delete-small.png', _("Remove Tag"), '', $registry->getImageDir('horde')) . '</a>' : '') . '</li>';
+            $html .= '<li>' . Horde::link($links[$tag_id], sprintf(ngettext("%d photo", "%d photos", $taginfo['total']), $taginfo['total'])) . htmlspecialchars($taginfo['tag_name']) . '</a>' . ($hasEdit ? '<a href="#" onclick="removeTag(' . $tag_id . ');">' . Horde::img('delete-small.png', _("Remove Tag")) . '</a>' : '') . '</li>';
         }
         $html .= '</ul>';
 
         return $html;
     }
 
-}
\ No newline at end of file
+}
index bb0b855..db4c835 100644 (file)
@@ -75,7 +75,7 @@ $image_tag = '<img src="' . Ansel::getImageUrl($image_id, 'thumb', true) . '" al
 $gt = Horde_Ajax_Imple::factory(array('ansel', 'ImageSaveGeotag'));
 $gtUrl = $gt->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());
index 4b81e03..3be9928 100644 (file)
@@ -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 = '';
index 34bb737..bccd5a7 100644 (file)
@@ -20,8 +20,7 @@ if (!empty($refresh_time) && ($refresh_time > 0) && !empty($refresh_url)) {
 Horde::includeScriptFiles();
 ?>
 <title><?php echo htmlspecialchars($page_title, ENT_COMPAT, Horde_Nls::getCharset()) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir() ?>/favicon.ico" rel="SHORTCUT ICON" />
-<link rel="SHORTCUT ICON" href="<?php echo $GLOBALS['registry']->getImageDir() ?>/favicon.ico" />
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
 <?php echo Ansel::stylesheetLinks() ?>
 <?php echo Horde::wrapInlineScript(Ansel::initJSVars());?>
 <?php Horde::outputInlineScript(); ?>
index ee7b87d..45b036b 100755 (executable)
@@ -1,6 +1,6 @@
 <?php echo $tabs->render('image'); ?>
 <h1 class="header"><?php echo $title ?></h1>
-<link href="<?php echo $registry->getImageDir() ?>/../cropper.css" rel="stylesheet" type="text/css" />
+<link href="<?php echo Horde_Themes::img() ?>/../cropper.css" rel="stylesheet" type="text/css" />
 
 <script type="text/javascript">
 
index 0455d37..00f8fac 100755 (executable)
@@ -3,7 +3,7 @@
 <div style="float: right">
 <form>
 <input name="name" type="text" value="<?php echo $name ?>" />
-<input type="image" name="submit" src="<?php echo $registry->getImageDir('horde'); ?>/search.png" />
+<input type="image" name="submit" src="<?php echo Horde_Themes::img('search.png') ?>" />
 </form>
 </div>
 <?php echo $title ?>
index 520fcb5..bb68610 100644 (file)
@@ -53,7 +53,7 @@ if ($prefs->isLocked('default_gallerystyle')) {
   </td>
 </tr>
 <tr>
-  <td align="right" valign="top"><?php echo Horde::img('required.png', '', '', $registry->getImageDir('horde')) ?><strong><?php echo _("Gallery Display Name") ?></strong>&nbsp;</td>
+  <td align="right" valign="top"><?php echo Horde::img('required.png') ?><strong><?php echo _("Gallery Display Name") ?></strong>&nbsp;</td>
   <td>
     <input name="gallery_name" id="gallery_name" type="text" value="<?php echo htmlspecialchars($gallery_name) ?>" size="50" maxlength="100" />
   </td>
index fa6be95..2ac45f1 100644 (file)
@@ -5,7 +5,7 @@
 <?php
 printf(_("Galleries grouped by %s"), $groupby);
 echo ' ' . Horde::link(Ansel::getUrlFor('group', array())) .
-Horde::img('reload.png', _("Refresh List"), null, $registry->getImageDir('horde')); ?></a>
+Horde::img('reload.png', _("Refresh List")) ?></a>
 </div>
 <div class="anselActions widget">
   <?php echo _("Group by:") . ' ' . implode(' | ', $groupby_links) ?>
index 86a9e30..a8aa034 100644 (file)
@@ -93,25 +93,25 @@ echo Horde::link($galleryurl) . Horde::img('galleries.png') . ' ' . _("Back to g
 echo Horde::link($imageview_url) . Horde::img('galleries.png') . ' ' . _("Cancel") . '</a> ';
 
 if (Ansel::isAvailable('rotate')) {
-    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate270')) . Horde::img('image/rotate-270.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Rotate Left") . '</a> ';
-    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate180')) . Horde::img('image/rotate-180.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Rotate 180") . '</a> ';
-    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate90')) . Horde::img('image/rotate-90.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Rotate Right") . '</a> ';
+    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate270')) . Horde::img('image/rotate-270.png') . ' ' . _("Rotate Left") . '</a> ';
+    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate180')) . Horde::img('image/rotate-180.png') . ' ' . _("Rotate 180") . '</a> ';
+    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate90')) . Horde::img('image/rotate-90.png') . ' ' . _("Rotate Right") . '</a> ';
 }
 if (Ansel::isAvailable('flip')) {
-    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewflip')) . Horde::img('image/flip.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Flip") . '</a> ';
+    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewflip')) . Horde::img('image/flip.png') . ' ' . _("Flip") . '</a> ';
 }
 if (Ansel::isAvailable('mirror')) {
-    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewmirror')) . Horde::img('image/mirror.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Mirror") . '</a> ';
+    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewmirror')) . Horde::img('image/mirror.png') . ' ' . _("Mirror") . '</a> ';
 }
 if (Ansel::isAvailable('grayscale')) {
-    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewgrayscale')) . Horde::img('image/grayscale.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Grayscale") . '</a> ';
+    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewgrayscale')) . Horde::img('image/grayscale.png') . ' ' . _("Grayscale") . '</a> ';
 }
 if (Ansel::isAvailable('text_watermark')) {
     echo Horde::link('#', '', '', '_blank', Horde::popupJs(Horde::applicationUrl($imageurl), array('params' => array('actionID' => 'setwatermark', 'share' => $gallery->getName()), 'width' => 450, 'height' => 250, 'urlencode' => true)) . 'return false;') . Horde::img('text.png') . ' ' . _("Watermark") . '</a> ';
 }
 $selfUrl = Horde::selfUrl(true);
-echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($selfUrl, array('actionID' => 'cropedit')))) . Horde::img('image/crop.png', '', '', $registry->getImageDir('horde')) . _("Crop") . '</a>';
-echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($selfUrl, array('actionID' => 'resizeedit')))) . Horde::img('image/ratio.png', '', '', $registry->getImageDir('horde')) . _("Resize") . '</a>';
+echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($selfUrl, array('actionID' => 'cropedit')))) . Horde::img('image/crop.png') . _("Crop") . '</a>';
+echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($selfUrl, array('actionID' => 'resizeedit')))) . Horde::img('image/ratio.png') . _("Resize") . '</a>';
 ?>
 </div>
 <br />
index fa0efe0..4690ef9 100644 (file)
@@ -9,26 +9,26 @@ echo Horde::link($galleryurl) . Horde::img('galleries.png') . ' ' . _("Back to g
 echo Horde::link($imageview_url) . Horde::img('galleries.png') . ' ' . _("Cancel") . '</a> ';
 
 if (Ansel::isAvailable('rotate')) {
-    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate270')) . Horde::img('image/rotate-270.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Rotate Left") . '</a> ';
-    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate180')) . Horde::img('image/rotate-180.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Rotate 180") . '</a> ';
-    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate90')) . Horde::img('image/rotate-90.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Rotate Right") . '</a> ';
+    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate270')) . Horde::img('image/rotate-270.png') . ' ' . _("Rotate Left") . '</a> ';
+    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate180')) . Horde::img('image/rotate-180.png') . ' ' . _("Rotate 180") . '</a> ';
+    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate90')) . Horde::img('image/rotate-90.png') . ' ' . _("Rotate Right") . '</a> ';
 }
 if (Ansel::isAvailable('flip')) {
-    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewflip')) . Horde::img('image/flip.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Flip") . '</a> ';
+    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewflip')) . Horde::img('image/flip.png') . ' ' . _("Flip") . '</a> ';
 }
 if (Ansel::isAvailable('mirror')) {
-    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewmirror')) . Horde::img('image/mirror.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Mirror") . '</a> ';
+    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewmirror')) . Horde::img('image/mirror.png') . ' ' . _("Mirror") . '</a> ';
 }
 if (Ansel::isAvailable('grayscale')) {
-    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewgrayscale')) . Horde::img('image/grayscale.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Grayscale") . '</a> ';
+    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewgrayscale')) . Horde::img('image/grayscale.png') . ' ' . _("Grayscale") . '</a> ';
 }
 if (Ansel::isAvailable('TextWatermark')) {
     echo Horde::link('#', '', '', '_blank', Horde::popupJs(Horde::applicationUrl($imageurl), array('params' => array('actionID' => 'setwatermark', 'share' => $gallery->getName()), 'width' => 450, 'height' => 250, 'urlencode' => true)) . 'return false;') . Horde::img('text.png') . ' ' . _("Watermark") . '</a> ';
 }
 
 $selfUrl = Horde::selfUrl(true);
-echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($selfUrl, array('actionID' => 'cropedit')))) . Horde::img('image/crop.png', '', '', $registry->getImageDir('horde')) . _("Crop") . '</a>';
-echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($selfUrl, array('actionID' => 'resizeedit')))) . Horde::img('image/ratio.png', '', '', $registry->getImageDir('horde')) . _("Resize") . '</a>';
+echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($selfUrl, array('actionID' => 'cropedit')))) . Horde::img('image/crop.png') . _("Crop") . '</a>';
+echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($selfUrl, array('actionID' => 'resizeedit')))) . Horde::img('image/ratio.png') . _("Resize") . '</a>';
 
 ?>
 </div>
index bd85408..be13582 100644 (file)
@@ -16,11 +16,11 @@ $image_url = Horde::applicationUrl(Horde_Util::addParameter($base_url, array('ac
 <?php
 if ($gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
     echo Horde::link(Horde::applicationUrl($save_url), _("Save Change"))
-             . Horde::img('save.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Save Change") . '</a> ';
+             . Horde::img('save.png') . ' ' . _("Save Change") . '</a> ';
 }
 if ($gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
     echo Horde::link(Horde::applicationUrl($edit_url), _("Cancel Change"))
-             . Horde::img('delete.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Cancel Change") . '</a>';
+             . Horde::img('delete.png') . ' ' . _("Cancel Change") . '</a>';
 }
 ?>
 </div>
index 1d24732..a4b5462 100644 (file)
@@ -19,11 +19,11 @@ $image_url = Horde::applicationUrl(Horde_Util::addParameter($base_url, array('ac
 <?php
 if ($gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
     echo Horde::link(Horde::applicationUrl($save_url), _("Save Change"))
-             . Horde::img('save.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Save Change") . '</a> ';
+             . Horde::img('save.png') . ' ' . _("Save Change") . '</a> ';
 }
 if ($gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) {
     echo Horde::link(Horde::applicationUrl($edit_url), _("Cancel Change"))
-             . Horde::img('delete.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Cancel Change") . '</a>';
+             . Horde::img('delete.png') . ' ' . _("Cancel Change") . '</a>';
 }
 ?>
 </div>
index 74be8b3..39b2e10 100644 (file)
@@ -40,27 +40,27 @@ echo Horde::link($galleryurl) . Horde::img('galleries.png') . ' ' . _("Back to g
 echo Horde::link($imageview_url) . Horde::img('galleries.png') . ' ' . _("Cancel") . '</a> ';
 
 if (Ansel::isAvailable('rotate')) {
-    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate270')) . Horde::img('image/rotate-270.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Rotate Left") . '</a> ';
-    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate180')) . Horde::img('image/rotate-180.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Rotate 180") . '</a> ';
-    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate90')) . Horde::img('image/rotate-90.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Rotate Right") . '</a> ';
+    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate270')) . Horde::img('image/rotate-270.png') . ' ' . _("Rotate Left") . '</a> ';
+    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate180')) . Horde::img('image/rotate-180.png') . ' ' . _("Rotate 180") . '</a> ';
+    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewrotate90')) . Horde::img('image/rotate-90.png') . ' ' . _("Rotate Right") . '</a> ';
 }
 if (Ansel::isAvailable('flip')) {
-    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewflip')) . Horde::img('image/flip.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Flip") . '</a> ';
+    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewflip')) . Horde::img('image/flip.png') . ' ' . _("Flip") . '</a> ';
 }
 if (Ansel::isAvailable('mirror')) {
-    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewmirror')) . Horde::img('image/mirror.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Mirror") . '</a> ';
+    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewmirror')) . Horde::img('image/mirror.png') . ' ' . _("Mirror") . '</a> ';
 }
 if (Ansel::isAvailable('grayscale')) {
-    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewgrayscale')) . Horde::img('image/grayscale.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Grayscale") . '</a> ';
+    echo Horde::link(Horde_Util::addParameter($imageurl, 'actionID', 'previewgrayscale')) . Horde::img('image/grayscale.png') . ' ' . _("Grayscale") . '</a> ';
 }
 if (Ansel::isAvailable('text_watermark')) {
     echo Horde::link('#', '', '', '_blank', Horde::popupJs(Horde::applicationUrl($imageurl), array('params' => array('actionID' => 'setwatermark', 'share' => $gallery->getName()), 'width' => 450, 'height' => 250, 'urlencode' => true)) . 'return false;') . Horde::img('text.png') . ' ' . _("Watermark") . '</a> ';
 }
 
 $selfUrl = Horde::selfUrl(true);
-echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($selfUrl, array('actionID' => 'cropedit')))) . Horde::img('image/crop.png', '', '', $registry->getImageDir('horde')) . _("Crop") . '</a>';
+echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($selfUrl, array('actionID' => 'cropedit')))) . Horde::img('image/crop.png') . _("Crop") . '</a>';
 
-echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($selfUrl, array('actionID' => 'resizeedit')))) . Horde::img('image/ratio.png', '', '', $registry->getImageDir('horde')) . _("Resize") . '</a>';
+echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($selfUrl, array('actionID' => 'resizeedit')))) . Horde::img('image/ratio.png') . _("Resize") . '</a>';
 ?>
 </div>
 <form method="post" action="<?php echo Horde::applicationUrl(Horde_Util::addParameter($imageurl, 'actionID', 'resize'));?>">
index e834902..49a02d3 100644 (file)
@@ -12,7 +12,7 @@ if (!empty($haveImages)) {
     Horde::addScriptFile('carousel.js', 'ansel');
 }
 
-$graphic_dir = Horde::applicationUrl($GLOBALS['registry']->getImageDir(), true);
+$graphic_dir = Horde_Themes::img();
 $lbcssurl = Horde::url($GLOBALS['registry']->get('themesuri', 'ansel') . '/lightbox.css', true);
 ?>
 </td>
@@ -129,7 +129,7 @@ Event.observe(window, "resize", resized);
   padding: 2px;
   width: 16px;
   height: 16px;
-  background: url(<?php echo $registry->getImageDir() ?>/slideshow_prev.png);
+  background: url(<?php echo $graphic_dir ?>/slideshow_prev.png);
   background-repeat: no-repeat;
   z-index: 100;
   cursor: pointer;
@@ -149,7 +149,7 @@ Event.observe(window, "resize", resized);
   padding: 2px;
   width: 16px;
   height: 16px;
-  background: url(<?php echo $registry->getImageDir() ?>/slideshow_next.png);
+  background: url(<?php echo $graphic_dir ?>/slideshow_next.png);
   background-repeat: no-repeat;
   z-index: 100;
   cursor: pointer;
index 4426ca4..62bdc35 100644 (file)
@@ -2,6 +2,6 @@
  <span class="rightFloat">
   <?php ($galleries_perpage < $num_galleries) ? printf(_("%d to %d of %d Galleries"), $start, $end, $num_galleries) : printf(ngettext("%d Gallery", "%d Galleries", $num_galleries), $num_galleries) ?>
  </span>
- <?php echo @htmlspecialchars($list_title, ENT_COMPAT, Horde_Nls::getCharset()) . ' ' . Horde::link(Horde::applicationUrl($refresh_link), _("Refresh List")) . Horde::img('reload.png', _("Refresh List"), null, $registry->getImageDir('horde')) . '</a>' ?>
+ <?php echo @htmlspecialchars($list_title, ENT_COMPAT, Horde_Nls::getCharset()) . ' ' . Horde::link(Horde::applicationUrl($refresh_link), _("Refresh List")) . Horde::img('reload.png', _("Refresh List")) . '</a>' ?>
 </div>
 <table width="100%" style="background:<?php echo $styleDef['background'] ?>;"><tr>
index 0224544..fa33c55 100644 (file)
@@ -72,7 +72,7 @@ function arrowHandler(e)
             (!Horde_Auth::getAuth() ||
              $this->gallery->get('owner') != Horde_Auth::getAuth()) &&
             !empty($GLOBALS['conf']['report_content']['driver']) &&
-            (($conf['report_content']['allow'] == 'authenticated' && 
+            (($conf['report_content']['allow'] == 'authenticated' &&
               Horde_Auth::isAuthenticated()) ||
              $conf['report_content']['allow'] == 'all')) {
 
@@ -83,7 +83,7 @@ function arrowHandler(e)
         }
 ?>
     <div class="slideControls">
-     <?php echo Horde::fullSrcImg('loading.gif', array('dir' => $registry->getImageDir('horde'), 'attr' => 'class="imgloading"'));?>
+     <?php echo Horde::fullSrcImg('loading.gif', array('dir' => Horde_Themes::img(null, 'horde'), 'attr' => 'class="imgloading"'));?>
      <?php
      if (empty($this->_params['hide_slideshow'])) {
          echo '<a style="display:none;" href="' . $this->_urls['slideshow'] . '" class="ssPlay" title="' . _("Start Slideshow") . '">' .
@@ -102,7 +102,7 @@ function arrowHandler(e)
      <noscript>
       <?php echo '<img src="' . $this->_urls['imgsrc'] . '" alt="' . htmlspecialchars($this->resource->filename) . '" />' ?>
      </noscript>
-     <?php echo Horde::img('blank.gif', '', array('id' => 'photodiv', 'width' => $this->_geometry['width'], 'height' => $this->_geometry['height']), $registry->getImageDir('horde')) ?>
+     <?php echo Horde::img('blank.gif', '', array('id' => 'photodiv', 'width' => $this->_geometry['width'], 'height' => $this->_geometry['height'])) ?>
      <div id="CaptionContainer" style="width:<?php echo $this->_geometry['width']?>px;">
      <p id="Caption" style="display:none;">
        <?php echo Horde_Text_Filter::filter($this->resource->caption, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)) ?>
@@ -110,7 +110,7 @@ function arrowHandler(e)
      </div>
     </div>
     <div class="slideControls">
-     <?php echo Horde::fullSrcImg('loading.gif', array('dir' => $registry->getImageDir('horde'), 'attr' => 'class="imgloading"'));?>
+     <?php echo Horde::fullSrcImg('loading.gif', array('dir' => Horde_Themes::img(null, 'horde'), 'attr' => 'class="imgloading"'));?>
      <?php
      if (empty($this->_params['hide_slideshow'])) {
          echo '<a style="display:none;" href="' . $this->_urls['slideshow'] . '" class="ssPlay" title="' . _("Start Slideshow") . '">' .
index d65f9d8..750ed7b 100644 (file)
@@ -2,7 +2,7 @@
  <span id="listCounts" class="rightFloat">
    <?php if ($this->_g_perPage < $this->_numGalleries) printf(_("%d to %d of %d Galleries"), $this->_start, $end, $this->_numGalleries); else printf(ngettext("%d Gallery", "%d Galleries", $this->_numGalleries), $this->_numGalleries) ?>
  </span>
- <?php if (empty($this->_params['api'])) echo Ansel::getBreadcrumbs() . ' ' . Horde::link(Horde::applicationUrl($refresh_link), _("Refresh List")) . Horde::img('reload.png', _("Refresh List"), null, $registry->getImageDir('horde')) . '</a>' ?>
+ <?php if (empty($this->_params['api'])) echo Ansel::getBreadcrumbs() . ' ' . Horde::link(Horde::applicationUrl($refresh_link), _("Refresh List")) . Horde::img('reload.png', _("Refresh List")) . '</a>' ?>
 </div>
 <?php if (empty($this->_params['api'])): ?>
 <div class="anselActions widget">
       . _("Owner") . '</a>';
   if ($this->_sortDir) {
       echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($refresh_link, array('sort' => $this->_sortBy, 'sort_dir' => 0))))
-          . Horde::img('za.png', _("Ascending"), '', $registry->getImageDir('horde'))
+          . Horde::img('za.png', _("Ascending"))
           . '</a>';
   } else {
       echo Horde::link(Horde::applicationUrl(Horde_Util::addParameter($refresh_link, array('sort' => $this->_sortBy, 'sort_dir' => 1))))
-          . Horde::img('az.png', _("Descending"), '', $registry->getImageDir('horde'))
+          . Horde::img('az.png', _("Descending"))
           . '</a>';
    }
  ?>
index 4dc3392..753143e 100644 (file)
@@ -48,7 +48,7 @@ function stopSlideShow()
   <tr>
    <td style="margin:5px;height:<?php echo $GLOBALS['conf']['screen']['height'] ?>px;vertical-align:top;">
      <div id="Container">
-      <?php echo Horde::img('blank.gif', '', array('id' => 'Photo', 'style' => 'display:none;'), $registry->getImageDir('horde')) ?>
+      <?php echo Horde::img('blank.gif', '', array('id' => 'Photo', 'style' => 'display:none')) ?>
      </div>
    </td>
   </tr>
diff --git a/ansel/themes/silver/themed_graphics b/ansel/themes/silver/themed_graphics
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/ansel/themes/tango-blue/themed_graphics b/ansel/themes/tango-blue/themed_graphics
deleted file mode 100644 (file)
index e69de29..0000000
index 3b6af53..84a323c 100644 (file)
@@ -19,7 +19,7 @@ if (empty($cmd)) {
         $registry->get('name'),
         sprintf(_("Publish your photos to %s on %s."), $registry->get('name'), $conf['server']['name']),
         Horde::applicationUrl(Horde_Util::addParameter('xppublish.php', 'cmd', 'publish'), true, -1),
-        Horde::url($registry->getImageDir() . '/favicon.ico', true, -1));
+        Horde::url(Horde_Themes::img('favicon.ico'), true, -1));
     exit;
 }
 
index dafab1b..8f7218b 100644 (file)
  */
 
 class Translate_Display {
-    
+
     function header($msg, $msg2 = '') {
        global $cnt_i, $registry;
-       $select_img = Horde::img('alerts/message.png', '', '', $registry->getImageDir('horde'));
+       $select_img = Horde::img('alerts/message.png');
        print sprintf('<table cellspacing=0 cellpadding=0 width=100%%><tr><td class="header">%s</td><td align="right" class="header">%s</td><td  class="header" width="20">%s</td></tr></table>', $msg, $msg2, $select_img);
        flush();
     }
-    
+
     function warning($msg, $bold = true) {
        global $cnt_i, $registry;
        $item = ($cnt_i++ % 2);
-       $select_img = Horde::img('alerts/warning.png', '', '', $registry->getImageDir('horde'));
+       $select_img = Horde::img('alerts/warning.png');
        if ($bold) {
            print sprintf('<table cellspacing=0 cellpadding=0 width=100%%><tr><td class="item%d" style="color: #ff0000">%s</td><td  class="item%1$d" width="20">%s</td></tr></table>', $item, $msg, $select_img);
        } else {
@@ -29,26 +29,26 @@ class Translate_Display {
        }
        flush();
     }
-    
+
     function error($msg) {
        global $cnt_i, $registry;
        $item = ($cnt_i++ % 2);
-       $select_img = Horde::img('alerts/error.png', '', '', $registry->getImageDir('horde'));
+       $select_img = Horde::img('alerts/error.png');
        print sprintf('<table cellspacing=0 cellpadding=0 width=100%%><tr><td class="item%d" style="color: #ff0000"><b>%s</b></td><td  class="item%1$d" width="20">%s</td></tr></table>', $item, $msg, $select_img);
        flush();
     }
-    
+
     function info($msg = "", $bold = true) {
-       
+
        global $cnt_i, $registry;
-       
+
        if (empty($msg)) {
            echo "<br />";
        } else {
-           
+
            $item = ($cnt_i++ % 2);
-           
-           $select_img = Horde::img('select.png', '', '', $registry->getImageDir('horde'));
+
+       $select_img = Horde::img('alerts/select.png');
            if ($bold) {
                print sprintf('<table cellspacing=0 cellpadding=0 width=100%%><tr><td class="item%d"><b>%s</b></td><td  class="item%1$d" width="20">%s</td></tr></table>', $item, $msg, $select_img);
            } else {
@@ -65,7 +65,7 @@ class Translate_Display {
         }
        return Horde_Nls::getCharset();
     }
-    
+
     function convert_string($msg) {
        global $po;
 
@@ -74,7 +74,7 @@ class Translate_Display {
        $msg = preg_replace($f, $t, $msg);
        return Horde_String::convertCharset(html_entity_decode($msg), Horde_Nls::getCharset(), Translate_Display::parseCharset($po->meta['Content-Type']));
     }
-    
+
     function display_string($msg) {
        global $po;
 
@@ -83,32 +83,32 @@ class Translate_Display {
        $msg = preg_replace($f, $t, $msg);
        return Horde_String::convertCharset($msg, Translate_Display::parseCharset($po->meta['Content-Type']), Horde_Nls::getCharset());
     }
-    
+
     function get_percent($used, $total) {
        if ($total > 0) {
            $percent = sprintf("%2.2f", (($used * 100) / $total));
        } else {
            $percent = 0;
        }
-       
+
        return $percent;
     }
-    
+
     function create_bargraph ($used, $total, $text = true, $reverse = false, $small = false) {
        if ($total > 0) {
            $percent = round(($used * 100) / $total);
        } else {
            $percent = 0;
        }
-       
+
        $html = '<table border="0" cellpadding="0" cellspacing="0"><tr><td nowrap="nowrap">';
        $html .= '<table border="0" width="100" cellpadding="0" cellspacing="0">';
        $html .= '<tr height="10">';
-       
+
        if ($percent > 0) {
            $html .= '<td nowrap="nowrap" width="' . ($percent) . '" bgcolor="#00FF00"></td>';
        }
-       
+
        if ($percent != 100) {
            $html .= '<td nowrap="nowrap" width="' . (100 - $percent) . '" ';
            if ($reverse) {
@@ -117,9 +117,9 @@ class Translate_Display {
                $html .= ' bgcolor="#006699"></td>';
            }
        }
-       
+
        $html .= '</tr></table></td>';
-       
+
        if ($text) {
            if ($small) {
                $html .= '<td class="small"> ' . $percent .'% </td>';
@@ -127,10 +127,10 @@ class Translate_Display {
                $html .= '<td> ' . $percent .'% </td>';
            }
        }
-       
+
        $html .= '</tr></table>';
-       
-       return $html;    
+
+       return $html;
     }
-    
+
 }
index 523dd0a..689879e 100644 (file)
@@ -19,7 +19,7 @@ Horde::includeScriptFiles();
 
 ?>
 <title><?php echo $page_title ?></title>
-<?php Horde::includeStylesheetFiles() ?>
+<?php Horde_Themes::includeStylesheetFiles() ?>
 </head>
 
 <body>
index 58d356c..0834a9f 100644 (file)
@@ -21,8 +21,8 @@ class Beatnik {
         $editing = Horde_Util::getFormData('id');
         $editing = !empty($editing);
 
-        $hordeImgDir = $GLOBALS['registry']->getImageDir('horde');
-        $beatnikImgDir = $GLOBALS['registry']->getImageDir();
+        $hordeImgDir = Horde_Themes::img(null, 'horde');
+        $beatnikImgDir = Horde_Themes::img();
         $menu = new Horde_Menu();
 
         $menu->add(Horde::applicationUrl('listzones.php'), _('List Domains'), 'website.png', $hordeImgDir);
index 432ab37..5d8051d 100644 (file)
@@ -36,7 +36,7 @@ $pager = new Horde_Ui_Pager('page', $pager_vars,
 // Limit the domain list to the current page
 $domains = array_slice($beatnik->domains, $page*$perpage, $perpage);
 
-$img_dir = $registry->getImageDir('horde');
+$img_dir = Horde_Themes::img();
 
 // Hide fields that the user does not want to see
 $fields = Beatnik::getRecFields('soa');
index 27dea2d..52ba347 100644 (file)
@@ -33,7 +33,7 @@ Horde::includeScriptFiles();
 
 ?>
 <title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php echo Horde::includeStylesheetFiles(); ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php echo Horde_Themes::includeStylesheetFiles(); ?>
 </head>
 <body>
index 059cd4b..0fb1203 100644 (file)
@@ -15,7 +15,7 @@ if (Horde_Auth::getAuth() && (!$prefs->isLocked('categories') || !$prefs->isLock
     $categoryUrl = Horde_Util::addParameter(Horde::url($registry->get('webroot', 'horde') . '/services/prefs.php'),
                                         array('app' => 'horde', 'group' => 'categories'));
     echo Horde::link($categoryUrl, _("Edit domain groups and colors"), 'widget', '_blank') .
-         Horde::img('colorpicker.png', _("Edit categories and colors"), array('align' => 'absmiddle'), $registry->getImageDir('horde')) . '</a>';
+         Horde::img('colorpicker.png', _("Edit categories and colors"), array('align' => 'absmiddle')) . '</a>';
 }
 ?>
 </p>
index 9ea916e..c21dad9 100644 (file)
@@ -13,7 +13,7 @@ $menu_view = $prefs->getValue('menu_view');
 <span style="float:right">
 <?php
     $link = Horde::link('#', _("Select Domain"), '', '', 'domainSubmit(true); return false;');
-    sprintf('<ul><li>%s%s<br />%s</a></li></ul>', $link, Horde::img('tree/folderopen.png', '', '', $registry->getImageDir('horde')), ($menu_view != 'icon') ? Horde::highlightAccessKey(_("Select _Domain"), $accesskey) : '');
+    sprintf('<ul><li>%s%s<br />%s</a></li></ul>', $link, Horde::img('tree/folderopen.png'), ($menu_view != 'icon') ? Horde::highlightAccessKey(_("Select _Domain"), $accesskey) : '');
 ?>
 </span>
 <span style="float:right">
index f55eee7..5acf527 100644 (file)
@@ -36,7 +36,7 @@ foreach ($fields as $field_id => $field) {
     }
 }
 
-$img_dir = $registry->getImageDir('horde');
+$img_dir = Horde_Themes::img(null, 'horde');
 $delete = Horde_Util::addParameter(Horde::applicationUrl('delete.php'), 'curdomain', $_SESSION['beatnik']['curdomain']['zonename']);
 $edit = Horde_Util::addParameter(Horde::applicationUrl('editrec.php'), 'curdomain', $_SESSION['beatnik']['curdomain']['zonename']);
 $rectypes = Beatnik::getRecTypes();
index 5e8c64e..7f0b6ae 100644 (file)
@@ -23,7 +23,7 @@ class Horde_Block_chora_tree_menu extends Horde_Block
                     false,
                     array(
                         'icon' => 'folder.png',
-                        'icondir' => $GLOBALS['registry']->getImageDir('horde') . '/tree',
+                        'icondir' => Horde_Themes::img(null, 'horde') . '/tree',
                         'url' => Chora::url('browsedir', '', array('rt' => $key))
                     )
                 );
index 5055aeb..2aabd0e 100644 (file)
@@ -29,7 +29,7 @@ if (strpos($mime_type, 'text/plain') !== false) {
     $data = reset($data);
     echo $data['data'];
 } else {
-    echo Horde::link(Horde_Util::addParameter(Horde::selfUrl(true), 'p', 1)) . Horde::img('download.png', '', '', $registry->getImageDir('horde')) . ' ' . sprintf(_("Download revision %s"), $r) . '</a>';
+    echo Horde::link(Horde_Util::addParameter(Horde::selfUrl(true), 'p', 1)) . Horde::img('download.png') . ' ' . sprintf(_("Download revision %s"), $r) . '</a>';
 }
 ?>
 </div>
index e0817da..cae4d34 100644 (file)
@@ -19,8 +19,8 @@ Horde::includeScriptFiles();
 
 ?>
 <title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir() ?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
 </head>
 
 <body>
index 11c54a8..14e5477 100644 (file)
@@ -27,7 +27,7 @@
 
 <table cellspacing="0" class="hrdiff">
 <caption>
- <?php $blank = $registry->getImageDir('horde') . '/blank.gif' ?>
+ <?php $blank = Horde_Themes::img('blank.gif') ?>
  <img class="unmodified" src="<?php echo $blank ?>" alt="<?php echo _("Unmodified") ?>" /> <?php echo _("Unmodified") ?>
  <img class="added" src="<?php echo $blank ?>" alt="<?php echo _("Added") ?>" /> <?php echo _("Added") ?>
  <img class="modified" src="<?php echo $blank ?>" alt="<?php echo _("Modified") ?>" /> <?php echo _("Modified") ?>
diff --git a/chora/themes/silver/themed_graphics b/chora/themes/silver/themed_graphics
deleted file mode 100644 (file)
index e69de29..0000000
index fd51228..e582a87 100644 (file)
@@ -20,8 +20,8 @@ class Crumb {
         global $conf, $registry, $browser, $print_link;
 
         $menu = new Horde_Menu(Horde_Menu::MASK_ALL);
-        $menu->add(Horde::applicationUrl('listclients.php'), _("List Clients"), 'user.png', $registry->getImageDir('horde'));
-        $menu->add(Horde::applicationUrl('addclient.php'), _("Add Client"), 'user.png', $registry->getImageDir('horde'));
+        $menu->add(Horde::applicationUrl('listclients.php'), _("List Clients"), 'user.png', Horde_Themes::img(null, 'horde'));
+        $menu->add(Horde::applicationUrl('addclient.php'), _("Add Client"), 'user.png', Horde_Themes::img(null, 'horde'));
 
         return $menu;
     }
index ed05758..b45d7f2 100644 (file)
@@ -22,8 +22,8 @@ Horde::includeScriptFiles();
 
 ?>
 <title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
 </head>
 
 <body>
index 1ccf85b..807b182 100644 (file)
@@ -28,12 +28,12 @@ foreach ($ledgers as $ledger) {
 }
 asort($sorted_ledgers);
 
-$browse_img = Horde::img('accounts.png', _("Ledger"), null, $registry->getImageDir('fima'));
-$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'));
+$browse_img = Horde::img('accounts.png', _("Ledger"));
+$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', 'turba');
+Horde::addScriptFile('tables.js', 'horde');
 $title = _("Manage Ledgers");
 require FIMA_TEMPLATES . '/common-header.inc';
 require FIMA_TEMPLATES . '/menu.inc';
index 4e92f1c..2725bf1 100644 (file)
@@ -9,11 +9,9 @@ class Horde_Block_fima_tree_menu extends Horde_Block {
 
     function _buildTree(&$tree, $indent = 0, $parent = null)
     {
-        global $registry;
-
         $menus = array(
             array('add', _("Add Postings"), 'add.png', Horde_Util::addParameter(Horde::applicationUrl('postings.php'), 'actionID', 'add_postings')),
-            array('search', _("Search"), 'search.png', Horde::applicationUrl('search.php'), $registry->getImageDir('horde')),
+            array('search', _("Search"), 'search.png', Horde::applicationUrl('search.php'), Horde_Themes::img(null, 'horde')),
             array('accounts', _("Accounts"), 'accounts.png', Horde::applicationUrl('accounts.php')),
             array('reports', _("Reports"), 'report.png', Horde::applicationUrl('report.php')),
         );
@@ -25,7 +23,7 @@ class Horde_Block_fima_tree_menu extends Horde_Block {
                            $indent + 1,
                            false,
                            array('icon' => $menu[2],
-                                 'icondir' => isset($menu[4]) ? $menu[4] : $registry->getImageDir(),
+                                 'icondir' => isset($menu[4]) ? $menu[4] : Horde_Themes::img(),
                                  'url' => $menu[3]));
         }
     }
index 6b46d69..6a61289 100644 (file)
@@ -427,7 +427,7 @@ class Fima {
                 $html .= '<div id="goto" class="control" style="position:absolute;visibility:hidden;padding:1px"></div>' . "\n";
             }
             $html .= '<a href="#" onclick="openCalendar(\'' . $name . '_img\', \'' . $name . '\', \'updateWday(\\\'' . $name . '\\\');\'); return false;" title="Select a date">';
-            $html .= Horde::img('calendar.png', _("Set date"), 'align="top" id="' . $name . '_img"', $GLOBALS['registry']->getImageDir('horde'));
+            $html .= Horde::img('calendar.png', _("Set date"), 'align="top" id="' . $name . '_img"');
             $html .= '</a>' . "\n";
         }
 
@@ -746,14 +746,15 @@ class Fima {
      */
     function getMenu()
     {
-        global $conf, $registry, $browser, $print_link;
+        global $conf, $browser, $print_link;
 
         $actionID = Horde_Util::getFormData('actionID');
+        $hordeimg = Horde_Themes::img(null, 'horde');
 
         $menu = new Horde_Menu(Horde_Menu::MASK_ALL);
         $menu->add(Horde::applicationUrl('postings.php'), _("_List Postings"), 'list.png', null, null, null, (basename($_SERVER['PHP_SELF']) == 'index.php' && basename(dirname($_SERVER['PHP_SELF'])) != 'ledgers') ? 'current' : ($actionID === null ? null : '__noselection'));
         $menu->add(Horde_Util::addParameter(Horde::applicationUrl('postings.php'), 'actionID', 'add_postings'), _("Add _Postings"), 'add.png', null, null, null, $actionID == 'add_postings' ? 'current' : '__noselection');
-        $menu->add(Horde::applicationUrl('search.php'), _("Search"), 'search.png', $registry->getImageDir('horde'));
+        $menu->add(Horde::applicationUrl('search.php'), _("Search"), 'search.png', $hordeimg);
         $menu->add(Horde::applicationUrl('accounts.php'), _("_Accounts"), 'accounts.png');
 
         if (Horde_Auth::getAuth()) {
@@ -764,11 +765,11 @@ class Fima {
         $menu->add(Horde::applicationUrl('report.php'), _("_Reports"), 'report.png');
 
         /* 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', $hordeimg);
 
         /* Print. */
         if (isset($print_link)) {
-            $menu->add($print_link, _("_Print"), 'print.png', $registry->getImageDir('horde'), '_blank', Horde::popupJs($print_link, array('urlencode' => true)) . 'return false;', '__noselection');
+            $menu->add($print_link, _("_Print"), 'print.png', $hordeimg, '_blank', Horde::popupJs($print_link, array('urlencode' => true)) . 'return false;', '__noselection');
         }
 
         return $menu;
index 368123e..d7e600e 100644 (file)
@@ -626,7 +626,7 @@ if ($pageOb['mode'] == 'list' || $pageOb['mode'] == 'edit') {
 
 /* Generate page links. */
 if ($pageOb['mode'] == 'list') {
-    $graphicsdir = $registry->getImageDir('horde');
+    $graphicsdir = Horde_Themes::img(null, 'horde');
     if ($pageOb['page'] == 1) {
         $pageOb['pages_first'] = Horde::img('nav/first-grey.png', null, null, $graphicsdir);
         $pageOb['pages_prev'] = Horde::img('nav/left-grey.png', null, null, $graphicsdir);
index 801b2af..1cdad54 100644 (file)
@@ -29,7 +29,7 @@ function Submit(action)
 <div id="accountList">
 <?php
 
-$params = array('icondir' => $GLOBALS['registry']->getImageDir(), 'icon' => '');
+$params = array('icondir' => Horde_Themes::img(), 'icon' => '');
 $tree = Horde_Tree::factory('account_tree', 'Javascript');
 
 foreach ($accounts as $accountId => $account) {
@@ -40,9 +40,9 @@ foreach ($accounts as $accountId => $account) {
     }
     $accountExtra = '';
     if (!$print_view) {
-        if ($perm_delete && $accountId == 'root')           { $accountExtra .= '&nbsp;'.Horde::link('#', _("Delete all"), '', '', "Submit('delete_all'); return false;")                    . Horde::img('delete-small.png', _("Delete"), '', $GLOBALS['registry']->getImageDir('horde')) . '</a>'; }
-        if ($perm_edit   && isset($account['edit_link']))   { $accountExtra .= '&nbsp;'.Horde::link(Horde::applicationUrl($account['edit_link']),   sprintf(_("Edit %s"), $accountLabel))   . Horde::img('edit-small.png', _("Edit"), '', $GLOBALS['registry']->getImageDir('horde'))     . '</a>'; }
-        if ($perm_delete && isset($account['delete_link'])) { $accountExtra .= '&nbsp;'.Horde::link(Horde::applicationUrl($account['delete_link']), sprintf(_("Delete %s"), $accountLabel)) . Horde::img('delete-small.png', _("Delete"), '', $GLOBALS['registry']->getImageDir('horde')) . '</a>'; }
+        if ($perm_delete && $accountId == 'root')           { $accountExtra .= '&nbsp;'.Horde::link('#', _("Delete all"), '', '', "Submit('delete_all'); return false;")                    . Horde::img('delete-small.png', _("Delete")) . '</a>'; }
+        if ($perm_edit   && isset($account['edit_link']))   { $accountExtra .= '&nbsp;'.Horde::link(Horde::applicationUrl($account['edit_link']),   sprintf(_("Edit %s"), $accountLabel))   . Horde::img('edit-small.png', _("Edit"))     . '</a>'; }
+        if ($perm_delete && isset($account['delete_link'])) { $accountExtra .= '&nbsp;'.Horde::link(Horde::applicationUrl($account['delete_link']), sprintf(_("Delete %s"), $accountLabel)) . Horde::img('delete-small.png', _("Delete")) . '</a>'; }
         if ($perm_edit   && isset($account['add_link']))    { $accountExtra .= '&nbsp;'.Horde::link(Horde::applicationUrl($account['add_link']), _("Create a New Account"))                 . Horde::img('new-small.png', '+')                                                            . '</a>'; }
         if (                isset($account['view_link']))   { $accountExtra .= '&nbsp;'.Horde::link(Horde::applicationUrl($account['view_link']), sprintf(_("View %s"), $accountLabel))     . Horde::img('search-small.png', _("Search"))                                                 . '</a>'; }
     }
index 9a6f939..4fefe2b 100644 (file)
@@ -22,8 +22,8 @@ Horde::includeScriptFiles();
 
 ?>
 <title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
 </head>
 
 <body>
index b6c7021..c3426d8 100644 (file)
@@ -2,16 +2,16 @@
  <div <?php if ($pageOb['page_count'] > 1) { echo 'style="width:40%" '; } ?> class="leftFloat">
   <span dir="ltr"><?php echo htmlspecialchars($title) ?></span>
 <?php if ($pageOb['mode'] == 'list'): ?>
-  <?php echo Horde::link($pageOb['url'], _("Refresh List")) . Horde::img('reload.png', _("Refresh List"), '', $registry->getImageDir('horde')) ?> </a>
+  <?php echo Horde::link($pageOb['url'], _("Refresh List")) . Horde::img('reload.png', _("Refresh List")) ?> </a>
 <?php if (!isset($_SESSION['fima_search'])): ?>
-  <?php echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('search.php'), 'search_type', $prefs->getValue('active_postingtype')), _("Search Postings")) . Horde::img('search.png', _("Search"), '', $registry->getImageDir('horde')) ?></a>
+  <?php echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('search.php'), 'search_type', $prefs->getValue('active_postingtype')), _("Search Postings")) . Horde::img('search.png', _("Search")) ?></a>
 <?php else: ?>
-  <?php echo Horde::link(Horde::applicationUrl('search.php'), _("Edit Search Query")) . Horde::img('edit.png', _("Edit Search Query"), '', $registry->getImageDir('horde')) ?></a>
-  <?php echo Horde::link(Horde_Util::addParameter($pageOb['url'], 'actionID', 'clear_search'), _("Clear Search Query")) . Horde::img('delete.png', _("Clear Search Query"), '', $registry->getImageDir('horde')) ?></a>
+  <?php echo Horde::link(Horde::applicationUrl('search.php'), _("Edit Search Query")) . Horde::img('edit.png', _("Edit Search Query")) ?></a>
+  <?php echo Horde::link(Horde_Util::addParameter($pageOb['url'], 'actionID', 'clear_search'), _("Clear Search Query")) . Horde::img('delete.png', _("Clear Search Query")) ?></a>
 <?php endif; ?>
 <?php endif; ?>
  </div>
-  
+
 <?php if ($pageOb['mode'] == 'list'): ?>
 <?php if ($pageOb['page_count'] > 1): ?>
  <div style="width:20%" class="leftFloat">
@@ -24,7 +24,7 @@
   <?php echo $pageOb['postings_count'] ?>
  </div>
 <?php endif; ?>
+
 <?php if ( $GLOBALS['browser']->isBrowser('msie') && $GLOBALS['browser']->getMajor() < 7): ?>
  <div class="clear" style="clear:none" /></div>
 <?php else: ?>
index a605a72..c05552a 100644 (file)
@@ -55,7 +55,7 @@ if ($pageOb['mode'] == 'edit') {
 <?php if ($pageOb['mode'] == 'list'): ?>
 <?php if (!$headers_inc_count): ?>
   <th id="checkheader" width="35" onclick="document.messages.checkAll.checked = !document.messages.checkAll.checked; makeSelection(-1);">
-<?php if (!$print_view): ?>  
+<?php if (!$print_view): ?>
    <label for="checkAll" class="hidden">_("Check _All/None")</label>
    <input type="checkbox" class="checkbox" id="checkAll" name="checkAll" onclick="makeSelection(-1);" <?php echo Horde::getAccessKeyAndTitle(_("Check _All/None")) ?> />
 <?php endif; ?>
@@ -69,7 +69,7 @@ if ($pageOb['mode'] == 'edit') {
 <?php if ($pageOb['mode'] == 'list'): ?>
   <th class="<?php echo ($sortby == $key) ? 'selected' : 'item' ?>" width="<?php echo $val['width'] ?>" onclick="document.location.href='<?php echo addslashes(Horde_Util::addParameter(($sortby == $key) ? $sorturl : $pageOb['url'], array('sortby' => $key, 'actionID' => 'change_sort'))) ?>';">
   <?php if ($sortby == $key): ?>
-    <?php echo Horde::link(Horde_Util::addParameter($sorturl, array('sortby' => $key, 'actionID' => 'change_sort')), $val['stext'], null, null, null, $val['stext']) . Horde::img($sortImg, $sortText, '', $registry->getImageDir('horde')) ?></a>
+    <?php echo Horde::link(Horde_Util::addParameter($sorturl, array('sortby' => $key, 'actionID' => 'change_sort')), $val['stext'], null, null, null, $val['stext']) . Horde::img($sortImg, $sortText) ?></a>
   <?php endif; ?>
   <?php echo Horde::widget(Horde_Util::addParameter(($sortby == $key) ? $sorturl : $pageOb['url'], array('sortby' => $key, 'actionID' => 'change_sort')), $val['stext'], 'widget', null, null, $val['text']) ?>
 <?php else: ?>
index ffffe11..9ae73b8 100644 (file)
@@ -23,7 +23,7 @@ foreach ($data as $rowId => $row) {
             $sortText = sprintf(_("Sort by %s"), $value);
             echo '<th class="' . (($sortby == $colId) ? 'selected' : 'item') . ' sortable" onclick="document.location.href=' . addslashes(Horde_Util::addParameter(($sortby == $colId) ? $sorturl : $reporturl, 'sortby',  $colId)) . '">';
             if ($sortby == $colId) {
-                echo Horde::link(Horde_Util::addParameter($sorturl, 'sortby', $colId), $sortText, null, null, null, $sortText) . Horde::img($sortImg, $sortImgText, '', $registry->getImageDir('horde')) . '</a>';
+                echo Horde::link(Horde_Util::addParameter($sorturl, 'sortby', $colId), $sortText, null, null, null, $sortText) . Horde::img($sortImg, $sortImgText) . '</a>';
             }
             echo Horde::widget(Horde_Util::addParameter(($sortby == $colId) ? $sorturl : $reporturl, 'sortby', $colId), $sortText, 'widget', null, null, $value);
             echo '</th>';
index fdd919e..121ce29 100644 (file)
@@ -5,7 +5,7 @@
 <div class="header">
 <?php echo htmlspecialchars($title) ?>
 <?php if (isset($_SESSION['fima_search'])): ?>
-<?php echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('search.php'), 'actionID', 'clear_search'), _("Clear Search Query")) . Horde::img('delete.png', _("Clear Search Query"), '', $registry->getImageDir('horde')) ?></a>
+<?php echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('search.php'), 'actionID', 'clear_search'), _("Clear Search Query")) . Horde::img('delete.png', _("Clear Search Query")) ?></a>
 <?php endif; ?>
 </div>
 
diff --git a/fima/themes/silver/themed_graphics b/fima/themes/silver/themed_graphics
deleted file mode 100644 (file)
index e69de29..0000000
index 6351b67..fb07a96 100644 (file)
@@ -51,7 +51,7 @@ if ($activities instanceof PEAR_Error) {
 }
 
 $delete_url = Horde::applicationUrl('edit/activity.php');
-$delete_img = Horde::img('delete.png', '', '', $registry->getImageDir('horde'));
+$delete_img = Horde::img('delete.png');
 
 Horde::addScriptFile('tables.js', 'horde');
 require FOLKS_TEMPLATES . '/common-header.inc';
index 82bf337..1b17397 100644 (file)
@@ -68,11 +68,11 @@ if ($groups instanceof PEAR_Error) {
 // Prepare actions
 $actions = array(
     array('url' => Horde::applicationUrl('edit/friends/blacklist.php'),
-          'img' => Horde::img('delete.png', '', '', $registry->getImageDir('horde')),
+          'img' => Horde::img('delete.png'),
           'id' => 'user',
           'name' => _("Remove")),
     array('url' => Horde::applicationUrl('user.php'),
-          'img' => Horde::img('user.png', '', '', $registry->getImageDir('horde')),
+          'img' => Horde::img('user.png'),
           'id' => 'user',
           'name' => _("View profile")));
 
index 12fe7b9..31b88e2 100644 (file)
@@ -30,20 +30,20 @@ if ($list instanceof PEAR_Error) {
 // Prepare actions
 $actions = array(
     array('url' => Horde::applicationUrl('user.php'),
-          'img' => Horde::img('user.png', '', '', $registry->getImageDir('horde')),
+          'img' => Horde::img('user.png'),
           'id' => 'user',
           'name' => _("View profile")),
     array('url' => Horde::applicationUrl('edit/friends/approve.php'),
-          'img' => Horde::img('tick.png', '', '', $registry->getImageDir('horde')),
+          'img' => Horde::img('tick.png'),
           'id' => 'user',
           'name' => _("Approve")),
     array('url' => Horde::applicationUrl('edit/friends/reject.php'),
-          'img' => Horde::img('cross.png', '', '', $registry->getImageDir('horde')),
+          'img' => Horde::img('cross.png'),
           'id' => 'user',
           'name' => _("Reject")));
 if ($registry->hasInterface('letter')) {
     $actions[] = array('url' => $registry->callByPackage('letter', 'compose', ''),
-                        'img' => Horde::img('letter.png', '', '', $registry->getImageDir('letter')),
+                        'img' => Horde::img('letter.png'),
                         'id' => 'user_to',
                         'name' => _("Send message"));
 }
@@ -56,4 +56,4 @@ require FOLKS_TEMPLATES . '/edit/header.php';
 require FOLKS_TEMPLATES . '/edit/friends.php';
 require FOLKS_TEMPLATES . '/edit/footer.php';
 
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
index 08d79f1..edafeda 100644 (file)
@@ -31,16 +31,16 @@ if ($list instanceof PEAR_Error) {
 // Prepare actions
 $actions = array(
     array('url' => Horde::applicationUrl('edit/friends/add.php'),
-          'img' => Horde::img('delete.png', '', '', $registry->getImageDir('horde')),
+          'img' => Horde::img('delete.png'),
           'id' => 'user',
           'name' => _("Remove")),
     array('url' => Horde::applicationUrl('user.php'),
-          'img' => Horde::img('user.png', '', '', $registry->getImageDir('horde')),
+          'img' => Horde::img('user.png'),
           'id' => 'user',
           'name' => _("View profile")));
 if ($registry->hasInterface('letter')) {
     $actions[] = array('url' => $registry->callByPackage('letter', 'compose', ''),
-                        'img' => Horde::img('letter.png', '', '', $registry->getImageDir('letter')),
+                        'img' => Horde::img('letter.png'),
                         'id' => 'user_to',
                         'name' => _("Send message"));
 }
@@ -53,4 +53,4 @@ require FOLKS_TEMPLATES . '/edit/header.php';
 require FOLKS_TEMPLATES . '/edit/friends.php';
 require FOLKS_TEMPLATES . '/edit/footer.php';
 
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
index 904ffc9..5b050e5 100644 (file)
@@ -30,12 +30,12 @@ if ($list instanceof PEAR_Error) {
 // Prepare actions
 $actions = array(
     array('url' => Horde::applicationUrl('user.php'),
-          'img' => Horde::img('user.png', '', '', $registry->getImageDir('horde')),
+          'img' => Horde::img('user.png'),
           'id' => 'user',
           'name' => _("View profile")));
 if ($registry->hasInterface('letter')) {
     $actions[] = array('url' => $registry->callByPackage('letter', 'compose', ''),
-                        'img' => Horde::img('letter.png', '', '', $registry->getImageDir('letter')),
+                        'img' => Horde::img('letter.png'),
                         'id' => 'user_to',
                         'name' => _("Send message"));
 }
@@ -48,4 +48,4 @@ require FOLKS_TEMPLATES . '/edit/header.php';
 require FOLKS_TEMPLATES . '/edit/friends.php';
 require FOLKS_TEMPLATES . '/edit/footer.php';
 
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
index e28eb49..53daea9 100644 (file)
@@ -110,13 +110,13 @@ break;
 }
 
 $remove_url = Horde_Util::addParameter(Horde::applicationUrl('edit/friends/groups.php'), 'action', 'delete');
-$remove_img = Horde::img('delete.png', '', '', $registry->getImageDir('horde'));
+$remove_img = Horde::img('delete.png');
 $edit_url = Horde_Util::addParameter(Horde::applicationUrl('edit/friends/groups.php'), 'action', 'edit');
-$edit_img = Horde::img('edit.png', '', '', $registry->getImageDir('horde'));
+$edit_img = Horde::img('edit.png');
 $perms_url = Horde::applicationUrl('perms.php');
-$perms_img = Horde::img('perms.png', '', '', $registry->getImageDir('horde'));
+$perms_img = Horde::img('perms.png');
 $members_url = Horde::applicationUrl('edit/friends/friends.php');
-$members_img = Horde::img('group.png', '', '', $registry->getImageDir('horde'));
+$members_img = Horde::img('group.png');
 
 require FOLKS_TEMPLATES . '/common-header.inc';
 require FOLKS_TEMPLATES . '/menu.inc';
index 9a5e2b8..695dd70 100644 (file)
@@ -30,16 +30,16 @@ if ($list instanceof PEAR_Error) {
 // Prepare actions
 $actions = array(
     array('url' => Horde::applicationUrl('edit/friends/add.php'),
-          'img' => Horde::img('delete.png', '', '', $registry->getImageDir('horde')),
+          'img' => Horde::img('delete.png');
           'id' => 'user',
           'name' => _("Remove")),
     array('url' => Horde::applicationUrl('user.php'),
-          'img' => Horde::img('user.png', '', '', $registry->getImageDir('horde')),
+          'img' => Horde::img('user.png');
           'id' => 'user',
           'name' => _("View profile")));
 if ($registry->hasInterface('letter')) {
     $actions[] = array('url' => $registry->callByPackage('letter', 'compose', ''),
-                        'img' => Horde::img('letter.png', '', '', $registry->getImageDir('letter')),
+                        'img' => Horde::img('letter.png'),
                         'id' => 'user_to',
                         'name' => _("Send message"));
 }
@@ -52,4 +52,4 @@ require FOLKS_TEMPLATES . '/edit/header.php';
 require FOLKS_TEMPLATES . '/edit/friends.php';
 require FOLKS_TEMPLATES . '/edit/footer.php';
 
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
index 73805d5..db6c099 100644 (file)
@@ -30,16 +30,16 @@ if ($list instanceof PEAR_Error) {
 // Prepare actions
 $actions = array(
     array('url' => Horde::applicationUrl('edit/friends/add.php'),
-          'img' => Horde::img('delete.png', '', '', $registry->getImageDir('horde')),
+          'img' => Horde::img('delete.png');
           'id' => 'user',
           'name' => _("Add")),
     array('url' => Horde::applicationUrl('user.php'),
-          'img' => Horde::img('user.png', '', '', $registry->getImageDir('horde')),
+          'img' => Horde::img('user.png');
           'id' => 'user',
           'name' => _("View profile")));
 if ($registry->hasInterface('letter')) {
     $actions[] = array('url' => $registry->callByPackage('letter', 'compose', ''),
-                        'img' => Horde::img('letter.png', '', '', $registry->getImageDir('letter')),
+                        'img' => Horde::img('letter.png'),
                         'id' => 'user_to',
                         'name' => _("Send message"));
 }
@@ -52,4 +52,4 @@ require FOLKS_TEMPLATES . '/edit/header.php';
 require FOLKS_TEMPLATES . '/edit/friends.php';
 require FOLKS_TEMPLATES . '/edit/footer.php';
 
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
index dcd5508..0231817 100644 (file)
@@ -30,12 +30,12 @@ if ($list instanceof PEAR_Error) {
 // Prepare actions
 $actions = array(
     array('url' => Horde::applicationUrl('user.php'),
-          'img' => Horde::img('user.png', '', '', $registry->getImageDir('horde')),
+          'img' => Horde::img('user.png'),
           'id' => 'user',
           'name' => _("View profile")));
 if ($registry->hasInterface('letter')) {
     $actions[] = array('url' => $registry->callByPackage('letter', 'compose', ''),
-                        'img' => Horde::img('letter.png', '', '', $registry->getImageDir('letter')),
+                        'img' => Horde::img('letter.png'),
                         'id' => 'user_to',
                         'name' => _("Send message"));
 }
@@ -48,4 +48,4 @@ require FOLKS_TEMPLATES . '/edit/header.php';
 require FOLKS_TEMPLATES . '/edit/friends.php';
 require FOLKS_TEMPLATES . '/edit/footer.php';
 
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
index bb9aca4..c19a5b9 100644 (file)
@@ -290,7 +290,7 @@ class Folks {
      */
     static function getMenu()
     {
-        $img = $GLOBALS['registry']->getImageDir('horde');
+        $img = Horde_Themes::img(null, 'horde');
         $menu = new Horde_Menu(Horde_Menu::MASK_ALL);
         $menu->add(self::getUrlFor('user', Horde_Auth::getAuth()), _("My profile"), 'myaccount.png', $img);
         $menu->add(self::getUrlFor('list', 'friends'), _("Friends"), 'group.png', $img);
index d6caa48..8827ce1 100644 (file)
@@ -20,14 +20,14 @@ Horde::includeScriptFiles();
 
 ?>
 <title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
 <link rel="alternate" type="application/rss+xml" href="<?php echo Folks::getUrlFor('feed', 'online') ?>" title="<?php echo _("Online users") ?>" />
 <?php if (Horde_Auth::isAuthenticated()): ?>
 <link rel="alternate" type="application/rss+xml" href="<?php echo Folks::getUrlFor('feed', 'friends') ?>" title="<?php echo _("Online friends") ?>" />
 <link rel="alternate" type="application/rss+xml" href="<?php echo Folks::getUrlFor('feed', 'activity') ?>" title="<?php echo _("Friends activity") ?>" />
 <link rel="alternate" type="application/rss+xml" href="<?php echo Folks::getUrlFor('feed', 'know') ?>" title="<?php echo _("People you might know") ?>" />
 <?php endif; ?>
-<?php Horde::includeStylesheetFiles() ?>
+<?php Horde_Themes::includeStylesheetFiles() ?>
 </head>
 
 <body>
index 5fdb287..e234ae0 100644 (file)
@@ -23,7 +23,7 @@ if (empty($activities)) {
 <?php foreach ($activities as $activity) { ?>
 <tr>
     <td><a href="<?php echo $registry->get('webroot', $activity['activity_scope']) ?>" />
-        <img src="<?php echo $registry->getImageDir($activity['activity_scope']) . '/' . $activity['activity_scope'] ?>.png" />
+        <img src="<?php echo Horde_Themes::img($activitiy['activity_scope'] . 'png', $activity['activity_scope']) ?>" />
         <?php echo $registry->get('name', $activity['activity_scope']) ?></a>
     </td>
     <td><?php echo Folks::format_datetime($activity['activity_date']) ?></td>
index 9c14656..8ae6550 100644 (file)
@@ -39,7 +39,7 @@ echo '<tr><td><a href="' . Horde::applicationUrl('edit/friends/blacklist.php') .
 <br />
 <br />
 
-<h1 class="header"><?php echo Horde::img('feed.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Feeds") ?></h1>
+<h1 class="header"><?php echo Horde::img('feed.png') . ' ' . _("Feeds") ?></h1>
 <table class="striped">
 <tr><td><a href="<?php echo Folks::getUrlFor('feed', 'online') ?>"><?php echo _("Online users") ?></a></td></tr>
 <tr><td><a href="<?php echo Folks::getUrlFor('feed', 'friends') ?>"><?php echo _("Online friends") ?></a></td></tr>
index 1be8c1b..36ec3dc 100644 (file)
@@ -5,7 +5,7 @@
   <title><?php echo $title ?></title>
   <description><?php echo $title ?></description>
   <image>
-   <url><?php echo $registry->getImageDir() ?>/folks.png</url>
+   <url><?php echo Horde_Themes::img('folks.png') ?></url>
    <link><?php echo $link ?></link>
    <title><?php echo $title ?></title>
   </image>
index fdd5a88..ed79402 100644 (file)
@@ -5,7 +5,7 @@
   <title><?php echo $title ?></title>
   <description><?php echo $title ?></description>
   <image>
-   <url><?php echo $registry->getImageDir() ?>/folks.png</url>
+   <url><?php echo Horde_Themes::img('folks.png') ?></url>
    <link><?php echo $link ?></link>
    <title><?php echo $title ?></title>
   </image>
index 3092843..eb86ae1 100644 (file)
@@ -49,7 +49,7 @@ foreach ($headers as $key => $val) {
     echo '<th class="widget leftAlign nowrap">' . "\n";
     if ($criteria['sort_by'] == $key) {
         echo Horde::link(Horde_Util::addParameter($list_url, 'sort_dir', ($criteria['sort_dir'] == 'DESC') ? 'ASC' : 'DESC'), $val['text'], null, null, null, $val['text']);
-        echo Horde::img($sortImg, $sortText, null, $registry->getImageDir('horde')) . '</a>&nbsp;';
+        echo Horde::img($sortImg, $sortText) . '</a>&nbsp;';
     }
     echo Horde::widget(Horde_Util::addParameter(($criteria['sort_by'] == $key) ? $list_url : $list_url, 'sort_by', $key), $val['text'], 'widget');
     echo '</th>';
index ac59f3b..1f271ad 100644 (file)
@@ -11,7 +11,7 @@ if (!empty($queries)):
 <h1 class="header"><?php echo _("My queries") ?></h1>
 <?php
 foreach ($queries as $query) {
-    $delete_img = Horde::img('delete.png', _("Delete"), '', $registry->getImageDir('horde'));
+    $delete_img = Horde::img('delete.png', _("Delete"));
     echo '<tr><td>' . Horde::link(Horde_Util::addParameter(Horde::applicationUrl('search.php'), 'query', $query), '', 'bottom') . $query . '</a></td>';
     echo '<td>' . Horde::link(Horde_Util::addParameter(Horde::applicationUrl('save_search.php'), array('query' => $query, 'delete' => 1))) . $delete_img . '</a></td></tr>';
 }
index fc6f406..ce85939 100644 (file)
@@ -7,7 +7,7 @@ foreach ($apps as $app => $name) {
         $page = $registry->getInitialPage($app);
         echo '<div class="appService">' .
                 '<a href="' . $page . '">' .
-                '<img src="' . $registry->getImageDir($app) . '/'.  $app . '.png" /> ' .
+                '<img src="' . Horde_Themes::img($app . '.png', $app). '" /> ' .
                     $name .
                     '</a></div>';
     } catch (Horde_Exception $e) {}
index a24cca1..9ccee69 100644 (file)
@@ -4,27 +4,27 @@
 
 <?php if ($registry->hasInterface('letter')): ?>
 <a href="<?php echo $registry->callByPackage('letter', 'compose', array($user)) ?>" title="<?php echo _("Send private message") ?>">
-<img src="<?php echo $registry->getImageDir('letter') ?>/letter.png"> <?php echo _("Send message") ?></a>
+<img src="<?php echo Horde_Themes::img('letter.png') ?>"> <?php echo _("Send message") ?></a>
 
 <a href="<?php echo $registry->get('webroot', 'letter') ?>/compose.php?title=<?php echo _("Look at this profile") ?>&content=<?php echo Folks::getUrlFor('user', $user, true, -1) ?>"  title="<?php echo _("Send this profile to a friend") ?>">
-<img src="<?php echo $registry->getImageDir('horde') ?>/nav/right.png"> <?php echo _("Forward") ?></a>
+<img src="<?php echo Horde_Themes::img('/nav/right.png') ?>"> <?php echo _("Forward") ?></a>
 
 <?php endif; ?>
 
 <a href="javascript: document.getElementById('message_body').focus()" title="<?php echo _("Add a comment") ?>">
-<img src="<?php echo $registry->getImageDir('agora') ?>/agora.png"> <?php echo _("Add a comment") ?></a>
+<img src="<?php echo Horde_Themes::img('agora.png', 'agora') ?>"> <?php echo _("Add a comment") ?></a>
 
 <a href="<?php echo Horde_Util::addParameter(Horde::applicationUrl('edit/friends/add.php'), 'user', $user); ?>" title="<?php echo sprintf(_("Add %s as a friend?"), $user) ?>" onclick="return confirm('<?php echo sprintf(_("Add %s as a friend?"), $user) ?>')">
-<img src="<?php echo $registry->getImageDir('horde') ?>/user.png"> <?php echo _("Friend") ?></a>
+<img src="<?php echo Horde_Themes::img('user.png') ?>"> <?php echo _("Friend") ?></a>
 
 <a href="<?php echo Horde_Util::addParameter(Horde::applicationUrl('edit/friends/blacklist.php'), 'user', $user); ?>" title="<?php echo sprintf(_("Add %s to you blacklist?"), $user) ?>" onclick="return confirm('<?php echo sprintf(_("Add %s to you blacklist?"), $user) ?>')">
-<img src="<?php echo $registry->getImageDir('horde') ?>/locked.png"> <?php echo _("Blacklist") ?></a>
+<img src="<?php echo Horde_Themes::img('locked.png') ?>"> <?php echo _("Blacklist") ?></a>
 
 <a href="<?php echo Horde_Util::addParameter(Horde::applicationUrl('report.php'), 'user', $user); ?>" title="<?php echo _("Report user") ?>">
-<img src="<?php echo $registry->getImageDir('horde') ?>/problem.png"> <?php echo _("Report") ?></a>
+<img src="<?php echo Horde_Themes::img('problem.png') ?>"> <?php echo _("Report") ?></a>
 
 <a href="<?php echo Folks::getUrlFor('list', 'list') ?>" title="<?php echo _("User list") ?>">
-<img src="<?php echo $registry->getImageDir('horde') ?>/group.png"> <?php echo _("Users") ?></a>
+<img src="<?php echo Horde_Themes::img('group.png') ?>"> <?php echo _("Users") ?></a>
 
 </div>
 
index 319ff46..fd5cd34 100644 (file)
@@ -1,9 +1,9 @@
 <h1><?php echo $title ?></h1>
 
 <ul class="notices">
-<li><img src="<?php echo $registry->getImageDir('horde')?>/alerts/warning.png"><?php echo sprintf(_("User %s would like to his profile remains visible only to authenticated users."), $user) ?></li>
+<li><img src="<?php echo Horde_Themes::img('alerts/warning.png') ?>"><?php echo sprintf(_("User %s would like to his profile remains visible only to authenticated users."), $user) ?></li>
 <?php
-echo '<li><img src="' . $registry->getImageDir('horde') . '/alerts/success.png">'
+echo '<li><img src="' . Horde_Themes::img('alerts/success.png') ?>">'
                 . _("Click here to login.")
                 . ' <a href="' . Hode::getServiceLink('login', 'folks')  . '">' . _("Click here to login.") . '</a>'
                     . '</li>';
index 7440e59..5ccdcc7 100644 (file)
@@ -1,5 +1,5 @@
 <h1><?php echo $title ?></h1>
 
 <ul class="notices">
-<li><img src="<?php echo $registry->getImageDir('horde')?>/alerts/warning.png"><?php echo sprintf(_("User %s has been disabled."), $user) ?></li>
+<li><img src="<?php echo Horde_Themes::img('alerts/warning.png')"><?php echo sprintf(_("User %s has been disabled."), $user) ?></li>
 </ul>
index 73fb2b3..08d5f18 100644 (file)
@@ -1,10 +1,10 @@
 <h1><?php echo $title ?></h1>
 
 <ul class="notices">
-<li><img src="<?php echo $registry->getImageDir('horde')?>/alerts/warning.png"><?php echo sprintf(_("User %s would like to his profile remains visible only to his friends."), $user) ?></li>
-<?php 
+<li><img src="<?php echo Horde_Themes::img('alerts/warning.png') ?>"><?php echo sprintf(_("User %s would like to his profile remains visible only to his friends."), $user) ?></li>
+<?php
 if ($registry->hasMethod('letter/compose')) {
-    echo '<li><img src="' . $registry->getImageDir('letter') . '/letter.png">'
+    echo '<li><img src="' . Horde_Themes::img('letter.png') . ">'
                     . sprintf(_("You can still send a private message to user %s."), $user)
                     . ' <a href="' . $registry->callByPackage('letter', 'compose', array(array('user_to' => $user)))  . '">' . _("Click here") . '</a>'
                      . '</li>';
index b25256a..1a089ed 100644 (file)
@@ -1,5 +1,5 @@
 <h1><?php echo $title ?></h1>
 
 <ul class="notices">
-<li><img src="<?php echo $registry->getImageDir('horde')?>/alerts/warning.png"><?php echo sprintf(_("User %s is inactive."), $user) ?></li>
+<li><img src="<?php echo Horde_Themes::img('alerts/warning.png') ?>"><?php echo sprintf(_("User %s is inactive."), $user) ?></li>
 </ul>
index d21f7f8..9a71114 100644 (file)
@@ -1,10 +1,10 @@
 <h1><?php echo $title ?></h1>
 
 <ul class="notices">
-<li><img src="<?php echo $registry->getImageDir('horde')?>/alerts/warning.png"><?php echo sprintf(_("User %s would like to remain private."), $user) ?></li>
-<?php 
+<li><img src="<?php echo Horde_Themes::img('alerts/warning.png') ?>"><?php echo sprintf(_("User %s would like to remain private."), $user) ?></li>
+<?php
 if ($registry->hasMethod('letter/compose')) {
-    echo '<li><img src="' . $registry->getImageDir('letter') . '/letter.png">'
+    echo '<li><img src="' . Horde_Themes::img('letter.png') . '">'
                     . sprintf(_("You can still send a private message to user %s."), $user)
                     . ' <a href="' . $registry->callByPackage('letter', 'compose', array(array('user_to' => $user)))  . '">' . _("Click here") . '</a>'
                      . '</li>';
index 37ba555..c5391cc 100644 (file)
@@ -25,7 +25,7 @@ if ($profile['user_video']) {
 
 } else {
 
-    echo '<img src="' . $registry->getImageDir('horde') . '/guest.png" alt="'
+    echo '<img src="' . Horde_Themes::img('guest.png') . '" alt="'
                 . $user . '" title="' . _("Has no picture"). '" style="border: 2px solid #eeeeee; padding: 100px"/>';
 
 }
@@ -119,8 +119,8 @@ if (!empty($friends)):
 <tr>
 <td class="header" colspan="2">
 <span style="float: right">
-<a href="<?php echo Horde::applicationUrl('edit/friends/index.php') ?>" title="<?php echo _("Edit my firends") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/plus.png" /></a>
-<a href="<?php echo Horde_Util::addParameter(Horde::applicationUrl('edit/friends/index.php'), 'user', $user) ?>" title="<?php echo sprintf(_("Add %s as a friend?"), $user) ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/nav/right.png" /></a>
+<a href="<?php echo Horde::applicationUrl('edit/friends/index.php') ?>" title="<?php echo _("Edit my firends") ?>"><img src="<?php Horde_Themes::img('plus.png') ?>" /></a>
+<a href="<?php echo Horde_Util::addParameter(Horde::applicationUrl('edit/friends/index.php'), 'user', $user) ?>" title="<?php echo sprintf(_("Add %s as a friend?"), $user) ?>"><img src="<?php echo Horde_Themes::img('nav/right.png') ?>" /></a>
 </span>
 <?php echo _("Friends") ?> (<?php echo count($friends) ?>)
 </td>
@@ -145,8 +145,8 @@ $path = $registry->get('webroot', 'classifieds');
 <tr>
 <td class="header" colspan="2">
 <span style="float: right">
-<a href="<?php echo $path ?>/ads/index.php" title="<?php echo _("Add your content") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/plus.png" /></a>
-<a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/nav/right.png" /></a>
+<a href="<?php echo $path ?>/ads/index.php" title="<?php echo _("Add your content") ?>"><img src="<?php echo Horde_Themes::img('plus.png') ?>" /></a>
+<a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo Horde_Themes::img('nav/right.png') ?>" /></a>
 </span>
 <a href="<?php echo $path ?>/list.php?user_uid=<?php echo $user ?>" title="<?php echo _("Others user content") ?>" ><?php echo $registry->get('name', 'classified') ?> (<?php echo $profile['count_classifieds'] ?>)</a>
 </td>
@@ -170,8 +170,8 @@ $path = $registry->get('webroot', 'news');
 <tr>
 <td class="header" colspan="2">
 <span style="float: right">
-<a href="<?php echo $path ?>/add.php" title="<?php echo _("Add your content") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/plus.png" /></a>
-<a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/nav/right.png" /></a>
+<a href="<?php echo $path ?>/add.php" title="<?php echo _("Add your content") ?>"><img src="<?php echo Horde_Themes::img('plus.png') ?>" /></a>
+<a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo Horde_Themes::img('nav/right.png') ?>" /></a>
 </span>
 <a href="<?php echo $path ?>/search.php?user=<?php echo $user ?>" title="<?php echo _("Others user content") ?>" ><?php echo $registry->get('name', 'news') ?> (<?php echo $profile['count_news'] ?>)</a>
 </td>
@@ -195,8 +195,8 @@ $path = $registry->get('webroot', 'oscar');
 <tr>
 <td class="header" colspan="2">
 <span style="float: right">
-<a href="<?php echo $path ?>/videos/index.php" title="<?php echo _("Add your content") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/plus.png" /></a>
-<a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/nav/right.png" /></a>
+<a href="<?php echo $path ?>/videos/index.php" title="<?php echo _("Add your content") ?>"><img src="<?php echo Horde_Themes::img('plus.png') ?>" /></a>
+<a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo Horde_Themes::img('nav/right.png') ?>" /></a>
 </span>
 <a href="<?php echo $path ?>/search.php?author=<?php echo $user ?>" title="<?php echo _("Others user content") ?>" ><?php echo $registry->get('name', 'oscar') ?> (<?php echo $profile['count_videos'] ?>)</a>
 </a>
@@ -222,8 +222,8 @@ $path = $registry->get('webroot', 'genie');
 <tr>
 <td class="header" colspan="2">
 <span style="float: right">
-<a href="<?php echo $path ?>/wishlist.php?wishlist=<?php echo Horde_Auth::getAuth() ?>" title="<?php echo _("Add your content") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/plus.png" /></a>
-<a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/nav/right.png" /></a>
+<a href="<?php echo $path ?>/wishlist.php?wishlist=<?php echo Horde_Auth::getAuth() ?>" title="<?php echo _("Add your content") ?>"><img src="<?php echo Horde_Themes::img('plus.png') ?>" /></a>
+<a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo Horde_Themes::img('nav/right.png') ?>" /></a>
 </span>
 <a href="<?php echo $path ?>/wishlist.php?wishlist=<?php echo $user ?>" title="<?php echo _("Others user content") ?>" ><?php echo $registry->get('name', 'genie') ?> (<?php echo $profile['count_wishes'] ?>)</a>
 </td>
@@ -248,8 +248,8 @@ $path = $registry->get('webroot', 'ansel');
 <tr>
 <td class="header" colspan="2">
 <span style="float: right">
-<a href="<?php echo $path ?>/view.php?groupby=owner&view=List&owner=<?php echo Horde_Auth::getAuth() ?>" title="<?php echo _("Add your content") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/plus.png" /></a>
-<a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/nav/right.png" /></a>
+<a href="<?php echo $path ?>/view.php?groupby=owner&view=List&owner=<?php echo Horde_Auth::getAuth() ?>" title="<?php echo _("Add your content") ?>"><img src="<?php echo Horde_Themes::img('plus.png') ?>" /></a>
+<a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo Horde_Themes::img('nav/right.png') ?>" /></a>
 </span>
 <a href="<?php echo $path ?>/view.php?groupby=owner&view=List&owner=<?php echo $user ?>" title="<?php echo _("Others user content") ?>" ><?php echo $registry->get('name', 'ansel') ?> (<?php echo $profile['count_galleries'] ?>)</a> |
 <a href="<?php echo $path ?>/faces/search/owner.php?owner=<?php echo $user ?>" title="<?php echo _("Faces in user galleries") ?>"><?php echo _("Faces") ?></a>
@@ -276,8 +276,8 @@ $path = $registry->get('webroot', 'thomas');
 <tr>
 <td class="header" colspan="2">
 <span style="float: right">
-<a href="<?php echo $path ?>/edit.php" title="<?php echo _("Add your content") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/plus.png" /></a>
-<a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/nav/right.png" /></a>
+<a href="<?php echo $path ?>/edit.php" title="<?php echo _("Add your content") ?>"><img src="<?php echo Horde_Themes::img('plus.png') ?>" /></a>
+<a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo Horde_Themes::img('nav/right.png') ?>" /></a>
 </span>
 <a href="<?php echo $path ?>/user.php?user=<?php echo $user ?>" title="<?php echo _("Others user content") ?>" ><?php echo $registry->get('name', 'thomas') ?> (<?php echo $profile['count_blogs'] ?>)</a>
 </td>
@@ -302,8 +302,8 @@ $path = $registry->get('webroot', 'schedul');
 <tr>
 <td class="header" colspan="2">
 <span style="float: right">
-<a href="<?php echo $path ?>/add.php" title="<?php echo _("Add your content") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/plus.png" /></a>
-<a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/nav/right.png" /></a>
+<a href="<?php echo $path ?>/add.php" title="<?php echo _("Add your content") ?>"><img src="<?php echo Horde_Themes::img('plus.png') ?>" /></a>
+<a href="<?php echo $path ?>" title="<?php echo _("Preview") ?>"><img src="<?php echo Horde_Themes::img('nav/right.png') ?>" /></a>
 </span>
 <a href="<?php echo $path ?>/user.php?user=<?php echo $user ?>" title="<?php echo _("Others user content") ?>" ><?php echo $registry->get('name', 'schedul') ?> (<?php echo $profile['count_attendances'] ?>)</a>
 </td>
@@ -335,8 +335,8 @@ $path = $registry->get('webroot', 'schedul');
 <tr>
 <td class="header" colspan="2">
 <span style="float: right">
-<a href="/uporabniki/edit/activity.php" title="<?php echo _("Add your content") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/plus.png" /></a>
-<a href="/uporabniki/friends/index.php" title="<?php echo _("Preview") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/nav/right.png" /></a>
+<a href="/uporabniki/edit/activity.php" title="<?php echo _("Add your content") ?>"><img src="<?php echo Horde_Themes::img('plus.png') ?>" /></a>
+<a href="/uporabniki/friends/index.php" title="<?php echo _("Preview") ?>"><img src="<?php echo Horde_Themes::img('nav/right.png') ?>" /></a>
 </span>
 <?php echo _("Activity") ?>
 </td>
index ce3777b..765b10c 100644 (file)
@@ -61,7 +61,7 @@ abstract class Horde_Ajax_Imple_AutoCompleter extends Horde_Ajax_Imple_Base
                 'boxClass' => 'hordeACBox kronolithLongField',
                 'trigger' => $this->_params['triggerId'],
                 'uri' => (string)$this->_getUrl($config['pretty'], $GLOBALS['registry']->getApp()),
-                'URI_IMG_HORDE' => $GLOBALS['registry']->getImageDir('horde'),
+                'URI_IMG_HORDE' => Horde_Themes::img(null, 'horde'),
                 'box' => !empty($this->_params['box']) ? $this->_params['box'] : ''
             ), $config['params']);
 
index fd09ee5..ce774f1 100644 (file)
@@ -106,8 +106,7 @@ class Horde_Block_Layout
         if ($edit) {
             $icons .= Horde::link($this->getActionUrl('edit', $row, $col),
                                   _("Edit"))
-                . Horde::img('edit.png', _("Edit"), '',
-                             $GLOBALS['registry']->getImageDir('horde'))
+                . Horde::img('edit.png', _("Edit"))
                 . '</a>';
         }
         if ($this->isRemovable($row, $col)) {
@@ -116,8 +115,7 @@ class Horde_Block_Layout
                 '', '',
                 'return window.confirm(\''
                 . addslashes(_("Really delete this block?")) . '\')')
-                . Horde::img('delete.png', _("Remove"), '',
-                             $GLOBALS['registry']->getImageDir('horde'))
+                . Horde::img('delete.png', _("Remove"))
                 . '</a>';
         }
         return $icons;
index 3732f9d..274dca6 100644 (file)
@@ -622,7 +622,7 @@ class Horde_Block_Layout_Manager extends Horde_Block_Layout
         }
 
         return Horde::link($url, $title) .
-            Horde::img('block/' . $img . '.png', $title, '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+            Horde::img('block/' . $img . '.png', $title) . '</a>';
     }
 
     /**
index a06efe2..74b1ba3 100644 (file)
@@ -1425,35 +1425,27 @@ HTML;
     /**
      * Constructs a correctly-pathed link to an image.
      *
-     * @param string $src   The image file.
+     * @param mixed $src    The image file (either a string or a
+     *                      Horde_Themes_Image object).
      * @param string $alt   Text describing the image.
      * @param mixed  $attr  Any additional attributes for the image tag. Can be
      *                      a pre-built string or an array of key/value pairs
      *                      that will be assembled and html-encoded.
-     * @param string $dir   The root graphics directory.
      *
      * @return string  The full image tag.
      */
-    static public function img($src, $alt = '', $attr = '', $dir = null)
+    static public function img($src, $alt = '', $attr = '')
     {
         $charset = Horde_Nls::getCharset();
 
         /* If browser does not support images, simply return the ALT text. */
         if (!$GLOBALS['browser']->hasFeature('images')) {
-            $old_error = error_reporting(0);
-            $res = htmlspecialchars($alt, ENT_COMPAT, $charset);
-            error_reporting($old_error);
-            return $res;
+            return @htmlspecialchars($alt, ENT_COMPAT, $charset);
         }
 
         /* If no directory has been specified, get it from the registry. */
-        if (is_null($dir)) {
-            $dir = $GLOBALS['registry']->getImageDir();
-        }
-
-        /* If a directory has been provided, prepend it to the image source. */
-        if (!empty($dir)) {
-            $src = $dir . '/' . $src;
+        if (!($src instanceof Horde_Themes_Image) && ($src[0] != '/')) {
+            $src = Horde_Themes::img($src);
         }
 
         /* Build all of the tag attributes. */
@@ -1494,14 +1486,13 @@ HTML;
 
         /* If browser does not support images, simply return the ALT text. */
         if (!$GLOBALS['browser']->hasFeature('images')) {
-            $old_error = error_reporting(0);
-            $res = htmlspecialchars($alt, ENT_COMPAT, $charset);
-            error_reporting($old_error);
-            return $res;
+            return @htmlspecialchars($alt, ENT_COMPAT, $charset);
         }
 
         /* If no directory has been specified, get it from the registry. */
-        $dir = empty($options['dir']) ? $GLOBALS['registry']->getImageDir() : $options['dir'];
+        $dir = empty($options['dir'])
+            ? Horde_Themes::img()
+            : $options['dir'];
 
         /* If we can send as data, no need to get the full path */
         $src = self::base64ImgData($dir . '/' . $src);
@@ -1533,19 +1524,20 @@ HTML;
     /**
      * Generate RFC 2397-compliant image data strings.
      *
-     * @param string $file    Filename containing image data.
+     * @param mixed $in       URI or Horde_Themes_Image object containing
+     *                        image data.
      * @param integer $limit  Sets a hard size limit for image data; if
      *                        exceeded, will not string encode.
      *
      * @return string  The string to use in the image 'src' attribute; either
-     *                 the image data if the browser supports, or the filepath
+     *                 the image data if the browser supports, or the URI
      *                 if not.
      */
-    public function base64ImgData($file, $limit = null)
+    public function base64ImgData($in, $limit = null)
     {
         $dataurl = $GLOBALS['browser']->hasFeature('dataurl');
         if (!$dataurl) {
-            return $file;
+            return $in;
         }
 
         if (!is_null($limit) &&
@@ -1554,18 +1546,20 @@ HTML;
         }
 
         /* Only encode image files if they are below the dataurl limit. */
-        $filename = realpath($GLOBALS['registry']->get('fileroot', 'horde')) . preg_replace('/^' . preg_quote($GLOBALS['registry']->get('webroot', 'horde'), '/') . '/', '', $file);
-        if (!file_exists($filename)) {
-            return $file;
+        if (!($in instanceof Horde_Themes_Image)) {
+            $in = Horde_Themes_Image::fromUri($in);
+            if (!file_exists($in->fs)) {
+                return $in->uri;
+            }
         }
 
         /* Delete approx. 50 chars from the limit to account for the various
          * data/base64 header text.  Multiply by 0.75 to determine the
          * base64 encoded size. */
         return (($dataurl === true) ||
-                (filesize($filename) <= (($dataurl * 0.75) - 50)))
-            ? 'data:image/' . substr($file, strrpos($file, '.') + 1) . ';base64,' . base64_encode(file_get_contents($filename))
-            : $file;
+                (filesize($in->fs) <= (($dataurl * 0.75) - 50)))
+            ? 'data:image/' . substr($in->uri, strrpos($in->uri, '.') + 1) . ';base64,' . base64_encode(file_get_contents($in->fs))
+            : $in->uri;
     }
 
     /**
@@ -1680,228 +1674,6 @@ HTML;
     }
 
     /**
-     * Outputs the necessary style tags, honoring configuration choices as
-     * to stylesheet caching.
-     *
-     * @param array $options  Additional options:
-     * <pre>
-     * 'additional' - (array) TODO
-     * 'sub' - (string) A subdirectory containing additional CSS files to
-     *         load as an overlay to the base CSS files.
-     * </pre>
-     */
-    static public function includeStylesheetFiles($options = array())
-    {
-        global $conf, $prefs, $registry;
-
-        $themesfs = $registry->get('themesfs');
-        $themesuri = $registry->get('themesuri');
-
-        $css = self::getStylesheets($prefs->getValue('theme'), $options);
-        $css_out = array();
-
-        if (!empty($options['additional'])) {
-            $css = array_merge($css, $options['additional']);
-        }
-
-        $cache_type = empty($conf['cachecss'])
-            ? 'none'
-            : $conf['cachecssparams']['driver'];
-
-        if ($cache_type == 'none') {
-            $css_out = $css;
-        } else {
-            $mtime = array(0);
-            $out = '';
-
-            foreach ($css as $file) {
-                $mtime[] = filemtime($file['f']);
-            }
-
-            $sig = hash('md5', serialize($css) . max($mtime));
-
-            switch ($cache_type) {
-            case 'filesystem':
-                $css_filename = '/static/' . $sig . '.css';
-                $css_path = $registry->get('fileroot', 'horde') . $css_filename;
-                $css_url = $registry->get('webroot', 'horde') . $css_filename;
-                $exists = file_exists($css_path);
-                break;
-
-            case 'horde_cache':
-                $cache = $GLOBALS['injector']->getInstance('Horde_Cache');
-
-                // Do lifetime checking here, not on cache display page.
-                $exists = $cache->exists($sig, empty($GLOBALS['conf']['cachecssparams']['lifetime']) ? 0 : $GLOBALS['conf']['cachecssparams']['lifetime']);
-                $css_url = self::getCacheUrl('css', array('cid' => $sig));
-                break;
-            }
-
-            if (!$exists) {
-                $flags = defined('FILE_IGNORE_NEW_LINES')
-                    ? (FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES)
-                    : 0;
-
-                foreach ($css as $file) {
-                    $path = substr($file['u'], 0, strrpos($file['u'], '/') + 1);
-
-                    // Fix relative URLs, convert graphics URLs to data URLs
-                    // (if possible), remove multiple whitespaces, and strip
-                    // comments.
-                    $tmp = preg_replace(array('/(url\(["\']?)([^\/])/i', '/\s+/', '/\/\*.*?\*\//'), array('$1' . $path . '$2', ' ', ''), implode('', file($file['f'], $flags)));
-                    if ($GLOBALS['browser']->hasFeature('dataurl')) {
-                        $tmp = preg_replace_callback('/(background(?:-image)?:[^;}]*(?:url\(["\']?))(.*?)((?:["\']?\)))/i', array('Horde', 'stylesheetCallback'), $tmp);
-                    }
-                    $out .= $tmp;
-                }
-
-                /* Use CSS tidy to clean up file. */
-                if ($conf['cachecssparams']['compress'] == 'php') {
-                    try {
-                        $out = Horde_Text_Filter::filter($out, 'csstidy');
-                    } catch (Horde_Exception $e) {}
-                }
-
-                switch ($cache_type) {
-                case 'filesystem':
-                    if (!file_put_contents($css_path, $out)) {
-                        throw new Horde_Exception('Could not write cached CSS file to disk.');
-                    }
-                    break;
-
-                case 'horde_cache':
-                    $cache->set($sig, $out);
-                    break;
-                }
-            }
-
-            $css_out = array(array('u' => $css_url));
-        }
-
-        foreach ($css_out as $file) {
-            echo '<link href="' . $file['u'] . "\" rel=\"stylesheet\" type=\"text/css\" />\n";
-        }
-    }
-
-    /**
-     * Callback for includeStylesheetFiles() to convert images to base64
-     * data strings.
-     *
-     * @param array $matches  The list of matches from preg_replace_callback.
-     *
-     * @return string  The image string.
-     */
-    public function stylesheetCallback($matches)
-    {
-        /* Limit data to 16 KB in stylesheets. */
-        return $matches[1] . self::base64ImgData($matches[2], 16384) . $matches[3];
-    }
-
-    /**
-     * Return the list of base stylesheets to display.
-     * Callback for includeStylesheetFiles() to convert images to base64
-     * data strings.
-     *
-     * @param mixed $theme    The theme to use; specify an empty value to
-     *                        retrieve the theme from user preferences, and
-     *                        false for no theme.
-     * @param array $options  Additional options:
-     * <pre>
-     * 'app' - (string) The current application.
-     * 'sub' - (string) A subdirectory containing additional CSS files to
-     *         load as an overlay to the base CSS files.
-     * </pre>
-     *
-     * @return array  TODO
-     */
-    public function getStylesheets($theme = '', $options = array())
-    {
-        if (($theme === '') && isset($GLOBALS['prefs'])) {
-            $theme = $GLOBALS['prefs']->getValue('theme');
-        }
-
-        $css = array();
-
-        $css_list = array('screen');
-        if (isset($GLOBALS['nls']['rtl'][$GLOBALS['language']])) {
-            $css_list[] = 'rtl';
-        }
-
-        /* Collect browser specific stylesheets if needed. */
-        switch ($GLOBALS['browser']->getBrowser()) {
-        case 'msie':
-            $ie_major = $GLOBALS['browser']->getMajor();
-            if ($ie_major == 8) {
-                $css_list[] = 'ie8';
-            } elseif ($ie_major == 7) {
-                $css_list[] = 'ie7';
-            } elseif ($ie_major < 7) {
-                $css_list[] = 'ie6_or_less';
-                if ($GLOBALS['browser']->getPlatform() == 'mac') {
-                    $css_list[] = 'ie5mac';
-                }
-            }
-            break;
-
-
-        case 'opera':
-            $css_list[] = 'opera';
-            break;
-
-        case 'mozilla':
-            $css_list[] = 'mozilla';
-            break;
-
-        case 'webkit':
-            $css_list[] = 'webkit';
-        }
-
-        $curr_app = empty($options['app'])
-            ? $GLOBALS['registry']->getApp()
-            : $options['app'];
-        $apps = array_unique(array('horde', $curr_app));
-        $sub = empty($options['sub']) ? null : $options['sub'];
-
-        foreach ($apps as $app) {
-            $themes_fs = $GLOBALS['registry']->get('themesfs', $app) . '/';
-            $themes_uri = self::url($GLOBALS['registry']->get('themesuri', $app), false, -1) . '/';
-
-            foreach ($css_list as $css_name) {
-                $css[$themes_fs . $css_name . '.css'] = $themes_uri . $css_name . '.css';
-                if ($sub && ($app == $curr_app)) {
-                    $css[$themes_fs . $sub . '/' . $css_name . '.css'] = $themes_uri . $sub . '/' . $css_name . '.css';
-                }
-
-                if (!empty($theme)) {
-                    $css[$themes_fs . $theme . '/' . $css_name . '.css'] = $themes_uri . $theme . '/' . $css_name . '.css';
-                    if ($sub && ($app == $curr_app)) {
-                        $css[$themes_fs . $theme . '/' . $sub . '/' . $css_name . '.css'] = $themes_uri . $theme . '/' . $sub . '/' . $css_name . '.css';
-                    }
-                }
-            }
-        }
-
-        /* Add user-defined additional stylesheets. */
-        try {
-            $css = array_merge($css, self::callHook('cssfiles', array($theme), 'horde'));
-        } catch (Horde_Exception_HookNotSet $e) {}
-        if ($curr_app != 'horde') {
-            try {
-                $css = array_merge($css, self::callHook('cssfiles', array($theme), $curr_app));
-            } catch (Horde_Exception_HookNotSet $e) {}
-        }
-
-        $css_out = array();
-        foreach ($css as $f => $u) {
-            if (file_exists($f)) {
-                $css_out[] = array('f' => $f, 'u' => $u);
-            }
-        }
-
-        return $css_out;
-    }
-
-    /**
      * Returns an un-used access key from the label given.
      *
      * @param string $label     The label to choose an access key from.
index 5789361..da64300 100644 (file)
@@ -106,7 +106,7 @@ class Horde_Core_Notification_Status extends Horde_Notification_Event_Status
             return parent::__toString();
         }
 
-        return Horde::img($img, $label, null, $GLOBALS['registry']->getImageDir('horde')) . $text;
+        return Horde::img($img, $label) . $text;
     }
 
 }
index fba3c5b..fd414c5 100644 (file)
@@ -214,7 +214,7 @@ class Horde_Help
 
         $url = Horde::getServiceLink('help', $module)->add('topic', $topic)->setRaw(true);
         return Horde::link($url, _("Help"), 'helplink', 'hordehelpwin', Horde::popupJs($url, array('urlencode' => true)) . 'return false;') .
-            Horde::img('help.png', _("Help"), 'width="16" height="16"', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+            Horde::img('help.png', _("Help"), 'width="16" height="16"') . '</a>';
     }
 
 
index 1a8c072..822ba6f 100644 (file)
@@ -148,7 +148,6 @@ class Horde_Menu
     {
         global $conf, $registry, $prefs;
 
-        $graphics = $registry->getImageDir('horde');
         $app = $registry->getApp();
 
         if ($this->_mask !== self::MASK_NONE) {
@@ -163,14 +162,14 @@ class Horde_Menu
         if (($this->_mask & self::MASK_PREFS) &&
             $this->showService('options') &&
             ($url = Horde::getServiceLink('options', $app))) {
-            $this->add($url, _("_Options"), 'prefs.png', $graphics);
+            $this->add($url, _("_Options"), 'prefs.png');
         }
 
         /* Add problem link. */
         if (($this->_mask & self::MASK_PROBLEM) &&
             $this->showService('problem') &&
             ($problem_link = Horde::getServiceLink('problem', $app))) {
-            $this->add($problem_link, _("Problem"), 'problem.png', $graphics);
+            $this->add($problem_link, _("Problem"), 'problem.png');
         }
 
         /* Add help link. */
@@ -178,7 +177,7 @@ class Horde_Menu
             $this->showService('help') &&
             ($help_link = Horde::getServiceLink('help', $app))) {
             Horde::
-            $this->add($help_link, _("Help"), 'help_index.png', $graphics, 'help', Horde::popupJs($help_link, array('urlencode' => true)) . 'return false;', 'helplink');
+            $this->add($help_link, _("Help"), 'help_index.png', null, 'help', Horde::popupJs($help_link, array('urlencode' => true)) . 'return false;', 'helplink');
         }
 
         /* Login/Logout. */
@@ -194,12 +193,12 @@ class Horde_Menu
             if (Horde_Auth::getAuth()) {
                 if ((!$prefs->getValue('show_sidebar') || $this->showService('logout')) &&
                     ($logout_link = Horde::getServiceLink('logout', $app))) {
-                    $this->add($logout_link, _("_Log out"), 'logout.png', $graphics, $auth_target, null, '__noselection');
+                    $this->add($logout_link, _("_Log out"), 'logout.png', null, $auth_target, null, '__noselection');
                 }
             } else {
                 if ($this->showService('login') &&
                     ($login_link = Horde::getServiceLink('login', $app))) {
-                    $this->add(Horde_Util::addParameter($login_link, array('url' => Horde::selfUrl(true, true, true))), _("_Log in"), 'login.png', $graphics, $auth_target, null, '__noselection');
+                    $this->add(Horde_Util::addParameter($login_link, array('url' => Horde::selfUrl(true, true, true))), _("_Log in"), 'login.png', null, $auth_target, null, '__noselection');
                 }
             }
         }
@@ -240,7 +239,7 @@ class Horde_Menu
             /* Icon. */
             $icon = '';
             if ($menu_view == 'icon' || $menu_view == 'both') {
-                if (!isset($m['icon_path'])) {
+                if (empty($m['icon_path'])) {
                     $m['icon_path'] = null;
                 }
                 $icon = Horde::img($m['icon'], Horde::stripAccessKey($m['text']), '', $m['icon_path']) . '<br />';
index 6ab1f77..6642d50 100644 (file)
@@ -63,13 +63,6 @@ class Horde_Registry
     protected $_apis = array();
 
     /**
-     * Cached values of the image directories.
-     *
-     * @param array
-     */
-    protected $_imgDir = array();
-
-    /**
      * Hash storing information on each registry-aware application.
      *
      * @var array
@@ -1258,7 +1251,7 @@ class Horde_Registry
             $pval = $this->applications[$app][$parameter];
         } else {
             $pval = ($parameter == 'icon')
-                ? $this->getImageDir($app) . '/' . $app . '.png'
+                ? Horde_Themes::img($app . '.png', $app)
                 : (isset($this->applications['horde'][$parameter]) ? $this->applications['horde'][$parameter] : null);
         }
 
@@ -1364,55 +1357,6 @@ class Horde_Registry
     }
 
     /**
-     * Function to work out an application's graphics URI, optionally taking
-     * into account any themes directories that may be set up.
-     *
-     * @param string $app        The application for which to get the image
-     *                           directory. If blank will default to current
-     *                           application.
-     * @param boolean $usetheme  Take into account any theme directory?
-     *
-     * @return string  The image directory uri path.
-     */
-    public function getImageDir($app = null, $usetheme = true)
-    {
-        if (empty($app)) {
-            $app = $this->getApp();
-        }
-
-        if ($this->get('status', $app) == 'heading') {
-            $app = 'horde';
-        }
-
-        $sig = strval($app . '|' . $usetheme);
-
-        if (isset($this->_imgDir[$sig])) {
-            return $this->_imgDir[$sig];
-        }
-
-        /* This is the default location for the graphics. */
-        $this->_imgDir[$sig] = $this->get('themesuri', $app) . '/graphics';
-
-        /* Figure out if this is going to be overridden by any theme
-         * settings. */
-        if ($usetheme &&
-            isset($GLOBALS['prefs']) &&
-            ($theme = $GLOBALS['prefs']->getValue('theme'))) {
-            /* Since theme information is so limited, store directly in the
-             * session. */
-            if (!isset($_SESSION['_registry']['theme'][$theme][$app])) {
-                $_SESSION['_registry']['theme'][$theme][$app] = file_exists($this->get('themesfs', $app) . '/' . $theme . '/themed_graphics');
-            }
-
-            if ($_SESSION['_registry']['theme'][$theme][$app]) {
-                $this->_imgDir[$sig] = $this->get('themesuri', $app) . '/' . $theme . '/graphics';
-            }
-        }
-
-        return $this->_imgDir[$sig];
-    }
-
-    /**
      * Query the initial page for an application - the webroot, if there is no
      * initial_page set, and the initial_page, if it is set.
      *
diff --git a/framework/Core/lib/Horde/Themes.php b/framework/Core/lib/Horde/Themes.php
new file mode 100644 (file)
index 0000000..44a767f
--- /dev/null
@@ -0,0 +1,394 @@
+<?php
+/**
+ * The Horde_Themes:: class provides an interface to handling Horde themes.
+ *
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (LGPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
+ *
+ * @author  Michael Slusarz <slusarz@horde.org>
+ * @package Core
+ */
+class Horde_Themes
+{
+    /**
+     * Outputs the necessary style tags, honoring configuration choices as
+     * to stylesheet caching.
+     *
+     * @param array $options  Additional options:
+     * <pre>
+     * 'additional' - (array) TODO
+     * 'sub' - (string) A subdirectory containing additional CSS files to
+     *         load as an overlay to the base CSS files.
+     * </pre>
+     */
+    static public function includeStylesheetFiles($options = array())
+    {
+        global $conf, $prefs, $registry;
+
+        $themesfs = $registry->get('themesfs');
+        $themesuri = $registry->get('themesuri');
+
+        $css = self::getStylesheets($prefs->getValue('theme'), $options);
+        $css_out = array();
+
+        if (!empty($options['additional'])) {
+            $css = array_merge($css, $options['additional']);
+        }
+
+        $cache_type = empty($conf['cachecss'])
+            ? 'none'
+            : $conf['cachecssparams']['driver'];
+
+        if ($cache_type == 'none') {
+            $css_out = $css;
+        } else {
+            $mtime = array(0);
+            $out = '';
+
+            foreach ($css as $file) {
+                $mtime[] = filemtime($file['f']);
+            }
+
+            $sig = hash('md5', serialize($css) . max($mtime));
+
+            switch ($cache_type) {
+            case 'filesystem':
+                $css_filename = '/static/' . $sig . '.css';
+                $css_path = $registry->get('fileroot', 'horde') . $css_filename;
+                $css_url = $registry->get('webroot', 'horde') . $css_filename;
+                $exists = file_exists($css_path);
+                break;
+
+            case 'horde_cache':
+                $cache = $GLOBALS['injector']->getInstance('Horde_Cache');
+
+                // Do lifetime checking here, not on cache display page.
+                $exists = $cache->exists($sig, empty($GLOBALS['conf']['cachecssparams']['lifetime']) ? 0 : $GLOBALS['conf']['cachecssparams']['lifetime']);
+                $css_url = Horde::getCacheUrl('css', array('cid' => $sig));
+                break;
+            }
+
+            if (!$exists) {
+                $flags = defined('FILE_IGNORE_NEW_LINES')
+                    ? (FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES)
+                    : 0;
+
+                foreach ($css as $file) {
+                    $path = substr($file['u'], 0, strrpos($file['u'], '/') + 1);
+
+                    // Fix relative URLs, convert graphics URLs to data URLs
+                    // (if possible), remove multiple whitespaces, and strip
+                    // comments.
+                    $tmp = preg_replace(array('/(url\(["\']?)([^\/])/i', '/\s+/', '/\/\*.*?\*\//'), array('$1' . $path . '$2', ' ', ''), implode('', file($file['f'], $flags)));
+                    if ($GLOBALS['browser']->hasFeature('dataurl')) {
+                        $tmp = preg_replace_callback('/(background(?:-image)?:[^;}]*(?:url\(["\']?))(.*?)((?:["\']?\)))/i', array(__CLASS__, 'stylesheetCallback'), $tmp);
+                    }
+                    $out .= $tmp;
+                }
+
+                /* Use CSS tidy to clean up file. */
+                if ($conf['cachecssparams']['compress'] == 'php') {
+                    try {
+                        $out = Horde_Text_Filter::filter($out, 'csstidy');
+                    } catch (Horde_Exception $e) {}
+                }
+
+                switch ($cache_type) {
+                case 'filesystem':
+                    if (!file_put_contents($css_path, $out)) {
+                        throw new Horde_Exception('Could not write cached CSS file to disk.');
+                    }
+                    break;
+
+                case 'horde_cache':
+                    $cache->set($sig, $out);
+                    break;
+                }
+            }
+
+            $css_out = array(array('u' => $css_url));
+        }
+
+        foreach ($css_out as $file) {
+            echo '<link href="' . $file['u'] . "\" rel=\"stylesheet\" type=\"text/css\" />\n";
+        }
+    }
+
+    /**
+     * Callback for includeStylesheetFiles() to convert images to base64
+     * data strings.
+     *
+     * @param array $matches  The list of matches from preg_replace_callback.
+     *
+     * @return string  The image string.
+     */
+    static public function stylesheetCallback($matches)
+    {
+        /* Limit data to 16 KB in stylesheets. */
+        return $matches[1] . Horde::base64ImgData($matches[2], 16384) . $matches[3];
+    }
+
+    /**
+     * Return the list of base stylesheets to display.
+     * Callback for includeStylesheetFiles() to convert images to base64
+     * data strings.
+     *
+     * @param mixed $theme    The theme to use; specify an empty value to
+     *                        retrieve the theme from user preferences, and
+     *                        false for no theme.
+     * @param array $options  Additional options:
+     * <pre>
+     * 'app' - (string) The current application.
+     * 'sub' - (string) A subdirectory containing additional CSS files to
+     *         load as an overlay to the base CSS files.
+     * </pre>
+     *
+     * @return array  TODO
+     */
+    static public function getStylesheets($theme = '', $options = array())
+    {
+        if (($theme === '') && isset($GLOBALS['prefs'])) {
+            $theme = $GLOBALS['prefs']->getValue('theme');
+        }
+
+        $css = array();
+
+        $css_list = array('screen');
+        if (isset($GLOBALS['nls']['rtl'][$GLOBALS['language']])) {
+            $css_list[] = 'rtl';
+        }
+
+        /* Collect browser specific stylesheets if needed. */
+        switch ($GLOBALS['browser']->getBrowser()) {
+        case 'msie':
+            $ie_major = $GLOBALS['browser']->getMajor();
+            if ($ie_major == 8) {
+                $css_list[] = 'ie8';
+            } elseif ($ie_major == 7) {
+                $css_list[] = 'ie7';
+            } elseif ($ie_major < 7) {
+                $css_list[] = 'ie6_or_less';
+                if ($GLOBALS['browser']->getPlatform() == 'mac') {
+                    $css_list[] = 'ie5mac';
+                }
+            }
+            break;
+
+
+        case 'opera':
+            $css_list[] = 'opera';
+            break;
+
+        case 'mozilla':
+            $css_list[] = 'mozilla';
+            break;
+
+        case 'webkit':
+            $css_list[] = 'webkit';
+        }
+
+        $curr_app = empty($options['app'])
+            ? $GLOBALS['registry']->getApp()
+            : $options['app'];
+        $apps = array_unique(array('horde', $curr_app));
+        $sub = empty($options['sub']) ? null : $options['sub'];
+
+        foreach ($apps as $app) {
+            $themes_fs = $GLOBALS['registry']->get('themesfs', $app) . '/';
+            $themes_uri = Horde::url($GLOBALS['registry']->get('themesuri', $app), false, -1) . '/';
+
+            foreach ($css_list as $css_name) {
+                $css[$themes_fs . $css_name . '.css'] = $themes_uri . $css_name . '.css';
+                if ($sub && ($app == $curr_app)) {
+                    $css[$themes_fs . $sub . '/' . $css_name . '.css'] = $themes_uri . $sub . '/' . $css_name . '.css';
+                }
+
+                if (!empty($theme)) {
+                    $css[$themes_fs . $theme . '/' . $css_name . '.css'] = $themes_uri . $theme . '/' . $css_name . '.css';
+                    if ($sub && ($app == $curr_app)) {
+                        $css[$themes_fs . $theme . '/' . $sub . '/' . $css_name . '.css'] = $themes_uri . $theme . '/' . $sub . '/' . $css_name . '.css';
+                    }
+                }
+            }
+        }
+
+        /* Add user-defined additional stylesheets. */
+        try {
+            $css = array_merge($css, Horde::callHook('cssfiles', array($theme), 'horde'));
+        } catch (Horde_Exception_HookNotSet $e) {}
+        if ($curr_app != 'horde') {
+            try {
+                $css = array_merge($css, Horde::callHook('cssfiles', array($theme), $curr_app));
+            } catch (Horde_Exception_HookNotSet $e) {}
+        }
+
+        $css_out = array();
+        foreach ($css as $f => $u) {
+            if (file_exists($f)) {
+                $css_out[] = array('f' => $f, 'u' => $u);
+            }
+        }
+
+        return $css_out;
+    }
+
+    /**
+     * Return the path to an image, using the default image if the image does
+     * not exist in the current theme.
+     *
+     * @param string $name    The image name. If null, will return the image
+     *                        directory.
+     * @param mixed $options  Additional options. If a string, is taken to be
+     *                        the 'app' parameter. If an array, the following
+     *                        options are available:
+     * <pre>
+     * 'app' - (string) Use this application instead of the current app.
+     * 'nohorde' - (boolean) If true, do not fallback to horde for image.
+     * 'notheme' - (boolean) If true, do not use themed data.
+     * 'theme' - (string) Use this theme instead of the Horde default.
+     * </pre>
+     *
+     * @return Horde_Themes_Image  An object which contains the URI
+     *                             and filesystem location of the image.
+     */
+    static public function img($name = null, $options = array())
+    {
+        return self::_getObject('graphics', $name, $options);
+    }
+
+    /**
+     * Return the path to a sound, using the default sound if the sound does
+     * not exist in the current theme.
+     *
+     * @param string $name    The sound name. If null, will return the sound
+     *                        directory.
+     * @param mixed $options  Additional options. If a string, is taken to be
+     *                        the 'app' parameter. If an array, the following
+     *                        options are available:
+     * <pre>
+     * 'app' - (string) Use this application instead of the current app.
+     * 'nohorde' - (boolean) If true, do not fallback to horde for sound.
+     * 'notheme' - (boolean) If true, do not use themed data.
+     * 'theme' - (string) Use this theme instead of the Horde default.
+     * </pre>
+     *
+     * @return Horde_Themes_Image  An object which contains the URI
+     *                             and filesystem location of the sound.
+     */
+    static public function sound($name = null, $options = array())
+    {
+        return self::_getObject('sound', $name, $options);
+    }
+
+    /**
+     * Return the path to a themes element, using the default element if the
+     * image does not exist in the current theme.
+     *
+     * @param string $type    The element type ('graphics', 'sound').
+     * @param string $name    The element name. If null, will return the
+     *                        element directory.
+     * @param mixed $options  Additional options. If a string, is taken to be
+     *                        the 'app' parameter. If an array, the following
+     *                        options are available:
+     * <pre>
+     * 'app' - (string) Use this application instead of the current app.
+     * 'nohorde' - (boolean) If true, do not fallback to horde for element.
+     * 'notheme' - (boolean) If true, do not use themed data.
+     * 'theme' - (string) Use this theme instead of the Horde default.
+     * </pre>
+     *
+     * @return Horde_Themes_Element  An object which contains the URI and
+     *                               filesystem location of the element.
+     */
+    static protected function _getObject($type, $name, $options)
+    {
+        if (is_string($options)) {
+            $app = $options;
+            $options = array();
+        } else {
+            $app = empty($options['app'])
+                ? $GLOBALS['registry']->getApp()
+                : $options['app'];
+        }
+        if ($GLOBALS['registry']->get('status', $app) == 'heading') {
+            $app = 'horde';
+        }
+
+        $app_list = array($app);
+        if ($app != 'horde' && empty($options['nohorde'])) {
+            $app_list[] = 'horde';
+        }
+        $path = '/' . $type . (is_null($name) ? '' : '/' . $name);
+
+        $classname = ($type == 'graphics')
+            ? 'Horde_Themes_Image'
+            : 'Horde_Themes_Sound';
+
+        /* Check themes first. */
+        if (empty($options['notheme']) &&
+            isset($GLOBALS['prefs']) &&
+            (($theme = $GLOBALS['prefs']->getValue('theme')) ||
+             (!empty($options['theme']) && ($theme = $options['theme'])))) {
+            $tpath = '/' . $theme . $path;
+            foreach ($app_list as $app) {
+                $filepath = $GLOBALS['registry']->get('themesfs', $app) . $tpath;
+                if (is_null($name) || file_exists($filepath)) {
+                    return new $classname($GLOBALS['registry']->get('themesuri', $app) . $tpath, $filepath);
+                }
+            }
+        }
+
+        /* Fall back to app/horde defaults. */
+        foreach ($app_list as $app) {
+            $filepath = $GLOBALS['registry']->get('themesfs', $app) . $path;
+            if (file_exists($filepath)) {
+                return new $classname($GLOBALS['registry']->get('themesuri', $app) . $path, $filepath);
+            }
+        }
+
+        return '';
+    }
+
+    /**
+     * Returns a list of available sounds for a theme.
+     *
+     * @return array  An array of Horde_Themes_Sound objects. Keys are the
+     *                base filenames.
+     */
+    static public function soundList()
+    {
+        $app = $GLOBALS['registry']->getApp();
+
+        /* Do search in reverse order - app + theme sounds have the highest
+         * priority and will overwrite previous sound definitions. */
+        $locations = array(
+            self::sound(null, array('app' => 'horde', 'notheme' => true)),
+            // Placeholder for app
+            null,
+            self::sound(null, 'horde')
+        );
+
+        if ($app != 'horde') {
+            $locations[1] = self::sound(null, array('app' => $app, 'notheme' => true));
+            $locations[3] = self::sound(null, $app);
+        }
+
+        $sounds = array();
+        foreach ($locations as $val) {
+            if ($val) {
+                foreach (glob($val->fs . '/*.wav') as $file) {
+                    $file = basename($file);
+                    if (!isset($sounds[$file])) {
+                        $sounds[$file] = self::sound($file);
+                    }
+                }
+            }
+        }
+
+        ksort($sounds);
+        return $sounds;
+    }
+
+}
diff --git a/framework/Core/lib/Horde/Themes/Element.php b/framework/Core/lib/Horde/Themes/Element.php
new file mode 100644 (file)
index 0000000..88392f5
--- /dev/null
@@ -0,0 +1,64 @@
+<?php
+/**
+ * The Horde_Themes_Element:: class provides an object-oriented interface to
+ * a themes element.
+ *
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (LGPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
+ *
+ * @author  Michael Slusarz <slusarz@horde.org>
+ * @package Core
+ */
+class Horde_Themes_Element
+{
+    /**
+     * The URI.
+     *
+     * @var string
+     */
+    public $uri = '';
+
+    /**
+     * The filesystem path.
+     *
+     * @var string
+     */
+    public $fs = '';
+
+    /**
+     * Constructor.
+     *
+     * @param string $uri  The image URI.
+     * @param string $fs   The image filesystem path.
+     */
+    public function __construct($uri, $fs)
+    {
+        $this->uri = $uri;
+        $this->fs = $fs;
+    }
+
+    /**
+     * String representation of this object.
+     *
+     * @return string  The URI.
+     */
+    public function __toString()
+    {
+        return $this->uri;
+    }
+
+    /**
+     * Convert a URI into a Horde_Themes_Image object.
+     *
+     * @param string $uri  The URI to convert.
+     *
+     * @return Horde_Themes_Image  An image object.
+     */
+    static public function fromUri($uri)
+    {
+        return new self($uri, realpath($GLOBALS['registry']->get('fileroot', 'horde')) . preg_replace('/^' . preg_quote($GLOBALS['registry']->get('webroot', 'horde'), '/') . '/', '', $uri));
+    }
+
+}
diff --git a/framework/Core/lib/Horde/Themes/Image.php b/framework/Core/lib/Horde/Themes/Image.php
new file mode 100644 (file)
index 0000000..0579923
--- /dev/null
@@ -0,0 +1,14 @@
+<?php
+/**
+ * The Horde_Themes_Image:: class provides an object-oriented interface to
+ * a themed image.
+ *
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (LGPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
+ *
+ * @author  Michael Slusarz <slusarz@horde.org>
+ * @package Core
+ */
+class Horde_Themes_Image extends Horde_Themes_Element {}
diff --git a/framework/Core/lib/Horde/Themes/Sound.php b/framework/Core/lib/Horde/Themes/Sound.php
new file mode 100644 (file)
index 0000000..54fd82d
--- /dev/null
@@ -0,0 +1,14 @@
+<?php
+/**
+ * The Horde_Themes_Sound:: class provides an object-oriented interface to
+ * a themed sound.
+ *
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (LGPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
+ *
+ * @author  Michael Slusarz <slusarz@horde.org>
+ * @package Core
+ */
+class Horde_Themes_Sound extends Horde_Themes_Element {}
index 47dde8a..1fbdb19 100644 (file)
@@ -37,7 +37,8 @@ Application Framework.
   <api>beta</api>
  </stability>
  <license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
- <notes>* Add Horde::nocacheUrl().
+ <notes>* Add Horde_Themes:: class.
+ * Add Horde::nocacheUrl().
  * Remove dependency on Horde_DOM package.
  * Added Horde_Registry_Api:: and Horde_Registry_Application:: classes.
  * Moved Horde_Exception to Exception package.
@@ -90,6 +91,12 @@ Application Framework.
      <dir name="Script">
       <file name="Files.php" role="php" />
      </dir> <!-- /lib/Horde/Script -->
+     <file name="Themes.php" role="php" />
+     <dir name="Themes">
+      <file name="Element.php" role="php" />
+      <file name="Image.php" role="php" />
+      <file name="Sound.php" role="php" />
+     </dir> <!-- /lib/Horde/Themes -->
     </dir> <!-- /lib/Horde -->
     <file name="Horde.php" role="php" />
    </dir> <!-- /lib -->
@@ -178,6 +185,10 @@ Application Framework.
    <install name="lib/Horde/Registry/Application.php" as="Horde/Registry/Application.php" />
    <install name="lib/Horde/Registry/Caller.php" as="Horde/Registry/Caller.php" />
    <install name="lib/Horde/Script/Files.php" as="Horde/Script/Files.php" />
+   <install name="lib/Horde/Themes.php" as="Horde/Themes.php" />
+   <install name="lib/Horde/Themes/Element.php" as="Horde/Themes/Element.php" />
+   <install name="lib/Horde/Themes/Image.php" as="Horde/Themes/Image.php" />
+   <install name="lib/Horde/Themes/Sound.php" as="Horde/Themes/Sound.php" />
    <install name="lib/Horde.php" as="Horde.php" />
   </filelist>
  </phprelease>
index e00746a..56c8315 100644 (file)
@@ -54,7 +54,7 @@ class Horde_Form_Renderer {
         global $registry;
         if (isset($registry) && is_a($registry, 'Registry')) {
             /* Registry available, so use a pretty image. */
-            $this->_requiredMarker = Horde::img('required.png', '*', '', $registry->getImageDir('horde'));
+            $this->_requiredMarker = Horde::img('required.png', '*');
         } else {
             /* No registry available, use something plain. */
             $this->_requiredMarker = '*';
index e1b61cf..dc1508f 100644 (file)
@@ -2957,9 +2957,7 @@ class Horde_Form_Type_sound extends Horde_Form_Type {
 
     function init()
     {
-        foreach (glob($GLOBALS['registry']->get('themesfs', 'horde') . '/sounds/*.wav') as $sound) {
-            $this->_sounds[] = basename($sound);
-        }
+        $this->_sounds = array_keys(Horde_Themes::getSounds());
     }
 
     function getSounds()
index 4454c88..db077a9 100644 (file)
@@ -276,7 +276,7 @@ class Horde_Mime_Viewer
         }
 
         if (!is_null($ret)) {
-            $ret['url'] = $GLOBALS['registry']->getImageDir($app) . '/mime/' . $ret['url'];
+            $ret['url'] = Horde_Themes::img('mime/' . $ret['url'], $app);
         }
 
         return $ret;
index c4ee80a..9453618 100644 (file)
@@ -165,7 +165,7 @@ class Horde_Form_VarRenderer_Xhtml extends Horde_Form_VarRenderer
             $imgId = $var->getVarName() . 'ehelper';
             if ($var->type->hasHelper('emoticons')) {
                 $html .= Horde::link('#', _("Emoticons"), '', '', 'openHtmlHelper(\'emoticons\', \'' . $var->getVarName() . '\'); return false;')
-                    . Horde::img('smile.png', _("Emoticons"), 'id="' . $imgId . '" align="middle"', $GLOBALS['registry']->getImageDir('horde') . '/emoticons')
+                    . Horde::img('emoticons/smile.png', _("Emoticons"), 'id="' . $imgId . '" align="middle"')
                     . '</a>'."\n";
             }
             $html .= '</div><div id="htmlhelper_' . $var->getVarName()
@@ -346,7 +346,7 @@ class Horde_Form_VarRenderer_Xhtml extends Horde_Form_VarRenderer
             $imgId = $var->getVarName() .'goto';
             $html .= '<div id="goto"></div>';
             $html .= Horde::link('#', _("Select a date"), '', '', 'openCalendar(\'' . $imgId . '\', \'' . $var->getVarName() . '\'); return false;')
-                . Horde::img('calendar.png', _("Calendar"), 'id="' . $imgId . '" ', $GLOBALS['registry']->getImageDir('horde'))
+                . Horde::img('calendar.png', _("Calendar"), 'id="' . $imgId . '" ')
                 . '</a>';
         }
 
@@ -370,9 +370,9 @@ class Horde_Form_VarRenderer_Xhtml extends Horde_Form_VarRenderer
             Horde::addScriptFile('open_colorpicker.js', 'horde');
             $html .= Horde::img('blank.gif', '', array('class' => 'form-colorpicker-preview',
                                                        'id' => 'colordemo_' . $var->getVarName(),
-                                                       'style' => 'background:' . $var->getValue($vars)), $GLOBALS['registry']->getImageDir('horde'))
+                                                       'style' => 'background:' . $var->getValue($vars)))
                 . Horde::link('#', _("Color Picker"), '', '', 'openColorPicker(\''. $var->getVarName() .'\'); return false;')
-                . Horde::img('colorpicker.png', _("Color Picker"), '', $GLOBALS['registry']->getImageDir('horde')) . '</a>'
+                . Horde::img('colorpicker.png', _("Color Picker")) . '</a>'
                 . '<div id="colorpicker_' . $var->getVarName() . '" class="form-colorpicker-palette"></div>';
         }
 
@@ -396,10 +396,10 @@ class Horde_Form_VarRenderer_Xhtml extends Horde_Form_VarRenderer
             . ' id="'. $varname . '-list-">'
             . $var->type->getOptions($var->getValue($vars)) . '    </select><div class="leftFloat">'
             . Horde::link('#', _("Move up"), '', '', $instance . '.moveColumnUp(); return false;')
-                . Horde::img('nav/up.png', _("Move up"), '', $registry->getImageDir('horde'))
+                . Horde::img('nav/up.png', _("Move up"))
                 . '</a><br />'
             . Horde::link('#', _("Move up"), '', '', $instance . '.moveColumnDown(); return false;')
-                . Horde::img('nav/down.png', _("Move down"), '', $registry->getImageDir('horde'))
+                . Horde::img('nav/down.png', _("Move down"))
                 . '</a></div>'
             . '<script type="text/javascript">' . "\n"
             . sprintf('%1$s = new Horde_Form_Sorter(\'%1$s\', \'%2$s\', \'%3$s\');' . "\n",
@@ -429,10 +429,10 @@ class Horde_Form_VarRenderer_Xhtml extends Horde_Form_VarRenderer
              . $var->type->getOptions(0, $fname)
              . '    </select>'
              . '<div><a href="" onclick="Horde_Form_Assign.move(\''. $fname .'\', 0); return false;">'
-             . Horde::img('rhand.png', _("Add column"), null, $registry->getImageDir('horde'))
+             . Horde::img('rhand.png', _("Add column"))
              . '</a><br /><a href="" onclick="Horde_Form_Assign.move(\''
              . $fname . '\', 1); return false;">'
-             . Horde::img('lhand.png', _("Remove column"), null, $registry->getImageDir('horde'))
+             . Horde::img('lhand.png', _("Remove column"))
              . '</a></div>'
              . sprintf('    <select name="%s__right" multiple="multiple" size="%d" style="width:%s"%s>',
                      $name, $size, $width,
@@ -750,7 +750,7 @@ EOT;
         if ($GLOBALS['browser']->hasFeature('javascript')) {
             $imgId = $varname .'goto';
             $html .= '<div id="goto" class="headerbox" style="position:absolute;visibility:hidden;padding:0"></div>';
-            $html .= Horde::link('#', _("Select an object"), '', '', 'obrowserWindow = ' . Horde::popupJs($GLOBALS['registry']->get('webroot', 'horde') . '/services/obrowser/') . 'obrowserWindowName = obrowserWindow.name; return false;') . Horde::img('tree/leaf.png', _("Object"), 'id="' . $imgId . '" align="middle"', $GLOBALS['registry']->getImageDir('horde')) . "</a>\n";
+            $html .= Horde::link('#', _("Select an object"), '', '', 'obrowserWindow = ' . Horde::popupJs($GLOBALS['registry']->get('webroot', 'horde') . '/services/obrowser/') . 'obrowserWindowName = obrowserWindow.name; return false;') . Horde::img('tree/leaf.png', _("Object"), 'id="' . $imgId . '" align="middle"') . "</a>\n";
         }
 
         return $html;
@@ -907,7 +907,7 @@ EOT;
         if ($number && $registry->hasMethod('telephony/dial')) {
             $url = $registry->call('telephony/dial', array($number));
             $label = sprintf(_("Dial %s"), $number);
-            $html .= ' ' . Horde::link($url, $label) . Horde::img('phone.png', $label, '', $registry->getImageDir('horde')) . '</a>';
+            $html .= ' ' . Horde::link($url, $label) . Horde::img('phone.png', $label) . '</a>';
         }
 
         return $html;
@@ -922,7 +922,7 @@ EOT;
         $number = $var->getValue($vars);
         if ($number && $registry->hasMethod('sms/compose')) {
             $url = $registry->link('sms/compose', array('to' => $number));
-            $html .= ' ' . Horde::link($url, _("Send SMS")) . Horde::img('mobile.png', _("Send SMS"), '', $registry->getImageDir('horde')) . '</a>';
+            $html .= ' ' . Horde::link($url, _("Send SMS")) . Horde::img('mobile.png', _("Send SMS")) . '</a>';
         }
 
         return $html;
@@ -1066,13 +1066,13 @@ EOT;
 
         $html = nl2br(htmlspecialchars($var->getValue($vars), ENT_QUOTES, Horde_Nls::getCharset()));
         if (!empty($mapurl)) {
-            $html .= '&nbsp;&nbsp;' . Horde::link(Horde::externalUrl($mapurl), $desc, null, '_blank') . Horde::img($icon, $desc, '', $registry->getImageDir('horde')) . '</a>';
+            $html .= '&nbsp;&nbsp;' . Horde::link(Horde::externalUrl($mapurl), $desc, null, '_blank') . Horde::img($icon, $desc) . '</a>';
         }
         if (!empty($mapurl2)) {
-            $html .= '&nbsp;' . Horde::link(Horde::externalUrl($mapurl2), $desc2, null, '_blank') . Horde::img($icon2, $desc2, '', $registry->getImageDir('horde')) . '</a>';
+            $html .= '&nbsp;' . Horde::link(Horde::externalUrl($mapurl2), $desc2, null, '_blank') . Horde::img($icon2, $desc2) . '</a>';
         }
         if (!empty($mapurl3)) {
-            $html .= '&nbsp;' . Horde::link(Horde::externalUrl($mapurl3), $desc3, null, '_blank') . Horde::img($icon3, $desc3, '', $registry->getImageDir('horde')) . '</a>';
+            $html .= '&nbsp;' . Horde::link(Horde::externalUrl($mapurl3), $desc3, null, '_blank') . Horde::img($icon3, $desc3) . '</a>';
         }
 
         return $html;
index 1fcf75d..0772cc3 100644 (file)
@@ -569,7 +569,7 @@ class Horde_Nls
 
         $img = $data['code'] . '.png';
         return file_exists($GLOBALS['registry']->get('themesfs', 'horde') . '/graphics/flags/' . $img)
-            ? Horde::img($img, $data['name'], array('title' => $data['name']), $GLOBALS['registry']->getImageDir('horde') . '/flags')
+            ? Horde::img('flags/' . $img, $data['name'], array('title' => $data['name']))
             : '[' . $data['name'] . ']';
     }
 
index 5013591..e4188d7 100644 (file)
@@ -65,7 +65,7 @@ class Horde_Perms_Ui
         /* Get the perms tree. */
         $nodes = $this->_perms->getTree();
 
-        $icondir = array('icondir' => $GLOBALS['registry']->getImageDir());
+        $icondir = array('icondir' => Horde_Themes::img());
         $perms_node = $icondir + array('icon' => 'perms.png');
         $add = Horde::applicationUrl('admin/perms/addchild.php');
         $add_img = Horde::img('add_perm.png', _("Add Permission"));
@@ -250,7 +250,7 @@ class Horde_Perms_Ui
 
         /* Default permissions. */
         $perm_val = $permission->getDefaultPermissions();
-        $this->_form->setSection('default', _("All Authenticated Users"), Horde::img('perms.png', '', '', $registry->getImageDir('horde')), false);
+        $this->_form->setSection('default', _("All Authenticated Users"), Horde::img('perms.png'), false);
 
         /* We MUST use 'deflt' for the variable name because 'default' is a
          * reserved word in JavaScript. */
@@ -281,7 +281,7 @@ class Horde_Perms_Ui
 
         /* Object creator permissions. */
         $perm_val = $permission->getCreatorPermissions();
-        $this->_form->setSection('creator', _("Creator Permissions"), Horde::img('user.png', '', '', $registry->getImageDir('horde')), false);
+        $this->_form->setSection('creator', _("Creator Permissions"), Horde::img('user.png'), false);
 
         if ($this->_type == 'matrix') {
             /* Define a single matrix row for creator perms. */
@@ -294,7 +294,7 @@ class Horde_Perms_Ui
 
         /* Users permissions. */
         $perm_val = $permission->getUserPermissions();
-        $this->_form->setSection('users', _("Individual Users"), Horde::img('user.png', '', '', $registry->getImageDir('horde')), false);
+        $this->_form->setSection('users', _("Individual Users"), Horde::img('user.png'), false);
         $auth = Horde_Auth::singleton($GLOBALS['conf']['auth']['driver']);
         if ($auth->hasCapability('list')) {
             /* The auth driver has list capabilities so set up an array which
@@ -355,7 +355,7 @@ class Horde_Perms_Ui
 
         /* Groups permissions. */
         $perm_val = $permission->getGroupPermissions();
-        $this->_form->setSection('groups', _("Groups"), Horde::img('group.png', '', '', $registry->getImageDir('horde')), false);
+        $this->_form->setSection('groups', _("Groups"), Horde::img('group.png'), false);
         require_once 'Horde/Group.php';
         $groups = Group::singleton();
         $group_list = $groups->listGroups();
index bb7a565..ad6d54a 100644 (file)
@@ -124,7 +124,7 @@ class Horde_Text_Filter_Emoticons extends Horde_Text_Filter_Base
     static public function getImage($icon, $prefix, $postfix)
     {
         if (!isset(self::$_iconpath)) {
-            self::$_iconpath = $GLOBALS['registry']->getImageDir('horde') . '/emoticons';
+            self::$_iconpath = Horde_Themes::img(null, 'horde') . '/emoticons';
         }
 
         return $prefix . Horde::img(self::getIcons($icon) . '.png', $icon, array('align' => 'middle', 'title' => $icon), self::$_iconpath) . $postfix;
index 21c10a9..3612d28 100644 (file)
@@ -235,7 +235,7 @@ class Horde_Tree
             $_SESSION['horde_tree'][$this->_instance] = array();
         }
 
-        $this->_img_dir = $GLOBALS['registry']->getImageDir('horde') . '/tree';
+        $this->_img_dir = Horde_Themes::img(null, array('app' => 'horde', 'notheme' => true)) . '/tree';
 
         if (!empty($GLOBALS['nls']['rtl'][$GLOBALS['language']])) {
             $rev_imgs = array(
index 869fbbd..51d0bf3 100644 (file)
@@ -170,7 +170,7 @@ class Horde_Ui_VarRenderer_Html extends Horde_Ui_VarRenderer
         $image = $var->type->getImage($vars, $var);
 
         Horde::addScriptFile('image.js', 'horde');
-        $graphics_dir = $GLOBALS['registry']->getImageDir('horde');
+        $graphics_dir = Horde_Themes::img(null, 'horde');
         $img_dir = $graphics_dir . '/image';
 
         $html = '';
@@ -298,7 +298,7 @@ class Horde_Ui_VarRenderer_Html extends Horde_Ui_VarRenderer
             Horde::addScriptFile('open_html_helper.js', 'horde', array('direct' => false));
             $imgId = $this->_genID($var->getVarName(), false) . 'ehelper';
             if ($var->type->hasHelper('emoticons')) {
-                $html .= Horde::link('#', _("Emoticons"), '', '', 'openHtmlHelper(\'emoticons\', \'' . $var->getVarName() . '\'); return false;') . Horde::img('smile.png', _("Emoticons"), 'id="' . $imgId . '"', $GLOBALS['registry']->getImageDir('horde') . '/emoticons') . '</a>';
+                $html .= Horde::link('#', _("Emoticons"), '', '', 'openHtmlHelper(\'emoticons\', \'' . $var->getVarName() . '\'); return false;') . Horde::img('emoticons/smile.png', _("Emoticons"), 'id="' . $imgId . '"') . '</a>';
             }
             $html .= '</td></tr><tr><td><div ' . $this->_genID('htmlhelper_' . $var->getVarName()) . ' class="control"></div></td></tr></table>' . "\n";
         }
@@ -505,7 +505,7 @@ class Horde_Ui_VarRenderer_Html extends Horde_Ui_VarRenderer
             $GLOBALS['browser']->hasFeature('javascript')) {
             Horde_Ui_JsCalendar::init();
             $imgId = $this->_genID($var->getVarName(), false) . 'goto';
-            $html .= Horde::link('#', _("Select a date"), '', '', 'Horde_Calendar.open(\'' . $imgId . '\', null)') . Horde::img('calendar.png', _("Calendar"), 'id="' . $imgId . '"', $GLOBALS['registry']->getImageDir('horde')) . "</a>\n";
+            $html .= Horde::link('#', _("Select a date"), '', '', 'Horde_Calendar.open(\'' . $imgId . '\', null)') . Horde::img('calendar.png', _("Calendar"), 'id="' . $imgId . '"') . "</a>\n";
         }
 
         return $html;
@@ -564,7 +564,7 @@ class Horde_Ui_VarRenderer_Html extends Horde_Ui_VarRenderer
             $html .= '<td>'
                 . Horde::link('#', _("Color Picker"), '', '',
                               'new ColorPicker({ color: \'' . htmlspecialchars($color) . '\', offsetParent: Event.element(event), update: [[\'' . $varname . '\', \'value\'], [\'' . $varname . '\', \'background\']] }); return false;')
-                . Horde::img('colorpicker.png', _("Color Picker"), 'height="16"', $registry->getImageDir('horde')) . '</a></td>';
+                . Horde::img('colorpicker.png', _("Color Picker"), 'height="16"') . '</a></td>';
         }
         return $html . '</tr></table>';
     }
@@ -585,8 +585,8 @@ class Horde_Ui_VarRenderer_Html extends Horde_Ui_VarRenderer
             '[list]" onchange="' . $instance . '.deselectHeader();" ' .
             $this->_genID($varname . '[list]') . '>' .
             $var->type->getOptions($var->getValue($vars)) . '</select><div class="leftFloat">' .
-            Horde::link('#', _("Move up"), '', '', $instance . '.moveColumnUp(); return false;') . Horde::img('nav/up.png', _("Move up"), '', $registry->getImageDir('horde')) . '</a><br />' .
-            Horde::link('#', _("Move up"), '', '', $instance . '.moveColumnDown(); return false;') . Horde::img('nav/down.png', _("Move down"), '', $registry->getImageDir('horde')) . '</a></div>' .
+            Horde::link('#', _("Move up"), '', '', $instance . '.moveColumnUp(); return false;') . Horde::img('nav/up.png', _("Move up")) . '</a><br />' .
+            Horde::link('#', _("Move up"), '', '', $instance . '.moveColumnDown(); return false;') . Horde::img('nav/down.png', _("Move down")) . '</a></div>' .
             '<script type="text/javascript">' . "\n" .
             sprintf('%1$s = new Horde_Form_Sorter(\'%1$s\', \'%2$s\', \'%3$s\');' . "\n",
                     $instance, $varname, $var->type->getHeader()) .
@@ -614,10 +614,10 @@ class Horde_Ui_VarRenderer_Html extends Horde_Ui_VarRenderer
             $var->type->getOptions(0, $form->getName(), $var->getVarName()) .
             '</select></td><td>' .
             '<a href="#" onclick="Horde_Form_Assign.move(\'' . $form->getName() . '\', \'' . $var->getVarName() . '\', 0); return false;">' .
-            Horde::img('rhand.png', _("Add"), null, $registry->getImageDir('horde')) .
+            Horde::img('rhand.png', _("Add")) .
             '</a><br /><a href="#" onclick="Horde_Form_Assign.move(\'' .
             $form->getName() . '\', \'' . $var->getVarName() . '\', 1); return false;">' .
-            Horde::img('lhand.png', _("Remove"), null, $registry->getImageDir('horde')) .
+            Horde::img('lhand.png', _("Remove")) .
             '</a></td><td>' .
             sprintf('<select name="%s__right" multiple="multiple" size="%d" style="width:%s"%s>',
                     $name, $size, $width,
@@ -932,7 +932,7 @@ EOT;
         }
 
         if ($GLOBALS['browser']->hasFeature('javascript')) {
-            $html .= Horde::link($GLOBALS['registry']->get('webroot', 'horde') . '/services/obrowser/', _("Select an object"), '', '_blank', 'obrowserWindow = ' . Horde::popupJs($GLOBALS['registry']->get('webroot', 'horde') . '/services/obrowser/', array('urlencode' => true)) . 'obrowserWindowName = obrowserWindow.name; return false;') . Horde::img('tree/leaf.png', _("Object"), '', $GLOBALS['registry']->getImageDir('horde')) . "</a>\n";
+            $html .= Horde::link($GLOBALS['registry']->get('webroot', 'horde') . '/services/obrowser/', _("Select an object"), '', '_blank', 'obrowserWindow = ' . Horde::popupJs($GLOBALS['registry']->get('webroot', 'horde') . '/services/obrowser/', array('urlencode' => true)) . 'obrowserWindowName = obrowserWindow.name; return false;') . Horde::img('tree/leaf.png', _("Object")) . "</a>\n";
         }
 
         return $html;
@@ -1148,7 +1148,7 @@ EOT;
         if ($number && $registry->hasMethod('telephony/dial')) {
             $url = $registry->call('telephony/dial', array($number));
             $label = sprintf(_("Dial %s"), $number);
-            $html .= ' ' . Horde::link($url, $label) . Horde::img('phone.png', $label, '', $registry->getImageDir('horde')) . '</a>';
+            $html .= ' ' . Horde::link($url, $label) . Horde::img('phone.png', $label) . '</a>';
         }
 
         return $html;
@@ -1163,7 +1163,7 @@ EOT;
         $number = $var->getValue($vars);
         if ($number && $registry->hasMethod('sms/compose')) {
             $url = $registry->link('sms/compose', array('to' => $number));
-            $html .= ' ' . Horde::link($url, _("Send SMS")) . Horde::img('mobile.png', _("Send SMS"), '', $registry->getImageDir('horde')) . '</a>';
+            $html .= ' ' . Horde::link($url, _("Send SMS")) . Horde::img('mobile.png', _("Send SMS")) . '</a>';
         }
 
         return $html;
@@ -1284,15 +1284,15 @@ EOT;
 
         $html = $text ? nl2br(@htmlspecialchars($address, ENT_QUOTES, $this->_charset)) : '';
         if (!empty($mapurl)) {
-            $html .= '&nbsp;&nbsp;' . Horde::link(Horde::externalUrl($mapurl), $desc, null, '_blank') . Horde::img($icon, $desc, '', $registry->getImageDir('horde')) . '</a>';
+            $html .= '&nbsp;&nbsp;' . Horde::link(Horde::externalUrl($mapurl), $desc, null, '_blank') . Horde::img($icon, $desc) . '</a>';
         }
         if (!empty($mapurl2)) {
-            $html .= '&nbsp;' . Horde::link(Horde::externalUrl($mapurl2), $desc2, null, '_blank') . Horde::img($icon2, $desc2, '', $registry->getImageDir('horde')) . '</a>';
+            $html .= '&nbsp;' . Horde::link(Horde::externalUrl($mapurl2), $desc2, null, '_blank') . Horde::img($icon2, $desc2) . '</a>';
         }
 
         /* Google generated map. */
         if ($address) {
-            $html .= '&nbsp;' . Horde::link(Horde::externalUrl('http://maps.google.com/maps?q=' . urlencode(preg_replace('/\r?\n/', ',', $address)) . '&hl=en'), _("Google Maps"), null, '_blank') . Horde::img($google_icon, _("Google Maps"), '', $registry->getImageDir('horde')) . '</a>';
+            $html .= '&nbsp;' . Horde::link(Horde::externalUrl('http://maps.google.com/maps?q=' . urlencode(preg_replace('/\r?\n/', ',', $address)) . '&hl=en'), _("Google Maps"), null, '_blank') . Horde::img($google_icon, _("Google Maps")) . '</a>';
         }
 
         return $html;
index 1169183..cc145dd 100644 (file)
@@ -23,7 +23,7 @@ class Horde_Block_gollem_tree_menu extends Horde_Block {
         // TODO
         return;
 
-        $icondir = $GLOBALS['registry']->getImageDir();
+        $icondir = Horde_Themes::img();
         $login_url = Horde::applicationUrl('login.php');
 
         foreach ($GLOBALS['gollem_backends'] as $key => $val) {
index d8712c4..d77c503 100644 (file)
@@ -708,7 +708,7 @@ class Gollem
         if (!empty($_SESSION['gollem'])) {
             $backend_key = $_SESSION['gollem']['backend_key'];
             if (Horde_Auth::isAdmin()) {
-                $menu->add(Horde_Util::addParameter(Horde::applicationUrl('permissions.php'), 'backend', $backend_key), _("_Permissions"), 'perms.png', $GLOBALS['registry']->getImageDir('horde'));
+                $menu->add(Horde_Util::addParameter(Horde::applicationUrl('permissions.php'), 'backend', $backend_key), _("_Permissions"), 'perms.png', Horde_Themes::img(null, 'horde'));
             }
 
             if ($_SESSION['gollem']['backends'][$backend_key]['quota_val'] != -1) {
@@ -717,7 +717,7 @@ class Gollem
                 } else {
                     $quota_url = Horde_Util::addParameter(Horde::applicationUrl('quota.php'), 'backend', $backend_key);
                 }
-                $menu->add($quota_url, _("Check Quota"), 'info_icon.png', $GLOBALS['registry']->getImageDir('horde'));
+                $menu->add($quota_url, _("Check Quota"), 'info_icon.png', Horde_Themes::img(null, 'horde'));
             }
         }
 
index 84c82cf..00df09a 100644 (file)
@@ -233,7 +233,7 @@ $numitem = count($list);
 $title = $GLOBALS['gollem_be']['label'];
 
 /* Image links. */
-$image_dir = $registry->getImageDir('horde');
+$image_dir = Horde_Themes::img(null, 'horde');
 $edit_img = Horde::img('edit.png', _("Edit"), null, $image_dir);
 $download_img = Horde::img('download.png', _("Download"), null, $image_dir);
 $folder_img = Horde::img('folder.png', _("folder"));
index 2be59f5..e97d3c2 100644 (file)
@@ -102,7 +102,7 @@ $t->set('currdir', htmlspecialchars($currdir));
 $t->set('formid', htmlspecialchars($formid));
 $t->set('navlink', Gollem::directoryNavLink($currdir, Horde_Util::addParameter($self_url, array('cacheid' => $cacheid, 'formid' => $formid))));
 if ($GLOBALS['conf']['backend']['backend_list'] == 'shown') {
-    $t->set('changeserver', Horde::link(htmlspecialchars(Horde_Auth::addLogoutParameters(Horde_Util::addParameter(Horde::applicationUrl('login.php'), array('url' => Horde_Util::addParameter(Horde::url('selectlist.php'), array('formid' => $formid)))), Horde_Auth::REASON_LOGOUT)), _("Change Server")) . Horde::img('logout.png', _("Change Server"), null, $GLOBALS['registry']->getImageDir('horde')) . '</a>', true);
+    $t->set('changeserver', Horde::link(htmlspecialchars(Horde_Auth::addLogoutParameters(Horde_Util::addParameter(Horde::applicationUrl('login.php'), array('url' => Horde_Util::addParameter(Horde::url('selectlist.php'), array('formid' => $formid)))), Horde_Auth::REASON_LOGOUT)), _("Change Server")) . Horde::img('logout.png', _("Change Server")) . '</a>', true);
 } else {
     $t->set('changeserver', '', true);
 }
index 69cf901..2e1b141 100644 (file)
@@ -24,8 +24,8 @@ require GOLLEM_TEMPLATES . '/javascript_defs.php';
 
 ?>
 <title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
 <?php Horde::outputInlineScript(); ?>
 </head>
 
index e0d5abe..a882f55 100644 (file)
@@ -37,11 +37,10 @@ if (!$prefs->isLocked('columns')) {
 
     $t->set('columns', $prefs->getValue('columns'));
 
-    $imagedir = $registry->getImageDir('horde');
-    $t->set('add', Horde::img('rhand.png', _("Add column"), null, $imagedir));
-    $t->set('remove', Horde::img('lhand.png', _("Remove column"), null, $imagedir));
-    $t->set('left', Horde::img('nav/up.png', _("Move left"), null, $imagedir));
-    $t->set('right', Horde::img('nav/down.png', _("Move right"), null, $imagedir));
+    $t->set('add', Horde::img('rhand.png', _("Add column")));
+    $t->set('remove', Horde::img('lhand.png', _("Remove column")));
+    $t->set('left', Horde::img('nav/up.png', _("Move left")));
+    $t->set('right', Horde::img('nav/down.png', _("Move right")));
 
     echo $t->fetch(GOLLEM_TEMPLATES . '/prefs/columnselect.html');
 }
diff --git a/gollem/themes/silver/themed_graphics b/gollem/themes/silver/themed_graphics
deleted file mode 100644 (file)
index e69de29..0000000
index 76d0a29..33dada1 100644 (file)
@@ -197,7 +197,7 @@ $nodes[GROUP_ROOT] = GROUP_ROOT;
 
 /* Set up some node params. */
 $spacer = '&nbsp;&nbsp;&nbsp;&nbsp;';
-$icondir = array('icondir' => $registry->getImageDir());
+$icondir = array('icondir' => Horde_Themes::img());
 $group_node = $icondir + array('icon' => 'group.png');
 $add = Horde::applicationUrl('admin/groups.php?actionID=addchild');
 $add_img = Horde::img('add_group.png');
index a9df1f3..358641e 100644 (file)
@@ -31,8 +31,8 @@ try {
     echo ' (' . count($session_info) . ')</h1>' .
          '<ul class="headerbox linedRow">';
 
-    $plus = Horde::img('tree/plusonly.png', _("Expand"), '', $GLOBALS['registry']->getImageDir('horde'));
-    $minus = Horde::img('tree/minusonly.png', _("Collapse"), 'style="display:none"', $GLOBALS['registry']->getImageDir('horde'));
+    $plus = Horde::img('tree/plusonly.png', _("Expand"));
+    $minus = Horde::img('tree/minusonly.png', _("Collapse"), 'style="display:none"');
 
     if (class_exists('Net_DNS')) {
         $resolver = new Net_DNS_Resolver();
index 744ae4b..f5c2d53 100644 (file)
@@ -190,17 +190,17 @@ $ftpform = '';
 if (!empty($_SESSION['_config'])) {
     $url = Horde::applicationUrl('admin/setup/diff.php');
     $action = _("Show differences between currently saved and the newly generated configuration.");
-    $actions[] = array('icon' => Horde::img('search.png', '', 'align="middle"', $registry->getImageDir('horde')),
+    $actions[] = array('icon' => Horde::img('search.png', '', 'align="middle"'),
                        'link' => Horde::link('#', '', '', '', Horde::popupJs($url, array('height' => 480, 'width' => 640, 'urlencode' => true)) . 'return false;') . $action . '</a>');
 
     /* Action to download the configuration upgrade PHP script. */
     $url = Horde::applicationUrl('admin/setup/scripts.php')->add(array('setup' => 'conf', 'type' => 'php'));
     $action = _("Download generated configuration as PHP script.");
-    $actions[] = array('icon' => Horde::img('download.png', '', 'align="middle"', $registry->getImageDir('horde')),
+    $actions[] = array('icon' => Horde::img('download.png', '', 'align="middle"'),
                        'link' => Horde::link($url) . $action . '</a>');
     /* Action to save the configuration upgrade PHP script. */
     $action = _("Save generated configuration as a PHP script to your server's temporary directory.");
-    $actions[] = array('icon' => Horde::img('save.png', '', 'align="middle"', $registry->getImageDir('horde')),
+    $actions[] = array('icon' => Horde::img('save.png', '', 'align="middle"'),
                        'link' => Horde::link($url->add('save', 'tmp')) . $action . '</a>');
 
     /* Set up the form for FTP upload of scripts. */
@@ -228,7 +228,7 @@ if (file_exists(Horde::getTempDir() . '/horde_setup_upgrade.php')) {
     /* Action to remove the configuration upgrade PHP script. */
     $url = Horde::applicationUrl('admin/setup/scripts.php')->add('clean', 'tmp');
     $action = _("Remove saved script from server's temporary directory.");
-    $actions[] = array('icon' => Horde::img('delete.png', '', 'align="middle"', $registry->getImageDir('horde')),
+    $actions[] = array('icon' => Horde::img('delete.png', '', 'align="middle"'),
                        'link' => Horde::link($url) . $action . '</a>');
 }
 
index 6a7433a..5147452 100644 (file)
@@ -82,7 +82,7 @@ case 'sidebar':
         $node_params_master = array(
             'target' => 'help_main',
             'icon' => 'help.png',
-            'icondir' => $registry->getImageDir('horde')
+            'icondir' => dirname(Horde_Themes::img('help.png'))
         );
 
         foreach ($topics as $id => $title) {
index fdc73c4..96b3eaa 100644 (file)
@@ -34,7 +34,7 @@ echo '<div class="control"><strong>'
 
 foreach ($results as $result) {
     echo '<li class="linedRow">' .
-         Horde::img($result['app'] . '.png', '', '', $registry->getImageDir($result['app'])) .
+         Horde::img(Horde_Themes::img($result['app'] . '.png', $result['app'])) .
          Horde::link($result['view_url'], '', '', '', '', '', '', array('style' => 'margin:4px')) .
          $result['title'] .
          '</a><span style="font-style:italic;"><div style="margin-left:10px;font-style:italic">' . $result['desc'] . '</div></li>';
index 96be190..f200333 100644 (file)
@@ -116,14 +116,16 @@ function buildMenu()
     // Add the administration menu if the user is an admin.
     if (Horde_Auth::isAdmin()) {
         $menu['administration'] = array('name' => _("Administration"),
-                                        'icon' => $registry->getImageDir() . '/administration.png',
+                                        'icon' => Horde_Themes::img('administration.png'),
                                         'status' => 'heading');
 
         try {
             $list = $registry->callByPackage('horde', 'admin_list');
             foreach ($list as $method => $vals) {
                 $name = Horde::stripAccessKey($vals['name']);
-                $icon = isset($vals['icon']) ? $registry->getImageDir() . '/' . $vals['icon'] : $registry->get('icon');
+                $icon = isset($vals['icon'])
+                    ? Horde_Themes::img($vals['icon'])
+                    : $registry->get('icon');
 
                 $menu['administration_' . $method] = array(
                     'name' => $name,
@@ -140,7 +142,7 @@ function buildMenu()
         $conf['prefs']['driver'] != '' && $conf['prefs']['driver'] != 'none') {
         $menu['options'] = array('name' => _("Options"),
                                  'status' => 'active',
-                                 'icon' => $registry->getImageDir() . '/prefs.png');
+                                 'icon' => Horde_Themes::img('prefs.png'));
 
         /* Get a list of configurable applications. */
         $prefs_apps = array();
@@ -189,13 +191,13 @@ function buildMenu()
     if (Horde_Auth::getAuth()) {
         $menu['logout'] = array('name' => _("Log out"),
                                 'status' => 'active',
-                                'icon' => $registry->getImageDir() . '/logout.png',
+                                'icon' => Horde_Themes::img('logout.png'),
                                 'url' => Horde::getServiceLink('logout', 'horde'),
                                 'target' => '_parent');
     } else {
         $menu['login'] = array('name' => _("Log in"),
                                'status' => 'active',
-                               'icon' => $registry->getImageDir() . '/login.png',
+                               'icon' => Horde_Themes::img('login.png'),
                                'url' => Horde::getServiceLink('login', 'horde'));
     }
 
index fd4026c..3835ebb 100644 (file)
@@ -5,7 +5,7 @@
     try {
         foreach ($registry->callByPackage('horde', 'admin_list') as $val) {
             $img = isset($val['icon'])
-                ? $registry->getImageDir() . '/' . $val['icon']
+                ? Horde_Themes::img($val['icon'])
                 : $registry->get('icon');
             $menu->add(strval(Horde::url($registry->applicationWebPath($val['link']))), $val['name'], $img, '');
         }
index 81cc5a5..0bbe371 100644 (file)
@@ -21,9 +21,9 @@ if (!empty($refresh_time) && !empty($refresh_url)) {
 ?>
 <title><?php echo htmlspecialchars($page_title) ?></title>
 <?php if (!$GLOBALS['browser']->isMobile()): ?>
-<link href="<?php echo $GLOBALS['registry']->getImageDir() ?>/favicon.ico" rel="SHORTCUT ICON" />
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
 <?php
-echo Horde::includeStylesheetFiles(array('additional' => Horde_Util::nonInputVar('horde_css_stylesheets', array())));
+echo Horde_Themes::includeStylesheetFiles(array('additional' => Horde_Util::nonInputVar('horde_css_stylesheets', array())));
 echo Horde::includeScriptFiles();
 echo implode("\n", Horde_Util::nonInputVar('linkTags', array()));
 Horde::outputInlineScript();
index 0542dc5..091c5d8 100644 (file)
@@ -5,7 +5,7 @@ $sidebar_width = isset($GLOBALS['prefs']) ? $GLOBALS['prefs']->getValue('sidebar
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "DTD/xhtml1-frameset.dtd">
 <html>
 <head>
- <link rel="SHORTCUT ICON" href="<?php echo $GLOBALS['registry']->getImageDir() ?>/favicon.ico" />
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
  <title><?php echo htmlspecialchars($GLOBALS['registry']->get('name')) ?></title>
 </head>
 
index f9bfbe2..e0eaf4d 100644 (file)
@@ -50,7 +50,7 @@ function openHtmlHelper(type, target)
         }
         cell.appendChild(link);
         img = document.createElement('IMG')
-        img.src = '<?php echo $GLOBALS['registry']->getImageDir('horde') . '/emoticons/' . $icon . '.png' ?>';
+        img.src = '<?php echo Horde_Themes::img('emoticons/' . $icon . '.png') ?>';
         img.align = 'middle';
         img.border = 0;
         link.appendChild(img);
index bea8bbd..10699f5 100644 (file)
@@ -6,7 +6,7 @@ if (!(isset($menu) && ($menu instanceof Horde_Menu))) {
     $status = $GLOBALS['registry']->get('status', 'horde');
     if ($GLOBALS['registry']->getApp() == 'horde' &&
         $status != 'notoolbar' && $status != 'hidden' && $status != 'inactive') {
-        $menu->add(Horde::applicationUrl('services/portal/'), _("_Home"), 'horde.png', $GLOBALS['registry']->getImageDir('horde'));
+        $menu->add(Horde::applicationUrl('services/portal/'), _("_Home"), 'horde.png', Horde_Themes::img(null, 'horde'));
     }
 }
 echo $menu->render();
index d44eb98..f9c42cc 100644 (file)
@@ -24,13 +24,13 @@ echo Horde::label($pref, $_prefs[$pref]['desc']) ?>&nbsp;<?php echo $helplink ?>
 <?php elseif ($param['type'] == 'sound'): $current_sound = !empty($alarm_pref[$method][$name]) ? $alarm_pref[$method][$name] : ''; ?>
 <ul class="sound-list">
  <li><label><input type="radio" name="<?php echo $pref . '_' . $name ?>" value=""<?php if (!$current_sound) echo ' checked="checked"' ?> /> <?php echo _("No Sound") ?></label></li>
-<?php foreach (glob($registry->get('themesfs', 'horde') . '/sounds/*.wav') as $sound): $sound = basename($sound); ?>
+<?php foreach (Horde_Themes::soundList() as $key => $val): ?>
  <li>
   <label>
-   <input type="radio" name="<?php echo $pref . '_' . $name ?>" value="<?php echo htmlspecialchars($sound) ?>"<?php if ($current_sound == $sound) echo ' checked="checked"' ?> />
-   <?php echo htmlspecialchars($sound) ?>
+   <input type="radio" name="<?php echo $pref . '_' . $name ?>" value="<?php echo htmlspecialchars($key) ?>"<?php if ($current_sound == $key) echo ' checked="checked"' ?> />
+   <?php echo htmlspecialchars($key) ?>
   </label>
-  <embed autostart="false" src="<?php echo $registry->get('themesuri', 'horde') . '/sounds/' . htmlspecialchars($sound) ?>" />
+  <embed autostart="false" src="<?php echo htmlspecialchars($val->uri) ?>" />
  </li>
 <?php endforeach; ?>
 </ul>
index a0c6585..4cec818 100644 (file)
@@ -54,7 +54,7 @@ document.observe('dom:loaded', function() {
    <?php if (!$prefs->isLocked('category_colors')): ?>
     <input size="7" style="background:<?php echo htmlspecialchars($color) ?>; color:<?php echo $fgcolor ?>" id="<?php echo $color_b ?>" name="<?php echo $color_b ?>" value="<?php echo htmlspecialchars($color) ?>" />
     <a href="#" onclick="new ColorPicker({ color: $F('<?php echo $color_b ?>'), offsetParent: Event.element(event), update: [['<?php echo $color_b ?>', 'value'], ['<?php echo $color_b ?>', 'background']] }); return false;">
-    <?php echo Horde::img('colorpicker.png', _("Color Picker"), 'height="16"', $registry->getImageDir('horde')) ?></a>
+    <?php echo Horde::img('colorpicker.png', _("Color Picker"), 'height="16"') ?></a>
    <?php endif; ?>
   </td>
  </tr>
@@ -70,7 +70,7 @@ $color_b = 'color_' . hash('md5', '_unfiled_');
    <?php if (!$prefs->isLocked('category_colors')): ?>
     <input size="7" style="background:<?php echo htmlspecialchars($color) ?>; color:<?php echo $fgcolor ?>" id="<?php echo $color_b ?>" name="<?php echo $color_b ?>" value="<?php echo htmlspecialchars($color) ?>" />
     <a href="#" onclick="new ColorPicker({ color: $F('<?php echo $color_b ?>'), offsetParent: Event.element(event), update: [['<?php echo $color_b ?>', 'value'], ['<?php echo $color_b ?>', 'background']] }); return false;">
-    <?php echo Horde::img('colorpicker.png', _("Color Picker"), 'height="16"', $registry->getImageDir('horde')) ?></a>
+    <?php echo Horde::img('colorpicker.png', _("Color Picker"), 'height="16"') ?></a>
    <?php endif; ?>
   </td>
  </tr>
@@ -86,7 +86,7 @@ foreach ($categories as $name):
    <?php if (!$prefs->isLocked('category_colors')): ?>
     <input size="7" style="background:<?php echo htmlspecialchars($color) ?>; color:<?php echo $fgcolor ?>" id="<?php echo $color_b ?>" name="<?php echo $color_b ?>" value="<?php echo htmlspecialchars($color) ?>" />
     <a href="#" onclick="new ColorPicker({ color: $F('<?php echo $color_b ?>'), offsetParent: Event.element(event), update: [['<?php echo $color_b ?>', 'value'], ['<?php echo $color_b ?>', 'background']] }); return false;">
-    <?php echo Horde::img('colorpicker.png', _("Color Picker"), 'height="16"', $registry->getImageDir('horde')) ?></a>
+    <?php echo Horde::img('colorpicker.png', _("Color Picker"), 'height="16"') ?></a>
     <?php endif; ?>
     <a href="#" onclick="removeCategory(decodeURIComponent('<?php echo rawurlencode(Horde_String::convertCharset($name, Horde_Nls::getCharset(), 'UTF-8')) ?>')); return false;"><?php echo Horde::img('delete.png') ?></a>
   </td>
index 72044f6..5142fd9 100644 (file)
@@ -9,9 +9,9 @@
 <tr valign="middle">
   <td width="100%" colspan="6" class="header">
     <span class="rightFloat">
-      <a href="#" onclick="javascript:window.close();" style="cursor:pointer"><?php echo Horde::img('close.png', _("Close Window"), '', $registry->getImageDir('horde')) ?></a>
+      <a href="#" onclick="javascript:window.close();" style="cursor:pointer"><?php echo Horde::img('close.png', _("Close Window")) ?></a>
     </span>
-    <?php echo Horde::img('perms.png', '', '', $registry->getImageDir('horde')) . '&nbsp;' . sprintf(_("Edit permissions for \"%s\""), htmlspecialchars($share->get('name'))); if (!empty($help)) echo '&nbsp;' . Horde_Help::link($app, $help) ?>
+    <?php echo Horde::img('perms.png')) . '&nbsp;' . sprintf(_("Edit permissions for \"%s\""), htmlspecialchars($share->get('name'))); if (!empty($help)) echo '&nbsp;' . Horde_Help::link($app, $help) ?>
   </td>
 </tr>
 <tr><td>&nbsp;</td></tr>
@@ -29,7 +29,7 @@ if (isset($userperms[$owner])) {
 ?>
 <tr valign="middle">
   <td class="header leftAlign" colspan="6">
-    <?php echo Horde::img('perms.png', '', '', $registry->getImageDir('horde')) . '&nbsp;' . _("Owner") ?>
+    <?php echo Horde::img('perms.png') . '&nbsp;' . _("Owner") ?>
   </td>
 </tr>
 <tr>
@@ -57,7 +57,7 @@ if (isset($userperms[$owner])) {
 <!-- Default Permissions -->
 <tr valign="middle">
   <td class="header leftAlign" width="55%">
-    <?php echo Horde::img('perms.png', '', '', $registry->getImageDir('horde')) . '&nbsp;' . _("All Authenticated Users") ?>
+    <?php echo Horde::img('perms.png') . '&nbsp;' . _("All Authenticated Users") ?>
   </td>
   <td class="header" align="center"><?php echo _("Show") ?></td>
   <td class="header" align="center"><?php echo _("Read") ?></td>
@@ -128,7 +128,7 @@ if (isset($userperms[$owner])) {
 <!-- Creator Permissions -->
 <tr valign="middle">
   <td class="header leftAlign">
-    <?php echo Horde::img('user.png', '', '', $registry->getImageDir('horde')) . '&nbsp;' . _("Object Creator") ?>
+    <?php echo Horde::img('user.png') . '&nbsp;' . _("Object Creator") ?>
   </td>
   <td class="header" align="center"><?php echo _("Show") ?></td>
   <td class="header" align="center"><?php echo _("Read") ?></td>
@@ -163,7 +163,7 @@ if (isset($userperms[$owner])) {
 <!-- User Permissions -->
 <tr valign="middle">
   <td class="header leftAlign">
-    <?php echo Horde::img('user.png', '', '', $registry->getImageDir('horde')) . '&nbsp;' . _("Individual Users") ?>
+    <?php echo Horde::img('user.png') . '&nbsp;' . _("Individual Users") ?>
   </td>
   <td class="header" align="center"><?php echo _("Show") ?></td>
   <td class="header" align="center"><?php echo _("Read") ?></td>
@@ -265,7 +265,7 @@ foreach ($userList as $user) {
 <!-- Group Permissions -->
 <tr valign="middle">
   <td class="header leftAlign">
-    <?php echo Horde::img('group.png', '', '', $registry->getImageDir('horde')) . '&nbsp;' . _("Groups") ?>
+    <?php echo Horde::img('group.png') . '&nbsp;' . _("Groups") ?>
   </td>
   <td class="header" align="center"><?php echo _("Show") ?></td>
   <td class="header" align="center"><?php echo _("Read") ?></td>
diff --git a/horde/themes/silver/themed_graphics b/horde/themes/silver/themed_graphics
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/horde/themes/tango-blue/themed_graphics b/horde/themes/tango-blue/themed_graphics
deleted file mode 100644 (file)
index e69de29..0000000
index ede635f..a614258 100644 (file)
@@ -63,7 +63,7 @@ if (($app = basename(Horde_Util::getFormData('app'))) && isset($apps[$app])) {
     $images = glob($dir . DIRECTORY_SEPARATOR . '*.png');
     if ($images && count($images)) {
         foreach ($images as $png) {
-            echo Horde::img(str_replace($basedir . DIRECTORY_SEPARATOR, '', $png), $png, array('hspace' => 10, 'vspace' => 10), $registry->getImageDir($app));
+            echo Horde::img(Horde_Themes::img(str_replace($basedir . DIRECTORY_SEPARATOR, '', $png) $app), $png, array('hspace' => 10, 'vspace' => 10));
         }
     } else {
         echo _("No icons found.");
index 18945aa..da28c04 100644 (file)
@@ -21,21 +21,21 @@ $view_url  = Horde::applicationUrl('view.php');
 $view_img  = Horde::img('view.gif', _("View"), 'align="middle"');
 
 $download_url = Horde_Util::addParameter($view_url, 'action', 'download');
-$download_img  = Horde::img('download.gif', _("Download"), 'align="middle"', $GLOBALS['registry']->getImageDir('horde'));
+$download_img  = Horde::img('download.gif', _("Download"));
 
 $edit_url = Horde::applicationUrl('edit.php');
 $edit_label = ($folder == 'pending') ? _("Edit") : _("Resend");
-$edit_img = Horde::img('edit.gif', $edit_label, 'align="middle"', $GLOBALS['registry']->getImageDir('horde'));
+$edit_img = Horde::img('edit.gif', $edit_label);
 
 $del_url  = Horde::applicationUrl('delete.php');
-$del_img  = Horde::img('delete-small.gif', _("Delete"), 'align="middle"', $GLOBALS['registry']->getImageDir('horde'));
+$del_img  = Horde::img('delete-small.gif', _("Delete"));
 
 $params = array('folder' => $folder, 'path' => $path);
-$warn_img = Horde::img('alerts/warning.gif', _("Warning"), 'align="middle"', $GLOBALS['registry']->getImageDir('horde'));
+$warn_img = Horde::img('alerts/warning.gif', _("Warning"));
 $send_url  = Horde::applicationUrl('send.php');
 
 $print_url  = Horde::applicationUrl('print.php');
-$print_img  = Horde::img('print.gif', _("Print"), 'align="middle"', $GLOBALS['registry']->getImageDir('horde'));
+$print_img  = Horde::img('print.gif', _("Print"));
 
 /* Loop through list and set up items. */
 $i = 0;
index 91810a6..3f3b7a8 100644 (file)
@@ -132,17 +132,17 @@ class Hylax {
         $menu->addArray(array('url' => Horde::applicationUrl('summary.php'),
                               'text' => _("Summary"),
                               'icon' => 'fax.png',
-                              'icon_path' => $registry->getImageDir()));
+                              'icon_path' => Horde_Themes::img()));
 
         $menu->addArray(array('url' => Horde::applicationUrl('folder.php'),
                               'text' => _("Folders"),
                               'icon' => 'folder.png',
-                              'icon_path' => $registry->getImageDir()));
+                              'icon_path' => Horde_Themes::img()));
 
         $menu->addArray(array('url' => Horde::applicationUrl('compose.php'),
                               'text' => _("Compose"),
                               'icon' => 'compose.png',
-                              'icon_path' => $registry->getImageDir()));
+                              'icon_path' => Horde_Themes::img()));
 
         if ($returnType == 'object') {
             return $menu;
index ab182b2..f6a8520 100644 (file)
@@ -22,8 +22,8 @@ Horde::includeScriptFiles();
 
 ?>
 <title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
 </head>
 
 <body>
index 4170eda..742fd70 100644 (file)
@@ -338,28 +338,28 @@ class IMP_Hooks
 //                preg_match("!^user/[^/]+/Calendar!", $box)) {
 //                $newmailboxes[$box] = array(
 //                    'icon' => 'kronolith.png',
-//                    'icondir' => $GLOBALS['registry']->getImageDir('kronolith')
+//                    'icondir' => Horde_Themes::img(null, 'kronolith')
 //                    'alt' => _("Calendar")
 //                );
 //            } elseif ((stripos($box, "INBOX/Tasks") !== false) ||
 //                      preg_match("!^user/[^/]+/Tasks!", $box)) {
 //                $newmailboxes[$box] = array(
 //                    'icon' => 'nag.png',
-//                    'icondir' => $GLOBALS['registry']->getImageDir('nag')
+//                    'icondir' => Horde_Themes::img(null, 'nag')
 //                    'alt' => _("Tasks")
 //                );
 //            } elseif ((stripos($box, "INBOX/Notes") !== false) ||
 //                      preg_match("!^user/[^/]+/Notes!", $box)) {
 //                $newmailboxes[$box] = array(
 //                    'icon' => 'mnemo.png',
-//                    'icondir' => $GLOBALS['registry']->getImageDir('mnemo')
+//                    'icondir' => Horde_Themes::img(null, 'mnemo')
 //                    'alt' => _("Notes")
 //                );
 //            } elseif ((stripos($box, "INBOX/Contacts") !== false) ||
 //                      preg_match("!^user/[^/]+/Contacts!", $box)) {
 //                $newmailboxes[$box] = array(
 //                    'icon' => 'turba.png',
-//                    'icondir' => $GLOBALS['registry']->getImageDir('turba')
+//                    'icondir' => Horde_Themes::img(null, 'turba')
 //                    'alt' => _("Contacts")
 //                );
 //            }
@@ -383,7 +383,7 @@ class IMP_Hooks
 //            case 'event':
 //                $icons[$name] = array(
 //                    'icon' => 'kronolith.png',
-//                    'icondir' => $GLOBALS['registry']->getImageDir('kronolith'),
+//                    'icondir' => Horde_Themes::img(null, 'kronolith')
 //                    'alt' => _("Calendar")
 //                );
 //                break;
@@ -391,7 +391,7 @@ class IMP_Hooks
 //            case 'task':
 //                $icons[$name] = array(
 //                    'icon' => 'nag.png',
-//                    'icondir' => $GLOBALS['registry']->getImageDir('nag'),
+//                    'icondir' => Horde_Themes::img(null, 'nag')
 //                    'alt' => _("Tasks")
 //                );
 //                break;
@@ -399,7 +399,7 @@ class IMP_Hooks
 //            case 'note':
 //                $icons[$name] = array(
 //                    'icon' => 'mnemo.png',
-//                    'icondir' => $GLOBALS['registry']->getImageDir('mnemo'),
+//                    'icondir' => Horde_Themes::img(null, 'mnemo')
 //                    'alt' => _("Notes")
 //                );
 //                break;
@@ -407,7 +407,7 @@ class IMP_Hooks
 //            case 'contact':
 //                $icons[$name] = array(
 //                    'icon' => 'turba.png',
-//                    'icondir' => $GLOBALS['registry']->getImageDir('turba'),
+//                    'icondir' => Horde_Themes::img(null, 'turba')
 //                    'alt' => _("Contacts")
 //                );
 //                break;
@@ -415,7 +415,7 @@ class IMP_Hooks
 //            case 'prefs':
 //                $icons[$name] = array(
 //                    'icon' => 'prefs.png',
-//                    'icondir' => $GLOBALS['registry']->getImageDir('horde'),
+//                    'icondir' => Horde_Themes::img(null, 'horde')
 //                    'alt' => _("Preferences")
 //                );
 //                break;
index 7eae9e3..9261b76 100644 (file)
@@ -1845,7 +1845,7 @@ class IMP_Ajax_Application extends Horde_Ajax_Application_Base
         if ($elt['user_icon']) {
             $ob->cl = 'customimg';
             $dir = empty($elt['icondir'])
-                ? $GLOBALS['registry']->getImageDir()
+                ? Horde_Themes::img()
                 : $elt['icondir'];
             $ob->i = empty($dir)
                 ? $elt['icon']
index 7549358..d7c2bc8 100644 (file)
@@ -24,7 +24,7 @@ class Horde_Block_imp_tree_folders extends Horde_Block
         }
 
         /* Cache some additional values. */
-        $image_dir = $GLOBALS['registry']->getImageDir();
+        $image_dir = Horde_Themes::img();
 
         $tree->addNode($parent . 'compose', $parent, _("New Message"),
                        $indent, false,
index 6a41ca2..7cece3e 100644 (file)
@@ -444,7 +444,7 @@ class IMP_Contents
                         'name' => '',
                         'status' => array(
                             array(
-                                'icon' => Horde::img('alerts/warning.png', _("Warning"), null, $GLOBALS['registry']->getImageDir('horde')),
+                                'icon' => Horde::img('alerts/warning.png', _("Warning")),
                                 'text' => $status
                             )
                         ),
index b57b136..f6b2861 100644 (file)
@@ -1083,7 +1083,7 @@ class IMP
         }
 
         if ($sound = $GLOBALS['prefs']->getValue('nav_audio')) {
-            $GLOBALS['notification']->push($GLOBALS['registry']->getImageDir() . '/audio/' . $sound, 'audio');
+            $GLOBALS['notification']->push(Horde_Themes::img('audio/' . $sound), 'audio');
         }
     }
 
index 663976f..87df48d 100644 (file)
@@ -1786,7 +1786,7 @@ class IMP_Imap_Tree
     {
         if (!isset($this->_eltCache)) {
             $this->_eltCache = $this->getSpecialMailboxes();
-            $this->_eltCache['image_dir'] = $GLOBALS['registry']->getImageDir();
+            $this->_eltCache['image_dir'] = Horde_Themes::img();
         }
     }
 
index ce9c7fb..2f5478e 100644 (file)
@@ -253,7 +253,7 @@ class IMP_Horde_Mime_Viewer_Html extends Horde_Mime_Viewer_Html
             $data = preg_replace_callback($this->_img_regex, array($this, '_blockImages'), $data);
 
             $status[] = array(
-                'icon' => Horde::img('mime/image.png', null, null, $GLOBALS['registry']->getImageDir('horde')),
+                'icon' => Horde::img('mime/image.png'),
                 'text' => array(
                     _("Images have been blocked to protect your privacy."),
                     Horde::link('#', '', 'unblockImageLink') . _("Show Images?") . '</a>'
@@ -290,7 +290,7 @@ class IMP_Horde_Mime_Viewer_Html extends Horde_Mime_Viewer_Html
     protected function _blockImages($matches)
     {
         if (is_null($this->_blockimg)) {
-            $this->_blockimg = Horde::url($GLOBALS['registry']->getImageDir('imp', false) . '/spacer_red.png', true, -1);
+            $this->_blockimg = Horde::url(Horde_Themes::img('spacer_red.png'), true, -1);
         }
 
         return empty($matches[2])
index 9d46bc1..d9bb0c9 100644 (file)
@@ -155,7 +155,7 @@ class IMP_Horde_Mime_Viewer_Images extends Horde_Mime_Viewer_Images
                 'data' => '',
                 'status' => array(
                     array(
-                        'icon' => Horde::img('mime/image.png', null, null, $GLOBALS['registry']->getImageDir('horde')),
+                        'icon' => Horde::img('mime/image.png'),
                         'text' => $status
                     )
                 ),
index 55cb87f..261dccf 100644 (file)
@@ -149,7 +149,7 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
                             $handled = true;
                             $url = Horde::url($registry->link('calendar/show', array('uid' => $guid)));
                             $msgs[] = array('success', _("The event was updated in your calendar.") .
-                                            '&nbsp;' . Horde::link($url, _("View event"), null, '_blank') . Horde::img('mime/icalendar.png', _("View event"), null, $registry->getImageDir('horde')) . '</a>');
+                                            '&nbsp;' . Horde::link($url, _("View event"), null, '_blank') . Horde::img('mime/icalendar.png', _("View event")) . '</a>');
                         } catch (Horde_Exception $e) {
                             // Could be a missing permission.
                             $msgs[] = array('warning', _("There was an error updating the event:") . ' ' . $e->getMessage() . '. ' . _("Trying to import the event instead."));
@@ -163,7 +163,7 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
                             $guid = $registry->call('calendar/import', array('content' => $components[$key], 'contentType' => $this->_mimepart->getType()));
                             $url = Horde::url($registry->link('calendar/show', array('uid' => $guid)));
                             $msgs[] = array('success', _("The event was added to your calendar.") .
-                                            '&nbsp;' . Horde::link($url, _("View event"), null, '_blank') . Horde::img('mime/icalendar.png', _("View event"), null, $registry->getImageDir('horde')) . '</a>');
+                                            '&nbsp;' . Horde::link($url, _("View event"), null, '_blank') . Horde::img('mime/icalendar.png', _("View event")) . '</a>');
                         } catch (Horde_Exception $e) {
                             $msgs[] = array('error', _("There was an error importing the event:") . ' ' . $e->getMessage());
                         }
@@ -194,7 +194,7 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
                             $guid = $registry->call('tasks/import', array($components[$key], $this->_mimepart->getType()));
                             $url = Horde::url($registry->link('tasks/show', array('uid' => $guid)));
                             $msgs[] = array('success', _("The task has been added to your tasklist.") .
-                                                         '&nbsp;' . Horde::link($url, _("View task"), null, '_blank') . Horde::img('mime/icalendar.png', _("View task"), null, $registry->getImageDir('horde')) . '</a>');
+                                                         '&nbsp;' . Horde::link($url, _("View task"), null, '_blank') . Horde::img('mime/icalendar.png', _("View task")) . '</a>');
                         } catch (Horde_Exception $e) {
                             $msgs[] = array('error', _("There was an error importing the task:") . ' ' . $e->getMessage());
                         }
@@ -551,7 +551,7 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
         $html .= '<h1 class="header">' . sprintf($desc, $sender) . '</h1>';
 
         foreach ($msgs as $msg) {
-            $html .= '<p class="notice">' . Horde::img('alerts/' . $msg[0] . '.png', '', null, $registry->getImageDir('horde')) . $msg[1] . '</p>';
+            $html .= '<p class="notice">' . Horde::img('alerts/' . $msg[0] . '.png') . $msg[1] . '</p>';
         }
 
         $start = $vfb->getAttribute('DTSTART');
@@ -721,7 +721,7 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
         $html .= '<h2 class="header">' . $desc . '</h2>';
 
         foreach ($msgs as $msg) {
-            $html .= '<p class="notice">' . Horde::img('alerts/' . $msg[0] . '.png', '', null, $registry->getImageDir('horde')) . $msg[1] . '</p>';
+            $html .= '<p class="notice">' . Horde::img('alerts/' . $msg[0] . '.png') . $msg[1] . '</p>';
         }
 
         $start = $vevent->getAttribute('DTSTART');
@@ -907,7 +907,7 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
         $html .= '<h2 class="header">' . $desc . '</h2>';
 
         foreach ($msgs as $msg) {
-            $html .= '<p class="notice">' . Horde::img('alerts/' . $msg[0] . '.png', '', null, $registry->getImageDir('horde')) . $msg[1] . '</p>';
+            $html .= '<p class="notice">' . Horde::img('alerts/' . $msg[0] . '.png') . $msg[1] . '</p>';
         }
 
         $priority = $vtodo->getAttribute('PRIORITY');
index 6fad7fe..a01b10f 100644 (file)
@@ -64,7 +64,7 @@ class IMP_Horde_Mime_Viewer_Mdn extends Horde_Mime_Viewer_Driver
 
         $status = array(
             array(
-                'icon' => Horde::img('info_icon.png', _("Info"), null, $GLOBALS['registry']->getImageDir('horde')),
+                'icon' => Horde::img('info_icon.png', _("Info")),
                 'text' => array(_("A message you have sent has resulted in a return notification from the recipient."))
             )
         );
index 0232724..2805fc8 100644 (file)
@@ -93,7 +93,7 @@ class IMP_Horde_Mime_Viewer_Partial extends Horde_Mime_Viewer_Driver
          * status message. */
         if (count($indices) != $total) {
             self::$_statuscache[$this->_mimepart->getMimeId()] = array(
-                'icon' => Horde::img('alerts/error.png', _("Error"), null, $GLOBALS['registry']->getImageDir('horde')),
+                'icon' => Horde::img('alerts/error.png', _("Error")),
                 'text' => array(
                     sprintf(_("Cannot display message - found only %s of %s parts of this message in the current mailbox."), count($indices), $total)
                 )
index db1c1d0..6195287 100644 (file)
@@ -89,7 +89,7 @@ class IMP_Horde_Mime_Viewer_Pdf extends Horde_Mime_Viewer_Pdf
                 'data' => '',
                 'status' => array(
                     array(
-                        'icon' => Horde::img('mime/image.png', null, null, $GLOBALS['registry']->getImageDir('horde')),
+                        'icon' => Horde::img('mime/image.png'),
                         'text' => $status
                     )
                 ),
index 3d2311f..81e360a 100644 (file)
@@ -374,7 +374,6 @@ class IMP_Horde_Mime_Viewer_Pgp extends Horde_Mime_Viewer_Driver
 
         if ($GLOBALS['prefs']->getValue('pgp_verify') ||
             Horde_Util::getFormData('pgp_verify_msg')) {
-            $graphicsdir = $GLOBALS['registry']->getImageDir('horde');
             $sig_part = $this->_params['contents']->getMIMEPart($sig_id);
 
             try {
@@ -382,11 +381,11 @@ class IMP_Horde_Mime_Viewer_Pgp extends Horde_Mime_Viewer_Driver
                     ? $this->_imppgp->verifySignature($sig_part->getContents(array('canonical' => true)), $this->_address)
                     : $this->_imppgp->verifySignature($sig_part->replaceEOL($this->_params['contents']->getBodyPart($signed_id, array('mimeheaders' => true)), Horde_Mime_Part::RFC_EOL), $this->_address, $sig_part->getContents());
 
-                $icon = Horde::img('alerts/success.png', _("Success"), null, $graphicsdir);
+                $icon = Horde::img('alerts/success.png', _("Success"));
                 $sig_text = $sig_result->message;
                 $success = true;
             } catch (Horde_Exception $e) {
-                $icon = Horde::img('alerts/error.png', _("Error"), null, $graphicsdir);
+                $icon = Horde::img('alerts/error.png', _("Error"));
                 $sig_text = $e->getMessage();
                 $success = false;
             }
index c0cc69a..b641f80 100644 (file)
@@ -30,7 +30,7 @@ class IMP_Horde_Mime_Viewer_Plain extends Horde_Mime_Viewer_Plain
     {
         $data = $this->_impRender(false);
         $item = reset($data);
-        $item['data'] = '<html><head>' . Horde::includeStylesheetFiles() . '</head><body><tt>' . $item['data'] . '</tt></body></html>';
+        $item['data'] = '<html><head>' . Horde_Themes::includeStylesheetFiles() . '</head><body><tt>' . $item['data'] . '</tt></body></html>';
         return $data;
     }
 
index 8f0704b..bbd32e1 100644 (file)
@@ -234,7 +234,6 @@ class IMP_Horde_Mime_Viewer_Smime extends Horde_Mime_Viewer_Driver
         $partlist = array_keys($this->_mimepart->contentTypeMap());
         $base_id = reset($partlist);
         $sig_id = Horde_Mime::mimeIdArithmetic(next($partlist), 'next');
-        $graphicsdir = $GLOBALS['registry']->getImageDir('horde');
 
         /* Initialize inline data. */
         self::$_cache[$base_id] = array(
@@ -273,7 +272,7 @@ class IMP_Horde_Mime_Viewer_Smime extends Horde_Mime_Viewer_Driver
             Horde_Util::getFormData('smime_verify_msg')) {
             try {
                 $sig_result = $this->_impsmime->verifySignature($raw_text);
-                self::$_cache[$base_id]['status'][0]['icon'] = Horde::img('alerts/success.png', _("Success"), null, $graphicsdir);
+                self::$_cache[$base_id]['status'][0]['icon'] = Horde::img('alerts/success.png', _("Success"));
                 self::$_cache[$base_id]['wrap'] = 'mimePartWrapValid';
 
                 if (empty($sig_result->result) ||
@@ -302,8 +301,8 @@ class IMP_Horde_Mime_Viewer_Smime extends Horde_Mime_Viewer_Driver
                 }
             } catch (Horde_Exception $e) {
                 self::$_cache[$base_id]['status'][0]['icon'] = ($e->getCode() == 'horde.warning')
-                    ? Horde::img('alerts/warning.png', _("Warning"), null, $graphicsdir)
-                    : Horde::img('alerts/error.png', _("Error"), null, $graphicsdir);
+                    ? Horde::img('alerts/warning.png', _("Warning"))
+                    : Horde::img('alerts/error.png', _("Error"));
                 self::$_cache[$base_id]['wrap'] = 'mimePartWrapInvalid';
                 $status[] = $e->getMessage();
             }
index 93fb1ba..f58dc4b 100644 (file)
@@ -100,7 +100,7 @@ class IMP_Horde_Mime_Viewer_Status extends Horde_Mime_Viewer_Driver
         case 'delayed':
             $status = array(
                 array(
-                    'icon' => Horde::img('alerts/error.png', _("Error"), null, $GLOBALS['registry']->getImageDir('horde')),
+                    'icon' => Horde::img('alerts/error.png', _("Error")),
                     'text' => array(
                         _("ERROR: Your message could not be delivered."),
                         sprintf(_("Additional error message details can be viewed %s."), $this->_params['contents']->linkViewJS($part2, 'view_attach', _("HERE"), array('jstext' => _("Additional message details"), 'params' => array('mode' => IMP_Contents::RENDER_INLINE))))
@@ -116,7 +116,7 @@ class IMP_Horde_Mime_Viewer_Status extends Horde_Mime_Viewer_Driver
         case 'relayed':
             $status = array(
                 array(
-                    'icon' => Horde::img('alerts/success.png', _("Success"), null, $GLOBALS['registry']->getImageDir('horde')),
+                    'icon' => Horde::img('alerts/success.png', _("Success")),
                     'text' => array(
                         _("Your message was successfully delivered."),
                         sprintf(_("Additional message details can be viewed %s."), $this->_params['contents']->linkViewJS($part2, 'view_attach', _("HERE"), array('jstext' => _("Additional message details"), 'params' => array('mode' => IMP_Contents::RENDER_INLINE))))
index cefc7a9..69ea588 100644 (file)
@@ -39,7 +39,7 @@ class IMP_Notification_Event_Status extends Horde_Core_Notification_Status
             return parent::__toString();
         }
 
-        return Horde::img($img, $label, null, $GLOBALS['registry']->getImageDir('imp')) . parent::__toString();
+        return Horde::img(Horde_Themes::img($img, 'imp'), $label) . parent::__toString();
     }
 
 }
index cfa5593..df0cd0c 100644 (file)
@@ -232,9 +232,6 @@ $mbox_info = $imp_mailbox->getMailboxArray(range($pageOb['begin'], $pageOb['end'
 /* Determine sorting preferences. */
 $sortpref = IMP::getSort($imp_mbox['mailbox']);
 
-/* Cache this value since we use it alot on this page. */
-$graphicsdir = $registry->getImageDir('horde');
-
 /* Determine if we are going to show the Hide/Purge Deleted Message links. */
 if (!$prefs->getValue('use_trash') &&
     !$GLOBALS['imp_search']->isVINBOXFolder()) {
@@ -264,23 +261,23 @@ if (!empty($pageOb['end'])) {
 if ($pageOb['pagecount']) {
     $rtl = !empty(Horde_Nls::$config['rtl'][$language]);
     if ($pageOb['page'] == 1) {
-        $pages_first = Horde::img($rtl ? 'nav/last-grey.png' : 'nav/first-grey.png', null, null, $graphicsdir);
-        $pages_prev = Horde::img($rtl ? 'nav/right-grey.png' : 'nav/left-grey.png', null, null, $graphicsdir);
+        $pages_first = Horde::img($rtl ? 'nav/last-grey.png' : 'nav/first-grey.png');
+        $pages_prev = Horde::img($rtl ? 'nav/right-grey.png' : 'nav/left-grey.png');
     } else {
         $first_url = $mailbox_imp_url->copy()->add('page', 1);
-        $pages_first = Horde::link($first_url, _("First Page")) . Horde::img($rtl ? 'nav/last.png' : 'nav/first.png', $rtl ? '>>' : '<<', null, $graphicsdir) . '</a>';
+        $pages_first = Horde::link($first_url, _("First Page")) . Horde::img($rtl ? 'nav/last.png' : 'nav/first.png', $rtl ? '>>' : '<<') . '</a>';
         $prev_url = $mailbox_imp_url->copy()->add('page', $pageOb['page'] - 1);
-        $pages_prev = Horde::link($prev_url, _("Previous Page")) . Horde::img($rtl ? 'nav/right.png' : 'nav/left.png', $rtl ? '>' : '<', null, $graphicsdir) . '</a>';
+        $pages_prev = Horde::link($prev_url, _("Previous Page")) . Horde::img($rtl ? 'nav/right.png' : 'nav/left.png', $rtl ? '>' : '<') . '</a>';
     }
 
     if ($pageOb['page'] == $pageOb['pagecount']) {
-        $pages_last = Horde::img($rtl ? 'nav/first-grey.png' : 'nav/last-grey.png', null, null, $graphicsdir);
-        $pages_next = Horde::img($rtl ? 'nav/left-grey.png' : 'nav/right-grey.png', null, null, $graphicsdir);
+        $pages_last = Horde::img($rtl ? 'nav/first-grey.png' : 'nav/last-grey.png');
+        $pages_next = Horde::img($rtl ? 'nav/left-grey.png' : 'nav/right-grey.png');
     } else {
         $next_url = $mailbox_imp_url->copy()->add('page', $pageOb['page'] + 1);
-        $pages_next = Horde::link($next_url, _("Next Page")) . Horde::img($rtl ? 'nav/left.png' : 'nav/right.png', $rtl ? '<' : '>', null, $graphicsdir) . '</a>';
+        $pages_next = Horde::link($next_url, _("Next Page")) . Horde::img($rtl ? 'nav/left.png' : 'nav/right.png', $rtl ? '<' : '>') . '</a>';
         $last_url = $mailbox_imp_url->copy()->add('page', $pageOb['pagecount']);
-        $pages_last = Horde::link($last_url, _("Last Page")) . Horde::img($rtl ? 'nav/first.png' : 'nav/last.png', $rtl ? '<<' : '>>', null, $graphicsdir) . '</a>';
+        $pages_last = Horde::link($last_url, _("Last Page")) . Horde::img($rtl ? 'nav/first.png' : 'nav/last.png', $rtl ? '<<' : '>>') . '</a>';
     }
 }
 
@@ -421,7 +418,7 @@ if ($_SESSION['imp']['protocol'] != 'pop') {
     } else {
         if ($imp_search->isEditableVFolder()) {
             $edit_search = sprintf(_("Edit Virtual Folder Definition for %s"), htmlspecialchars($rawtitle));
-            $hdr_template->set('delete_vfolder', Horde::link($imp_search->deleteUrl(), sprintf(_("Delete Virtual Folder Definition for %s"), htmlspecialchars($rawtitle)), null, null, "if (confirm('" . addslashes(_("Are you sure you want to delete this Virtual Folder Definition?")) . "')) { return true; } else { return false; }") . Horde::img('delete.png', sprintf(_("Delete Virtual Folder Definition for %s"), $rawtitle), '', $graphicsdir) . '</a>');
+            $hdr_template->set('delete_vfolder', Horde::link($imp_search->deleteUrl(), sprintf(_("Delete Virtual Folder Definition for %s"), htmlspecialchars($rawtitle)), null, null, "if (confirm('" . addslashes(_("Are you sure you want to delete this Virtual Folder Definition?")) . "')) { return true; } else { return false; }") . Horde::img('delete.png', sprintf(_("Delete Virtual Folder Definition for %s"), $rawtitle)) . '</a>');
         } elseif ($search_mbox && !isset($query_text)) {
             /* Mini search results. */
             $search_mailbox = reset($imp_search->getSearchFolders());
@@ -432,7 +429,7 @@ if ($_SESSION['imp']['protocol'] != 'pop') {
         }
 
         if (isset($edit_search)) {
-            $hdr_template->set('search', Horde::link($imp_search->editUrl(), $edit_search) . Horde::img('edit.png', $edit_search, '', $graphicsdir) . '</a>');
+            $hdr_template->set('search', Horde::link($imp_search->editUrl(), $edit_search) . Horde::img('edit.png', $edit_search) . '</a>');
         }
     }
 }
@@ -646,7 +643,7 @@ if ($pageOb['msgcount']) {
         $ptr = &$headers[$key];
         $ptr['class'] = ($sortpref['by'] == $key) ? 'selected' : 'item';
         if ($sortpref['by'] == $key) {
-            $ptr['change_sort_link'] = Horde::link($sort_url->copy()->add(array('sortby' => $key, 'actionID' => 'change_sort', 'mailbox_token' => $mailbox_token)), $val['stext'], null, null, null, $val['stext']) . Horde::img($sortImg, $sortText, '', $graphicsdir) . '</a>';
+            $ptr['change_sort_link'] = Horde::link($sort_url->copy()->add(array('sortby' => $key, 'actionID' => 'change_sort', 'mailbox_token' => $mailbox_token)), $val['stext'], null, null, null, $val['stext']) . Horde::img($sortImg, $sortText) . '</a>';
         } else {
             $ptr['change_sort_link'] = null;
         }
index 042d78c..7cb8507 100644 (file)
@@ -443,16 +443,16 @@ $n_template->set('back_to', Horde::widget($mailbox_url, sprintf(_("Back to %s"),
 $rtl = !empty(Horde_Nls::$config['rtl'][$language]);
 if (Horde_Util::nonInputVar('prev_url')) {
     $n_template->set('prev', Horde::link($prev_url, _("Previous Message")));
-    $n_template->set('prev_img', Horde::img($rtl ? 'nav/right.png' : 'nav/left.png', $rtl ? '>' : '<', '', $registry->getImageDir('horde')));
+    $n_template->set('prev_img', Horde::img($rtl ? 'nav/right.png' : 'nav/left.png', $rtl ? '>' : '<'));
 } else {
-    $n_template->set('prev_img', Horde::img($rtl ? 'nav/right-grey.png' : 'nav/left-grey.png', '', '', $registry->getImageDir('horde')));
+    $n_template->set('prev_img', Horde::img($rtl ? 'nav/right-grey.png' : 'nav/left-grey.png'));
 }
 
 if (Horde_Util::nonInputVar('next_url')) {
     $n_template->set('next', Horde::link($next_url, _("Next Message")));
-    $n_template->set('next_img', Horde::img($rtl ? 'nav/left.png' : 'nav/right.png', $rtl ? '<' : '>', '', $registry->getImageDir('horde')));
+    $n_template->set('next_img', Horde::img($rtl ? 'nav/left.png' : 'nav/right.png', $rtl ? '<' : '>'));
 } else {
-    $n_template->set('next_img', Horde::img($rtl ? 'nav/left-grey.png' : 'nav/right-grey.png', '', '', $registry->getImageDir('horde')));
+    $n_template->set('next_img', Horde::img($rtl ? 'nav/left-grey.png' : 'nav/right-grey.png'));
 }
 
 /* Prepare the navbar actions template. */
index 94ab971..311427f 100644 (file)
@@ -49,7 +49,7 @@ $t->setOption('gettext', true);
 $t->set('action', Horde::applicationUrl('saveimage.php'));
 $t->set('id', htmlspecialchars($id));
 $t->set('uid', htmlspecialchars($uid));
-$t->set('image_img', Horde::img('mime/image.png', _("Image"), null, $registry->getImageDir('horde')));
+$t->set('image_img', Horde::img('mime/image.png', _("Image")));
 
 /* Build the list of galleries. */
 $t->set('gallerylist', $registry->call('images/selectGalleries', array(null, Horde_Perms::EDIT)));
index 8205e7a..1030408 100644 (file)
@@ -39,7 +39,7 @@ if (!empty($refresh_time) && !empty($refresh_url)) {
 
 switch ($imp_view) {
 case 'dimp':
-    Horde::includeStylesheetFiles(array('sub' => 'dimp'));
+    Horde_Themes::includeStylesheetFiles(array('sub' => 'dimp'));
     break;
 
 case 'mimp':
@@ -47,7 +47,7 @@ case 'mimp':
     break;
 
 default:
-    Horde::includeStylesheetFiles();
+    Horde_Themes::includeStylesheetFiles();
     Horde::includeScriptFiles();
     break;
 }
@@ -57,10 +57,10 @@ default:
 </head>
 <body>
 <?php elseif ($imp_view == 'dimp'): ?>
-<link href="<?php echo $GLOBALS['registry']->getImageDir() ?>/favicon.ico" rel="SHORTCUT ICON" />
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
 </head>
 <?php else: ?>
-<link href="<?php echo $GLOBALS['registry']->getImageDir() ?>/favicon.ico" rel="SHORTCUT ICON" />
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
 <?php if ($mailbox_url = Horde_Util::nonInputVar('mailbox_url')): ?>
 <link href="<?php echo $mailbox_url ?>" rel="Up" />
 <?php elseif (!Horde_Util::nonInputVar('login_page')): ?>
index dca5bde..730260b 100644 (file)
@@ -137,14 +137,14 @@ function _simpleButton($id, $text, $image, $nodisplay = false)
 <?php endforeach; ?>
 <?php if ($show_quota): ?>
         <li id="quota">
-         <span class="used"><?php echo Horde::img('quotauncover.gif', '', '', $registry->get('webroot', 'imp') . '/themes/graphics') ?></span>
+         <span class="used"><?php echo Horde::img('quotauncover.gif') ?></span>
         </li>
 <?php endif; ?>
        </ul>
       </div>
 <?php elseif ($show_quota): ?>
       <div id="quota">
-        <span class="used"><?php echo Horde::img('quotauncover.gif', '', '', $registry->get('webroot', 'imp') . '/themes/graphics') ?></span>
+        <span class="used"><?php echo Horde::img('quotauncover.gif') ?></span>
       </div>
 <?php endif; ?>
      </div>
index 4c9518b..b3a11ca 100644 (file)
@@ -3,7 +3,7 @@
 $flaglist = $GLOBALS['injector']->getInstance('IMP_Imap_Flags')->getList(array('div' => true, 'fgcolor' => true));
 
 /* Get the graphics. */
-$picker_img = Horde::img('colorpicker.png', _("Color Picker"), '', $registry->getImageDir('horde'));
+$picker_img = Horde::img('colorpicker.png', _("Color Picker"));
 
 ?>
 <input type="hidden" name="flag_action" id="flag_action" />
index 8c476bf..b05f656 100644 (file)
     <?php echo _("No Sound") ?>
    </label>
   </li>
-<?php foreach (glob($registry->get('themesfs') . '/graphics/audio/*.wav') as $sound): $sound = basename($sound); ?>
+<?php foreach (Horde_Themes::soundList() as $key => $val): ?>
   <li>
    <label>
-    <input type="radio" name="nav_audio" value="<?php echo htmlspecialchars($sound) ?>"<?php if ($nav_audio == $sound) echo ' checked="checked"' ?> />
-    <?php echo htmlspecialchars($sound) ?>
+    <input type="radio" name="nav_audio" value="<?php echo htmlspecialchars($key) ?>"<?php if ($nav_audio == $key) echo ' checked="checked"' ?> />
+    <?php echo htmlspecialchars($key) ?>
    </label>
-   <embed autostart="false" src="<?php echo $registry->getImageDir() . '/audio/' . htmlspecialchars($sound) ?>" />
+   <embed autostart="false" src="<?php echo htmlspecialchars($val->uri) ?>" />
   </li>
 <?php endforeach; ?>
  </ul>
index ab7decf..7806db3 100644 (file)
@@ -1,7 +1,4 @@
-<?php
-    $cache = IMP_Application::$prefsCache['sourceselect'];
-    $imagedir = $registry->getImageDir('horde');
-?>
+<?php $cache = IMP_Application::$prefsCache['sourceselect']; ?>
 <?php if (!empty($cache['readSelect']) || !empty($cache['prefSelect'])): ?>
 <div>
  <input type="hidden" name="search_sources" id="search_sources" value="<?php echo implode("\t", $cache['search']['sources']) ?>" />
@@ -19,9 +16,9 @@
     </select>
    </td>
    <td>
-    <a href="#" id="addsource"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'lhand.png' : 'rhand.png', _("Add source"), null, $imagedir) ?></a>
+    <a href="#" id="addsource"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'lhand.png' : 'rhand.png', _("Add source")) ?></a>
     <br />
-    <a href="#" id="removesource"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'rhand.png' : 'lhand.png', _("Remove source"), null, $imagedir) ?></a>
+    <a href="#" id="removesource"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'rhand.png' : 'lhand.png', _("Remove source")) ?></a>
    </td>
    <td>
     <label for="selected_search_sources" class="hidden"><?php echo _("Selected Address books:") ?></label>
@@ -33,9 +30,9 @@
     </select>
    </td>
    <td>
-    <a href="#" id="moveup"><?php echo Horde::img('nav/up.png', _("Move up"), null, $imagedir) ?></a>
+    <a href="#" id="moveup"><?php echo Horde::img('nav/up.png', _("Move up")) ?></a>
     <br />
-    <a href="#" id="movedown"><?php echo Horde::img('nav/down.png', _("Move down"), null, $imagedir) ?></a>
+    <a href="#" id="movedown"><?php echo Horde::img('nav/down.png', _("Move down")) ?></a>
    </td>
   </tr>
  </table>
diff --git a/imp/themes/silver/themed_graphics b/imp/themes/silver/themed_graphics
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/imp/themes/tango-blue/themed_graphics b/imp/themes/tango-blue/themed_graphics
deleted file mode 100644 (file)
index e69de29..0000000
index b863e1a..5093bd7 100644 (file)
@@ -149,7 +149,7 @@ if ($mode == 'thread') {
     foreach ($thread as $val) {
         $delete_link->add(array('indices[]' => $val . IMP::IDX_SEP . $imp_mbox['mailbox'], 'start' => $imp_mailbox->getArrayIndex($val)));
     }
-    $template->set('delete', Horde::link('#', _("Delete Thread"), null, null, "if (confirm('" . addslashes(_("Are you sure you want to delete all messages in this thread?")) . "')) { window.location = '" . $delete_link . "'; } return false;") . Horde::img('delete.png', _("Delete Thread"), null, $registry->getImageDir('horde')) . '</a>');
+    $template->set('delete', Horde::link('#', _("Delete Thread"), null, null, "if (confirm('" . addslashes(_("Are you sure you want to delete all messages in this thread?")) . "')) { window.location = '" . $delete_link . "'; } return false;") . Horde::img('delete.png', _("Delete Thread")) . '</a>');
 }
 $template->set('thread', $mode == 'thread');
 $template->set('messages', $msgs);
index 3b14737..01ba21e 100644 (file)
@@ -245,7 +245,7 @@ case 'print_attach':
             $t->set('headers', $headers);
 
             if (!$browser->isBrowser('mozilla')) {
-                $t->set('css', Horde_Util::bufferOutput(array('Horde', 'includeStylesheetFiles')));
+                $t->set('css', Horde_Util::bufferOutput(array('Horde_Themes', 'includeStylesheetFiles')));
                 echo $t->fetch(IMP_TEMPLATES . '/print/headers.html');
                 break;
             }
index 973dd21..e104974 100644 (file)
@@ -158,8 +158,8 @@ if (count($filter_list) == 0) {
     $rule_count = array_sum(array_map(create_function('$a', "return (in_array(\$a['action'], \$_SESSION['ingo']['script_categories'])) ? 1 : 0;"), $filter_list));
 
     /* Common graphics. */
-    $down_img = Horde::img('nav/down.png', _("Move Rule Down"), '', $registry->getImageDir('horde'));
-    $up_img = Horde::img('nav/up.png', _("Move Rule Up"), '', $registry->getImageDir('horde'));
+    $down_img = Horde::img('nav/down.png', _("Move Rule Down"));
+    $up_img = Horde::img('nav/up.png', _("Move Rule Up"));
 
     foreach ($filter_list as $rule_number => $filter) {
         /* Skip non-display categories. */
@@ -254,7 +254,7 @@ if (count($filter_list) == 0) {
         /* Create delete link. */
         if (!is_null($delurl)) {
             $entry['dellink'] = Horde::link($delurl, sprintf(_("Delete %s"), $name), null, null, "return window.confirm('" . addslashes(_("Are you sure you want to delete this rule?")) . "');");
-            $entry['delimg'] = Horde::img('delete.png', sprintf(_("Delete %s"), $name), '', $registry->getImageDir('horde'));
+            $entry['delimg'] = Horde::img('delete.png', sprintf(_("Delete %s"), $name));
         } else {
             $entry['dellink'] = false;
         }
index a0e4f01..785bf1e 100644 (file)
@@ -443,7 +443,7 @@ class Ingo
             $menu->add(Horde::applicationUrl('script.php'), _("_Script"), 'script.png');
         }
         if (!empty($GLOBALS['ingo_shares']) && empty($GLOBALS['conf']['share']['no_sharing'])) {
-            $menu->add('#', _("_Permissions"), 'perms.png', $GLOBALS['registry']->getImageDir('horde'), '', Horde::popupJs(Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/shares/edit.php', true), array('params' => array('app' => 'ingo', 'share' => $_SESSION['ingo']['backend']['id'] . ':' . Horde_Auth::getAuth()), 'urlencode' => true)) . 'return false;');
+            $menu->add('#', _("_Permissions"), 'perms.png', Horde_Themes::img(null, 'horde'), '', Horde::popupJs(Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/shares/edit.php', true), array('params' => array('app' => 'ingo', 'share' => $_SESSION['ingo']['backend']['id'] . ':' . Horde_Auth::getAuth()), 'urlencode' => true)) . 'return false;');
         }
 
         return $menu;
index 6ccc519..8b75ffc 100644 (file)
@@ -14,10 +14,10 @@ if (!empty($title)) {
 <?php if (!empty($refresh_time) && !empty($refresh_url)): ?>
 <meta http-equiv="refresh" content="<?php echo $refresh_time ?>;url=<?php echo $refresh_url ?>">
 <?php endif; ?>
-<?php Horde::includeStylesheetFiles() ?>
+<?php Horde_Themes::includeStylesheetFiles() ?>
 <?php Horde::includeScriptFiles(); ?>
 <title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
 <?php Horde::outputInlineScript(); ?>
 </head>
 
index 77238b1..0e0be9c 100644 (file)
@@ -30,7 +30,7 @@
   </td>
 <?php endif; ?>
 <?php if (!$lastfield): ?>
-  <td><?php echo Horde::link('javascript:IngoRule.delete_condition(' . (int)$cond_num . ');', _("Delete Condition")) . Horde::img('delete.png', _("Delete Condition"), null, $registry->getImageDir('horde')) ?></a></td>
+  <td><?php echo Horde::link('javascript:IngoRule.delete_condition(' . (int)$cond_num . ');', _("Delete Condition")) . Horde::img('delete.png', _("Delete Condition")) ?></a></td>
 <?php elseif ($cond_num != 0): ?>
   <td>&nbsp;</td>
 <?php endif; ?>
diff --git a/ingo/themes/silver/themed_graphics b/ingo/themes/silver/themed_graphics
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/ingo/themes/tango-blue/themed_graphics b/ingo/themes/tango-blue/themed_graphics
deleted file mode 100644 (file)
index e69de29..0000000
index 501e08e..a377c5c 100644 (file)
@@ -8,8 +8,8 @@ if (isset($language)) {
 <?php echo !empty($language) ? '<html lang="' . strtr($language, '_', '-') . '">' : '<html>' ?>
 <head>
 <title><?php echo htmlspecialchars($registry->get('name')) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
 </head>
 
 <body>
index 7e854c2..2634118 100644 (file)
@@ -6,7 +6,7 @@
  * See the enclosed file COPYING for license information (GPL). If you
  * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
  *
- * @author  Andre Pawlowski aka sqall <sqall@h4des.org> 
+ * @author  Andre Pawlowski aka sqall <sqall@h4des.org>
  * @package Tree_Menu
  */
 
@@ -29,7 +29,7 @@ class Horde_Block_kastalia_tree_menu extends Horde_Block {
                        $indent + 1,
                        false,
                        array('icon' => 'menu/upload.png',
-                             'icondir' => $registry->getImageDir('kastalia'),
+                             'icondir' => Horde_Themes::img(null, 'kastalia'),
                              'url' => Horde::applicationUrl('upload_menu.php')));
     }
 
index 6b5aeac..5943d95 100644 (file)
@@ -22,7 +22,7 @@ class Kastalia {
 
         $menu = new Horde_Menu(HORDE_MENU_MASK_ALL);
 
-        $menu->add(Horde::applicationUrl('upload_menu.php'), _("Upload"), 'menu/upload.png', $registry->getImageDir('kastalia'));
+        $menu->add(Horde::applicationUrl('upload_menu.php'), _("Upload"), 'menu/upload.png', Horde_Themes::img());
 
         return $menu;
     }
index 9639b1b..d37d59d 100755 (executable)
@@ -25,8 +25,8 @@ Horde::includeScriptFiles();
 
 ?>
 <title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
 </head>
 
 <body>
index d7b06e2..09ab8c9 100644 (file)
@@ -54,35 +54,33 @@ class Koward_Controller_Application extends Horde_Controller_Base
      */
     public function getMenu()
     {
-        global $registry;
-
         $menu = new Horde_Menu();
 
         if ($this->koward->hasAccess('object/listall')) {
             $menu->add($this->urlFor(array('controller' => 'object', 'action' => 'listall')),
-                       _("_Objects"), 'user.png', $registry->getImageDir('horde'));
+                       _("_Objects"), 'user.png', Horde_Themes::img(null, 'horde'));
         }
 
         if ($this->koward->hasAccess('object/add', Koward::PERM_EDIT)) {
             $menu->add($this->urlFor(array('controller' => 'object', 'action' => 'add')),
-                       _("_Add"), 'plus.png', $registry->getImageDir('horde'));
+                       _("_Add"), 'plus.png', Horde_Themes::img(null, 'horde'));
         }
 
         if ($this->koward->hasAccess('object/search')) {
             $menu->add($this->urlFor(array('controller' => 'object', 'action' => 'search')),
-                       _("_Search"), 'search.png', $registry->getImageDir('horde'));
+                       _("_Search"), 'search.png', Horde_Themes::img(null, 'horde'));
         }
 
         if (!empty($this->koward->conf['koward']['menu']['queries'])) {
-            $menu->add(Horde::applicationUrl('Queries'), _("_Queries"), 'query.png', $registry->getImageDir('koward'));
+            $menu->add(Horde::applicationUrl('Queries'), _("_Queries"), 'query.png', Horde_Themes::img());
         }
         if (!empty($this->koward->conf['koward']['menu']['test'])) {
             $menu->add($this->urlFor(array('controller' => 'check', 'action' => 'show')),
-                   _("_Test"), 'problem.png', $registry->getImageDir('horde'));
+                   _("_Test"), 'problem.png', Horde_Themes::img(null, 'horde'));
         }
         if (Horde_Auth::getAuth()) {
             $menu->add($this->urlFor(array('controller' => 'index', 'action' => 'logout')),
-                       _("_Logout"), 'logout.png', $registry->getImageDir('horde'));
+                       _("_Logout"), 'logout.png', Horde_Themes::img(null, 'horde'));
         }
         return $menu;
     }
index 2110315..cd73b43 100644 (file)
@@ -48,15 +48,13 @@ class ObjectController extends Koward_Controller_Application
                     $this->urlFor(array('controller' => 'object',
                                         'action' => 'edit',
                                         'id' => $uid)),
-                    _("Edit")) . Horde::img('edit.png', _("Edit"), '',
-                                            $GLOBALS['registry']->getImageDir('horde'))
+                    _("Edit")) . Horde::img('edit.png', _("Edit"))
                     . '</a>';
                 $this->objectlist[$uid]['delete_url'] = Horde::link(
                     $this->urlFor(array('controller' => 'object',
                                         'action' => 'delete',
                                         'id' => $uid)),
-                    _("Delete")) . Horde::img('delete.png', _("Delete"), '',
-                                              $GLOBALS['registry']->getImageDir('horde'))
+                    _("Delete")) . Horde::img('delete.png', _("Delete"))
                     . '</a>';
                 if ($this->koward->hasAccess('object/view/' . $this->object_type, Koward::PERM_READ)) {
                     $this->objectlist[$uid]['view_url'] = Horde::link(
@@ -211,8 +209,7 @@ class ObjectController extends Koward_Controller_Application
                     $this->urlFor(array('controller' => 'object',
                                         'action' => 'edit',
                                         'id' => $this->params->id)),
-                    _("Edit")) . Horde::img('edit.png', _("Edit"), '',
-                                            $GLOBALS['registry']->getImageDir('horde'))
+                    _("Edit")) . Horde::img('edit.png', _("Edit"))
                     . '</a>';
 
 
@@ -353,15 +350,13 @@ class ObjectController extends Koward_Controller_Application
                             $this->urlFor(array('controller' => 'object',
                                                 'action' => 'edit',
                                                 'id' => $uid)),
-                            _("Edit")) . Horde::img('edit.png', _("Edit"), '',
-                                                    $GLOBALS['registry']->getImageDir('horde'))
+                            _("Edit")) . Horde::img('edit.png', _("Edit"))
                             . '</a>';
                         $this->objectlist[$uid]['delete_url'] = Horde::link(
                             $this->urlFor(array('controller' => 'object',
                                                 'action' => 'delete',
                                                 'id' => $uid)),
-                            _("Delete")) . Horde::img('delete.png', _("Delete"), '',
-                                                      $GLOBALS['registry']->getImageDir('horde'))
+                            _("Delete")) . Horde::img('delete.png', _("Delete"))
                             . '</a>';
                         $this->objectlist[$uid]['view_url'] = Horde::link(
                             $this->urlFor(array('controller' => 'object',
index 3d1f72a..d3c162c 100644 (file)
  <thead>
   <tr>
    <?php if ($this->allowEdit): ?>
-    <th class="item" width="1%"><?php echo Horde::img('edit.png', _("Edit"), '', $GLOBALS['registry']->getImageDir('horde')) ?></th>
+    <th class="item" width="1%"><?php echo Horde::img('edit.png', _("Edit")) ?></th>
    <?php endif; ?>
    <?php if ($this->allowDelete): ?>
-    <th class="item" width="1%"><?php echo Horde::img('delete.png', _("Delete"), '', $GLOBALS['registry']->getImageDir('horde')) ?></th>
+    <th class="item" width="1%"><?php echo Horde::img('delete.png', _("Delete")) ?></th>
    <?php endif; ?>
    <?php foreach ($this->attributes as $attribute => $info): ?>
      <th class="item leftAlign" width="<?php echo $info['width'] ?>%" nowrap="nowrap"><?= $info['title'] ?></th>
    <?php if ($this->allowEdit): ?>
     <td>
      <?= $info['edit_url'] ?>
-    </td> 
+    </td>
    <?php endif; ?>
    <?php if ($this->allowDelete): ?>
     <td>
      <?= $info['delete_url'] ?>
-    </td> 
+    </td>
    <?php endif; ?>
    <?php foreach ($this->attributes as $attribute => $ainfo): ?>
    <td>
@@ -41,9 +41,9 @@
    <?php else: ?>
     <?= $this->escape($info[$attribute]) ?>
    <?php endif; ?>
-   </td> 
+   </td>
    <?php endforeach; ?>
-  </tr> 
+  </tr>
   <?php endforeach; ?>
  </tbody>
 </table>
index 5f2a6fc..0703010 100644 (file)
  <thead>
   <tr>
    <?php if ($this->allowEdit): ?>
-    <th class="item" width="1%"><?php echo Horde::img('edit.png', _("Edit"), '', $GLOBALS['registry']->getImageDir('horde')) ?></th>
+    <th class="item" width="1%"><?php echo Horde::img('edit.png', _("Edit")) ?></th>
    <?php endif; ?>
    <?php if ($this->allowDelete): ?>
-    <th class="item" width="1%"><?php echo Horde::img('delete.png', _("Delete"), '', $GLOBALS['registry']->getImageDir('horde')) ?></th>
+    <th class="item" width="1%"><?php echo Horde::img('delete.png', _("Delete"),) ?></th>
    <?php endif; ?>
    <?php foreach ($this->attributes as $attribute => $info): ?>
      <th class="item leftAlign" width="<?php echo $info['width'] ?>%" nowrap="nowrap"><?= $info['title'] ?></th>
    <?php if ($this->allowEdit): ?>
     <td>
      <?= $info['edit_url'] ?>
-    </td> 
+    </td>
    <?php endif; ?>
    <?php if ($this->allowDelete): ?>
     <td>
      <?= $info['delete_url'] ?>
-    </td> 
+    </td>
    <?php endif; ?>
    <?php foreach ($this->attributes as $attribute => $ainfo): ?>
    <td>
@@ -52,9 +52,9 @@
    <?php else: ?>
     <?= $this->escape($value) ?>
    <?php endif; ?>
-   </td> 
+   </td>
    <?php endforeach; ?>
-  </tr> 
+  </tr>
   <?php endforeach; ?>
  </tbody>
 </table>
index 37b451c..470ed65 100644 (file)
@@ -27,10 +27,8 @@ $page_title .= !empty($this->title) ? ' :: ' . $this->title : '';
 Horde::includeScriptFiles();
 ?>
 <title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
-
-<?php Horde::includeStylesheetFiles() ?>
-
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
 </head>
 
 <body>
diff --git a/koward/www/htdocs/horde/themes/silver/themed_graphics b/koward/www/htdocs/horde/themes/silver/themed_graphics
deleted file mode 100644 (file)
index e69de29..0000000
index 57215c4..3e347a2 100644 (file)
@@ -177,8 +177,7 @@ foreach (array_keys($resources) as $id) {
 $view = Horde_Util::getFormData('view', 'Day');
 
 // Pre-format our delete image/link.
-$delimg = Horde::img('delete.png', _("Remove Attendee"), null,
-                     $registry->getImageDir('horde'));
+$delimg = Horde::img('delete.png', _("Remove Attendee"));
 
 $ident = Horde_Prefs_Identity::singleton();
 $identities = $ident->getAll('id');
index d221ec0..020ce6c 100644 (file)
@@ -65,9 +65,9 @@ foreach ($remote_calendars as $calendar) {
 }
 asort($sorted_calendars);
 
-$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 Calendars");
index 46e73f8..bb19492 100644 (file)
@@ -96,7 +96,7 @@ $template->set('updated', $now->format(DATE_ATOM));
 $template->set('kronolith_name', 'Kronolith');
 $template->set('kronolith_version', $registry->getVersion());
 $template->set('kronolith_uri', 'http://www.horde.org/kronolith/');
-$template->set('kronolith_icon', Horde::url($registry->getImageDir() . '/kronolith.png', true, -1));
+$template->set('kronolith_icon', Horde::url(Horde_Themes::img('kronolith.png'), true, -1));
 $template->set('xsl', $registry->get('themesuri') . '/feed-rss.xsl');
 $template->set('calendar_name', @htmlspecialchars($share->get('name'), ENT_COMPAT, Horde_Nls::getCharset()));
 $template->set('calendar_desc', @htmlspecialchars($share->get('desc'), ENT_COMPAT, Horde_Nls::getCharset()), true);
index 05e7efc..557fde9 100644 (file)
@@ -50,14 +50,14 @@ foreach (Horde_Alarm::notificationMethods() as $method => $params) {
         case 'sound':
             $alarm_params .= '<ul class="sound-list"><li><input type="radio" ' . $att
                 . ' value="" checked="checked" /> ' . _("No Sound") . '</li>';
-            foreach (glob($registry->get('themesfs', 'horde') . '/sounds/*.wav') as $sound) {
-                $sound = htmlspecialchars(basename($sound));
+            foreach (Horde_Themes::soundList() as $key => $val) {
+                $sound = htmlspecialchars($key);
                 $alarm_params .= '<li><input type="radio" id="kronolithEventAlarmParam'
                     . $name . str_replace('.wav', '', $sound) . '" ' . $name_att
                     . ' value="' .  $sound
                     . '" /> <embed autostart="false" src="'
-                    . $registry->get('themesuri', 'horde') . '/sounds/'
-                    . $sound . '" /> ' . $sound . '</li>';
+                    . htmlspecialchars($val->uri)
+                    . '" /> ' . $sound . '</li>';
             }
             $alarm_params .= '</ul>';
             break;
index c9c7fe5..c42e630 100644 (file)
@@ -107,7 +107,7 @@ class Kronolith_Ajax_Imple_TagActions extends Horde_Ajax_Imple_Base
         }
 
         foreach ($tags as $tag_id => $tag) {
-            $html .= '<li class="panel-tags">' . htmlspecialchars($tag) . ($hasEdit ? '<a href="#" onclick="removeTag(\'' . $id . '\', \'' . $type . '\', ' . $tag_id . ',\'' . $this->_getUrl('TagActions', 'kronolith') . '\'); Event.stop(event);" id="remove' . md5($id . $tag_id) . '">' . Horde::img('delete-small.png', _("Remove Tag"), '', $GLOBALS['registry']->getImageDir('horde')) . '</a>' : '') . '</li>';
+            $html .= '<li class="panel-tags">' . htmlspecialchars($tag) . ($hasEdit ? '<a href="#" onclick="removeTag(\'' . $id . '\', \'' . $type . '\', ' . $tag_id . ',\'' . $this->_getUrl('TagActions', 'kronolith') . '\'); Event.stop(event);" id="remove' . md5($id . $tag_id) . '">' . Horde::img('delete-small.png', _("Remove Tag")) . '</a>' : '') . '</li>';
         }
 
         return $html;
index 24c8d4c..2a55942 100644 (file)
@@ -90,8 +90,7 @@ class Kronolith_Api extends Horde_Registry_Api
                     $results[$path]['name'] = $owner;
                 }
                 if (in_array('icon', $properties)) {
-                    $results[$path]['icon'] =
-                        $registry->getImageDir('horde') . '/user.png';
+                    $results[$path]['icon'] = Horde_Themes::img('user.png');
                 }
                 if (in_array('browseable', $properties)) {
                     $results[$path]['browseable'] = true;
@@ -143,8 +142,8 @@ class Kronolith_Api extends Horde_Registry_Api
                     $results[$retpath . '.ics']['displayname'] = rawurlencode($calendar->get('name')) . '.ics';
                 }
                 if (in_array('icon', $properties)) {
-                    $results[$retpath]['icon'] = $registry->getImageDir() . '/kronolith.png';
-                    $results[$retpath . '.ics']['icon'] = $registry->getImageDir() . '/mime/icalendar.png';
+                    $results[$retpath]['icon'] = Horde_Themes::img('kronolith.png');
+                    $results[$retpath . '.ics']['icon'] = Horde_Themes::img('mime/icalendar.png');
                 }
                 if (in_array('browseable', $properties)) {
                     $results[$retpath]['browseable'] = $calendar->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ);
@@ -182,7 +181,7 @@ class Kronolith_Api extends Horde_Registry_Api
             // directory.
             $kronolith_driver = Kronolith::getDriver(null, $parts[1]);
             $events = $kronolith_driver->listEvents();
-            $icon = $registry->getImageDir('horde') . '/mime/icalendar.png';
+            $icon = Horde_Themes::img('mime/icalendar.png');
             $results = array();
             foreach ($events as $dayevents) {
                 foreach ($dayevents as $event) {
index 6b6a923..0df12b3 100644 (file)
@@ -37,7 +37,7 @@ class Horde_Block_kronolith_tree_alarms extends Horde_Block {
                                $indent + 1,
                                false,
                                array('icon' => 'alarm.png',
-                                     'icondir' => $GLOBALS['registry']->getImageDir(),
+                                     'icondir' => Horde_Themes::img(),
                                      'title' => $event->getTooltip(),
                                      'url' => $event->getViewUrl()));
             }
index d47615b..2ccc161 100644 (file)
@@ -21,7 +21,7 @@ class Horde_Block_kronolith_tree_menu extends Horde_Block {
             array('week', _("Week"), 'weekview.png', Horde::applicationUrl('week.php')),
             array('month', _("Month"), 'monthview.png', Horde::applicationUrl('month.php')),
             array('year', _("Year"), 'yearview.png', Horde::applicationUrl('year.php')),
-            array('search', _("Search"), 'search.png', Horde::applicationUrl('search.php'), $registry->getImageDir('horde')),
+            array('search', _("Search"), 'search.png', Horde::applicationUrl('search.php'), Horde_Themes::img(null, 'horde')),
         );
 
         foreach ($menus as $menu) {
@@ -31,7 +31,7 @@ class Horde_Block_kronolith_tree_menu extends Horde_Block {
                            $indent + 1,
                            false,
                            array('icon' => $menu[2],
-                                 'icondir' => isset($menu[4]) ? $menu[4] : $registry->getImageDir(),
+                                 'icondir' => isset($menu[4]) ? $menu[4] : Horde_Themes::img(),
                                  'url' => $menu[3]));
         }
     }
index df096ad..8f64c11 100644 (file)
@@ -1132,11 +1132,11 @@ abstract class Kronolith_Event
             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']);
                 }
             }
             if ($this->isAllDay()) {
@@ -1405,7 +1405,7 @@ abstract class Kronolith_Event
                         'del_exception' => $date,
                         'url' => Horde_Util::getFormData('url')))
             ->link(array('title' => sprintf(_("Delete exception on %s"), $formatted)))
-            . Horde::img('delete-small.png', _("Delete"), '', $GLOBALS['registry']->getImageDir('horde'))
+            . Horde::img('delete-small.png', _("Delete"))
             . '</a>';
     }
 
index 372dcae..db63728 100644 (file)
@@ -23,11 +23,11 @@ class Kronolith_FreeBusy_View_Day extends Kronolith_FreeBusy_View {
         $next = new Horde_Date($this->_start);
         $next->mday++;
         return Horde::url('#')->link(array('title' => _("Previous Day"), 'onclick' => 'return switchDate(' . $prev->dateString() . ');'))
-            . Horde::img('nav/left.png', '<', null, $registry->getImageDir('horde'))
+            . Horde::img('nav/left.png', '<')
             . '</a>'
             . $this->_start->strftime($prefs->getValue('date_format'))
             . Horde::url('#')->link(array('title' => _("Next Day"), 'onclick' => 'return switchDate(' . $next->dateString() . ');'))
-            . Horde::img('nav/right.png', '>', null, $registry->getImageDir('horde'))
+            . Horde::img('nav/right.png', '>')
             . '</a>';
     }
 
index c202c2b..7038891 100644 (file)
@@ -17,8 +17,6 @@ class Kronolith_FreeBusy_View_Month extends Kronolith_FreeBusy_View {
 
     function _title()
     {
-        global $registry, $prefs;
-
         $end = new Horde_Date($this->_start);
         $end->mday += $this->_days - 1;
         $prev = new Horde_Date($this->_start);
@@ -26,11 +24,11 @@ class Kronolith_FreeBusy_View_Month extends Kronolith_FreeBusy_View {
         $next = new Horde_Date($this->_start);
         $next->month++;
         return Horde::url('#')->link(array('title' => _("Previous Month"), 'onclick' => 'return switchDate(' . $prev->dateString() . ');'))
-            . Horde::img('nav/left.png', '<', null, $registry->getImageDir('horde'))
+            . Horde::img('nav/left.png', '<')
             . '</a>'
             . $this->_start->strftime('%B %Y')
             . Horde::url('#')->link(array('title' => _("Next Month"), 'onclick' => 'return switchDate(' . $next->dateString() . ');'))
-            . Horde::img('nav/right.png', '>', null, $registry->getImageDir('horde'))
+            . Horde::img('nav/right.png', '>')
             . '</a>';
     }
 
index e8e1d0a..1db9f64 100644 (file)
@@ -17,7 +17,7 @@ class Kronolith_FreeBusy_View_Week extends Kronolith_FreeBusy_View {
 
     function _title()
     {
-        global $registry, $prefs;
+        global $prefs;
 
         $prev = new Horde_Date($this->_start);
         $prev->mday -= 7;
@@ -26,12 +26,12 @@ class Kronolith_FreeBusy_View_Week extends Kronolith_FreeBusy_View {
         $end = new Horde_Date($this->_start);
         $end->mday += $this->_days - 1;
         return Horde::url('#')->link(array('title' => _("Previous Week"), 'onclick' => 'return switchDate(' . $prev->dateString() . ');'))
-            . Horde::img('nav/left.png', '<', null, $registry->getImageDir('horde'))
+            . Horde::img('nav/left.png', '<')
             . '</a>'
             . $this->_start->strftime($prefs->getValue('date_format')) . ' - '
             . $end->strftime($prefs->getValue('date_format'))
             . Horde::url('#')->link(array('title' => _("Next Week"), 'onclick' => 'return switchDate(' . $next->dateString() . ');'))
-            . Horde::img('nav/right.png', '>', null, $registry->getImageDir('horde'))
+            . Horde::img('nav/right.png', '>')
             . '</a>';
     }
 
index 97c758d..d83a4e6 100644 (file)
@@ -88,10 +88,10 @@ class Kronolith
              (!empty($GLOBALS['language']) ? '<html lang="' . strtr($GLOBALS['language'], '_', '-') . '"' : '<html') . ">\n".
              "<head>\n" .
              '<title>' . htmlspecialchars($GLOBALS['registry']->get('name')) . "</title>\n" .
-             '<link href="' . $GLOBALS['registry']->getImageDir() . "/favicon.ico\" rel=\"SHORTCUT ICON\" />\n".
+             '<link href="' . Horde_Themes::img('favicon.ico', array('nohorde' => true)) . "\" rel=\"SHORTCUT ICON\" />\n".
              Horde::wrapInlineScript(self::includeJSVars());
 
-        Horde::includeStylesheetFiles();
+        Horde_Themes::includeStylesheetFiles();
 
         echo "</head>\n";
 
@@ -121,7 +121,7 @@ class Kronolith
                 $language = 'en-US';
             }
             $params['conf'] = array(
-                'URI_IMG_HORDE' => $GLOBALS['registry']->getImageDir('horde') . '/',
+                'URI_IMG_HORDE' => Horde_Themes::img(null, 'horde') . '/',
                 'useMarkerLayer' => true,
                 'language' => $language);
 
@@ -185,7 +185,7 @@ class Kronolith
         /* Variables used in core javascript files. */
         $code['conf'] = array(
             'URI_AJAX' => (string)Horde::getServiceLink('ajax', 'kronolith'),
-            'URI_IMG' => $registry->getImageDir() . '/',
+            'URI_IMG' => Horde_Themes::img() . '/',
             'URI_SNOOZE' => (string)Horde::url($registry->get('webroot', 'horde') . '/services/snooze.php', true, -1),
             'URI_CALENDAR_EXPORT' => (string)Horde::url('data.php', true)->add(array('actionID' => 'export', 'all_events' => 1, 'exportID' => Horde_Data::EXPORT_ICALENDAR, 'exportCal' => '')),
             'URI_EVENT_EXPORT' => str_replace(array('%23', '%7B', '%7D'), array('#', '{', '}'), Horde::url('event.php', true)->add(array('view' => 'ExportEvent', 'eventID' => '#{id}', 'calendar' => '#{calendar}', 'type' => '#{type}'))),
@@ -2441,11 +2441,11 @@ class Kronolith
             Horde::addScriptFile('goto.js', 'kronolith', array('direct' => false));
             $menu->add('#', _("_Goto"), 'goto.png', null, '', 'openKGoto(kronolithDate, event); return false;');
         }
-        $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;
index e7ead6d..22a68e4 100644 (file)
@@ -18,12 +18,12 @@ if (!Horde_Auth::getAuth()) {
     exit;
 }
 $edit_url_base = Horde::applicationUrl('resources/groups/edit.php');
-$edit_img = Horde::img('edit.png', _("Edit"), null, $registry->getImageDir('horde'));
+$edit_img = Horde::img('edit.png', _("Edit"));
 
 $resources = Kronolith::getDriver('Resource')->listResources(Horde_Perms::EDIT, array('type' => Kronolith_Resource::TYPE_GROUP));
 //$display_url_base = Horde::applicationUrl('month.php', true, -1);
 $delete_url_base = Horde::applicationUrl('resources/groups/delete.php');
-$delete_img = Horde::img('delete.png', _("Delete"), null, $registry->getImageDir('horde'));
+$delete_img = Horde::img('delete.png', _("Delete"));
 ?>
 <script type="text/javascript">
 function performAction(action, rid)
index 30b4d7e..6afc017 100644 (file)
@@ -18,11 +18,11 @@ if (!Horde_Auth::getAuth()) {
     exit;
 }
 $edit_url_base = Horde::applicationUrl('resources/edit.php');
-$edit_img = Horde::img('edit.png', _("Edit"), null, $registry->getImageDir('horde'));
+$edit_img = Horde::img('edit.png', _("Edit"));
 $resources = Kronolith::getDriver('Resource')->listResources(Horde_Perms::READ, array('type' => Kronolith_Resource::TYPE_SINGLE));
 $display_url_base = Horde::applicationUrl('month.php', true, -1);
 $delete_url_base = Horde::applicationUrl('resources/delete.php');
-$delete_img = Horde::img('delete.png', _("Delete"), null, $registry->getImageDir('horde'));
+$delete_img = Horde::img('delete.png', _("Delete"));
 ?>
 <script type="text/javascript">
 function performAction(action, rid)
index 52f91c6..644022c 100644 (file)
@@ -55,7 +55,7 @@ function switchDateView(view, date)
  <tr><td colspan="4"><em><?php echo _("No attendees") ?></em></td></tr>
 <?php else: foreach ($_SESSION['kronolith']['attendees'] as $email => $status): ?>
  <tr>
-  <td class="nowrap"><?php $name = strpos($email, '@') === false ? $status['name'] : $email; echo Horde::url('#')->link(array('title' => sprintf(_("Remove %s"), $name), 'onclick' => "performAction('remove', decodeURIComponent('" . rawurlencode($email) . "')); return false;")) . Horde::img('delete.png', '', null, $registry->getImageDir('horde')) . '</a> ' . Horde::url('#')->link(array('title' => sprintf(_("Edit %s"), $name), 'onclick' => "performAction('edit', decodeURIComponent('" . rawurlencode($email) . "')); return false;")) . Horde::img('edit.png', '', null, $registry->getImageDir('horde')) . '</a>' ?></td>
+  <td class="nowrap"><?php $name = strpos($email, '@') === false ? $status['name'] : $email; echo Horde::url('#')->link(array('title' => sprintf(_("Remove %s"), $name), 'onclick' => "performAction('remove', decodeURIComponent('" . rawurlencode($email) . "')); return false;")) . Horde::img('delete.png') . '</a> ' . Horde::url('#')->link(array('title' => sprintf(_("Edit %s"), $name), 'onclick' => "performAction('edit', decodeURIComponent('" . rawurlencode($email) . "')); return false;")) . Horde::img('edit.png') . '</a>' ?></td>
   <td><?php echo htmlspecialchars(empty($status['name']) ? $email : Horde_Mime_Address::trimAddress($status['name'] . (strpos($email, '@') === false ? '' : ' <' . $email . '>'))) ?></td>
   <td>
 <label for="<?php echo "attendance_$i" ?>" class="hidden"><?php echo _("Attendance") ?></label>
@@ -91,7 +91,7 @@ function switchDateView(view, date)
  <tr><td colspan="4"><em><?php echo _("No attendees") ?></em></td></tr>
 <?php else: foreach ($resources as $id => $resource): ?>
  <tr>
-  <td class="nowrap"><?php echo Horde::url('#')->link(array('title' => sprintf(_("Remove %s"), $resource['name']), 'onclick' => "performAction('removeResource', " . $id . "); return false;")) . Horde::img('delete.png', '', null, $registry->getImageDir('horde')) ?></a></td>
+  <td class="nowrap"><?php echo Horde::url('#')->link(array('title' => sprintf(_("Remove %s"), $resource['name']), 'onclick' => "performAction('removeResource', " . $id . "); return false;")) . Horde::img('delete.png') ?></a></td>
   <td><?php echo htmlspecialchars($resource['name']) ?></td>
   <td>
   <label for="<?php echo "resourceattendance_$i" ?>" class="hidden"><?php echo _("Attendance") ?></label>
index afa9520..6a817d7 100644 (file)
@@ -27,7 +27,7 @@ asort($groups);
 <div>
   <label><?php echo _("Color") ?>:
     <input type="text" name="color" id="kronolithCalendarinternalColor" size="7" />
-    <?php echo Horde::url('#')->link(array('title' => _("Color Picker"), 'class' => 'kronolithColorPicker')) . Horde::img('colorpicker.png', _("Color Picker"), '', $GLOBALS['registry']->getImageDir('horde')) . '</a>' ?>
+    <?php echo Horde::url('#')->link(array('title' => _("Color Picker"), 'class' => 'kronolithColorPicker')) . Horde::img('colorpicker.png', _("Color Picker")) . '</a>' ?>
   </label>
 </div>
 
@@ -105,17 +105,17 @@ asort($groups);
       </thead>
       <tbody>
         <tr>
-         <td>
-            <?php if ($auth->hasCapability('list') && ($GLOBALS['conf']['auth']['list_users'] == 'list' || $GLOBALS['conf']['auth']['list_users'] == 'both')): ?>
-            <select name="owner_select">
-              <option value=""><?php echo _("Select a new owner:") ?></option>
-              <?php foreach ($auth->listUsers() as $user): ?>
-              <option value="<?php echo htmlspecialchars($user) ?>"<?php if ($user == Horde_Auth::getAuth()) echo ' selected="selected"' ?>><?php echo htmlspecialchars($user) ?></option>
-              <?php endforeach; ?>
-            </select>
-            <?php else: ?>
-            <input type="text" name="owner_input" size="50" value="<?php echo htmlspecialchars(Horde_Auth::getAuth()) ?>" />
-            <?php endif; ?>
+         <td>
+<?php if ($auth->hasCapability('list') && ($GLOBALS['conf']['auth']['list_users'] == 'list' || $GLOBALS['conf']['auth']['list_users'] == 'both')): ?>
+          <select name="owner_select">
+           <option value=""><?php echo _("Select a new owner:") ?></option>
+<?php foreach ($auth->listUsers() as $user): ?>
+           <option value="<?php echo htmlspecialchars($user) ?>"<?php if ($user == Horde_Auth::getAuth()) echo ' selected="selected"' ?>><?php echo htmlspecialchars($user) ?></option>
+<?php endforeach; ?>
+          </select>
+<?php else: ?>
+          <input type="text" name="owner_input" size="50" value="<?php echo htmlspecialchars(Horde_Auth::getAuth()) ?>" />
+<?php endif; ?>
           </td>
         </tr>
       </tbody>
@@ -322,7 +322,7 @@ asort($groups);
 <div>
   <label><?php echo _("Color") ?>:<br />
     <input type="text" name="color" id="kronolithCalendartasklistsColor" size="7" />
-    <?php echo Horde::url('#')->link(array('title' => _("Color Picker"), 'class' => 'kronolithColorPicker')) . Horde::img('colorpicker.png', _("Color Picker"), '', $GLOBALS['registry']->getImageDir('horde')) . '</a>' ?>
+    <?php echo Horde::url('#')->link(array('title' => _("Color Picker"), 'class' => 'kronolithColorPicker')) . Horde::img('colorpicker.png', _("Color Picker")) . '</a>' ?>
   </label>
 </div>
 
@@ -383,7 +383,7 @@ tbd
 <div>
   <label><?php echo _("Color") ?>:<br />
     <input type="text" name="color" id="kronolithCalendarremoteColor" size="7" />
-    <?php echo Horde::url('#')->link(array('title' => _("Color Picker"), 'onclick' => 'new ColorPicker({ color: $F(\'kronolithCalendarremoteColor\'), offsetParent: Event.element(event), update: [[\'kronolithCalendarremoteColor\', \'value\'], [\'kronolithCalendarremoteColor\', \'background\']] }); return false;')) . Horde::img('colorpicker.png', _("Color Picker"), '', $GLOBALS['registry']->getImageDir('horde')) . '</a>' ?>
+    <?php echo Horde::url('#')->link(array('title' => _("Color Picker"), 'onclick' => 'new ColorPicker({ color: $F(\'kronolithCalendarremoteColor\'), offsetParent: Event.element(event), update: [[\'kronolithCalendarremoteColor\', \'value\'], [\'kronolithCalendarremoteColor\', \'background\']] }); return false;')) . Horde::img('colorpicker.png', _("Color Picker")) . '</a>' ?>
   </label>
 </div>
 
index 76524e6..b6320ba 100644 (file)
@@ -38,8 +38,8 @@ var kronolithView = '<?php if (isset($view) && is_object($view)) echo $view->get
 var kronolithDate = new Date(<?php printf('%d, %d, %d', $currentDate->year, $currentDate->month - 1, $currentDate->mday) ?>);
 //]]></script>
 <title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
 <?php foreach ($GLOBALS['display_calendars'] as $calendar): ?>
 <link href="<?php echo Kronolith::feedUrl($calendar) ?>" rel="alternate" type="application/atom+xml" />
 <?php endforeach; ?>
index fae90b0..230f634 100644 (file)
@@ -2,9 +2,9 @@
 <?php
 $tomorrow = $this->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')) . '</a>';
+echo $this->link(-1)->link(array('title' => _("Previous day"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Day\', \'' . $yesterday->dateString() . '\');')) . Horde::img('nav/left.png', '<') . '</a>';
 echo '<span id="view_title">' . htmlspecialchars($this->getTime($prefs->getValue('date_format'))) . '</span>';
-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')) . '</a>';
+echo $this->link(1)->link(array('title' => _("Next day"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Day\', \'' . $tomorrow->dateString() . '\');')) . Horde::img('nav/right.png', '>') . '</a>';
 ?>
 </h1>
 <table cellspacing="0" width="100%" class="striped">
index f7e55cc..96c6151 100644 (file)
@@ -156,7 +156,7 @@ if ($event->alarm) {
 ?>
 <tr>
  <td colspan="5" class="control toggle" onclick="KronolithEventForm.toggleSection('alarm')">
-  <?php echo Horde::img('tree/blank.png', '', array('id' => 'toggle_alarm'), $GLOBALS['registry']->getImageDir('horde')) . ' <strong>' . Horde::label('alarm', _("_Alarm")) ?></strong>
+  <?php echo Horde::img('tree/blank.png', '', array('id' => 'toggle_alarm')) . ' <strong>' . Horde::label('alarm', _("_Alarm")) ?></strong>
   <span class="extra" id="extra_alarm"><?php if ($alarm_set) printf(_("%d %s before the event starts"), $alarm_value, $alarm_unit_title); ?></span>
 </td>
 </tr>
@@ -221,7 +221,7 @@ if ($event->alarm) {
 <!-- description -->
 <tr>
  <td colspan="5" class="control toggle" onclick="KronolithEventForm.toggleSection('description')">
-  <?php echo Horde::img('tree/blank.png', '', array('id' => 'toggle_description'), $GLOBALS['registry']->getImageDir('horde')) . ' <strong>' . Horde::label('description', _("Descri_ption")) ?></strong>
+  <?php echo Horde::img('tree/blank.png', '', array('id' => 'toggle_description')) . ' <strong>' . Horde::label('description', _("Descri_ption")) ?></strong>
   <span class="extra" id="extra_description"><?php echo htmlspecialchars(substr(str_replace(array("\r", "\n"), '  ', $event->description), 0, 80)) ?></span>
 </td>
 </tr>
@@ -234,7 +234,7 @@ if ($event->alarm) {
 <!-- url -->
 <tr>
  <td colspan="5" class="control toggle" onclick="KronolithEventForm.toggleSection('url')">
-  <?php echo Horde::img('tree/blank.png', '', array('id' => 'toggle_url'), $GLOBALS['registry']->getImageDir('horde')) . ' <strong>' . Horde::label('url', _("URL")) ?></strong>
+  <?php echo Horde::img('tree/blank.png', '', array('id' => 'toggle_url')) . ' <strong>' . Horde::label('url', _("URL")) ?></strong>
   <span class="extra" id="extra_url"><?php echo htmlspecialchars($event->url) ?></span>
 </td>
 </tr>
@@ -248,7 +248,7 @@ if ($event->alarm) {
 <!-- attendees/resources -->
 <tr>
  <td colspan="5" class="control toggle" onclick="KronolithEventForm.toggleSection('attendees')">
-  <?php echo Horde::img('tree/blank.png', '', array('id' => 'toggle_attendees'), $GLOBALS['registry']->getImageDir('horde')) . ' <strong>' . _("Attendees and Resources") ?></strong>
+  <?php echo Horde::img('tree/blank.png', '', array('id' => 'toggle_attendees')) . ' <strong>' . _("Attendees and Resources") ?></strong>
   <span class="extra"><?php echo htmlspecialchars(Kronolith::attendeeList()) ?></span>
  </td>
 </tr>
@@ -265,7 +265,7 @@ if ($event->alarm) {
 <!-- recurrence -->
 <tr>
  <td colspan="5" class="control toggle" onclick="KronolithEventForm.toggleSection('recurrence')">
-  <?php echo Horde::img('tree/blank.png', '', array('id' => 'toggle_recurrence'), $GLOBALS['registry']->getImageDir('horde')) . ' <strong>' . _("Recurrence") ?></strong>
+  <?php echo Horde::img('tree/blank.png', '', array('id' => 'toggle_recurrence')) . ' <strong>' . _("Recurrence") ?></strong>
   <span class="extra" id="extra_recurrence"><?php echo $event->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")) ?></span>
  </td>
 </tr>
@@ -357,7 +357,7 @@ if ($event->alarm) {
  <td>
 <?php
 Horde::addScriptFile('open_calendar.js', 'horde', array('direct' => 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')) . '</a>';
+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"') . '</a>';
 endif;
 ?>
  </td>
@@ -392,7 +392,7 @@ endif;
 <!-- tags  -->
 <tr>
 <td colspan="5" class="control toggle" onclick="KronolithEventForm.toggleSection('tags')">
- <?php echo Horde::img('tree/blank.png', '', array('id' => 'toggle_tags'), $GLOBALS['registry']->getImageDir('horde')) . ' <strong>' . _("Tags") ?></strong>
+ <?php echo Horde::img('tree/blank.png', '', array('id' => 'toggle_tags')) . ' <strong>' . _("Tags") ?></strong>
   <span class="extra" id="extra_tags"><?php echo (!empty($tags) ? htmlspecialchars($tags) : '');?></span>
   </td>
 </tr>
index 3c6d951..c0d25b1 100644 (file)
@@ -26,7 +26,7 @@
  <td>
 <?php Horde::addScriptFile('open_calendar.js', 'horde', array('direct' => false)); ?>
   <div id="goto" style="display:none"></div>
-  <?php echo Horde::url('#')->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')) . '</a>'; endif; ?>
+  <?php echo Horde::url('#')->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"') . '</a>'; endif; ?>
  </td>
 </tr>
 
@@ -76,7 +76,7 @@
   <td rowspan="2" valign="top">
 <?php
 Horde::addScriptFile('open_calendar.js', 'horde', array('direct' => 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')) . '</a>';
+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')) . '</a>';
 endif;
 ?>
  </td>
index c674532..7a01252 100644 (file)
@@ -256,7 +256,7 @@ Event.observe(window, 'load', function() {
 
 KronolithEventForm.toggleSection = function(section)
 {
-    var dir = '<?php echo $GLOBALS['registry']->getImageDir() ?>';
+    var dir = '<?php echo Horde_Themes::img() ?>';
     if (!$('section_' + section)) {
         return;
     }
index 8bc7863..8dba54e 100644 (file)
@@ -86,7 +86,7 @@
 
   <form id="kronolithSearchForm" action="">
     <input type="text" id="kronolithSearchTerm" value="<?php echo _("Search") ?>" default="<?php echo _("Search") ?>" />
-    <input id="kronolithSearchButton" type="image" src="<?php echo $GLOBALS['registry']->getImageDir() ?>/search.png" />
+    <input id="kronolithSearchButton" type="image" src="<?php echo Horde_Themes::img('search.png') ?>" />
   </form>
 
   <div id="kronolithMenuCalendars">
 <div id="kronolithBody">
 <div id="kronolithLoading" style="display:none"></div>
 <?php
-$img_blank = Horde::img('blank.gif', '', 'height="8" width="8"', $registry->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';
index 6cca9b0..dd7cfc4 100644 (file)
@@ -2,9 +2,9 @@
 <?php
 $prev = $this->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')) . '</a>';
+echo $this->link(-1)->link(array('title' => _("Last Month"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Month\', \'' . $prev->dateString() . '\');')) . Horde::img('nav/left.png', '<') . '</a>';
 echo '<span id="view_title">' . htmlspecialchars($this->date->strftime('%B %Y')) . '</span>';
-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')) . '</a>';
+echo $this->link(1)->link(array('title' => _("Next Month"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Month\', \'' . $next->dateString() . '\');')) . Horde::img('nav/right.png', '>') . '</a>';
 ?>
 </h1>
 
index 44e1a6a..b88f0de 100644 (file)
@@ -2,9 +2,9 @@
 <?php
 $prev = $this->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')) . '</a>';
+echo $this->link(-1)->link(array('title' => _("Last Month"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Month\', \'' . $prev->dateString() . '\');')) . Horde::img('nav/left.png', '<') . '</a>';
 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')) . '</a>';
+echo $this->link(1)->link(array('title' => _("Next Month"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'Month\', \'' . $next->dateString() . '\');')) . Horde::img('nav/right.png', '>') . '</a>';
 ?>
 </h1>
 
index 64aa186..80bc462 100644 (file)
@@ -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 '<a href="#" id="remove' . md5($id . $tag_id) . '">'
-        . Horde::img('delete-small.png', _("Remove Tag"), '', $registry->getImageDir('horde'))
+        . Horde::img('delete-small.png', _("Remove Tag"))
         . '</a>';
 }
 $ta = Horde_Ajax_Imple::factory(array('kronolith', 'TagActions'),
index 6d31436..c663746 100644 (file)
@@ -6,9 +6,9 @@
 <tr valign="middle">
   <td width="100%" colspan="7" class="header">
     <span class="rightFloat">
-      <a href="#" onclick="javascript:window.close();" style="cursor:pointer"><?php echo Horde::img('close.png', _("Close Window"), '', $registry->getImageDir('horde')) ?></a>
+      <a href="#" onclick="javascript:window.close();" style="cursor:pointer"><?php echo Horde::img('close.png', _("Close Window")) ?></a>
     </span>
-    <?php echo Horde::img('perms.png', '', '', $registry->getImageDir('horde')) . '&nbsp;' . sprintf(_("Edit permissions for %s"), htmlspecialchars($share->get('name'))) . '&nbsp;' . Horde_Help::link('kronolith', 'shares') ?>
+    <?php echo Horde::img('perms.png') . '&nbsp;' . sprintf(_("Edit permissions for %s"), htmlspecialchars($share->get('name'))) . '&nbsp;' . Horde_Help::link('kronolith', 'shares') ?>
   </td>
 </tr>
 <tr><td colspan="7">&nbsp;</td></tr>
@@ -19,7 +19,7 @@
 <!-- Ownership -->
 <tr valign="middle">
   <td class="header leftAlign" colspan="7">
-    <?php echo Horde::img('perms.png', '', '', $registry->getImageDir('horde')) . '&nbsp;' . _("Owner") ?>
+    <?php echo Horde::img('perms.png') . '&nbsp;' . _("Owner") ?>
   </td>
 </tr>
 <tr>
@@ -47,7 +47,7 @@
 <!-- Default Permissions -->
 <tr valign="middle">
   <td class="header leftAlign" width="55%">
-    <?php echo Horde::img('perms.png', '', '', $registry->getImageDir('horde')) . '&nbsp;' . _("All Authenticated Users") ?>
+    <?php echo Horde::img('perms.png') . '&nbsp;' . _("All Authenticated Users") ?>
   </td>
   <td class="header" align="center"><?php echo _("Show") ?></td>
   <td class="header" align="center"><?php echo _("Read") ?></td>
 <!-- Creator Permissions -->
 <tr valign="middle">
   <td class="header leftAlign">
-    <?php echo Horde::img('user.png', '', '', $registry->getImageDir('horde')) . '&nbsp;' . _("Object Creator") ?>
+    <?php echo Horde::img('user.png') . '&nbsp;' . _("Object Creator") ?>
   </td>
   <td class="header" align="center"><?php echo _("Show") ?></td>
   <td class="header" align="center"><?php echo _("Read") ?></td>
 <!-- User Permissions -->
 <tr valign="middle">
   <td class="header leftAlign">
-    <?php echo Horde::img('user.png', '', '', $registry->getImageDir('horde')) . '&nbsp;' . _("Individual Users") ?>
+    <?php echo Horde::img('user.png') . '&nbsp;' . _("Individual Users") ?>
   </td>
   <td class="header" align="center"><?php echo _("Show") ?></td>
   <td class="header" align="center"><?php echo _("Read") ?></td>
@@ -288,7 +288,7 @@ foreach ($userList as $user) {
 <!-- Group Permissions -->
 <tr valign="middle">
   <td class="header leftAlign">
-    <?php echo Horde::img('group.png', '', '', $registry->getImageDir('horde')) . '&nbsp;' . _("Groups") ?>
+    <?php echo Horde::img('group.png') . '&nbsp;' . _("Groups") ?>
   </td>
   <td class="header" align="center"><?php echo _("Show") ?></td>
   <td class="header" align="center"><?php echo _("Read") ?></td>
index 828a4ba..774d5eb 100644 (file)
@@ -305,9 +305,9 @@ function changeSearchFields()
    </select>
   </td>
   <td>
-   <a href="#" onclick="addSource(); return false;"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'lhand.png' : 'rhand.png', _("Add source"), null, $registry->getImageDir('horde')) ?></a>
+   <a href="#" onclick="addSource(); return false;"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'lhand.png' : 'rhand.png', _("Add source")) ?></a>
    <br />
-   <a href="#" onclick="removeSource(); return false;"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'rhand.png' : 'lhand.png', _("Remove source"), null, $registry->getImageDir('horde')) ?></a>
+   <a href="#" onclick="removeSource(); return false;"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'rhand.png' : 'lhand.png', _("Remove source")) ?></a>
   </td>
   <td>
    <label for="selected_search_sources" class="hidden"><?php echo _("Selected Address books:") ?></label>
@@ -317,9 +317,9 @@ function changeSearchFields()
    </select>
   </td>
   <td>
-   <a href="#" onclick="moveSourceUp(); return false;"><?php echo Horde::img('nav/up.png', _("Move up"), null, $registry->getImageDir('horde')) ?></a>
+   <a href="#" onclick="moveSourceUp(); return false;"><?php echo Horde::img('nav/up.png', _("Move up")) ?></a>
    <br />
-   <a href="#" onclick="moveSourceDown(); return false;"><?php echo Horde::img('nav/down.png', _("Move down"), null, $registry->getImageDir('horde')) ?></a>
+   <a href="#" onclick="moveSourceDown(); return false;"><?php echo Horde::img('nav/down.png', _("Move down")) ?></a>
   </td>
  </tr>
 </table>
index 95eaf06..aae93b3 100644 (file)
@@ -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')) . '</a>';
+echo $this->link(-1)->link(array('title' => _("Last week"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'' . $currentView . '\', \'' . $prev->dateString() . '\');')) . Horde::img('nav/left.png', '<') . '</a>';
 echo '<span id="view_title">' . htmlspecialchars($this->days[$this->startDay]->getTime($prefs->getValue('date_format')) . ' - ' . $this->days[$this->endDay]->getTime($prefs->getValue('date_format'))) . '</span>';
-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')) . '</a>';
+echo $this->link(1)->link(array('title' => _("Next week"), 'class' => 'iconNav', 'onclick' => 'return ShowView(\'' . $currentView . '\', \'' . $next->dateString() . '\');')) . Horde::img('nav/right.png', '>') . '</a>';
 ?>
 </h1>
 
index e3fa8a7..40d1019 100644 (file)
@@ -1,7 +1,7 @@
 <h1 class="header" style="text-align:center">
 <?php
-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', '<', '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+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', '<') . '</a>';
 echo '<span id="view_title">' . htmlspecialchars($this->year) . '</span>';
-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')) . '</a>';
+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', '>') . '</a>';
 ?>
 </h1>
diff --git a/kronolith/themes/silver/themed_graphics b/kronolith/themes/silver/themed_graphics
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/kronolith/themes/tango-blue/themed_graphics b/kronolith/themes/tango-blue/themed_graphics
deleted file mode 100644 (file)
index e69de29..0000000
index 93c6632..5883445 100644 (file)
@@ -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()) {
index b7b20a9..42b52af 100644 (file)
@@ -182,8 +182,7 @@ class Horde_Block_nag_summary extends Horde_Block {
                 $label = sprintf(_("Edit \"%s\""), $task->name);
                 $html .= '<td width="1%">'
                     . 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)
                     . '</a></td>';
                 if ($task->completed) {
                     $html .= '<td width="1%">'
index 7a17dff..e31610c 100644 (file)
@@ -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));
         }
index 844b667..db78fbe 100644 (file)
@@ -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')));
     }
 
index 1720aee..470f9e0 100644 (file)
@@ -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;
index ae5026f..4b99756 100644 (file)
@@ -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']);
                 }
             }
         }
index 2a893c8..cc30da3 100644 (file)
@@ -107,7 +107,7 @@ class Horde_Ui_VarRenderer_Nag extends Horde_Ui_VarRenderer_Html
 <?php if ($GLOBALS['browser']->hasFeature('javascript')) {
 Horde::addScriptFile('open_calendar.js', 'horde', array('direct' => false));
 echo '<div id="goto" class="control" style="position:absolute;visibility:hidden;padding:1px"></div>';
-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')) . '</a>';
+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"') . '</a>';
 } ?>
 <?php
     }
@@ -155,7 +155,7 @@ echo Horde::link('#', _("Select a date"), '', '', 'openCalendar(\'startimg\', \'
 <?php echo $this->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) ?>
 <?php if ($GLOBALS['browser']->hasFeature('javascript')) {
 echo '<div id="goto" class="control" style="position:absolute;visibility:hidden;padding:1px"></div>';
-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')) . '</a>';
+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"') . '</a>';
 } ?>
 <br />
 
index 403fd8a..2e2b098 100644 (file)
@@ -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");
index af51d83..9bd72ba 100644 (file)
@@ -23,8 +23,8 @@ $bc = $prefs->getValue('show_panel')
 
 ?>
 <title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
 <link href="<?php echo Horde::applicationUrl('themes/categoryCSS.php') ?>" rel="stylesheet" type="text/css" />
 <script src="<?php echo $GLOBALS['registry']->get('jsuri', 'horde') ?>/glow/1.5.1/core/core.js" type="text/javascript"></script>
 <script src="<?php echo $GLOBALS['registry']->get('jsuri', 'horde') ?>/glow/1.5.1/widgets/widgets.js" type="text/javascript"></script>
index 469f4f8..143a10b 100644 (file)
@@ -1,6 +1,6 @@
 <div class="header leftAlign">
  <?php echo htmlspecialchars($title) . ' (' . $tasks->count() . ')' ?>
- <a id="quicksearchL" href="<?php echo Horde::applicationUrl('search.php') ?>" title="<?php echo _("Search") ?>" onclick="$('quicksearchL').hide(); $('quicksearch').show(); $('quicksearchT').focus(); return false;"><?php echo Horde::img('search.png', _("Search"), '', $registry->getImageDir('horde')) ?></a>
+ <a id="quicksearchL" href="<?php echo Horde::applicationUrl('search.php') ?>" title="<?php echo _("Search") ?>" onclick="$('quicksearchL').hide(); $('quicksearch').show(); $('quicksearchT').focus(); return false;"><?php echo Horde::img('search.png', _("Search")) ?></a>
  <div id="quicksearch" style="display:none">
   <input type="text" name="quicksearchT" id="quicksearchT" for="tasks-body" empty="tasks_empty" />
   <small>
index 99dbf44..b854069 100644 (file)
@@ -40,7 +40,7 @@ function doPrefsUpdate(column, sortDown)
   </th>
 <?php endif; ?>
   <th width="2%" class="nosort">
-   <?php echo Horde::img('edit.png', _("Edit Task"), null, $registry->getImageDir('horde')) ?>
+   <?php echo Horde::img('edit.png', _("Edit Task")) ?>
   </th>
   <th id="s<?php echo Nag::SORT_NAME ?>"<?php if ($sortby == Nag::SORT_NAME) echo ' class="' . $sortdirclass . '"' ?>>
    <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby', Nag::SORT_NAME)), _("Sort by Name"), 'sortlink', '', '', _("Na_me")) ?>&nbsp;
@@ -67,7 +67,7 @@ function doPrefsUpdate(column, sortDown)
        (!$GLOBALS['prefs']->isLocked('categories') ||
         !$GLOBALS['prefs']->isLocked('category_colors'))) {
        $categoryUrl = Horde_Util::addParameter(Horde::getServiceLink('options', 'horde'), array('group' => 'categories'));
-       echo ' ' . Horde::link($categoryUrl, _("Edit categories and colors"), '', '_blank', 'Horde.popup({url:this.href}); return false;') . Horde::img('colorpicker.png', _("Edit categories and colors"), '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+       echo ' ' . Horde::link($categoryUrl, _("Edit categories and colors"), '', '_blank', 'Horde.popup({url:this.href}); return false;') . Horde::img('colorpicker.png', _("Edit categories and colors")) . '</a>';
    }
    ?>
   </th>
index c44a821..bacdbe3 100644 (file)
@@ -37,7 +37,7 @@ if (!is_a($share, 'PEAR_Error') &&
         $share->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT) &&
         (!$task->private || $task->owner == Horde_Auth::getAuth())) {
         $label = sprintf(_("Edit \"%s\""), $task->name);
-        echo Horde::link($task->edit_link, $label) . Horde::img('edit.png', $label, null, $registry->getImageDir('horde')) . '</a>';
+        echo Horde::link($task->edit_link, $label) . Horde::img('edit.png', $label) . '</a>';
     }
     ?>
   </td>
index c7e15d1..1b430b7 100644 (file)
@@ -2,7 +2,7 @@
 
 Horde::addScriptFile('redbox.js', 'horde');
 
-$info_img = Horde::img('info_icon.png', _("Task List Information"), array('class' => 'tasklist-info'), $registry->getImageDir('horde'));
+$info_img = Horde::img('info_icon.png', _("Task List Information"), array('class' => 'tasklist-info'));
 
 $current_user = Horde_Auth::getAuth();
 $my_tasklists = array();
diff --git a/nag/themes/silver/themed_graphics b/nag/themes/silver/themed_graphics
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/nag/themes/tango-blue/themed_graphics b/nag/themes/tango-blue/themed_graphics
deleted file mode 100644 (file)
index e69de29..0000000
index 90a08fb..f4d53f2 100644 (file)
@@ -24,9 +24,9 @@ if ($categories instanceof PEAR_Error) {
 /* Set up the template fields. */
 $title = _("Category Administration");
 $edit_url = Horde::applicationUrl('admin/categories/edit.php');
-$edit_img = Horde::img('edit.png', _("Edit"), '', $registry->getImageDir('horde'));
+$edit_img = Horde::img('edit.png', _("Edit"));
 $delete_url = Horde::applicationUrl('admin/categories/delete.php');
-$delete_img = Horde::img('delete.png', _("Delete"), '', $registry->getImageDir('horde'));
+$delete_img = Horde::img('delete.png', _("Delete"));
 
 foreach ($categories as $category_id => $category) {
     $categories[$category_id]['actions'][] = Horde::link(Horde_Util::addParameter($delete_url, 'category_id', $category_id), _("Delete")) .
index a3fa193..d9c7ed9 100644 (file)
@@ -22,11 +22,11 @@ if ($sources instanceof PEAR_Error) {
 }
 
 $edit_url = Horde::applicationUrl('admin/sources/edit.php');
-$edit_img = Horde::img('edit.png', _("Edit"), '', $registry->getImageDir('horde'));
+$edit_img = Horde::img('edit.png', _("Edit"));
 $delete_url = Horde::applicationUrl('admin/sources/delete.php');
-$delete_img = Horde::img('delete.png', _("Delete"), '', $registry->getImageDir('horde'));
+$delete_img = Horde::img('delete.png', _("Delete"));
 $view_url = Horde::applicationUrl('browse.php');
-$view_img = Horde::img('category.png', _("View items"), '', $registry->getImageDir('horde'));
+$view_img = Horde::img('category.png', _("View items"));
 
 foreach ($sources as $source_id => $source) {
     $sources[$source_id]['actions'][] = Horde::link(Horde_Util::addParameter($view_url, 'source_id', $source_id), _("View articles")) .
index 9e73cde..4930ee0 100644 (file)
@@ -46,7 +46,7 @@ if ($version_data instanceof PEAR_Error) {
 
 $version_data = unserialize($version_data);
 
-Horde::includeStylesheetFiles();
+Horde_Themes::includeStylesheetFiles();
 
 while (list($k, $v) = each($current_data)) {
     echo '<hr><strong>' . $nls['languages'][$k] . '</strong><hr>' . "\n";
index 03e5c50..34008e8 100644 (file)
@@ -198,7 +198,7 @@ require_once NEWS_TEMPLATES . '/common-header.inc';
 require_once NEWS_TEMPLATES . '/menu.inc';
 require_once NEWS_TEMPLATES . '/edit/header.inc';
 
-$img_dir = $registry->getImageDir('horde');
+$img_dir = Horde_Themes::img(null, 'horde');
 foreach ($rows as $row) {
     require NEWS_TEMPLATES . '/edit/row.php';
     if ($row['id'] == $id ) {
index 9bb3856..d04a50f 100644 (file)
@@ -473,7 +473,7 @@ class News_Categories {
     {
         $cats = $this->getCategories(false);
 
-        $params = array('icondir' => $GLOBALS['registry']->getImageDir(),
+        $params = array('icondir' => Horde_Themes::img(),
                         'icon' => 'folder_open.png');
 
         // Set up the tree
index f5841e9..5d96b6c 100644 (file)
@@ -50,7 +50,7 @@ class News {
     static public function getFlag($lang)
     {
         $flag = 'flags/' . strtolower(substr($lang, -2)) . '.png';
-        return Horde::img($flag, $lang, 'align="middle"', $GLOBALS['registry']->getImageDir('horde'));
+        return Horde::img($flag, $lang);
     }
 
     /**
@@ -192,12 +192,12 @@ class News {
         }
 
         if (Horde_Auth::isAdmin('news:admin')) {
-            $delete_img = Horde::img('delete.png', _("Delete"), ' style="width: 16px height: 16px"', $GLOBALS['registry']->getImageDir('horde'));
+            $delete_img = Horde::img('delete.png', _("Delete"), ' style="width: 16px height: 16px"');
             $delete_url = Horde::applicationUrl('delete_file.php');
         }
 
-        $dowload_img = Horde::img('save.png', _("Dowload"), ' style="width: 16px height: 16px"', $GLOBALS['registry']->getImageDir('horde'));
-        $dowload_zip = Horde::img('mime/compressed.png', _("Dowload Zip Compressed"), 'style="width: 16px height: 16px"', $GLOBALS['registry']->getImageDir('horde'));
+        $dowload_img = Horde::img('save.png', _("Dowload"), ' style="width: 16px height: 16px"');
+        $dowload_zip = Horde::img('mime/compressed.png', _("Dowload Zip Compressed"), 'style="width: 16px height: 16px"');
         $view_url = Horde::applicationUrl('files.php');
 
         $html = '<table><tr valign="top"><td>';
@@ -494,7 +494,7 @@ class News {
     static public function getMenu()
     {
         $menu = new Horde_Menu();
-        $img_dir = $GLOBALS['registry']->getImageDir('horde');
+        $img_dir = Horde_Themes::img(null, 'horde');
 
         if ($GLOBALS['prefs']->getValue('news_layout') != '') {
             $menu->add(Horde::applicationUrl('content.php'), _("Overview"), 'layout.png', $img_dir);
index af98806..077632c 100644 (file)
@@ -37,7 +37,7 @@ if ($result instanceof PEAR_Error) {
 
 Horde::addScriptFile('tables.js', 'horde');
 Horde::includeScriptFiles();
-Horde::includeStylesheetFiles();
+Horde_Themes::includeStylesheetFiles();
 
 // require_once NEWS_TEMPLATES . '/common-header.inc';
 require_once NEWS_TEMPLATES . '/reads/header.inc';
index 112d14f..f06f9de 100644 (file)
@@ -22,10 +22,10 @@ Horde::includeScriptFiles();
 
 ?>
 <title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
 <link rel="alternate" title="<?php echo _("Last news") ?>" href="<?php echo Horde::applicationUrl('rss/news.php', true, -1) ?>" type="application/rss+xml" />
 <link rel="alternate" title="<?php echo _("Last comments") ?>" href="<?php echo Horde::applicationUrl('rss/comments.php', true, -1) ?>" type="application/rss+xml" />
-<?php Horde::includeStylesheetFiles() ?>
+<?php Horde_Themes::includeStylesheetFiles() ?>
 </head>
 
 <body>
index 0fe1849..5c7152a 100644 (file)
@@ -3,5 +3,5 @@
 <form id="mail_send" name="mail_send" method="post" action="<?php echo Horde::applicationUrl('mail.php') ?>">
 <input type="text" name="email" id="email" size="15" />
 <input type="hidden" name="id" id="id" value="<?php echo $id ?>" />
-<input type="image" src="<?php echo $registry->getImageDir('horde') ?>/mail.png"></a>
+<input type="image" src="<?php echo Horde_Themes::img('mail.png') ?>"></a>
 </form>
index 17c0c33..52d335f 100644 (file)
@@ -1,11 +1,11 @@
 <?php
 
 echo '<br /><div class="header">' . _("On this day") . '</div>';
-$img = Horde::img('news.png', '', '', $registry->getImageDir('news'));
+$img = Horde::img('news.png');
 echo $img . ' ' . Horde::link(Horde_Util::addParameter($browse_url, 'date', $row['publish'])) . _("News of this day.") . '</a><br />';
 
 if ($registry->hasInterface('schedul')) {
-    $img = Horde::img('schedul.png', '', '', $registry->getImageDir('schedul'));
+    $img = Horde::img('schedul.png');
     $url = $registry->get('webroot', 'schedul') . '/browse.php';
     $url = Horde_Util::addParameter($url, array('actionID' => 'date', 'date' => $row['publish']));
     echo $img . ' ' . Horde::link($url) . _("Events on this day.") . '</a><br />';
index 6818e7e..2f8d1e1 100644 (file)
@@ -2,10 +2,10 @@
 
 echo '<br /><div class="header">' . _("Tools") . '</div>';
 
-$img = Horde::img('print.png', '', '', $registry->getImageDir('horde'));
+$img = Horde::img('print.png');
 echo $img . ' ' . Horde::link('javascript:window.print()') . _("Printer firendly") . '</a><br />';
 
-$img = Horde::img('mime/pdf.png', '', '', $registry->getImageDir('horde'));
+$img = Horde::img('mime/pdf.png');
 echo $img . ' ' . Horde::link(Horde_Util::addParameter(Horde::applicationUrl('pdf.php'), 'id', $id)) . _("PDF") . '</a><br />';
 
 /* Bookmark link */
@@ -14,12 +14,12 @@ if ($registry->hasMethod('bookmarks/getAddUrl')) {
         'url' => News::getUrlFor('news', $id, true),
         'title' => $row['title']);
     $url = $registry->call('bookmarks/getAddUrl', array($api_params));
-    $img = Horde::img('trean.png', '', '', $registry->getImageDir('trean'));
+    $img = Horde::img(Horde_Themes::img('trean.png', 'trean'));
     echo $img . ' ' . Horde::link($url) . _("Add to bookmarks.") . '</a><br />';
 }
 
 if ($registry->hasInterface('notes')) {
-    $img = Horde::img('mnemo.png', '', '', $registry->getImageDir('mnemo'));
+    $img = Horde::img(Horde_Themes::img('mnemo.png', 'mnemo'));
     $url = Horde_Util::addParameter(Horde::applicationUrl('note.php', true), 'id', $id);
     echo $img . ' ' . Horde::link($url) . _("Add to notes.") . '</a><br />';
 }
index d811382..f9fa948 100644 (file)
@@ -21,11 +21,11 @@ class Operator {
 
         $menu = new Horde_Menu(Horde_Menu::MASK_ALL);
         $menu->add(Horde::applicationUrl('viewgraph.php'), _("_View Graphs"), 'graphs.png', null, null, null, basename($_SERVER['PHP_SELF']) == 'index.php' ? 'current' : null);
-        $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'));
 
         /* Export */
         if ($GLOBALS['conf']['menu']['export']) {
-            $menu->add(Horde::applicationUrl('export.php'), _("_Export"), 'data.png', $GLOBALS['registry']->getImageDir('horde'));
+            $menu->add(Horde::applicationUrl('export.php'), _("_Export"), 'data.png', Horde_Themes::img(null, 'horde'));
         }
 
         if ($returnType == 'object') {
index 0aedf17..7e9ae10 100644 (file)
@@ -22,8 +22,8 @@ Horde::includeScriptFiles();
 
 ?>
 <title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON">
-<?php Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
 </head>
 
 <body>
diff --git a/operator/themes/silver/themed_graphics b/operator/themes/silver/themed_graphics
deleted file mode 100644 (file)
index e69de29..0000000
index 8ac80e4..20a8304 100644 (file)
@@ -1,31 +1,28 @@
 <?php
      if (isset($language)) {
-     header('Content-type: text/html; charset=' . Horde_NLS::getCharset());
-     header('Vary: Accept-Language');
+         header('Content-type: text/html; charset=' . Horde_NLS::getCharset());
+         header('Vary: Accept-Language');
      }
-     ?>
+?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
           "DTD/xhtml1-transitional.dtd">
 <!--          Shout: Copyright 2005-2006, Ben Klang.           -->
 <!-- Horde Project: http://horde.org/ | Shout: http://projects.alkaloid.net/ -->
 <!--          Horde Licenses: http://www.horde.org/licenses/           -->
-<?php echo !empty($language) ? '<html lang="' . strtr($language, '_', '-') .
-                                      '">' : '<html>' ?>
-        <head>
-            <?php
-
-                 $page_title = $GLOBALS['registry']->get('name');
-            if (!empty($title)) $page_title .= ' :: ' . $title;
-            if (!empty($refresh_time) && !empty($refresh_url)) {
-            echo "<meta http-equiv=\"refresh\"
-                        content=\"$refresh_time;url=$refresh_url\">\n";
-                }
+<?php echo !empty($language) ? '<html lang="' . strtr($language, '_', '-') . '">' : '<html>' ?>
+<head>
+<?php
+    $page_title = $GLOBALS['registry']->get('name');
+    if (!empty($title)) $page_title .= ' :: ' . $title;
+    if (!empty($refresh_time) && !empty($refresh_url)) {
+        echo "<meta http-equiv=\"refresh\" content=\"$refresh_time;url=$refresh_url\">\n";
+    }
 
-                Horde::includeScriptFiles();
+    Horde::includeScriptFiles();
 
-                ?>
               <title><?php echo $page_title ?></title>
               <?php echo Horde::includeStylesheetFiles() ?>
+?>
+ <title><?php echo $page_title ?></title>
<?php echo Horde_Themes::includeStylesheetFiles() ?>
 </head>
 
 <body>
index 712a331..e6163e2 100644 (file)
@@ -38,7 +38,7 @@ function editAction(digit)
 {
     if ($('selectActionForm') == null) {
         curDigit = digit;
-        $('digitGraphic').src = '<?php echo $registry->getImageDir('shout'); ?>/digit-'+digit+'.png';
+        $('digitGraphic').src = '<?php echo Horde_Themes::img() ?>/digit-'+digit+'.png';
 
         // Draw the selectActionForm
         $('editActionOverlay').show();
@@ -136,19 +136,18 @@ function refreshMenu()
     text = document.createTextNode(meta.soundfile);
     col.appendChild(text);
     img = document.createElement('img');
-    img.src = '<?php echo $registry->getImageDir('shout') . '/edit.png'; ?>';
+    img.src = '<?php echo Horde_Themes::img('edit.png') ?>';
     img.alt = '<?php echo _("Change Soundfile"); ?>';
     img.setAttribute('onclick', 'changeSoundfile()');
     col.appendChild(img);
     img = document.createElement('img');
-    img.src = '<?php echo $registry->getImageDir('shout') . '/recordings.png'; ?>';
+    img.src = '<?php echo Horde_Themes::img('recordings.png') ?>';
     img.alt = '<?php echo _("Play Soundfile"); ?>';
     img.setAttribute('onclick', 'playSoundfile()');
     img.setAttribute("style", img.getAttribute("style") + "; float:right; ");
     col.appendChild(img);
     row.appendChild(col);
     $('menuInfo').appendChild(row);
-
 }
 
 function getMetaRow(name, value)
@@ -192,4 +191,4 @@ new Ajax.Request(ajax_url + 'getMenuInfo',
     }
 });
 // -->
-</script>
\ No newline at end of file
+</script>
index 0a58f1a..25f2625 100644 (file)
@@ -38,8 +38,7 @@
                 <?php
                 $attrs = array('onClick' => 'destinfo("' . $extension . '");',
                                'id' => 'destX' . $extension . 'toggle');
-                echo Horde::img('tree/plusonly.png', _("Destinations"), $attrs,
-                                $registry->getImageDir('horde'));
+                echo Horde::img('tree/plusonly.png', _("Destinations"), $attrs);
                 ?>
                 <span id="destX<?php echo $extension; ?>summary"></span>
                 <div class="extensionDestinations" id="destX<?php echo $extension; ?>info">
@@ -91,7 +90,7 @@ function resetExtenDest(exten)
     dest.devices.each(function (s) {
         // Fill in detail block
         var img = document.createElement('img');
-        img.src = "<?php echo $registry->getImageDir() . '/shout.png'; ?>";
+        img.src = "<?php echo Horde_Themes::img('shout.png') ?>";
 
         var span = document.createElement('span');
         span.className = 'device';
@@ -101,7 +100,7 @@ function resetExtenDest(exten)
 
         var del = document.createElement('img');
         del.id = "dest" + s + "X" + exten + "del";
-        del.src = "<?php echo $registry->getImageDir('horde') . '/delete-small.png'; ?>"
+        del.src = "<?php echo Horde_Themes::img('delete-small.png') ?>"
         del.style.cursor = 'pointer';
         del.setAttribute('onClick', 'delDest("' + exten + '", "device", "' + s + '")');
 
@@ -115,16 +114,15 @@ function resetExtenDest(exten)
 
         // Create summary icons
         img = document.createElement('img');
-        img.src = "<?php echo $registry->getImageDir() . '/shout.png'; ?>";
+        img.src = "<?php echo Horde_Themes::img('shout.png') ?>";
         $('destX' + exten + 'summary').appendChild(img);
-
     });
 
 
     dest.numbers.each(function (s) {
         // Fill in detail block
         var img = document.createElement('img');
-        img.src = "<?php echo $registry->getImageDir() . '/telephone-pole.png'; ?>";
+        img.src = "<?php echo Horde_Themes::img('telephone-pole.png') ?>";
 
         var span = document.createElement('span');
         span.className = 'device';
@@ -134,7 +132,7 @@ function resetExtenDest(exten)
 
         var del = document.createElement('img');
         del.id = "dest" + s + "X" + exten + "del";
-        del.src = "<?php echo $registry->getImageDir('horde') . '/delete-small.png'; ?>";
+        del.src = "<?php echo Horde_Themes::img('delete-small.png') ?>";
         del.style.cursor = 'pointer';
         del.setAttribute('onclick', 'delDest("' + exten + '", "number", "' + s + '")');
 
@@ -148,7 +146,7 @@ function resetExtenDest(exten)
 
         // Create summary icons
         img = document.createElement('img');
-        img.src = "<?php echo $registry->getImageDir() . '/telephone-pole.png'; ?>";
+        img.src = "<?php echo Horde_Themes::img('telephone-pole.png') ?>";
         $('destX' + exten + 'summary').appendChild(img);
     });
 
@@ -200,14 +198,14 @@ function expand(exten)
 {
     $('destX' + exten + 'summary').hide();
     $('destX' + exten + 'info').show();
-    $('destX' + exten + 'toggle').src = '<?php echo $registry->getImageDir('horde') . '/tree/minusonly.png'; ?>';
+    $('destX' + exten + 'toggle').src = '<?php echo Horde_Themes::img('tree/minusonly.png') ?>';
 }
 
 function contract(exten)
 {
     $('destX' + exten + 'summary').show();
     $('destX' + exten + 'info').hide();
-    $('destX' + exten + 'toggle').src = '<?php echo $registry->getImageDir('horde') . '/tree/plusonly.png'; ?>';
+    $('destX' + exten + 'toggle').src = '<?php echo Horde_Themes::img('tree/plusonly.png') ?>';
 }
 
 function processForm(event)
@@ -224,7 +222,7 @@ function processForm(event)
     var exten = form.getInputs('hidden', 'extension').first().value;
 
     var spinner = document.createElement('img');
-    spinner.src = "<?php echo $registry->getImageDir('horde') . '/loading.gif'; ?>"
+    spinner.src = "<?php echo Horde_Themes::img('loading.gif') ?>"
 
     $('destX' + exten + 'submit').hide();
     form.insertBefore(spinner, $('destX' + exten + 'submit'))
@@ -357,14 +355,14 @@ function delDest(exten, type, dest)
         'destination': dest
     });
 
-    
+
     var deleteIcon = $("dest" + dest + "X" + exten + "del")
     // If null we came from an edit so the spinner is already going
     if (deleteIcon !== null) {
         // Hide the delete button and replace it with a spinner
         deleteIcon.hide();
         var spinner = document.createElement('img');
-        spinner.src = "<?php echo $registry->getImageDir('horde') . '/loading.gif'; ?>"
+        spinner.src = "<?php echo Horde_Themes::img('loading.gif') ?>"
         var parent = deleteIcon.parentNode;
         parent.insertBefore(spinner, deleteIcon);
     }
index e44bb41..f0a2ee5 100644 (file)
@@ -18,7 +18,7 @@ class Skeleton
     static public function getMenu()
     {
         $menu = new Horde_Menu(Horde_Menu::MASK_ALL);
-        $menu->add(Horde::applicationUrl('list.php'), _("List"), 'user.png', $GLOBALS['registry']->getImageDir('horde'));
+        $menu->add(Horde::applicationUrl('list.php'), _("List"), 'user.png', Horde_Themes::img(null, 'horde'));
 
         return $menu;
     }
index dc8a7be..255429b 100644 (file)
@@ -19,8 +19,8 @@ Horde::includeScriptFiles();
 
 ?>
 <title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php echo Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php echo Horde_Themes::includeStylesheetFiles() ?>
 </head>
 
 <body>
index 2de54ec..26898b5 100644 (file)
@@ -26,9 +26,9 @@ foreach ($classes as $class) {
 }
 asort($sorted_classes);
 
-$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 Classes");
index e368647..1fbb5c8 100644 (file)
@@ -12,12 +12,10 @@ class Horde_Block_skoli_tree_menu extends Horde_Block {
 
     function _buildTree(&$tree, $indent = 0, $parent = null)
     {
-        global $registry;
-
         require_once dirname(__FILE__) . '/../base.php';
 
         $add = Horde::applicationUrl('add.php');
-        $icondir = $registry->getImageDir();
+        $icondir = Horde_Themes::img();
 
         $classes = Skoli::listClasses(false, Horde_Perms::EDIT);
         if (count($classes) > 0) {
@@ -47,7 +45,7 @@ class Horde_Block_skoli_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')));
         }
 
index 1fd23c3..8096c80 100644 (file)
@@ -497,11 +497,11 @@ class Skoli {
         }
 
         /* 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']['export']) {
-            $menu->add(Horde::applicationUrl('data.php'), _("_Export"), 'data.png', $registry->getImageDir('horde'));
+            $menu->add(Horde::applicationUrl('data.php'), _("_Export"), 'data.png', Horde_Themes::img(null, 'horde'));
         }
 
         // @TODO Implement an easy form to create timetables in e.g. Kronolith
index 17509f2..9072af1 100644 (file)
@@ -134,7 +134,7 @@ if (count($list) > 0) {
         require SKOLI_TEMPLATES . '/list/classes.inc';
 
         if ($show_students) {
-            $treedir = $registry->getImageDir('horde');
+            $treedir = Horde_Themes::img(null, 'horde');
             $counter = 0;
             foreach ($class['_students'] as $student) {
                 if (++$counter < count($class['_students'])) {
index 813016c..9350066 100644 (file)
@@ -26,8 +26,8 @@ $bc = $prefs->getValue('show_panel')
 
 ?>
 <title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
 <link href="<?php echo Horde::applicationUrl('themes/categoryCSS.php') ?>" rel="stylesheet" type="text/css" />
 </head>
 
index 78963e7..bf7aaa4 100644 (file)
@@ -3,7 +3,7 @@
     <?php
     if ($class['_edit']) {
         $label = _("New Entry");
-        echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('add.php'), 'class', $class['_id']), $label) . Horde::img('add.png', $label, null, $registry->getImageDir('skoli')) . '</a>';
+        echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('add.php'), 'class', $class['_id']), $label) . Horde::img('add.png', $label) . '</a>';
     }
     ?>
   </td>
@@ -11,7 +11,7 @@
     <?php
     if ($class['_edit']) {
         $label = sprintf(_("Edit \"%s\""), $class['name']);
-        echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('classes/edit.php'), 'c', $class['_id']), $label) . Horde::img('edit.png', $label, null, $registry->getImageDir('horde')) . '</a>';
+        echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('classes/edit.php'), 'c', $class['_id']), $label) . Horde::img('edit.png', $label) . '</a>';
     }
     ?>
   </td>
index 1cb21fe..8c10e1c 100644 (file)
@@ -1,6 +1,6 @@
 <div class="header leftAlign">
  <?php echo htmlspecialchars($title) ?>
- <a id="quicksearchL" href="<?php echo Horde::applicationUrl('search.php') ?>" title="<?php echo _("Search") ?>" onclick="$('quicksearchL').hide(); $('quicksearch').show(); $('quicksearchT').focus(); return false;"><?php echo Horde::img('search.png', _("Search"), '', $registry->getImageDir('horde')) ?></a>
+ <a id="quicksearchL" href="<?php echo Horde::applicationUrl('search.php') ?>" title="<?php echo _("Search") ?>" onclick="$('quicksearchL').hide(); $('quicksearch').show(); $('quicksearchT').focus(); return false;"><?php echo Horde::img('search.png', _("Search")) ?></a>
  <div id="quicksearch" style="display:none">
   <input type="text" name="quicksearchT" id="quicksearchT" for="classes-body" empty="classes_empty" />
   <small>
index b5e970a..490e909 100644 (file)
@@ -38,10 +38,10 @@ function doPrefsUpdate(column, sortDown)
 <thead>
  <tr class="item leftAlign">
   <th width="2%" class="nosort">
-   <?php echo Horde::img('add.png', _("New Entry"), null, $registry->getImageDir('skoli')) ?>
+   <?php echo Horde::img('add.png', _("New Entry")) ?>
   </th>
   <th width="2%" class="nosort">
-   <?php echo Horde::img('edit.png', _("Edit Class"), null, $registry->getImageDir('horde')) ?>
+   <?php echo Horde::img('edit.png', _("Edit Class")) ?>
   </th>
 <?php if (in_array('semesterstart', $class_columns)): ?>
   <th id="s<?php echo SKOLI_SORT_SEMESTERSTART ?>"<?php if ($sortby_class == SKOLI_SORT_SEMESTERSTART) echo ' class="' . $sortdirclass_class . '"' ?> width="2%">
@@ -86,7 +86,7 @@ function doPrefsUpdate(column, sortDown)
    if (Horde_Auth::getAuth() && (!$GLOBALS['prefs']->isLocked('categories') ||
                            !$GLOBALS['prefs']->isLocked('category_colors'))) {
        $categoryUrl = Horde_Util::addParameter(Horde::getServiceLink('options', 'horde'), array('group' => 'categories'));
-       echo ' ' . Horde::link($categoryUrl, _("Edit categories and colors"), '', '_blank', Horde::popupJs($categoryUrl, array('urlencode' => true)) . 'return false;') . Horde::img('colorpicker.png', _("Edit categories and colors"), '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+       echo ' ' . Horde::link($categoryUrl, _("Edit categories and colors"), '', '_blank', Horde::popupJs($categoryUrl, array('urlencode' => true)) . 'return false;') . Horde::img('colorpicker.png', _("Edit categories and colors")) . '</a>';
    }
    ?>
   </th>
index a7e7c2c..1925d31 100644 (file)
@@ -3,7 +3,7 @@
     <?php
     if ($class['_edit']) {
         $label = _("New Entry");
-        echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('add.php'), array('class'=>$class['_id'], 'student'=>$student['__key'])), $label) . Horde::img('add.png', $label, null, $registry->getImageDir('skoli')) . '</a>';
+        echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('add.php'), array('class'=>$class['_id'], 'student'=>$student['__key'])), $label) . Horde::img('add.png', $label) . '</a>';
     }
     ?>
   </td>
@@ -13,7 +13,7 @@
         $label = sprintf(_("Show \"%s\""), $student[$conf['addresses']['name_field']]);
         $url = $registry->link('contacts/show', array('source' => $class['address_book'],
                                                       'key' => $student['__key']));
-        echo Horde::link($url, $label) . Horde::img('user.png', $label, null, $registry->getImageDir('horde')) . '</a>';
+        echo Horde::link($url, $label) . Horde::img('user.png', $label) . '</a>';
     }
     ?>
   </td>
index 0b976ce..97c2c07 100644 (file)
@@ -7,13 +7,13 @@
             'view'  => 'EditEntry',
             'entry' => $entry['_id']
         );
-        echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('entry.php'), $params), $label) . Horde::img('edit.png', $label, null, $registry->getImageDir('horde')) . '</a>';
+        echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('entry.php'), $params), $label) . Horde::img('edit.png', $label) . '</a>';
     }
     ?>
   </td>
   <td><?php echo htmlspecialchars($entry['class']) ?>&nbsp;</td>
   <td>
-    <?php 
+    <?php
     $params = array(
         'view'  => 'Entry',
         'entry' => $entry['_id']
index 585dab5..0a118a1 100644 (file)
@@ -1,7 +1,7 @@
 <br />
 <div class="header leftAlign">
  <?php echo htmlspecialchars(_("Search Result")) ?>
- <a id="quicksearchL" href="<?php echo Horde::applicationUrl('search.php') ?>" title="<?php echo _("Search") ?>" onclick="$('quicksearchL').hide(); $('quicksearch').show(); $('quicksearchT').focus(); return false;"><?php echo Horde::img('search.png', _("Search"), '', $registry->getImageDir('horde')) ?></a>
+ <a id="quicksearchL" href="<?php echo Horde::applicationUrl('search.php') ?>" title="<?php echo _("Search") ?>" onclick="$('quicksearchL').hide(); $('quicksearch').show(); $('quicksearchT').focus(); return false;"><?php echo Horde::img('search.png', _("Search")) ?></a>
  <div id="quicksearch" style="display:none">
   <input type="text" name="quicksearchT" id="quicksearchT" for="entries-body" empty="entries_empty" />
   <small>
index b512c17..212f020 100644 (file)
@@ -28,7 +28,7 @@ function doPrefsUpdate(column, sortDown)
 <thead>
  <tr class="item leftAlign">
   <th width="2%" class="nosort">
-   <?php echo Horde::img('edit.png', _("Edit Class"), null, $registry->getImageDir('horde')) ?>
+   <?php echo Horde::img('edit.png', _("Edit Class")) ?>
   </th>
   <th id="s<?php echo SKOLI_SORT_CLASS ?>"<?php if ($sortby == SKOLI_SORT_CLASS) echo ' class="' . $sortdir_class . '"' ?> width="2%">
    <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby', SKOLI_SORT_CLASS)), _("Sort by Class"), 'sortlink', '', '', _("Class")) ?>&nbsp;
index c157c8f..4e10cbc 100644 (file)
@@ -254,7 +254,7 @@ class TimeObjects_Driver_Weatherdotcom extends TimeObjects_Driver
                                'recurrence' => Horde_Date_Recurrence::RECUR_NONE,
                                'params' => array(),
                                'link' => new Horde_Url('#'),
-                               'icon' =>  (string)Horde::url($GLOBALS['registry']->getImageDir('horde') . '/block/weatherdotcom/23x23/' . ($data['day']['conditionIcon'] == '-' ? 'na' : $data['day']['conditionIcon']) . '.png', true, false));
+                               'icon' =>  (string)Horde::url(Horde_Themes::img('block/weatherdotcom/23x23/' . ($data['day']['conditionIcon'] == '-' ? 'na' : $data['day']['conditionIcon']) . '.png'), true, false));
 
             $day->mday++;
         }
index adc9290..054345c 100644 (file)
@@ -36,10 +36,10 @@ foreach ($addressbooks as $addressbook) {
 }
 asort($sorted_addressbooks);
 
-$browse_img = Horde::img('turba.png', _("Browse"), null, $registry->getImageDir('turba'));
-$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'));
+$browse_img = Horde::img('turba.png', _("Browse"));
+$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 Address Books");
index 2cf6232..df928ed 100644 (file)
@@ -89,8 +89,7 @@ if ($contact->hasPermission(Horde_Perms::DELETE)) {
 @list($own_source, $own_id) = explode(';', $prefs->getValue('own_contact'));
 if ($own_source == $source && $own_id == $contact->getValue('__key')) {
     $own_icon = ' ' . Horde::img('user.png', _("Your own contact"),
-                                 array('title' => _("Your own contact")),
-                                 $registry->getImageDir('horde'));
+                                 array('title' => _("Your own contact")));
     $own_link = '';
 } else {
     $own_icon = '';
index a709bac..eaac649 100644 (file)
@@ -195,7 +195,7 @@ class Turba_Api extends Horde_Registry_Api
                     $results['turba/' . $owner]['name'] = $owner;
                 }
                 if (in_array('icon', $properties)) {
-                    $results['turba/' . $owner]['icon'] = $registry->getImageDir() . '/turba.png';
+                    $results['turba/' . $owner]['icon'] = Horde_Themes::img('turba.png');
                 }
                 if (in_array('browseable', $properties)) {
                     $results['turba/' . $owner]['browseable'] = true;
@@ -263,7 +263,7 @@ class Turba_Api extends Horde_Registry_Api
                     $results[$curpath . $addressbook]['name'] = $name;
                 }
                 if (in_array('icon', $properties)) {
-                    $results[$curpath . $addressbook]['icon'] = $registry->getImageDir() . '/turba.png';
+                    $results[$curpath . $addressbook]['icon'] = Horde_Themes::img('turba.png');
                 }
                 if (in_array('browseable', $properties)) {
                     $results[$curpath . $addressbook]['browseable'] = true;
@@ -320,7 +320,7 @@ class Turba_Api extends Horde_Registry_Api
                     $results[$key]['name'] = Turba::formatName($contact);
                 }
                 if (in_array('icon', $properties)) {
-                    $results[$key]['icon'] = $registry->getImageDir('horde') . '/mime/vcard.png';
+                    $results[$key]['icon'] = Horde_Themes::img('mime/vcard.png');
                 }
                 if (in_array('browseable', $properties)) {
                     $results[$key]['browseable'] = false;
index d4b2314..1335bbf 100644 (file)
@@ -16,7 +16,7 @@ class Horde_Block_turba_tree_menu extends Horde_Block {
 
         $browse = Horde::applicationUrl('browse.php');
         $add = Horde::applicationUrl('add.php');
-        $icondir = $registry->getImageDir() . '/menu';
+        $icondir = Horde_Themes::img() . '/menu';
 
         if ($GLOBALS['addSources']) {
             $tree->addNode($parent . '__new',
@@ -59,7 +59,7 @@ class Horde_Block_turba_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')));
     }
 
index 13ce734..32bdcc7 100644 (file)
@@ -318,7 +318,7 @@ class Turba_ListView {
         }
         $sortdir = $this->getColumnSortDirection($i);
         if ($this->isPrimarySortColumn($i)) {
-            return Horde::img($sortdir ? 'za.png' : 'az.png', $title, null, $GLOBALS['registry']->getImageDir('horde'));
+            return Horde::img($sortdir ? 'za.png' : 'az.png', $title);
         } else {
             return Horde::img($sortdir ? 'za_secondary.png' : 'az_secondary.png', _("Sort Direction"));
         }
index 2b3f344..63e6d06 100644 (file)
@@ -333,7 +333,7 @@ class Turba_Object {
                             'type' => $file['type'],
                             'source' => $this->driver->name,
                             'key' => $this->getValue('__key'));
-        $dl = Horde::link(Horde::downloadUrl($file['name'], $url_params), $file['name']) . Horde::img('download.png', _("Download"), '', $registry->getImageDir('horde')) . '</a>';
+        $dl = Horde::link(Horde::downloadUrl($file['name'], $url_params), $file['name']) . Horde::img('download.png', _("Download")) . '</a>';
 
         // Let's see if we can view this one, too.
         if ($viewer && !is_a($viewer, 'Horde_Mime_Viewer_default')) {
@@ -362,7 +362,7 @@ class Turba_Object {
             '<input type="hidden" name="file" value="' . htmlspecialchars($file['name']) . '" />' .
             '<input type="hidden" name="source" value="' . htmlspecialchars($this->driver->name) . '" />' .
             '<input type="hidden" name="key" value="' . htmlspecialchars($this->getValue('__key')) . '" />' .
-            '<input type="image" class="img" src="' . $GLOBALS['registry']->getImageDir('horde') . '/delete.png" />' .
+            '<input type="image" class="img" src="' . Horde_Themes::img('delete.png') . '" />' .
             '</form>';
 
         return $this->vfsDisplayUrl($file) . ' ' . $delform;
index 2823d6b..203e229 100644 (file)
@@ -604,11 +604,11 @@ class Turba {
         if (count($GLOBALS['addSources'])) {
             $menu->add(Horde::applicationUrl('add.php'), _("_New Contact"), 'menu/new.png');
         }
-        $menu->add(Horde::applicationUrl('search.php'), _("_Search"), 'search.png', $GLOBALS['registry']->getImageDir('horde'), null, null, (($GLOBALS['prefs']->getValue('initial_page') == 'search.php' && basename($_SERVER['PHP_SELF']) == 'index.php' && strpos($_SERVER['PHP_SELF'], 'addressbooks/index.php') === false) || (basename($_SERVER['PHP_SELF']) == 'browse.php' && Horde_Util::getFormData('key') == '**search')) ? 'current' : null);
+        $menu->add(Horde::applicationUrl('search.php'), _("_Search"), 'search.png', Horde_Themes::img(null, 'horde'), null, null, (($GLOBALS['prefs']->getValue('initial_page') == 'search.php' && basename($_SERVER['PHP_SELF']) == 'index.php' && strpos($_SERVER['PHP_SELF'], 'addressbooks/index.php') === false) || (basename($_SERVER['PHP_SELF']) == 'browse.php' && Horde_Util::getFormData('key') == '**search')) ? 'current' : null);
 
         /* Import/Export */
         if ($GLOBALS['conf']['menu']['import_export']) {
-            $menu->add(Horde::applicationUrl('data.php'), _("_Import/Export"), 'data.png', $GLOBALS['registry']->getImageDir('horde'));
+            $menu->add(Horde::applicationUrl('data.php'), _("_Import/Export"), 'data.png', Horde_Themes::img(null, 'horde'));
         }
 
         return $menu;
index 70c052a..702e895 100644 (file)
@@ -18,7 +18,7 @@ function hide_mini_search()
 <input name="search" id="search" size="35" />
 <input type="submit" class="button" value="<?php echo _("Search") ?>" />
 <input type="submit" class="button" style="display:none" value="<?php echo _("Close") ?>" id="turba_minisearch_close" onclick="hide_mini_search(); return false;" />
-<span id="turba_minisearch_searching" style="display:none"><?php echo Horde::img('loading.gif', '', '', $GLOBALS['registry']->getImageDir('horde'))?></span>
+<span id="turba_minisearch_searching" style="display:none"><?php echo Horde::img('loading.gif'?></span>
 </form>
 
 <div><iframe id="turba_minisearch_iframe" name="turba_minisearch_iframe" style="width:100%;border:none;display:none" frameborder="0" src="about:blank"></iframe></div>
index 45019ce..b543be7 100644 (file)
@@ -8,10 +8,10 @@
   <th class="item leftAlign" width="1%" style="cursor:pointer" onclick="document.contacts.checkAll.checked = !document.contacts.checkAll.checked; SelectAll();" nowrap="nowrap"><label for="checkAll" class="hidden"><?php echo _("Check All/None") ?></label><input type="checkbox" id="checkAll" name="checkAll" onclick="document.contacts.checkAll.checked = !document.contacts.checkAll.checked; SelectAll();" <?php echo Horde::getAccessKeyAndTitle(_("Check _All/None")) ?> /></th>
 <?php endif; ?>
 <?php if ($this->showEdit): $col_count++; ?>
-  <th class="item" width="1%"><?php echo Horde::img('edit.png', _("Edit"), '', $GLOBALS['registry']->getImageDir('horde')) ?></th>
+  <th class="item" width="1%"><?php echo Horde::img('edit.png', _("Edit")) ?></th>
 <?php endif; ?>
 <?php if ($this->showVcard): $col_count++; ?>
-  <th class="item" width="1%"><?php echo Horde::img('mime/vcard.png', _("vCard"), '', $GLOBALS['registry']->getImageDir('horde')) ?></th>
+  <th class="item" width="1%"><?php echo Horde::img('mime/vcard.png', _("vCard")) ?></th>
 <?php endif; ?>
 <?php if ($this->showGroup): $col_count++; ?>
   <th class="item" width="1%"><?php echo Horde::img('group.png', _("List")) ?></th>
index 2419edc..e15b641 100644 (file)
@@ -1,6 +1,6 @@
 <div class="header">
  <?php echo htmlspecialchars($title) ?>
- <a id="quicksearchL" href="<?php echo Horde::applicationUrl('search.php') ?>" title="<?php echo _("Search") ?>" onclick="$('quicksearchL').hide(); $('quicksearch').show(); $('quicksearchT').focus(); return false;"><?php echo Horde::img('search.png', _("Search"), '', $GLOBALS['registry']->getImageDir('horde')) ?></a>
+ <a id="quicksearchL" href="<?php echo Horde::applicationUrl('search.php') ?>" title="<?php echo _("Search") ?>" onclick="$('quicksearchL').hide(); $('quicksearch').show(); $('quicksearchT').focus(); return false;"><?php echo Horde::img('search.png', _("Search")) ?></a>
  <div id="quicksearch" style="display:none">
   <input type="text" name="quicksearchT" id="quicksearchT" for="QuickFinderContacts" empty="QuickFinderEmpty" />
   <small>
index 5c24fbb..e2a31d7 100644 (file)
@@ -12,8 +12,7 @@ if ($ob->hasValue('name')) {
 
 if ($own_source == $ob->getSource() && $own_id == $ob->getValue('__key')) {
     $own_icon = Horde::img('user.png', _("Your own contact"),
-                           array('title' => _("Your own contact")),
-                           $GLOBALS['registry']->getImageDir('horde'));
+                           array('title' => _("Your own contact")));
 } else {
     $own_icon = '&nbsp;';
 }
@@ -25,8 +24,7 @@ if ($ob->hasValue('__key')) {
                                           'key' => $ob->getValue('__key')));
     $vcard_url = Horde::link(Horde::applicationUrl($vcard_url),
                              _("Download vCard"))
-        . Horde::img('mime/vcard.png', _("Download vCard"), '',
-            $GLOBALS['registry']->getImageDir('horde'))
+        . Horde::img('mime/vcard.png', _("Download vCard"))
         . '</a>';
 
     $cell = Horde::link($ob->url()) . $link_text . '</a>';
@@ -38,8 +36,7 @@ if ($ob->hasValue('__key')) {
                   'key' => $ob->getValue('__key'),
                   'url' => Horde::selfUrl(true, false, true)));
         $edit_url = Horde::link(Horde::applicationUrl($edit_url), _("Edit"))
-            . Horde::img('edit.png', _("Edit"), '',
-                         $GLOBALS['registry']->getImageDir('horde'))
+            . Horde::img('edit.png', _("Edit"))
             . '</a>';
     }
 } else {
index d7b085d..a39408f 100644 (file)
@@ -21,8 +21,8 @@ if (!empty($refresh_time) && ($refresh_time > 0) && !empty($refresh_url)) {
 Horde::includeScriptFiles();
 ?>
 <title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
 </head>
 
 <body<?php if ($bc = Horde_Util::nonInputVar('bodyClass')) echo ' class="' . $bc . '"' ?>>
index 0d9a1e9..37b6deb 100644 (file)
@@ -170,9 +170,9 @@ function moveAddressBookDown()
    </select>
   </td>
   <td>
-   <a href="#" onclick="addAddressBook(); return false;"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'lhand.png' : 'rhand.png', _("Add address book"), null, $registry->getImageDir('horde')) ?></a>
+   <a href="#" onclick="addAddressBook(); return false;"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'lhand.png' : 'rhand.png', _("Add address book")) ?></a>
    <br />
-   <a href="#" onclick="removeAddressBook(); return false;"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'rhand.png' : 'lhand.png', _("Remove address book"), null, $registry->getImageDir('horde')) ?></a>
+   <a href="#" onclick="removeAddressBook(); return false;"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'rhand.png' : 'lhand.png', _("Remove address book")) ?></a>
   </td>
   <td>
    <label for="selected_addressbooks" class="hidden"><?php echo _("These address books will display in this order:") ?></label>
@@ -181,9 +181,9 @@ function moveAddressBookDown()
    </select>
   </td>
   <td>
-   <a href="#" onclick="moveAddressBookUp(); return false;"><?php echo Horde::img('nav/up.png', _("Move left"), null, $registry->getImageDir('horde')) ?></a>
+   <a href="#" onclick="moveAddressBookUp(); return false;"><?php echo Horde::img('nav/up.png', _("Move left")) ?></a>
    <br />
-   <a href="#" onclick="moveAddressBookDown(); return false;"><?php echo Horde::img('nav/down.png', _("Move right"), null, $registry->getImageDir('horde')) ?></a>
+   <a href="#" onclick="moveAddressBookDown(); return false;"><?php echo Horde::img('nav/down.png', _("Move right")) ?></a>
   </td>
  </tr>
 </table>
diff --git a/turba/themes/silver/themed_graphics b/turba/themes/silver/themed_graphics
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/turba/themes/tango-blue/themed_graphics b/turba/themes/tango-blue/themed_graphics
deleted file mode 100644 (file)
index e69de29..0000000
index be85d1c..7e8997a 100644 (file)
@@ -39,8 +39,8 @@ $template->set('menu', Vilma::getMenu('string'));
 $template->set('notify', Horde_Util::bufferOutput(array($notification, 'notify'), array('listeners' => 'status')));
 
 /* Set up the field list. */
-$images = array('delete' => Horde::img('delete.png', _("Delete Domain"), '', $registry->getImageDir('horde')),
-                'edit' => Horde::img('edit.png', _("Edit Domain"), '', $registry->getImageDir('horde')));
+$images = array('delete' => Horde::img('delete.png', _("Delete Domain")),
+                'edit' => Horde::img('edit.png', _("Edit Domain")));
 $template->set('images', $images);
 
 /* Render the page. */
index a1d15fc..60d8158 100644 (file)
@@ -130,7 +130,7 @@ class Vilma_Driver {
         if ($user['user_enabled'] !== 'active') {
             $no_error = false;
             $err_msg = _("User disabled.");
-            $status[] = Horde::img('alerts/error.png', $err_msg, 'align="middle"', $GLOBALS['registry']->getImageDir('horde')) . '&nbsp;' . $err_msg;
+            $status[] = Horde::img('alerts/error.png', $err_msg) . '&nbsp;' . $err_msg;
         }
 
         /* Check if mailbox exists. */
@@ -138,13 +138,13 @@ class Vilma_Driver {
         if (is_a($mailboxes, 'PEAR_Error')) {
             $no_error = false;
             $err_msg = $mailboxes->getMessage();
-            $status[] = Horde::img('alerts/warning.png', $err_msg, 'align="middle"', $GLOBALS['registry']->getImageDir('horde')) . '&nbsp;' . $err_msg;
+            $status[] = Horde::img('alerts/warning.png', $err_msg) . '&nbsp;' . $err_msg;
         }
         $result = $mailboxes->checkMailbox($user_name, $domain_name);
         if (is_a($result, 'PEAR_Error')) {
             $no_error = false;
             $err_msg = $result->getMessage();
-            $status[] = Horde::img('alerts/warning.png', $err_msg, 'align="middle"', $GLOBALS['registry']->getImageDir('horde')) . '&nbsp;' . $err_msg;
+            $status[] = Horde::img('alerts/warning.png', $err_msg) . '&nbsp;' . $err_msg;
         }
 
         /* TODO: Quota checking would be nice too. */
@@ -153,13 +153,13 @@ class Vilma_Driver {
          * user's status. */
         if ($no_error) {
             $msg = _("User ready.");
-            $status = array(Horde::img('alerts/success.png', $msg, 'align="middle"', $GLOBALS['registry']->getImageDir('horde')) . '&nbsp;' . $msg);
+            $status = array(Horde::img('alerts/success.png', $msg) . '&nbsp;' . $msg);
         }
         return $status;
     }
 
     /* Saves or creates alias records for a given user.
-     * 
+     *
      * @param array info The info used to store the information.
      *                   Required fields are:
      *                    'address' => The destination address (used for LDAP ID lookup)
@@ -173,12 +173,12 @@ class Vilma_Driver {
         if (is_a($result, 'PEAR_Error')) {
           return $result;
         }
-        
+
         return true;
     }
-    
+
     /* Deletes alias records for a given user.
-     * 
+     *
      * @param array info The info used to store the information.
      *                   Required fields are:
      *                    'address' => The destination address (used for LDAP ID lookup)
@@ -191,12 +191,12 @@ class Vilma_Driver {
         if (is_a($result, 'PEAR_Error')) {
           return $result;
         }
-        
+
         return true;
     }
-    
+
     /* Saves or creates forward records for a given user.
-     * 
+     *
      * @param array info The info used to store the information.
      *                   Required fields are:
      *                    'address' => The destination address (used for LDAP ID lookup)
@@ -210,12 +210,12 @@ class Vilma_Driver {
         if (is_a($result, 'PEAR_Error')) {
           return $result;
         }
-        
+
         return true;
     }
-    
+
     /* Deletes forward records for a given user.
-     * 
+     *
      * @param array info The info used to store the information.
      *                   Required fields are:
      *                    'address' => The destination address (used for LDAP ID lookup)
@@ -228,10 +228,10 @@ class Vilma_Driver {
         if (is_a($result, 'PEAR_Error')) {
           return $result;
         }
-        
+
         return true;
     }
-    
+
     function saveUser(&$info)
     {
         $create = false;
index f1383ee..328de45 100644 (file)
@@ -177,7 +177,7 @@ class Vilma {
             $url = Horde::applicationUrl('users/index.php');
             $tmp = Horde_Util::addParameter($url, 'domain_id', $domain['domain_id']);
             $menu->add(Horde::applicationUrl($tmp), _($domain['domain_name']), 'domain.png');
-            $menu->add(Horde::applicationUrl('users/edit.php'), _("New _Address"), 'user.png', $GLOBALS['registry']->getImageDir('horde'));
+            $menu->add(Horde::applicationUrl('users/edit.php'), _("New _Address"), 'user.png', Horde_Themes::img(null, 'horde'));
         } else {
             $menu->add(Horde::applicationUrl('domains/edit.php'), _("_New Domain"), 'domain.png');
         }
index 4a7188e..93db958 100644 (file)
@@ -22,8 +22,8 @@ Horde::includeScriptFiles();
 
 ?>
 <title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php Horde::includeStylesheetFiles() ?>
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
+<?php Horde_Themes::includeStylesheetFiles() ?>
 </head>
 
 <body>
index 7145895..53181eb 100644 (file)
@@ -130,8 +130,8 @@ $template->set('notify', Horde_Util::bufferOutput(array($notification, 'notify')
 $template->set('pager', $pager->render());
 
 /* Set up the field list. */
-$images = array('delete' => Horde::img('delete.png', _("Delete User"), '', $registry->getImageDir('horde')),
-                'edit' => Horde::img('edit.png', _("Edit User"), '', $registry->getImageDir('horde')));
+$images = array('delete' => Horde::img('delete.png', _("Delete User")),
+                'edit' => Horde::img('edit.png', _("Edit User")));
 $template->set('images', $images);
 
 /* Render the page. */
index c49b07f..f06caa1 100644 (file)
@@ -50,8 +50,8 @@ $actions['users_text'] = _("Users");
 $template->set('actions', $actions);
 
 /* Set up the field list. */
-$images = array('delete' => Horde::img('delete.png', _("Delete User"), '', $registry->getImageDir('horde')),
-                'edit' => Horde::img('edit.png', _("Edit User"), '', $registry->getImageDir('horde')));
+$images = array('delete' => Horde::img('delete.png', _("Delete User")),
+                'edit' => Horde::img('edit.png', _("Edit User")));
 $template->set('images', $images);
 
 $template->set('menu', Vilma::getMenu('string'));
index d7755f7..b57867e 100644 (file)
@@ -29,7 +29,7 @@ class Whups_Api extends Horde_Registry_Api
             $results = array(
                 'whups/queue' => array(
                     'name' => _("Queues"),
-                    'icon' => $registry->getImageDir() . '/whups.png',
+                    'icon' => Horde_Themes::img('whups.png'),
                     'browseable' => count(
                         Whups::permissionsFilter($whups_driver->getQueues(),
                                                  'queue', Horde_Perms::READ))));
index eca3d19..2ae742d 100644 (file)
@@ -20,7 +20,7 @@ class Horde_Block_whups_tree_menu extends Horde_Block {
                        $indent + 1,
                        false,
                        array('icon' => 'create.png',
-                             'icondir' => $registry->getImageDir(),
+                             'icondir' => Horde_Themes::img(),
                              'url' => Horde::applicationUrl('ticket/create.php')));
 
         $tree->addNode($parent . '__search',
@@ -29,7 +29,7 @@ class Horde_Block_whups_tree_menu extends Horde_Block {
                        $indent + 1,
                        false,
                        array('icon' => 'search.png',
-                             'icondir' => $registry->getImageDir('horde'),
+                             'icondir' => Horde_Themes::img(),
                              'url' => Horde::applicationUrl('search.php')));
     }
 
index 269526c..87da5d4 100644 (file)
@@ -33,8 +33,7 @@ class Horde_Ui_VarRenderer_whups extends Horde_Ui_VarRenderer_Html {
                        @htmlspecialchars($var->getValue($vars)),
                        $this->_getActionScripts($form, $var))
             . '<span id="' . $name . '_loading_img" style="display:none;">'
-            . Horde::img('loading.gif', _("Loading..."), '',
-                         $GLOBALS['registry']->getImageDir('horde'))
+            . Horde::img('loading.gif', _("Loading..."))
             . '</span>';
     }
 
index 35333ee..7614261 100755 (executable)
@@ -155,7 +155,7 @@ class Horde_Form_Renderer_Comment extends Horde_Form_Renderer {
 
             $comment_count++;
             if ($private) {
-                $comment_label = Horde::img('locked.png', '', null, $registry->getImageDir('horde'))
+                $comment_label = Horde::img('locked.png')
                     . sprintf(_("Comment #%d (Private)"), $comment_count);
             } else {
                 $comment_label = sprintf(_("Comment #%d"), $comment_count);
index 095a793..f8ad7eb 100644 (file)
@@ -210,7 +210,7 @@ class Horde_Form_Renderer_Query extends Horde_Form_Renderer {
         // little nicer.
         $fimgattrs = 'height="20" width="0" style="vertical-align: middle;"';
         $imgattrs = 'height="20" width="20" style="vertical-align: middle;"';
-        $imgdir = $registry->getImageDir('horde');
+        $imgdir = Horde_Themes::img(null, 'horde');
 
         $space = '';
         $count = count($more);
index 83b97dd..ed59c7c 100644 (file)
@@ -643,9 +643,7 @@ class Whups {
                 $name = Horde::img('group.png',
                                    !empty($details['name'])
                                    ? $details['name']
-                                   : $details['user'],
-                                   '',
-                                   $GLOBALS['registry']->getImageDir('horde'))
+                                   : $details['user'])
                     . $name;
             }
         }
@@ -838,7 +836,7 @@ class Whups {
         $url_params = array('actionID' => 'download_file',
                             'file' => $file['name'],
                             'ticket' => $ticket);
-        $link .= ' ' . Horde::link(Horde::downloadUrl($file['name'], $url_params), $file['name']) . Horde::img('download.png', _("Download"), null, $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+        $link .= ' ' . Horde::link(Horde::downloadUrl($file['name'], $url_params), $file['name']) . Horde::img('download.png', _("Download")) . '</a>';
 
         // Admins can delete attachments.
         if (Whups::hasPermission($queue, 'queue', Horde_Perms::DELETE)) {
@@ -848,7 +846,7 @@ class Whups {
                       'id' => $ticket,
                       'url' => Horde::selfUrl(true, false, true)));
             $link .= ' ' . Horde::link($url, sprintf(_("Delete %s"), $file['name']), '', '', 'return window.confirm(\'' . addslashes(sprintf(_("Permanently delete %s?"), $file['name'])) . '\');') .
-                Horde::img('delete.png', sprintf(_("Delete %s"), $file['name']), null, $GLOBALS['registry']->getImageDir('horde')) . '</a>';
+                Horde::img('delete.png', sprintf(_("Delete %s"), $file['name'])) . '</a>';
         }
 
         return $link;
index 0faf2ee..7526c00 100644 (file)
@@ -90,8 +90,7 @@ if (!is_null($tickets)) {
             : array('slug' => $whups_query->slug);
         $subscription = Horde::link(Whups::urlFor('query_rss', $params, true, -1),
                                     _("Subscribe to this query"))
-            . Horde::img('feed.png', _("Subscribe to this query"), null,
-                         $GLOBALS['registry']->getImageDir('horde'))
+            . Horde::img('feed.png', _("Subscribe to this query"))
             . '</a>';
     }
     $results = Whups_View::factory(
index 0695811..ef9bab6 100644 (file)
@@ -29,9 +29,9 @@ if (isset($whups_query) && isset($whups_query->id)) {
 
 ?>
 <title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
 <link href="<?php echo Horde::applicationUrl('opensearch.php', true, -1) ?>" rel="search" type="application/opensearchdescription+xml" title="<?php echo $registry->get('name') . ' (' . Horde::applicationUrl('', true) . ')' ?>" />
-<?php Horde::includeStylesheetFiles() ?>
+<?php Horde_Themes::includeStylesheetFiles() ?>
 </head>
 
 <body>
index 5e661f3..a2b2bd9 100644 (file)
@@ -295,9 +295,9 @@ function changeSearchFields()
    </select>
   </td>
   <td>
-   <a href="#" onclick="addSource(); return false;"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'lhand.png' : 'rhand.png', _("Add source"), null, $registry->getImageDir('horde')) ?></a>
+   <a href="#" onclick="addSource(); return false;"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'lhand.png' : 'rhand.png', _("Add source")) ?></a>
    <br />
-   <a href="#" onclick="removeSource(); return false;"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'rhand.png' : 'lhand.png', _("Remove source"), null, $registry->getImageDir('horde')) ?></a>
+   <a href="#" onclick="removeSource(); return false;"><?php echo Horde::img(isset($GLOBALS['nls']['rtl'][$GLOBALS['language']]) ? 'rhand.png' : 'lhand.png', _("Remove source")) ?></a>
   </td>
   <td>
    <label for="selected_search_sources" class="hidden"><?php echo _("Selected Address books:") ?></label>
@@ -307,9 +307,9 @@ function changeSearchFields()
    </select>
   </td>
   <td>
-   <a href="#" onclick="moveSourceUp(); return false;"><?php echo Horde::img('nav/up.png', _("Move up"), null, $registry->getImageDir('horde')) ?></a>
+   <a href="#" onclick="moveSourceUp(); return false;"><?php echo Horde::img('nav/up.png', _("Move up")) ?></a>
    <br />
-   <a href="#" onclick="moveSourceDown(); return false;"><?php echo Horde::img('nav/down.png', _("Move down"), null, $registry->getImageDir('horde')) ?></a>
+   <a href="#" onclick="moveSourceDown(); return false;"><?php echo Horde::img('nav/down.png', _("Move down")) ?></a>
   </td>
  </tr>
 </table>
diff --git a/whups/themes/silver/themed_graphics b/whups/themes/silver/themed_graphics
deleted file mode 100644 (file)
index e69de29..0000000
index 875c84a..5d64cba 100644 (file)
@@ -117,14 +117,12 @@ class AttachedFiles extends Page {
         $template->setOption('gettext', true);
         $template->set('pageName', $this->pageName());
         $template->set('formAction', Wicked::url('AttachedFiles'));
-        $template->set('deleteButton', $registry->getImageDir('horde')
-                                       . '/delete.png');
+        $template->set('deleteButton', Horde_Themes::img('delete.png'));
         $template->set('referrerLink', Wicked::url($this->referrer()));
 
         $refreshIcon = Horde::link($this->pageUrl())
             . Horde::img('reload.png',
-                         sprintf(_("Reload \"%s\""), $this->pageTitle()),
-                         '', $registry->getImageDir('horde'))
+                         sprintf(_("Reload \"%s\""), $this->pageTitle()))
             . '</a>';
         $template->set('refreshIcon', $refreshIcon);
         $template->set('attachments', $attachments, true);
@@ -147,8 +145,7 @@ class AttachedFiles extends Page {
             $template->set('requireChangelog', false, true);
         }
 
-        $requiredMarker = Horde::img('required.png', '*', '',
-                                     $registry->getImageDir('horde'));
+        $requiredMarker = Horde::img('required.png', '*');
         $template->set('requiredMarker', $requiredMarker);
         $template->set('referrer', $this->referrer());
         $template->set('formInput', Horde_Util::formInput());
index 5551102..9b24061 100644 (file)
@@ -93,8 +93,7 @@ class MergeOrRename extends Page {
 
         $template->set('referrerLink', Wicked::url($referrer));
 
-        $requiredMarker = Horde::img('required.png', '*', '',
-                                     $registry->getImageDir('horde'));
+        $requiredMarker = Horde::img('required.png', '*');
         $template->set('requiredMarker', $requiredMarker);
 
         $references = $wicked->getBackLinks($referrer);
index 85e51cc..724939c 100644 (file)
@@ -22,9 +22,9 @@ Horde::includeScriptFiles();
 
 ?>
 <title><?php echo htmlspecialchars($page_title) ?></title>
-<link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
+<link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
 <link href="<?php echo Horde::applicationUrl('opensearch.php', true, -1) ?>" rel="search" type="application/opensearchdescription+xml" title="<?php echo $registry->get('name') . ' (' . Horde::applicationUrl('', true) . ')' ?>" />
-<?php Horde::includeStylesheetFiles() ?>
+<?php Horde_Themes::includeStylesheetFiles() ?>
 </head>
 
 <body>
index 78729eb..b07fe02 100644 (file)
@@ -30,6 +30,6 @@ if ($this->referrer()) {
 
 echo htmlspecialchars($this->pageName()) . $referrerLink . ($this->isOld() ? ' (' . htmlspecialchars($v) . ')' : '') . ' ' .
  Horde::link($this->pageUrl(), _("Reload Page")) .
- Horde::img('reload.png', _("Reload Page"), '', $GLOBALS['registry']->getImageDir('horde')) ?></a>
+ Horde::img('reload.png', _("Reload Page")) ?></a>
  <?php if ($this->isLocked()) echo Horde::img('locked.png', _("Locked")) ?>
 </div>
index 7addca6..b228e61 100644 (file)
@@ -25,7 +25,7 @@ function preview()
  <input type="submit" value="<?php echo _("Save") ?>" class="button" />
  <input type="button" value="<?php echo _("Preview") ?>" class="button" onclick="preview()" />
  <a class="button" href="<?php echo $page->pageUrl()->add('actionID', 'unlock') ?>"><?php echo _("Cancel") ?></a>
- <?php if (!empty($GLOBALS['conf']['wicked']['require_change_log'])) echo Horde::img('required.png', _("Changelog is required"), '', $GLOBALS['registry']->getImageDir('horde')) ?>
+ <?php if (!empty($GLOBALS['conf']['wicked']['require_change_log'])) echo Horde::img('required.png', _("Changelog is required")) ?>
  <strong><?php echo _("Change log") . ': ' ?></strong><input type="text" name="changelog" size="50" />
  <input type="checkbox" name="minor" id="minor" checked="checked" /><label for="minor"> <?php echo _("Minor Change") ?></label>
 </div>
index 7430ba8..feb75e6 100644 (file)
@@ -5,7 +5,7 @@
 
 <h1 class="header">
  <?php printf(_("History: %s"), Horde::link($this->pageUrl()) . htmlspecialchars($this->pageName()) . '</a>');
-       echo Horde::link($this->pageUrl('history.php')) . Horde::img('reload.png', _("Reload History"), '', $GLOBALS['registry']->getImageDir('horde')) ?></a>
+       echo Horde::link($this->pageUrl('history.php')) . Horde::img('reload.png', _("Reload History")) ?></a>
 </h1>
 
 <table width="100%" cellspacing="0" class="linedRow">
@@ -13,9 +13,9 @@
   <th align="left" width="1%"><?php echo _("Version") ?></th>
 
 <?php if ($this->allows(WICKED_MODE_REMOVE)): ?>
-  <th align="center" class="nowrap" style="width:1%"><?php echo Horde::img('delete.png', _("Delete Version"), '', $GLOBALS['registry']->getImageDir('horde')) ?></th>
+  <th align="center" class="nowrap" style="width:1%"><?php echo Horde::img('delete.png', _("Delete Version")) ?></th>
 <?php endif; if ($this->allows(WICKED_MODE_EDIT)): ?>
-  <th align="center" class="nowrap" style="width:1%"><?php echo Horde::img('edit.png', _("Edit Version"), '', $GLOBALS['registry']->getImageDir('horde')) ?></th>
+  <th align="center" class="nowrap" style="width:1%"><?php echo Horde::img('edit.png', _("Edit Version")) ?></th>
 
   <th align="center" class="nowrap" style="width:1%"><?php echo Horde::img('restore.png', _("Restore Version")) ?></th>
 <?php endif; ?>
index b9d3302..6ede924 100644 (file)
@@ -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')) . '</a>';
+echo Horde::link($url, $text) . Horde::img('delete.png', $text) . '</a>';
 ?>
  </td>
 <?php endif; if ($this->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')) . '</a>';
+    echo Horde::link($url, $text) . Horde::img('edit.png', $text) . '</a>';
 }
 ?>
  </td>