Changeset 5548 for extensions/lmt/maintain.inc.php
- Timestamp:
- Apr 1, 2010, 9:05:29 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/lmt/maintain.inc.php
r5431 r5548 20 20 //ini_set('display_errors', true); 21 21 22 global $gpc_installed, $ lang; //needed for plugin manager compatibility22 global $gpc_installed, $gpcNeeded, $lang; //needed for plugin manager compatibility 23 23 24 24 /* ----------------------------------------------------------------------------- … … 26 26 ----------------------------------------------------------------------------- */ 27 27 $gpc_installed=false; 28 if(file_exists(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/common_plugin.class.inc.php')) 28 $gpcNeeded="3.0.0"; 29 if(file_exists(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/CommonPlugin.class.inc.php')) 29 30 { 30 @include_once(PHPWG_PLUGINS_PATH.' grum_plugins_classes-2/main.inc.php');31 // need GPC release greater or equal than 2.0.532 if( checkGPCRelease(2,0,5))31 @include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/CommonPlugin.class.inc.php'); 32 // need GPC release greater or equal than 3.0.0 33 if(CommonPlugin::checkGPCRelease(3,0,0)) 33 34 { 34 35 @include_once('lmt_install.class.inc.php'); … … 39 40 function gpcMsgError(&$errors) 40 41 { 41 array_push($errors, sprintf(l10n('lmt_gpc2_not_installed'), "2.0.5")); 42 global $gpcNeeded; 43 $msg=sprintf(l10n('To install this plugin, you need to install Grum Plugin Classes %s before'), $gpcNeeded); 44 if(is_array($errors)) 45 { 46 array_push($errors, $msg); 47 } 48 else 49 { 50 $errors=Array($msg); 51 } 42 52 } 43 53 // ----------------------------------------------------------------------------- … … 51 61 function plugin_install($plugin_id, $plugin_version, &$errors) 52 62 { 53 global $prefixeTable, $gpc_installed ;63 global $prefixeTable, $gpc_installed, $gpcNeeded; 54 64 55 65 if($gpc_installed) … … 61 71 array_push($errors, "error"); 62 72 } 73 GPCCore::register($obj->getPluginName(), LMT_VERSION, $gpcNeeded); 63 74 } 64 75 else … … 109 120 $obj = new LMT_Install($prefixeTable, __FILE__); 110 121 $obj->uninstall(); 122 GPCCore::unregister($obj->getPluginName()); 111 123 } 112 124 else
Note: See TracChangeset
for help on using the changeset viewer.