Ignore:
Timestamp:
May 21, 2011, 3:19:26 PM (13 years ago)
Author:
nikrou
Message:

Update to make plugin compatible with piwigo 2.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/akBookStyle/trunk/include/akContent.class.php

    r10863 r10975  
    33// | akBookStyle  - a plugin for Piwigo                                    |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
     5// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
    66// | Copyright(C) 2009      vdigital                                       |
    77// +-----------------------------------------------------------------------+
     
    8989    $template->assign('AK_THUMBNAILS_LOC', $this->plugin_config->ak_thumbnails_loc);
    9090    $template->assign('AK_PIC_SRC', get_image_url($images[$this->current_picture]));
    91 
    9291    $template->assign('AK_NEXT', $this->getNextPicture($this->current_picture, $images));
    9392    $template->assign('AK_PREVIOUS', $this->getPreviousPicture($this->current_picture, $images));
     
    103102
    104103    $selected_one = false;
    105     foreach ($tpl_vars as &$tpl_var) {
    106       list($thumbnail_width, $thumbnail_height) = getimagesize($tpl_var['TN_SRC']);
     104    foreach ($tpl_vars as $i => &$tpl_var) {
     105      list($thumbnail_width, $thumbnail_height) = getimagesize(get_thumbnail_path($images[$i]));
    107106      $thumbnail_x_center = $thumbnail_width/2;
    108107      $thumbnail_y_center = $thumbnail_height/2;
     
    164163  private function getPictureId($images) {
    165164    if ($GLOBALS['conf']['question_mark_in_urls']==false and
    166       isset($_SERVER["PATH_INFO"]) and !empty($_SERVER["PATH_INFO"]) ) {
    167       $rewritten = $_SERVER["PATH_INFO"];
     165      isset($_SERVER['PATH_INFO']) and !empty($_SERVER['PATH_INFO']) ) {
     166      $rewritten = $_SERVER['PATH_INFO'];
    168167      $rewritten = str_replace('//', '/', $rewritten);
    169168    } else {
Note: See TracChangeset for help on using the changeset viewer.