Ignore:
Timestamp:
Jun 24, 2012, 9:19:27 PM (12 years ago)
Author:
grum
Message:

feature:2641- compatibility with Piwigo 2.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/lmt/lmt_ajax.php

    r15341 r16014  
    2525 */
    2626if(!isset($_REQUEST['ajaxfct'])) $_REQUEST['ajaxfct']='';
    27 if(preg_match('/^admin\./i', $_REQUEST['ajaxfct']))
    28 {
    29   define('IN_ADMIN', true);
    30 }
     27if(preg_match('/^admin\./i', $_REQUEST['ajaxfct'])) define('IN_ADMIN', true);
     28if(!defined('AJAX_CALL')) define('AJAX_CALL', true);
    3129
    3230// the common.inc.php file loads all the main.inc.php plugins files
     
    6058    global $user;
    6159
    62     if(!isset($_REQUEST['ajaxfct'])) $_REQUEST['ajaxfct']='';
     60    GPCAjax::checkToken();
    6361    if(!isset($_REQUEST['errcode'])) $_REQUEST['errcode']='';
    6462
     
    198196          'file' => $row['file'],
    199197          'cat' => $tmpcat,
    200           'thumb' => str_replace(PHPWG_ROOT_PATH, './', DerivativeImage::thumb_url(array('id'=>$row['image_id'], 'path'=>$row['path'])))
     198          'thumb' => str_replace(PHPWG_ROOT_PATH, './', DerivativeImage::url(IMG_SQUARE, array('id'=>$row['image_id'], 'path'=>$row['path'])))
    201199        );
    202200      }
     
    290288          'file' => $row['file'],
    291289          'cat' => $tmpcat,
    292           'thumb' => str_replace(PHPWG_ROOT_PATH, './', DerivativeImage::thumb_url(array('id'=>$row['image_id'], 'path'=>$row['path'])))
     290          'thumb' => str_replace(PHPWG_ROOT_PATH, './', DerivativeImage::url(IMG_SQUARE, array('id'=>$row['image_id'], 'path'=>$row['path'])))
    293291        );
    294292      }
Note: See TracChangeset for help on using the changeset viewer.