Ignore:
Timestamp:
Mar 6, 2013, 2:40:39 PM (7 years ago)
Author:
plg
Message:

compatibility with Piwigo 2.5: replace functions mysql_* with pwg_db_* equivalent

bug fixed with option to link photo title on HD

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/lightbox/functions.inc.php

    r20207 r21240  
    4444    return htmlspecialchars('<a href="'.$url.'">'.$name.'</a>');
    4545  }
    46   elseif ($name_link == 'high' and $picture['has_high'] and $user['enabled_high']=='true')
     46  elseif ($name_link == 'high')
    4747  {
    48     include_once(PHPWG_ROOT_PATH . 'include/functions_picture.inc.php');
    49     return htmlspecialchars('<a href="javascript:phpWGOpenWindow(\''.get_high_url($picture).'\',\'\',\'scrollbars=yes,toolbar=no,status=no,resizable=yes\')">'.$name.'</a>');
     48    $src_image = new SrcImage($picture);
     49
     50    if ($src_image->is_original() and 'true' == $user['enabled_high'])
     51    {
     52      $name.= ' ('.l10n('Display').' '.l10n('Original').')';
     53      return htmlspecialchars('<a href="javascript:phpWGOpenWindow(\''.$src_image->get_url().'\',\'\',\'scrollbars=yes,toolbar=no,status=no,resizable=yes\')" rel="nofollow">'.$name.'</a>');
     54    }
    5055  }
    5156  return $name;
Note: See TracChangeset for help on using the changeset viewer.