Changeset 6106


Ignore:
Timestamp:
05/07/10 22:21:09 (9 years ago)
Author:
grum
Message:

Update plugin with some new functions

Location:
extensions/GrumPluginClasses
Files:
43 added
6 edited

Legend:

Unmodified
Added
Removed
  • extensions/GrumPluginClasses/admin/plugin_admin.php

    r5550 r6106  
    1515if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); } 
    1616 
    17 include(GPC_PATH."gpc_aip.class.inc.php"); 
    1817 
    1918global $prefixeTable; 
     
    2120load_language('plugin.lang', GPC_PATH); 
    2221 
    23 $main_plugin_object = get_plugin_data($plugin_id); 
    2422 
    25 $plugin_ai = new GPC_AIP($prefixeTable, $main_plugin_object->getFileLocation()); 
    26 $plugin_ai->manage(); 
     23if(isset($_REQUEST['searchRequest'])) 
     24{ 
     25  load_language('requestBuilder.lang', GPC_PATH); 
     26  // if set, this is probably an ajax search request 
     27  include_once(GPC_PATH."classes/GPCRequestBuilder.class.inc.php"); 
     28  GPCRequestBuilder::init($prefixeTable, 'gpc'); 
     29  GPCRequestBuilder::executeRequest(); 
     30} 
     31else 
     32{ 
     33  include(GPC_PATH."gpc_aip.class.inc.php"); 
     34 
     35  $main_plugin_object = get_plugin_data($plugin_id); 
     36 
     37  $plugin_ai = new GPC_AIP($prefixeTable, $main_plugin_object->getFileLocation()); 
     38  $plugin_ai->manage(); 
     39} 
     40 
     41 
    2742 
    2843?> 
  • extensions/GrumPluginClasses/classes/GPCCore.class.inc.php

    r5958 r6106  
    5454        Array('name' => "GPCPagesNavigations", 'version' => "2.0.0"), 
    5555        Array('name' => "GPCPublicIntegration", 'version' => "2.0.0"), 
     56        Array('name' => "GPCRequestBuilder", 'version' => "1.0.0"), 
    5657        Array('name' => "GPCTables", 'version' => "1.5.0"), 
    5758        Array('name' => "GPCTabSheet", 'version' => "1.0.0"), 
  • extensions/GrumPluginClasses/classes/GPCTables.class.inc.php

    r5550 r6106  
    4141{ 
    4242  public $tables;    //array of tables names 
    43   public $version = "1.4"; 
     43  public $version = "1.5"; 
    4444 
    4545  public function __construct($tables) 
  • extensions/GrumPluginClasses/language/fr_FR/plugin.lang.php

    r5550 r6106  
    99$lang['Installed'] = 'Installé le'; 
    1010$lang['Infos'] = 'Informations'; 
    11  
     11$lang['Some plugins are dependent on Grum Plugin Classes: before uninstall, you must first uninstall the plugins dependent'] = 'Certains plugins sont dépendants de Grum Plugin Classes : avant le désinstaller, il faut au préalable désinstaller les plugins dépendants'; 
    1212?> 
  • extensions/GrumPluginClasses/main.inc.php

    r5958 r6106  
    9292global $prefixeTable; 
    9393 
    94 //GPC admin interface is loaded and active only if in admin page 
    95 if(basename($_SERVER["PHP_SELF"])=='admin.php') 
     94if(defined('IN_ADMIN')) 
    9695{ 
     96  //GPC admin interface is loaded and active only if in admin page 
    9797  include_once("gpc_aim.class.inc.php"); 
    9898 
  • extensions/GrumPluginClasses/maintain.inc.php

    r5550 r6106  
    77 
    88include_once('gpc_version.inc.php'); // => Don't forget to update this file !! 
     9include_once('gpc_install.class.inc.php'); // => Don't forget to update this file !! 
    910 
    1011 
     
    1213function plugin_install($plugin_id, $plugin_version, &$errors) 
    1314{ 
     15  global $prefixeTable; 
     16 
     17  $obj = new GPC_Install($prefixeTable, __FILE__); 
     18  $result=$obj->install(); 
     19  if(!$result) 
     20  { 
     21    array_push($errors, "error"); 
     22  } 
     23  unset($obj); 
    1424} 
    1525 
     
    2434function plugin_uninstall($plugin_id) 
    2535{ 
     36  global $prefixeTable; 
     37 
     38  $obj = new GPC_Install($prefixeTable, __FILE__); 
     39  $result=$obj->uninstall(); 
     40  /* 
     41   * piwigo don't alllow to manage errors during the uninstall process... 
     42  if(!$result or is_string($result)) 
     43  { 
     44    array_push($errors, l10n($result)); 
     45  } 
     46  */ 
     47  unset($obj); 
    2648} 
    2749 
Note: See TracChangeset for help on using the changeset viewer.