Changeset 21240


Ignore:
Timestamp:
03/06/13 14:40:39 (6 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

Location:
extensions/lightbox
Files:
3 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; 
  • extensions/lightbox/get_content.php

    r20207 r21240  
    3232  LIMIT 1'; 
    3333 
    34 $picture = mysql_fetch_assoc( pwg_query($query) ); 
     34$picture = pwg_db_fetch_assoc( pwg_query($query) ); 
    3535 
    3636if (empty($picture) or !$picture['is_gvideo']) 
  • extensions/lightbox/save_history.php

    r20207 r21240  
    1414} 
    1515 
    16 $image_id = mysql_real_escape_string($imgid[1]); 
     16$image_id = pwg_db_real_escape_string($imgid[1]); 
    1717 
    1818$query = 'UPDATE '.IMAGES_TABLE.' SET hit=hit+1 WHERE id = '.$image_id.';'; 
Note: See TracChangeset for help on using the changeset viewer.