Changeset 8962 for extensions/AMenuManager/maintain.inc.php
- Timestamp:
- Jan 28, 2011, 5:10:45 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/AMenuManager/maintain.inc.php
r5545 r8962 14 14 15 15 16 global $gpc _installed, $gpcNeeded, $lang; //needed for plugin manager compatibility16 global $gpcInstalled, $lang; //needed for plugin manager compatibility 17 17 18 18 /* ----------------------------------------------------------------------------- 19 19 AMM needs the Grum Plugin Classe 20 20 ----------------------------------------------------------------------------- */ 21 $gpc_installed=false; 22 $gpcNeeded="3.0.0"; 21 $gpcInstalled=false; 23 22 if(file_exists(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/CommonPlugin.class.inc.php')) 24 23 { 25 24 @include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/CommonPlugin.class.inc.php'); 26 // need GPC release greater or equal than 3. 0.027 if(CommonPlugin::checkGPCRelease(3, 0,0))25 // need GPC release greater or equal than 3.3.3 26 if(CommonPlugin::checkGPCRelease(3,3,3)) 28 27 { 29 28 @include_once("amm_install.class.inc.php"); 30 $gpc _installed=true;29 $gpcInstalled=true; 31 30 } 32 31 } … … 34 33 function gpcMsgError(&$errors) 35 34 { 36 global $gpcNeeded; 37 $msg=sprintf(l10n('To install this plugin, you need to install Grum Plugin Classes %s before'), $gpcNeeded); 35 $msg=sprintf(l10n('To install this plugin, you need to install Grum Plugin Classes %s before'), AMM_GPC_NEEDED); 38 36 if(is_array($errors)) 39 37 { … … 51 49 load_language('plugin.lang', AMM_PATH); 52 50 51 52 53 53 function plugin_install($plugin_id, $plugin_version, &$errors) 54 54 { 55 global $prefixeTable, $gpc _installed, $gpcNeeded;56 if($gpc _installed)55 global $prefixeTable, $gpcInstalled; 56 if($gpcInstalled) 57 57 { 58 //$menu->register('mbAMM_links', 'Links', 0, 'AMM');59 //$menu->register('mbAMM_randompict', 'Random pictures', 0, 'AMM');60 58 $amm=new AMM_install($prefixeTable, __FILE__); 61 59 $result=$amm->install(); 62 GPCCore::register($amm->getPluginName(), AMM_VERSION, $gpcNeeded);63 60 } 64 61 else … … 70 67 function plugin_activate($plugin_id, $plugin_version, &$errors) 71 68 { 72 global $prefixeTable; 73 74 $amm=new AMM_install($prefixeTable, __FILE__); 75 $result=$amm->activate(); 69 global $prefixeTable, $gpcInstalled; 70 if($gpcInstalled) 71 { 72 $amm=new AMM_install($prefixeTable, __FILE__); 73 $result=$amm->activate(); 74 } 76 75 } 77 76 78 77 function plugin_deactivate($plugin_id) 79 78 { 79 global $prefixeTable, $gpcInstalled; 80 81 if($gpcInstalled) 82 { 83 $amm=new AMM_install($prefixeTable, __FILE__); 84 $amm->deactivate(); 85 } 80 86 } 81 87 82 88 function plugin_uninstall($plugin_id) 83 89 { 84 global $prefixeTable, $gpc _installed;85 if($gpc _installed)90 global $prefixeTable, $gpcInstalled; 91 if($gpcInstalled) 86 92 { 87 93 $amm=new AMM_install($prefixeTable, __FILE__); 88 94 $result=$amm->uninstall(); 89 GPCCore::unregister($amm->getPluginName());90 95 } 91 96 else … … 96 101 97 102 98 99 103 ?>
Note: See TracChangeset
for help on using the changeset viewer.