Horde::link -> Horde_Url#link()
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sun, 8 Aug 2010 16:26:24 +0000 (12:26 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sun, 8 Aug 2010 16:26:24 +0000 (12:26 -0400)
20 files changed:
ansel/js/slideshow.js
ansel/lib/Block/recent_comments.php
ansel/lib/GalleryMode/Normal.php
ansel/lib/Storage.php
ansel/lib/View/GalleryRenderer/Gallery.php
ansel/lib/View/Image.php
ansel/lib/Widget/Actions.php
ansel/map_edit.php
ansel/templates/group/header.inc
ansel/templates/group/owner.inc
ansel/templates/image/crop_image.inc
ansel/templates/image/edit_image.inc
ansel/templates/image/resize_image.inc
ansel/templates/list/header.inc
ansel/templates/tile/image.inc
ansel/templates/view/gallery.inc
ansel/templates/view/gallerylightbox.inc
ansel/templates/view/image.inc
ansel/templates/view/results.inc
ansel/templates/view/slideshow.inc

index 7205709..be877bd 100644 (file)
@@ -147,9 +147,9 @@ Slide.prototype = {
         }
         if ($('image_delete_link')) {
             //TODO : Guess we should have PHP save the localized text for this...
-            var deleteAction = function() {return window.confirm("Do you want to permanently delete " +  SlideController.photos[SlideController.photoId][1])};
+            var deleteAction = function() { SlideController.pause(); if (!window.confirm("Do you want to permanently delete " +  SlideController.photos[SlideController.photoId][1])) { alert("blah"); return false; } return true;};
             $('image_delete_link').href = SlideController.baseUrl + '/image.php' + params + '&actionID=delete';
-            $('image_delete_link').observe('click', deleteAction);
+            $('image_delete_link').observe('click', function(e) { return deleteAction(); e.stop(); });
         }
         $('image_download_link').href = SlideController.baseUrl + '/img/download.php?image=' + SlideController.photos[SlideController.photoId][3];
         $('image_download_link').observe('click', function() {SlideController.pause();});
index 58d76db..74c15dc 100644 (file)
@@ -60,9 +60,7 @@ class Horde_Block_ansel_recent_comments extends Horde_Block
             try {
                 $gallery = $this->_getGallery();
             } catch (Horde_Exception $e) {
-                return Horde::link(
-                    Ansel::getUrlFor('view', array('view' => 'List'), true))
-                    . _("Gallery") . '</a>';
+                return Ansel::getUrlFor('view', array('view' => 'List'), true)->link() . _("Gallery") . '</a>';
             }
             // Build the gallery name.
             if (isset($this->_params['gallery'])) {
index 0f16194..df530a9 100644 (file)
@@ -216,7 +216,7 @@ class Ansel_GalleryMode_Normal extends Ansel_GalleryMode_Base
         } catch (VFS_Exception $e) {}
 
         /* Delete from storage */
-        $GLOBALS['injector']->getInstance('Ansel_Storage')->getScope()->deleteImage($image->id);
+        $GLOBALS['injector']->getInstance('Ansel_Storage')->getScope()->removeImage($image->id);
         if (!$isStack) {
             $this->_gallery->updateImageCount(1, false);
         }
index 90c472f..7a7e92d 100644 (file)
@@ -1125,7 +1125,7 @@ class Ansel_Storage
     public function removeImage($image_id)
     {
         $this->_db->exec('DELETE FROM ansel_images WHERE image_id = ' . (int)$image_id);
-        $this->_db->exec('DELETE FROM ansel_image_attributes WHERE image_id = ' . (int)$imageid);
+        $this->_db->exec('DELETE FROM ansel_image_attributes WHERE image_id = ' . (int)$image_id);
     }
 
     /**
index 6245234..be2ad59 100644 (file)
@@ -107,21 +107,21 @@ class Ansel_View_GalleryRenderer_Gallery extends Ansel_View_GalleryRenderer_Base
         $cellwidth = round(100 / $tilesperrow);
         $count = 0;
         $action_links = array();
+        $url = new Horde_Url('#');
         if ($GLOBALS['conf']['gallery']['downloadzip']) {
-            $action_links[] = Horde::link('#', '', 'widget', '', 'downloadSelected(); return false;') . _("Download selected images") . '</a>';
-
+            $action_links[] = $url->link(array('class' => 'widget', 'onclick.raw' => 'downloadSelected(); return false;')) . _("Download selected images") . '</a>';
         }
         if (!empty($option_edit)) {
-            $action_links[] = Horde::link('#', '', 'widget', '', 'editDates(); return false;') . _("Edit Dates") . '</a>';
+            $action_links[] = $url->link(array('class' => 'widget', 'onclick.raw' => 'editDates(); return false;')) . _("Edit Dates") . '</a>';
         }
         if (!empty($option_delete)) {
-            $action_links[] = Horde::link('#', '', 'widget', '', 'deleteSelected(); return false;') . _("Delete") . '</a>';
+            $action_links[] = $url->link(array('class' => 'widget', 'onclick.raw' => 'deleteSelected(); return false;')) . _("Delete") . '</a>';
         }
         if (!empty($option_move)) {
-            $action_links[] = Horde::link('#', '', 'widget', '', 'moveSelected(); return false;') . _("Move") . '</a>';
+            $action_links[] = $url->link(array('class' => 'widget', 'onclick.raw' =>'moveSelected(); return false;')) . _("Move") . '</a>';
         }
         if (!empty($option_copy)) {
-            $action_links[] = Horde::link('#', '', 'widget', '', 'copySelected(); return false;') . _("Copy") . '</a>';
+            $action_links[] = $url->link(array('class' => 'widget', 'onclick.raw' => 'copySelected(); return false;')) . _("Copy") . '</a>';
         }
         Horde::addScriptFile('popup.js', 'horde');
         include ANSEL_TEMPLATES . '/view/gallery.inc';
index da0fcc6..e965bc2 100644 (file)
@@ -147,7 +147,7 @@ class Ansel_View_Image extends Ansel_View_Base
             $this->_geometry = $this->resource->getDimensions('screen');
         } catch (Horde_Exception $e) {
             Horde::logMessage($e, 'ERR');
-            $this->_geometry = $conf['screen'];
+            $this->_geometry = $GLOBALS['conf']['screen'];
         }
 
         /* Get the image lists */
index e192185..7e80ae5 100644 (file)
@@ -2,6 +2,13 @@
 /**
  * Ansel_Widget_Actions:: class to wrap the display of gallery actions
  *
+ * Copyright 2008-2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @TODO: Use Horde_View for html template output.
+ * 
  * @author Michael J. Rubinsky <mrubinsk@horde.org>
  * @package Ansel
  */
@@ -34,14 +41,14 @@ class Ansel_Widget_Actions extends Ansel_Widget_Base
         if ($this->_view->gallery->hasFeature('upload')) {
             $uploadurl = Horde::applicationUrl('img/upload.php')->add(
                 array('gallery' => $id,
-                      'page' => !empty($this->_view->_params['page']) ? $this->_view->_params['page'] : 0)
-                );
+                      'page' => !empty($this->_view->_params['page']) ? $this->_view->_params['page'] : 0));
         }
 
         $html .= '<ul style="list-style-type:none;">';
         if (empty($this->_params['hide_slideshow']) &&
             $this->_view->gallery->hasFeature('slideshow') &&
             $this->_view->gallery->countImages()) {
+
             /* Slideshow link */
             if (!empty($this->_params['slideshow_link'])) {
                 $slideshow_url = str_replace(array('%i', '%g'),
@@ -58,6 +65,8 @@ class Ansel_Widget_Actions extends Ansel_Widget_Base
             }
             $html .= '<li>' . $slideshow_url->link(array('class' => 'widget')) . Horde::img('slideshow_play.png', _("Start Slideshow")) . ' ' . _("Start Slideshow") . '</a></li>';
         }
+        
+        /* Upload and new subgallery Urls */
         if (!empty($uploadurl) && $this->_view->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
             $html .= '<li>' . $uploadurl->link(array('class' => 'widget')) . Horde::img('image_add.png') . ' ' . _("Upload photos") . '</a></li>';
 
@@ -176,7 +185,8 @@ class Ansel_Widget_Actions extends Ansel_Widget_Base
 
         if ($GLOBALS['registry']->getAuth() &&
             $this->_view->gallery->get('owner') == $GLOBALS['registry']->getAuth()) {
-            $html .= '<li>' . Horde::link('#', '', 'popup widget', '', Horde::popupJs(Horde::applicationUrl('perms.php'), array('params' => array('cid' => $this->_view->gallery->id), 'urlencode' => true)) . 'return false;') . Horde::img('perms.png') . ' ' . _("Set permissions") . '</a></li>';
+             $url = new Horde_Url('#');
+             $html .= '<li>' . $url->link(array('class' => 'popup widget', 'onclick' => 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' &&
             $registry->isAuthenticated()) ||
index 74e6d6c..d722014 100644 (file)
@@ -82,7 +82,8 @@ if (count($imgs) > 0) {
             } else {
                 $title = _point2Deg($data['image_latitude'], true) . ' ' . _point2Deg($data['image_longitude']);
             }
-            $other_images .= Horde::link('#', $title, '', '', "mapEdit.setLocation('" . $data['image_latitude'] . "', '" . $data['image_longitude'] . "', '" . $data['image_location'] . "');return false") . '<img src="' . Ansel::getImageUrl($id, 'mini', true) . '" alt="[thumbnail]" /></a>';
+            $tempurl = new Horde_Url('#');
+            $other_images .= $tempurl->link(array('title' => $title, 'onclick' => "mapEdit.setLocation('" . $data['image_latitude'] . "', '" . $data['image_longitude'] . "', '" . $data['image_location'] . "');return false")) . '<img src="' . Ansel::getImageUrl($id, 'mini', true) . '" alt="[thumbnail]" /></a>';
         }
     }
     $other_images .= '</div>';
index 2ac45f1..9ac874c 100644 (file)
@@ -4,8 +4,7 @@
  </span>
 <?php
 printf(_("Galleries grouped by %s"), $groupby);
-echo ' ' . Horde::link(Ansel::getUrlFor('group', array())) .
-Horde::img('reload.png', _("Refresh List")) ?></a>
+echo ' ' . Ansel::getUrlFor('group', array())->link() . Horde::img('reload.png', _("Refresh List")) ?></a>
 </div>
 <div class="anselActions widget">
   <?php echo _("Group by:") . ' ' . implode(' | ', $groupby_links) ?>
index df2973b..1f63a04 100644 (file)
@@ -22,9 +22,9 @@ if ($group == $GLOBALS['registry']->getAuth()) {
     $owner_title = sprintf(_("%s's Galleries"), $group);
 }
 
-$link = Horde::link(Ansel::getUrlFor('view', array('groupby' => $groupby,
-                                                   'owner' => $group,
-                                                   'view' => 'List')));
+$link = Ansel::getUrlFor('view', array('groupby' => $groupby,
+                                       'owner' => $group,
+                                       'view' => 'List'))->link();
 
 $num_galleries = $GLOBALS['injector']->getInstance('Ansel_Storage')->getScope()->countGalleries($GLOBALS['registry']->getAuth(), Horde_Perms::SHOW,
                                                                                                 $group, null, false);
index 4055440..22d60b1 100644 (file)
@@ -107,7 +107,8 @@ if (Ansel::isAvailable('grayscale')) {
     echo $imageurl->copy()->add('actionID', 'previewgrayscale')->link() . Horde::img('image/grayscale.png') . ' ' . _("Grayscale") . '</a> ';
 }
 if (Ansel::isAvailable('text_watermark')) {
-    echo Horde::link('#', '', '', '_blank', Horde::popupJs($imageurl, array('params' => array('actionID' => 'setwatermark', 'share' => $gallery->getName()), 'width' => 450, 'height' => 250, 'urlencode' => true)) . 'return false;') . Horde::img('text.png') . ' ' . _("Watermark") . '</a> ';
+    $url = new Horde_Url('#');
+    echo $url->link(array('target' => '_blank', 'onclick.raw' => Horde::popupJs($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 $selfUrl->copy()->add('actionID','cropedit')->link() . Horde::img('image/crop.png') . _("Crop") . '</a>';
index f24b5de..5e56c0e 100644 (file)
@@ -23,7 +23,8 @@ if (Ansel::isAvailable('grayscale')) {
     echo $imageurl->copy()->add('actionID', 'previewgrayscale')->link() . 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> ';
+    $url = new Horde_Url('#');
+    echo $url->link(array('target' => '_blank', 'onclick.raw' => 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);
index 69f82ed..6b441c3 100644 (file)
@@ -54,7 +54,8 @@ if (Ansel::isAvailable('grayscale')) {
     echo $imageurl->copy()->add('actionID', 'previewgrayscale')->link() . 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> ';
+    $url = new Horde_Url('#');
+    echo $url->link(array('target' => '_blank', 'onclick.raw' => 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);
index c377a6d..6145a2a 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, $GLOBALS['registry']->getCharset()) . ' ' . Horde::link(Horde::applicationUrl($refresh_link), _("Refresh List")) . Horde::img('reload.png', _("Refresh List")) . '</a>' ?>
+ <?php echo @htmlspecialchars($list_title, ENT_COMPAT, $GLOBALS['registry']->getCharset()) . ' ' . Horde::applicationUrl($refresh_link)->link(array('title' => _("Refresh List"))) . Horde::img('reload.png', _("Refresh List")) . '</a>' ?>
 </div>
 <table width="100%" style="background:<?php echo $styleDef['background'] ?>;"><tr>
index 56dc065..d4d95fd 100644 (file)
@@ -1,14 +1,14 @@
-<?php echo '<div class="image-tile" id="imagetile_' . (int)$image->id . '">' . Horde::link($view_url, $image->filename, '', '', $imgOnClick, $title, '', $imgAttributes) . '<img src="' . $thumb_url  . '" alt="' . htmlspecialchars($image->filename) . '" /></a>'; ?>
+<?php echo '<div class="image-tile" id="imagetile_' . (int)$image->id . '">' . $view_url->link(array_merge(array('title' => $image->filename, 'onclick.raw' => $imgOnClick)), $imgAttributes) . '<img src="' . $thumb_url  . '" alt="' . htmlspecialchars($image->filename) . '" /></a>'; ?>
  <div style="valign: bottom;">
  <div class="image-tile-caption" id="<?php echo (int)$image->id . 'caption'?>"><?php echo $imageCaption ?></div>
 <?php if ($GLOBALS['registry']->getAuth() || $option_select): ?>
 <div><label><input type="checkbox" class="checkbox" name="image[<?php echo (int)$image->id ?>]" /> <?php echo _("Select for Action") ?></label></div>
 <?php endif; ?>
 <?php if ($view != 'Gallery'): ?>
-<div><?php echo _("From: ") . Horde::link($gallery_url) . $parent->get('name') ?></a></div>
+<div><?php echo _("From: ") . $gallery_url->link() . $parent->get('name') ?></a></div>
 <?php endif; ?>
 <?php if (($conf['comments']['allow'] == 'all' || ($conf['comments']['allow'] == 'authenticated' && $GLOBALS['registry']->getAuth())) && empty($params['hide_comments'])): ?>
- <div><?php echo Horde::link($img_view_url . '#messagediv', _("View or leave comments")) ?> <?php printf(ngettext("%d comment", "%d comments", $image->commentCount), $image->commentCount) ?></a></div>
+ <div><?php echo $img_view_url->copy()->setAnchor('messagediv')->link(array('title' => _("View or leave comments"))) . sprintf(ngettext("%d comment", "%d comments", $image->commentCount), $image->commentCount) ?></a></div>
 <?php endif;
 if ($option_select): ?>
  <div>
index 9d5f9c9..353183a 100644 (file)
@@ -128,10 +128,11 @@ function downloadSelected()
     <?php endif; ?>
     <?php if (!empty($option_select) && $this->numTiles): ?>
     <table class="anselActions" cellspacing="0" width="100%"><tr><td>
-    <?php echo '<span class="widget">' . _("Select:") . '</span> '
-              . Horde::link('#', '', 'widget', '', 'selectAll(); return false;')
+    <?php   $tempurl = new Horde_Url('#');
+            echo '<span class="widget">' . _("Select:") . '</span> '
+              . $tempurl->link(array('class' => 'widget', 'onclick' => 'selectAll(); return false;'))
               . _("All") . '</a> | '
-              . Horde::link('#', '', 'widget', '', 'selectNone(); return false;')
+              . $tempurl->link(array('class' => 'widget', 'onclick' => 'selectNone(); return false;'))
               . _("None") . '</a>'; ?>
     </td>
     <td align="right">
index e4dbf22..b3f05b2 100644 (file)
@@ -144,25 +144,26 @@ function downloadSelected()
     <?php endif; ?>
     <?php if (!empty($option_select) && $this->numTiles): ?>
         <table class="anselActions" cellspacing="0" width="100%"><tr><td>
-        <?php printf(_("Select: %s, %s"),
-                       Horde::link('#', _("Select All"), '', '', 'selectAll(); return false;') . _("All") . '</a>',
-                       Horde::link('#', _("Select None"), '', '', 'selectNone(); return false;') . _("None") . '</a>');?>
+        <?php   $tempurl = new Horde_Url('#');
+                printf(_("Select: %s, %s"),
+                       $tempurl->link(array('title' => _("Select All"), 'onclick' => 'selectAll(); return false;')) . _("All") . '</a>',
+                       $tempurl->link(array('title' => _("Select None"), 'onclick' => 'selectNone(); return false;')) . _("None") . '</a>');?>
        </td><td align="right">
         <?php if ($option_delete || $option_move || $option_copy) echo _("Actions: ") ?>
           <?php if ($GLOBALS['conf']['gallery']['downloadzip']): ?>
-            <?php echo Horde::link('#', '', 'widget', '', 'downloadSelected(); return false;') . _("Download selected photos")?></a> |
+            <?php echo $tempurl->link(array('class' => 'widget', 'onclick' => 'downloadSelected(); return false;')) . _("Download selected photos")?></a> |
           <?php endif; ?>
           <?php if ($option_edit): ?>
-           <?php echo Horde::link('#', _("Edit Dates"), 'widget', '', 'editDates(); return false;') . _("Edit Dates"); ?></a> |
+           <?php echo $tempurl->link(array('title' => _("Edit Dates"), 'class' => 'widget', 'onclick' => 'editDates(); return false;')) . _("Edit Dates"); ?></a> |
           <?php endif; ?>
           <?php if ($option_delete): ?>
-            <?php echo Horde::link('#', _("Delete"), 'widget', '', 'deleteSelected(); return false;') . _("Delete"); ?></a>
+            <?php echo $tempurl->link(array('title' => _("Delete"), 'class' => 'widget', 'onclick' => 'deleteSelected(); return false;')) . _("Delete"); ?></a>
           <?php endif; ?>
           <?php if ($option_move): ?>
-          | <?php echo Horde::link('#', _("Move"), 'widget', '', 'moveSelected(); return false;') . _("Move"); ?></a>
+          | <?php echo $tempurl->link(array('title' => _("Move"), 'class' => 'widget', 'onclick' => 'moveSelected(); return false;')) . _("Move"); ?></a>
           <?php endif; ?>
           <?php if ($option_copy): ?>
-     |      <?php echo Horde::link('#', _("Copy"), 'widget', '', 'copySelected(); return false;') . _("Copy"); ?></a>
+     |      <?php echo $tempurl->link(array('title' => _("Copy"), 'class' => 'widget', 'onclick' => 'copySelected(); return false;')) . _("Copy"); ?></a>
           <?php endif; ?>
           <select name="new_gallery"><option value="-1"><?php echo _("Selected photos to") ?></option><?php echo Ansel::selectGalleries(array('selected' => $this->galleryId, 'perm' => Horde_Perms::EDIT)) ?></select>
           </td></tr></table>
index 5e7a619..382708b 100644 (file)
@@ -52,21 +52,22 @@ function arrowHandler(e)
  <tr>
   <td valign="top" style="background-color:<?php echo $this->_style['background']; ?>;">
     <?php
+        $tempurl = new Horde_Url('#');
         $needSeperator = false;
         $actionHTML = '';
         if ($this->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT) && empty($this->_params['api'])) {
             $needSeperator = true;
-            $actionHTML .= Horde::link('#', '', '', '_blank', $this->_urls['prop_popup'] . 'return false;', '', '', array('id' => 'image_properties_link')) . _("Properties") . '</a>';
-            $actionHTML .= ' | ' . Horde::link($this->_urls['edit'], '', '', '', '', '', '', array('id' => 'image_edit_link')) . _("Edit") . '</a>';
+            $actionHTML .= $tempurl->link(array('target' => '_blank', 'onclick' => $this->_urls['prop_popup'] . 'return false;', 'id' => 'image_properties_link')) . _("Properties") . '</a>';
+            $actionHTML .= ' | ' . $this->_urls['edit']->link(array('id' => 'image_edit_link')) . _("Edit") . '</a>';
         }
         if ($this->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE) && empty($this->_params['api'])) {
-            $actionHTML .= ' | ' . Horde::link($this->_urls['delete'], '', '', '', 'return window.confirm(\'' . addslashes(sprintf(_("Do you want to permanently delete ''%s''?"), $this->resource->filename)) . '\');', '', '', array('id' => 'image_delete_link')) . _("Delete") . '</a>';
+            $actionHTML .= ' | ' . $this->_urls['delete']->link(array('onclick' => 'return window.confirm(\'' . addslashes(sprintf(_("Do you want to permanently delete ''%s''?"), $this->resource->filename)) . '\');', 'id' => 'image_delete_link')) . _("Delete") . '</a>';
         }
         if (!empty($conf['ecard']['enable']) && !empty($this->_urls['ecard'])) {
-            $actionHTML .= (empty($this->_params['api']) && $needSeperator ? ' | ' : '') . Horde::link($this->_urls['ecard'], '', '', '_blank', '', '', '', array('id' => 'image_ecard_link')) . _("Send an Ecard"); $needSeperator = true . '</a>';
+            $actionHTML .= (empty($this->_params['api']) && $needSeperator ? ' | ' : '') . $this->_urls['ecard']->link(array('target' => '_blank', 'id' => 'image_ecard_link')) . _("Send an Ecard"); $needSeperator = true . '</a>';
         }
         if ($this->gallery->canDownload()) {
-            $actionHTML .= (empty($this->_params['api']) && $needSeperator ? ' | ' : '') . Horde::link($this->_urls['download'], '', '', '', '', '', '', array('id' => 'image_download_link')) . _("Download Original Photo"); $needSeperator = true . '</a>';
+            $actionHTML .= (empty($this->_params['api']) && $needSeperator ? ' | ' : '') . $this->_urls['download']->link(array('id' => 'image_download_link')) . _("Download Original Photo"); $needSeperator = true . '</a>';
         }
         if (empty($this->_params['api']) &&
             (!$GLOBALS['registry']->getAuth() ||
@@ -76,7 +77,7 @@ function arrowHandler(e)
               $GLOBALS['registry']->isAuthenticated()) ||
              $conf['report_content']['allow'] == 'all')) {
 
-            $actionHTML .=  ($needSeperator ? ' | ' : '' ) . Horde::link($this->_urls['report']) . _("Report") . '</a>';
+            $actionHTML .=  ($needSeperator ? ' | ' : '' ) . $this->_urls['report']->link() . _("Report") . '</a>';
         }
         if (strlen($actionHTML)) {
             echo '<div class="control anselActions" style="text-align:center;">' . $actionHTML . '</div>';
index 0b2266b..e3e781f 100644 (file)
@@ -73,18 +73,19 @@ echo htmlspecialchars($this->getTitle(), ENT_COMPAT, $GLOBALS['registry']->getCh
 <table class="control" width="100%" cellspacing="0">
  <tr>
   <td>
-    <?php printf(_("Select: %s, %s"),
-                   Horde::link('#', _("Select All"), '', '', 'selectAll(); return false;') . _("All") . '</a>',
-                   Horde::link('#', _("Select None"), '', '', 'selectNone(); return false;') . _("None") . '</a>');?>
+    <?php   $tempurl = new Horde_Url('#');
+            printf(_("Select: %s, %s"),
+                   $tempurl->link(array('title' => _("Select All"), 'onclick' => 'selectAll(); return false;')) . _("All") . '</a>',
+                   $tempurl->link(array('title' => _("Select None"), 'onclick' => 'selectNone(); return false;')) . _("None") . '</a>');?>
   </td>
   <td class="rightAlign">
 <?php echo _("Actions: ") ?>
-    <?php echo Horde::link('#', _("Delete"), 'widget', '', 'deleteSelected(); return false;') . _("Delete"); ?></a>
+    <?php echo $tempurl->link(array('title' => _("Delete"), 'class' => 'widget', 'onclick' => 'deleteSelected(); return false;')) . _("Delete"); ?></a>
 <?php if ($option_move): ?>
- |  <?php echo Horde::link('#', _("Move"), 'widget', '', 'moveSelected(); return false;') . _("Move"); ?></a>
+ |  <?php echo $tempurl->link(array('title' => _("Move"), 'class' => 'widget', 'onclick' => 'moveSelected(); return false;')) . _("Move"); ?></a>
 <?php endif; ?>
 <?php if ($option_copy): ?>
- |  <?php echo Horde::link('#', _("Copy"), 'widget', '', 'copySelected(); return false;') . _("Copy"); ?></a>
+ |  <?php echo $tempurl->link(array('title' => _("Copy"), 'class' => 'widget', 'onclick' => 'copySelected(); return false;')) . _("Copy"); ?></a>
 <?php endif; ?>
     <select name="new_gallery"><option value="-1"><?php echo _("Selected photos to") ?></option><?php echo Ansel::selectGalleries(array('perms' => Horde_Perms::EDIT))?></select>
   </td>
index 81d9bc4..d6e2223 100644 (file)
@@ -14,19 +14,18 @@ function stopSlideShow()
  <tr class="control">
   <td>
     <?php if ($this->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)): ?>
-        <?php echo Horde::link('#', '', '', '_blank', 'SlideController.pause();' . $this->_urls['prop_popup'], '', '', array('id' => 'image_properties_link')) . _("Properties") ?></a>
-      | <?php echo Horde::link(Horde::applicationUrl($this->_urls['edit']), '', '', '', '', '', '', array('id' => 'image_edit_link')) . _("Edit") ?></a>
+        <?php $url = new Horde_Url('#'); echo $url->link(array('onclick.raw' => $this->_urls['prop_popup'] . ' SlideController.pause(); return false;','id' => 'image_properties_link')) . _("Properties") ?></a>
+      | <?php echo Horde::applicationUrl($this->_urls['edit'])->link(array('id' => 'image_edit_link')) . _("Edit") ?></a>
     <?php endif; ?>
     <?php if ($this->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)): ?>
-      | <?php echo Horde::link($this->_urls['delete'], '', '', '', 'return window.confirm(\'' . addslashes(sprintf(_("Do you want to permanently delete \"%s\"?"), $this->resource->filename)) . '\');', '', '', array('id' => 'image_delete_link')) . _("Delete") ?></a>
+      | <?php echo $this->_urls['delete']->link(array('id' => 'image_delete_link')) . _("Delete") ?></a>
     <?php endif; ?>
   </td>
   <td class="rightAlign">
-
-<?php if (!empty($conf['ecard']['enable'])): ?>
-    <?php echo Horde::link($this->_urls['ecard'], '', '', '_blank', 'SlideController.pause();' . Horde::popupJs($ecardurl, array('urlencode' => true)) . 'return false;', '', '', array('id' => 'image_ecard_link')) . _("Send an Ecard") ?></a> |
+<?php if (!empty($GLOBALS['conf']['ecard']['enable'])): ?>
+    <?php echo $this->_urls['ecard']->link(array('target' => '_blank', 'onclick' => 'SlideController.pause();' . Horde::popupJs($this->_urls['ecard'], array('urlencode' => true)) . 'return false;', 'id' => 'image_ecard_link')) . _("Send an Ecard") ?></a> |
 <?php endif; ?>
-    <?php echo Horde::link($this->_urls['download'], '', '', '', 'SlideController.pause();', '', '', array('id' => 'image_download_link')) . _("Download Original Photo") ?></a>
+    <?php echo $this->_urls['download']->link(array('onclick' => 'SlideController.pause();', 'id' => 'image_download_link')) . _("Download Original Photo") ?></a>
   </td>
  </tr>
 </table>