From 788954489f410d6efbebb7e2c2777022cf790885 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 4 Feb 2014 17:45:36 -0700 Subject: [PATCH] Horde::img -> Horde_Themes_Image::tag --- horde/admin/alarms.php | 2 +- horde/admin/config/index.php | 47 ++++++++++++++----- horde/admin/groups.php | 6 ++- horde/admin/perms/index.php | 2 +- horde/docs/CODING_STANDARDS | 12 ++++- horde/lib/Block/Account.php | 2 +- horde/lib/Block/Cloud.php | 7 ++- horde/lib/Block/FbStream.php | 7 ++- horde/lib/Block/Iframe.php | 6 ++- horde/lib/Block/Moon.php | 34 +++++++------- horde/lib/Block/Sunrise.php | 4 +- horde/lib/Block/TwitterTimeline.php | 7 ++- horde/lib/Block/Vatid.php | 5 +- horde/lib/Block/Weather.php | 12 ++--- horde/services/obrowser/index.php | 8 ++-- horde/services/portal/cloud_search.php | 2 +- horde/templates/admin/groups/add.inc | 2 +- horde/templates/admin/groups/delete.inc | 2 +- horde/templates/admin/groups/edit.inc | 8 ++-- horde/templates/admin/user/list.inc | 6 +-- horde/templates/shares/edit.inc | 14 +++--- horde/util/icon_browser.php | 12 +++-- ingo/lib/Basic/Filters.php | 32 ++++++++----- ingo/lib/Basic/Rule.php | 1 + ingo/lib/Smartmobile.php | 2 +- ingo/templates/basic/rule/rule.html.php | 2 +- turba/contact.php | 6 ++- .../Ajax/Application/Handler/Minisearch.php | 2 +- turba/lib/Object.php | 2 +- turba/lib/Ui/VarRenderer/Turba.php | 2 +- turba/lib/View/List.php | 10 ++-- turba/templates/browse/row.inc | 6 ++- 32 files changed, 172 insertions(+), 100 deletions(-) diff --git a/horde/admin/alarms.php b/horde/admin/alarms.php index 2000f600327..e5a99262f29 100644 --- a/horde/admin/alarms.php +++ b/horde/admin/alarms.php @@ -132,7 +132,7 @@ ->add('delete', 1) ->link(array('title' => sprintf(_("Delete \"%s\""), $alarm['title']), 'onclick' => 'return confirm(\'' . addslashes(sprintf(_("Are you sure you want to delete '%s'?"), $alarm['title'])) . '\')')) - . Horde::img('delete.png') + . Horde_Themes_Image::tag('delete.png') . ''; } $view->alarms = $alarms; diff --git a/horde/admin/config/index.php b/horde/admin/config/index.php index 437e04a4a41..17f9e02dcfa 100644 --- a/horde/admin/config/index.php +++ b/horde/admin/config/index.php @@ -137,9 +137,9 @@ function _uploadFTP($params) } /* Set up some icons. */ -$success = Horde::img('alerts/success.png'); -$warning = Horde::img('alerts/warning.png'); -$error = Horde::img('alerts/error.png'); +$success = Horde_Themes_Image::tag('alerts/success.png'); +$warning = Horde_Themes_Image::tag('alerts/warning.png'); +$error = Horde_Themes_Image::tag('alerts/error.png'); $self_url = Horde::url('admin/config/'); $conf_url = Horde::url('admin/config/config.php'); @@ -148,7 +148,9 @@ function _uploadFTP($params) $config_outdated = $schema_outdated = false; if (class_exists('Horde_Bundle')) { $apps[0] = array( - 'icon' => Horde::img($registry->get('icon', 'horde'), Horde_Bundle::FULLNAME, '', ''), + 'icon' => Horde_Themes_Image::tag($registry->get('icon', 'horde'), array( + 'alt' => Horde_Bundle::FULLNAME + )), 'name' => '' . Horde_Bundle::FULLNAME . '', 'sort' => '00', 'version' => '' . Horde_Bundle::VERSION . '' @@ -190,7 +192,10 @@ function _uploadFTP($params) } else { $apps[$i]['name'] = $apps[$i]['sort']; } - $apps[$i]['icon'] = Horde::img($registry->get('icon', $app), $registry->get('name', $app), '', ''); + $apps[$i]['icon'] = Horde_Themes_Image::tag( + $registry->get('icon', $app), + array('alt' => $registry->get('name', $app)) + ); $apps[$i]['version'] = ''; if ($version = $registry->getVersion($app, true)) { $apps[$i]['version'] = $version; @@ -376,18 +381,30 @@ function _uploadFTP($params) if ($session->get('horde', 'config/')) { $url = Horde::url('admin/config/diff.php'); $action = _("Show differences between currently saved and the newly generated configuration."); - $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 . ''); + $actions[] = array( + 'icon' => Horde_Themes_Image::tag('search.png', array( + 'attr' => array('align' => 'middle') + )), + 'link' => Horde::link('#', '', '', '', Horde::popupJs($url, array('height' => 480, 'width' => 640, 'urlencode' => true)) . 'return false;') . $action . '' + ); /* Action to download the configuration upgrade PHP script. */ $url = Horde::url('admin/config/scripts.php')->add(array('setup' => 'conf', 'type' => 'php')); $action = _("Download generated configuration as PHP script."); - $actions[] = array('icon' => Horde::img('download.png', '', 'align="middle"'), - 'link' => Horde::link($url) . $action . ''); + $actions[] = array( + 'icon' => Horde_Themes_Image::tag('download.png', array( + 'attr' => array('align' => 'middle') + )), + 'link' => Horde::link($url) . $action . '' + ); /* 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"'), - 'link' => Horde::link($url->add('save', 'tmp')) . $action . ''); + $actions[] = array( + 'icon' => Horde_Themes_Image::tag('save.png', array( + 'attr' => array('align' => 'middle') + )), + 'link' => Horde::link($url->add('save', 'tmp')) . $action . '' + ); /* Set up the form for FTP upload of scripts. */ $vars = Horde_Variables::getDefaultVariables(); @@ -414,8 +431,12 @@ function _uploadFTP($params) /* Action to remove the configuration upgrade PHP script. */ $url = Horde::url('admin/config/scripts.php')->add('clean', 'tmp'); $action = _("Remove saved script from server's temporary directory."); - $actions[] = array('icon' => Horde::img('delete.png', '', 'align="middle"'), - 'link' => Horde::link($url) . $action . ''); + $actions[] = array( + 'icon' => Horde_Themes_Image::tag('delete.png', array( + 'attr' => array('align' => 'middle') + )), + 'link' => Horde::link($url) . $action . '' + ); } $view = new Horde_View(array( diff --git a/horde/admin/groups.php b/horde/admin/groups.php index a0138511225..3a3fa48e7ce 100644 --- a/horde/admin/groups.php +++ b/horde/admin/groups.php @@ -175,9 +175,11 @@ $edit = $group_url->copy()->add('actionID', 'edit'); if (!$groups->readOnly()) { $add = $group_url->copy()->add('actionID', 'addchild'); - $add_img = Horde::img('add_group.png'); + $add_img = Horde_Themes_Image::tag('add_group.png'); $delete = $group_url->copy()->add('actionID', 'delete'); - $delete_img = Horde::img('delete.png', _("Delete Group")); + $delete_img = Horde_Themes_Image::tag('delete.png', array( + 'alt' => _("Delete Group") + )); } /* Set up the tree. */ diff --git a/horde/admin/perms/index.php b/horde/admin/perms/index.php index 610cb4e72a3..a55dbe47f22 100644 --- a/horde/admin/perms/index.php +++ b/horde/admin/perms/index.php @@ -26,7 +26,7 @@ $ui = new Horde_Core_Perms_Ui($injector->getInstance('Horde_Perms'), $injector->getInstance('Horde_Core_Perms')); -echo '

' . Horde::img('perms.png') . ' ' . _("Permissions") . '

'; +echo '

' . Horde_Themes_Image::tag('perms.png') . ' ' . _("Permissions") . '

'; $ui->renderTree($perm_id); $page_output->footer(); diff --git a/horde/docs/CODING_STANDARDS b/horde/docs/CODING_STANDARDS index 78e879ec64a..b0faee204c8 100644 --- a/horde/docs/CODING_STANDARDS +++ b/horde/docs/CODING_STANDARDS @@ -381,12 +381,20 @@ after all other output. All images must have an ``alt`` attribute:: <?php echo _(" /> - + _("Example") + )); + ?> Input fields of type "image" do not allow the border attribute and may render with a border on some browsers. Use the following instead:: - + _("Example") + )); + ?> Database Conventions diff --git a/horde/lib/Block/Account.php b/horde/lib/Block/Account.php index 8d91c6938c4..da4e1c92d2f 100644 --- a/horde/lib/Block/Account.php +++ b/horde/lib/Block/Account.php @@ -93,7 +93,7 @@ protected function _content() if ($status) { $output .= '

' . - Horde::img('alerts/warning.png', _("Warning")) . + Horde_Themes_Image::tag('alerts/warning.png', array('alt' => _("Warning"))) . '  ' . $status . '

'; } diff --git a/horde/lib/Block/Cloud.php b/horde/lib/Block/Cloud.php index 24f9123042f..2d8ee8e403d 100644 --- a/horde/lib/Block/Cloud.php +++ b/horde/lib/Block/Cloud.php @@ -29,7 +29,12 @@ protected function _content() return Horde::endBuffer() . '
 ' - . Horde::img('loading.gif', '', array('style' => 'display:none;', 'id' => 'cloudloadingimg')) + . Horde_Themes_Image::tag('loading.gif', array( + 'attr' => array( + 'id' => 'cloudloadingimg', + 'style' => 'display:none;' + ) + )) . '
' . $cloud->buildHTML() . '
'; } diff --git a/horde/lib/Block/FbStream.php b/horde/lib/Block/FbStream.php index a2dd3cc627c..36c6ab69bb5 100644 --- a/horde/lib/Block/FbStream.php +++ b/horde/lib/Block/FbStream.php @@ -141,7 +141,12 @@ protected function _content() if (!empty($fbperms[Horde_Service_Facebook_Auth::EXTEND_PERMS_PUBLISHSTREAM])) { $html .= '' . '
' . _("Post") . '
' - . Horde::img('loading.gif', '', array('id' => $instance. '_loading', 'style' => 'display:none;')); + . Horde_Themes_Image::tag('loading.gif', array( + 'attr' => array( + 'id' => $instance. '_loading', + 'style' => 'display:none;' + ) + )); } } catch (Horde_Service_Facebook_Exception $e) { $prefs = $GLOBALS['registry']->getServiceLink('prefs'); diff --git a/horde/lib/Block/Iframe.php b/horde/lib/Block/Iframe.php index ff62b2adb5d..29a45743d49 100644 --- a/horde/lib/Block/Iframe.php +++ b/horde/lib/Block/Iframe.php @@ -52,7 +52,11 @@ protected function _title() return htmlspecialchars($title) . $url->link(array('target' => '_blank')) . - Horde::img('external.png', '', array('style' => 'vertical-align:middle;padding-left:.3em')) . ''; + Horde_Themes_Image::tag('external.png', array( + 'attr' => array( + 'style' => 'vertical-align:middle;padding-left:.3em' + ) + )) . ''; } /** diff --git a/horde/lib/Block/Moon.php b/horde/lib/Block/Moon.php index 32d5ccf4f01..02e569c71d2 100644 --- a/horde/lib/Block/Moon.php +++ b/horde/lib/Block/Moon.php @@ -51,42 +51,40 @@ protected function _content() $offset++; } - if (isset($this->_params['phase']) && $this->_params['phase'] == 'next') { - $dates = array_slice(array_keys($phases), $lastNew + 4, 4); - } else { - $dates = array_slice(array_keys($phases), $lastNew, 4); - } + $dates = (isset($this->_params['phase']) && ($this->_params['phase'] == 'next')) + ? array_slice(array_keys($phases), $lastNew + 4, 4) + : array_slice(array_keys($phases), $lastNew, 4); - if (isset($this->_params['hemisphere']) && $this->_params['hemisphere'] == 'northern') { - $location = _("Northern Hemisphere"); - } else { - $location = _("Southern Hemisphere"); - } + $location = (isset($this->_params['hemisphere']) && ($this->_params['hemisphere'] == 'northern')) + ? _("Northern Hemisphere") + : _("Southern Hemisphere"); $html = '' . '' . ''; $html .= ''; $html .= ''; $html .= '
' . $location . '
' . - Horde::img('block/moon/newmoon.png', _("New Moon")) . + Horde_Themes_Image::tag('block/moon/newmoon.png', array('alt' => _("New Moon"))) . '
' . strftime('%d %b', $dates[0]) . '
'; - if (isset($this->_params['hemisphere']) && $this->_params['hemisphere'] == 'northern') { - $html .= Horde::img('block/moon/lastquarter.png', _("First Quarter")); + if (isset($this->_params['hemisphere']) && + ($this->_params['hemisphere'] == 'northern')) { + $html .= Horde_Themes_Image::tag('block/moon/lastquarter.png', array('alt' => _("First Quarter"))); } else { - $html .= Horde::img('block/moon/firstquarter.png', _("First Quarter")); + $html .= Horde_Themes_Image::tag('block/moon/firstquarter.png', array('alt' => _("First Quarter"))); } $html .= '
' . strftime('%d %b', $dates[1]) . '
' . - Horde::img('block/moon/fullmoon.png', _("Full Moon")) . + Horde_Themes_Image::tag('block/moon/fullmoon.png', array('alt' => _("Full Moon"))) . '
' . strftime('%d %b', $dates[2]) . '
'; - if (isset($this->_params['hemisphere']) && $this->_params['hemisphere'] == 'northern') { - $html .= Horde::img('block/moon/firstquarter.png', _("Last Quarter")); + if (isset($this->_params['hemisphere']) && + ($this->_params['hemisphere'] == 'northern')) { + $html .= Horde_Themes_Image::tag('block/moon/firstquarter.png', array('alt' => _("Last Quarter"))); } else { - $html .= Horde::img('block/moon/lastquarter.png', _("Last Quarter")); + $html .= Horde_Themes_Image::tag('block/moon/lastquarter.png', array('alt' => _("Last Quarter"))); } $html .= '
' . strftime('%d %b', $dates[3]) . '
'; diff --git a/horde/lib/Block/Sunrise.php b/horde/lib/Block/Sunrise.php index 414736e4ef3..7b20d14ade0 100644 --- a/horde/lib/Block/Sunrise.php +++ b/horde/lib/Block/Sunrise.php @@ -67,10 +67,10 @@ protected function _content() return '' . '' . '' . '' . '
' . $location . '
' . - Horde::img('block/sunrise/sunrise.png', _("Sun Rise")) . + Horde_Themes_Image::tag('block/sunrise/sunrise.png', array('alt' => _("Sun Rise"))) . '
' . $rise . '
' . - Horde::img('block/sunrise/sunset.png', _("Sun Set")) . + Horde_Themes_Image::tag('block/sunrise/sunset.png', array('alt' => _("Sun Set"))) . '
' . $set . '
'; } diff --git a/horde/lib/Block/TwitterTimeline.php b/horde/lib/Block/TwitterTimeline.php index 059c52dd26a..89fe58edb73 100644 --- a/horde/lib/Block/TwitterTimeline.php +++ b/horde/lib/Block/TwitterTimeline.php @@ -145,7 +145,12 @@ protected function _content() $view->addHelper('Tag'); $view->instance = $instance; $view->defaultText = $defaultText; - $view->loadingImg = Horde::img('loading.gif', '', array('id' => $instance . '_loading', 'style' => 'display:none;')); + $view->loadingImg = Horde_Themes_Image::tag('loading.gif', array( + 'attr' => array( + 'id' => $instance . '_loading', + 'style' => 'display:none;' + ) + )); $view->latestStatus = !empty($this->_profile->status) ? htmlspecialchars($this->_profile->status->text) : ''; $view->latestDate = !empty($this->_profile->status) ? Horde_Date_Utils::relativeDateTime(strtotime($this->_profile->status->created_at), $GLOBALS['prefs']->getValue('date_format'), ($GLOBALS['prefs']->getValue('twentyFour') ? "%H:%M" : "%I:%M %P")) : ''; $view->bodyHeight = empty($this->_params['height']) ? 350 : $this->_params['height']; diff --git a/horde/lib/Block/Vatid.php b/horde/lib/Block/Vatid.php index cf3dd5b3918..cf7c0d18190 100644 --- a/horde/lib/Block/Vatid.php +++ b/horde/lib/Block/Vatid.php @@ -41,7 +41,10 @@ protected function _content() '
' . '
' . - Horde::img('loading.gif', _("Checking"), array('style' => 'display:none')) . + Horde_Themes_Image::tag('loading.gif', array( + 'alt' => _("Checking"), + 'attr' => array('style' => 'display:none') + )) . '
' . ''; } diff --git a/horde/lib/Block/Weather.php b/horde/lib/Block/Weather.php index 5887e223603..6dcc6cd5a41 100644 --- a/horde/lib/Block/Weather.php +++ b/horde/lib/Block/Weather.php @@ -126,7 +126,7 @@ protected function _content() $html = '
'; + . Horde_Themes_Image::tag('loading.gif') . ''; $location = $this->_params['location']; } @@ -172,10 +172,10 @@ protected function _content() // Sunrise/sunset. if ($station->sunrise) { $html .= '' . _("Sunrise") . ': ' - . Horde::img('block/sunrise/sunrise.png', _("Sunrise")) + . Horde_Themes_Image::tag('block/sunrise/sunrise.png', array('alt' => _("Sunrise"))) . sprintf("%s %s", $station->sunrise->strftime($GLOBALS['prefs']->getValue('date_format')), $station->sunrise->strftime($GLOBALS['prefs']->getValue('time_format'))); $html .= ' ' . _("Sunset") . ': ' - . Horde::img('block/sunrise/sunset.png', _("Sunset")) + . Horde_Themes_Image::tag('block/sunrise/sunset.png', array('alt' => _("Sunset"))) . sprintf("%s %s", $station->sunset->strftime($GLOBALS['prefs']->getValue('date_format')), $station->sunset->strftime($GLOBALS['prefs']->getValue('time_format'))); $html .= '
'; } @@ -236,7 +236,7 @@ protected function _content() // Current condition. $condition = $current->condition; $html .= '
' . _("Current condition") . ': ' - . Horde::img(Horde_Themes::img('weather/32x32/' . $current->icon)) + . Horde_Themes_Image::tag('weather/32x32/' . $current->icon) . ' ' . $condition . ''; @@ -307,7 +307,7 @@ protected function _content() // Condition. $html .= '' - . Horde::img(Horde_Themes::img('weather/32x32/' . $day->icon)) + . Horde_Themes_Image::tag('weather/32x32/' . $day->icon) . '
' . $condition . ''; if (isset($this->_params['detailedForecast'])) { @@ -349,7 +349,7 @@ protected function _content() . Horde::link( Horde::externalUrl($weather->link), $weather->title, '', '_blank', '', $weather->title) - . Horde::img(new Horde_Themes_Image($weather->logo)) + . Horde_Themes_Image::tag($weather->logo) . ''; } else { $html .= '
' diff --git a/horde/services/obrowser/index.php b/horde/services/obrowser/index.php index 6d03f986dd9..a4dab14f3cc 100644 --- a/horde/services/obrowser/index.php +++ b/horde/services/obrowser/index.php @@ -42,11 +42,13 @@ // Set the icon. if (!empty($values['icon'])) { - $row['icon'] = Horde::img($values['icon'], $values['name'], '', ''); + $row['icon'] = Horde_Themes_Image::tag($values['icon'], array( + 'alt' => $values['name'] + )); } elseif (!empty($values['browseable'])) { - $row['icon'] = Horde::img('tree/folder.png'); + $row['icon'] = Horde_Themes_Image::tag('tree/folder.png'); } else { - $row['icon'] = Horde::img('tree/leaf.png'); + $row['icon'] = Horde_Themes_Image::tag('tree/leaf.png'); } // Set the name/link. diff --git a/horde/services/portal/cloud_search.php b/horde/services/portal/cloud_search.php index c17f146e00c..dc96abcf20f 100644 --- a/horde/services/portal/cloud_search.php +++ b/horde/services/portal/cloud_search.php @@ -41,7 +41,7 @@ foreach ($results as $result) { echo '
  • ' . - (empty($result['icon']) ? Horde::img(Horde_Themes::img($result['app'] . '.png', $result['app'])) : '') . + (empty($result['icon']) ? Horde_Themes_Image::tag($result['app'] . '.png', array('alt' => $result['app'])) : '') . Horde::link($result['view_url'], '', '', '', '', '', '', array('style' => 'margin:4px')) . (empty($result['icon']) ? $result['title'] : '') . '' . $result['desc'] . '
  • '; diff --git a/horde/templates/admin/groups/add.inc b/horde/templates/admin/groups/add.inc index ccf6ddb9b63..953bb899b60 100644 --- a/horde/templates/admin/groups/add.inc +++ b/horde/templates/admin/groups/add.inc @@ -3,7 +3,7 @@

    -   +  

    diff --git a/horde/templates/admin/groups/delete.inc b/horde/templates/admin/groups/delete.inc index 1a5a66d5867..8fe49f3e666 100644 --- a/horde/templates/admin/groups/delete.inc +++ b/horde/templates/admin/groups/delete.inc @@ -4,7 +4,7 @@

    -   +  

    diff --git a/horde/templates/admin/groups/edit.inc b/horde/templates/admin/groups/edit.inc index c169d98ae1f..e8160f1ba8b 100644 --- a/horde/templates/admin/groups/edit.inc +++ b/horde/templates/admin/groups/edit.inc @@ -4,7 +4,7 @@

    - +

    readOnly()): ?> @@ -15,7 +15,7 @@

    - +

    @@ -39,7 +39,7 @@

    - +

      @@ -52,7 +52,7 @@ readOnly()): ?>

      - +

      hasCapability('list')): ?> diff --git a/horde/templates/admin/user/list.inc b/horde/templates/admin/user/list.inc index c3ebe7977b2..baf4a3f4345 100644 --- a/horde/templates/admin/user/list.inc +++ b/horde/templates/admin/user/list.inc @@ -29,10 +29,10 @@ foreach ($users as $user): ?>

    - + - - + + diff --git a/horde/templates/shares/edit.inc b/horde/templates/shares/edit.inc index 5a25cd51616..0132b7be58c 100644 --- a/horde/templates/shares/edit.inc +++ b/horde/templates/shares/edit.inc @@ -10,9 +10,9 @@ @@ -31,7 +31,7 @@ $operm = isset($userperms[$owner]) ?> @@ -59,7 +59,7 @@ $operm = isset($userperms[$owner]) @@ -130,7 +130,7 @@ $operm = isset($userperms[$owner]) @@ -165,7 +165,7 @@ $operm = isset($userperms[$owner]) @@ -267,7 +267,7 @@ foreach ($userList as $user) { diff --git a/horde/util/icon_browser.php b/horde/util/icon_browser.php index dba3e24c061..5e641886060 100644 --- a/horde/util/icon_browser.php +++ b/horde/util/icon_browser.php @@ -42,10 +42,14 @@ if (count($imgs)) { foreach ($imgs as $png) { - echo Horde::img(Horde_Themes::img(str_replace($img_fs . DIRECTORY_SEPARATOR, '', $png), $app), $png, array( - 'hspace' => 10, - 'title' => htmlspecialchars($png), - 'vspace' => 10 + echo Horde_Themes::img(str_replace($img_fs . DIRECTORY_SEPARATOR, '', $png), array( + 'alt' => $png, + 'app' => $app, + 'attr' => array( + 'hspace' => 10, + 'title' => $png, + 'vspace' => 10 + ) )); } } else { diff --git a/ingo/lib/Basic/Filters.php b/ingo/lib/Basic/Filters.php index 8b51413554e..e4210d8a7d4 100644 --- a/ingo/lib/Basic/Filters.php +++ b/ingo/lib/Basic/Filters.php @@ -201,31 +201,31 @@ protected function _init() switch ($filter['action']) { case Ingo_Storage::ACTION_BLACKLIST: $editurl = Ingo_Basic_Blacklist::url(); - $entry['filterimg'] = Horde::img('blacklist.png'); + $entry['filterimg'] = Horde_Themes_Image::tag('blacklist.png'); $name = _("Blacklist"); break; case Ingo_Storage::ACTION_WHITELIST: $editurl = Ingo_Basic_Whitelist::url(); - $entry['filterimg'] = Horde::img('whitelist.png'); + $entry['filterimg'] = Horde_Themes_Image::tag('whitelist.png'); $name = _("Whitelist"); break; case Ingo_Storage::ACTION_VACATION: $editurl = Ingo_Basic_Vacation::url(); - $entry['filterimg'] = Horde::img('vacation.png'); + $entry['filterimg'] = Horde_Themes_Image::tag('vacation.png'); $name = _("Vacation"); break; case Ingo_Storage::ACTION_FORWARD: $editurl = Ingo_Basic_Forward::url(); - $entry['filterimg'] = Horde::img('forward.png'); + $entry['filterimg'] = Horde_Themes_Image::tag('forward.png'); $name = _("Forward"); break; case Ingo_Storage::ACTION_SPAM: $editurl = Ingo_Basic_Spam::url(); - $entry['filterimg'] = Horde::img('spam.png'); + $entry['filterimg'] = Horde_Themes_Image::tag('spam.png'); $name = _("Spam Filter"); break; @@ -255,7 +255,9 @@ protected function _init() /* 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)); + $entry['delimg'] = Horde_Themes_Image::tag('delete.png', array( + 'alt' => sprintf(_("Delete %s"), $name) + )); } else { $entry['dellink'] = false; } @@ -265,7 +267,9 @@ protected function _init() (($perms->hasAppPermission('max_rules') === true) || $perms->hasAppPermission('max_rules') > count($filter_list))) { $entry['copylink'] = Horde::link($copyurl, sprintf(_("Copy %s"), $name)); - $entry['copyimg'] = Horde::img('copy.png', sprintf(_("Copy %s"), $name)); + $entry['copyimg'] = Horde_Themes_Image::tag('copy.png', array( + 'alt' => sprintf(_("Copy %s"), $name) + )); } else { $entry['copylink'] = false; } @@ -283,19 +287,21 @@ protected function _init() if (empty($filter['disable'])) { if ($edit_allowed) { $entry['disablelink'] = Horde::link($url->copy()->add('actionID', 'rule_disable'), sprintf(_("Disable %s"), $name)) . - Horde::img('enable.png', sprintf(_("Disable %s"), $name)) . - ''; + Horde_Themes_Image::tag('enable.png', array( + 'alt' => sprintf(_("Disable %s"), $name) + )) . ''; } else { - $entry['disablelink'] = Horde::img('enable.png'); + $entry['disablelink'] = Horde_Themes_Image::tag('enable.png'); } $entry['enablelink'] = false; } else { if ($edit_allowed) { $entry['enablelink'] = Horde::link($url->copy()->add('actionID', 'rule_enable'), sprintf(_("Enable %s"), $name)) . - Horde::img('disable.png', sprintf(_("Enable %s"), $name)) . - ''; + Horde_Themes_Image::tag('disable.png', array( + 'alt' => sprintf(_("Enable %s"), $name) + )) . ''; } else { - $entry['enablelink'] = Horde::img('disable.png'); + $entry['enablelink'] = Horde_Themes_Image::tag('disable.png'); } $entry['disablelink'] = false; } diff --git a/ingo/lib/Basic/Rule.php b/ingo/lib/Basic/Rule.php index b4141ac7061..a3831a23466 100644 --- a/ingo/lib/Basic/Rule.php +++ b/ingo/lib/Basic/Rule.php @@ -221,6 +221,7 @@ protected function _init() 'templatePath' => INGO_TEMPLATES . '/basic/rule' )); $view->addHelper('Horde_Core_View_Helper_Help'); + $view->addHelper('Horde_Core_View_Helper_Image'); $view->addHelper('Horde_Core_View_Helper_Label'); $view->addHelper('FormTag'); $view->addHelper('Tag'); diff --git a/ingo/lib/Smartmobile.php b/ingo/lib/Smartmobile.php index 4b4b76e867a..c97c122a373 100644 --- a/ingo/lib/Smartmobile.php +++ b/ingo/lib/Smartmobile.php @@ -116,7 +116,7 @@ protected function _initPages() $url->setAnchor('rule'); $this->view->list[] = array( - 'img' => is_null($img) ? null : Horde::img($img, '', array('class' => 'ui-li-icon')), + 'img' => is_null($img) ? null : Horde_Themes_Image::tag($img, array('attr' => array('class' => 'ui-li-icon'))), 'name' => $name, 'url' => $url ); diff --git a/ingo/templates/basic/rule/rule.html.php b/ingo/templates/basic/rule/rule.html.php index a21e28bc3fd..3fc4771927a 100644 --- a/ingo/templates/basic/rule/rule.html.php +++ b/ingo/templates/basic/rule/rule.html.php @@ -113,7 +113,7 @@ diff --git a/turba/contact.php b/turba/contact.php index 5cc8f5a29a8..f4cf11c7617 100644 --- a/turba/contact.php +++ b/turba/contact.php @@ -98,8 +98,10 @@ @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"))); + $own_icon = ' ' . Horde_Themes_Image::img('user.png', array( + 'alt' => _("Your own contact"), + 'attr' => array('title' => _("Your own contact")) + )); $own_link = ''; } else { $own_icon = ''; diff --git a/turba/lib/Ajax/Application/Handler/Minisearch.php b/turba/lib/Ajax/Application/Handler/Minisearch.php index 2fff345bdbb..facd1dfc6ff 100644 --- a/turba/lib/Ajax/Application/Handler/Minisearch.php +++ b/turba/lib/Ajax/Application/Handler/Minisearch.php @@ -60,7 +60,7 @@ public function minisearch() $results[] = '
  • ' . Horde::link(Horde::url($ob->url()), _("View Contact"), '', '_parent') . - Horde::img('contact.png', _("View Contact")) . ' ' . + Horde_Themes_Image::tag('contact.png', array('alt' => _("View Contact"))) . ' ' . (!empty($v) ? '' : '') . $link . (!empty($v) ? '' : '') . '
  • '; diff --git a/turba/lib/Object.php b/turba/lib/Object.php index 0df189078d0..e3e33c6bf27 100644 --- a/turba/lib/Object.php +++ b/turba/lib/Object.php @@ -455,7 +455,7 @@ public function vfsDisplayUrl($file) 'source' => $this->driver->getName(), 'key' => $this->getValue('__key') ); - $dl = Horde::link($registry->downloadUrl($file['name'], $url_params), $file['name']) . Horde::img('download.png', _("Download")) . ''; + $dl = Horde::link($registry->downloadUrl($file['name'], $url_params), $file['name']) . Horde_Themes_Image::tag('download.png', array('alt' => _("Download"))) . ''; // Let's see if we can view this one, too. if ($viewer && !($viewer instanceof Horde_Mime_Viewer_Default)) { diff --git a/turba/lib/Ui/VarRenderer/Turba.php b/turba/lib/Ui/VarRenderer/Turba.php index 37f3cd08905..1637c312c2d 100644 --- a/turba/lib/Ui/VarRenderer/Turba.php +++ b/turba/lib/Ui/VarRenderer/Turba.php @@ -30,7 +30,7 @@ protected function _renderVarInput_TurbaTags($form, $var, $vars) $html = sprintf('', $varname, $varname, $value); $html .= sprintf('', $varname, - Horde::img('loading.gif', _("Loading..."))); + Horde_Themes_Image::tag('loading.gif', array('alt' => _("Loading...")))); $GLOBALS['injector']->getInstance('Horde_Core_Factory_Imple')->create('Turba_Ajax_Imple_TagAutoCompleter', array('id' => $varname)); return $html; diff --git a/turba/lib/View/List.php b/turba/lib/View/List.php index 99810dd528b..77650e9e40b 100644 --- a/turba/lib/View/List.php +++ b/turba/lib/View/List.php @@ -333,10 +333,14 @@ public function getColumnSortImage($i, $title = null) } $sortdir = $this->getColumnSortDirection($i); if ($this->isPrimarySortColumn($i)) { - return Horde::img($sortdir ? 'za.png' : 'az.png', $title); - } else { - return Horde::img($sortdir ? 'za_secondary.png' : 'az_secondary.png', _("Sort Direction")); + return Horde_Themes_Image::tag($sortdir ? 'za.png' : 'az.png', array( + 'alt' => $title + )); } + + return Horde_Themes_Image::tag($sortdir ? 'za_secondary.png' : 'az_secondary.png', array( + 'alt' => _("Sort Direction") + )); } /** diff --git a/turba/templates/browse/row.inc b/turba/templates/browse/row.inc index a52acf48a44..8bd9298e8c1 100644 --- a/turba/templates/browse/row.inc +++ b/turba/templates/browse/row.inc @@ -11,8 +11,10 @@ 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"))); + $own_icon = Horde_Themes_Image::tag('user.png', array( + 'alt' => _("Your own contact"), + 'attr' => array('title' => _("Your own contact")) + )); } else { $own_icon = ' '; }
    add('form', 'remove_f'), _("Delete")) . Horde::img('delete.png', _("Delete")) ?>add('form', 'remove_f'), _("Delete")) . Horde_Themes_Image::tag('delete.png', array('alt' => _("Delete"))) ?> add('form', 'update_f'), _("Update")) . Horde::img('edit.png', _("Update")) ?>add('form', 'clear_f'), _("Clear user data")) . Horde::img('reload.png', _("Clear user data")) ?>add('form', 'update_f'), _("Update")) . Horde_Themes_Image::tag('edit.png', array('alt' => _("Update"))) ?>add('form', 'clear_f'), _("Clear user data")) . Horde_Themes_Image::tag('reload.png', array('alt' => _("Clear user data"))) ?>
    - + _("Close Window"))) ?> - get('name'))); if (!empty($help)) echo ' ' . Horde_Help::link($app, $help) ?> + get('name'))); if (!empty($help)) echo ' ' . Horde_Help::link($app, $help) ?>
     
    - +
    - +
    - +
    - +
    - + - + hordeImage('delete.png', _("Delete Condition")) ?>