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

feature:2634- compatibility with Piwigo 2.4
+add some objects on js framework

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/GrumPluginClasses/gpc_ajax.php

    r12215 r16012  
    2323 *  - public.rbuilder.searchExecute
    2424 *  - public.rbuilder.searchGetPage
    25  *  - public.tagSelector.get
    26  *  - admin.tagSelector.get
     25 *  - public.inputTag.get
     26 *  - admin.inputTag.get
    2727 *  - public.contact.sendMsg
    2828 *
     
    3232
    3333  define('PHPWG_ROOT_PATH',dirname(dirname(dirname(__FILE__))).'/');
    34 
     34  if(!defined('AJAX_CALL')) define('AJAX_CALL', true);
    3535
    3636  /*
     
    3838   */
    3939  if(!isset($_REQUEST['ajaxfct'])) $_REQUEST['ajaxfct']='';
    40   if(preg_match('/^admin\./i', $_REQUEST['ajaxfct']))
    41   {
    42     define('IN_ADMIN', true);
    43   }
     40  if(preg_match('/^admin\./i', $_REQUEST['ajaxfct'])) define('IN_ADMIN', true);
    4441
    4542  // the common.inc.php file loads all the main.inc.php plugins files
    4643  include_once(PHPWG_ROOT_PATH.'include/common.inc.php' );
    4744  include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php' );
     45  include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCAjax.class.inc.php');
    4846  include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/CommonPlugin.class.inc.php');
    49   include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCAjax.class.inc.php');
    5047
    5148  global $page;
     
    7774      $tableList=array('result_cache');
    7875      $this->setTablesList($tableList);
    79 
    8076      $this->loadConfig();
    8177      $this->checkRequest();
     
    10096           $_REQUEST['ajaxfct']=='admin.categorySelector.getList' or
    10197           $_REQUEST['ajaxfct']=='public.categorySelector.getList' or
    102            $_REQUEST['ajaxfct']=='public.tagSelector.get' or
    103            $_REQUEST['ajaxfct']=='admin.tagSelector.get' or
     98           $_REQUEST['ajaxfct']=='public.inputTag.get' or
     99           $_REQUEST['ajaxfct']=='admin.inputTag.get' or
    104100           $_REQUEST['ajaxfct']=='public.contact.sendMsg'
    105101          )
     
    149145
    150146        /*
    151          * check admin.tagSelector.get values
     147         * check admin.inputTag.get values
    152148         */
    153         if($_REQUEST['ajaxfct']=="admin.tagSelector.get" or
    154            $_REQUEST['ajaxfct']=="public.tagSelector.get")
     149        if($_REQUEST['ajaxfct']=="admin.inputTag.get" or
     150           $_REQUEST['ajaxfct']=="public.inputTag.get")
    155151        {
    156152          if(!isset($_REQUEST['letters'])) $_REQUEST['ajaxfct']="";
     
    236232          $result=$this->ajax_gpc_public_CategorySelectorGetList($_REQUEST['filter'], $_REQUEST['galleryRoot'], $_REQUEST['tree']);
    237233          break;
    238         case 'admin.tagSelector.get':
    239           $result=$this->ajax_gpc_both_TagSelectorGet('admin', $_REQUEST['letters'], $_REQUEST['filter'], $_REQUEST['maxTags'], $_REQUEST['ignoreCase']);
    240           break;
    241         case 'public.tagSelector.get':
    242           $result=$this->ajax_gpc_both_TagSelectorGet('public', $_REQUEST['letters'], $_REQUEST['filter'], $_REQUEST['maxTags'], $_REQUEST['ignoreCase']);
     234        case 'admin.inputTag.get':
     235          $result=$this->ajax_gpc_both_InputTagGet('admin', $_REQUEST['letters'], $_REQUEST['filter'], $_REQUEST['maxTags'], $_REQUEST['ignoreCase']);
     236          break;
     237        case 'public.inputTag.get':
     238          $result=$this->ajax_gpc_both_InputTagGet('public', $_REQUEST['letters'], $_REQUEST['filter'], $_REQUEST['maxTags'], $_REQUEST['ignoreCase']);
    243239          break;
    244240        case 'public.contact.sendMsg':
     
    408404     * @return String : json string
    409405     */
    410     private function ajax_gpc_both_TagSelectorGet($mode, $letters, $filter, $maxTags, $ignoreCase)
     406    private function ajax_gpc_both_InputTagGet($mode, $letters, $filter, $maxTags, $ignoreCase)
    411407    {
    412408      global $user;
     
    482478
    483479      return(json_encode($returned));
    484     } //ajax_gpc_both_TagSelectorGet
     480    } //ajax_gpc_both_InputTagGet
    485481
    486482
Note: See TracChangeset for help on using the changeset viewer.