Changeset 6977 for extensions/AMetaData/maintain.inc.php
- Timestamp:
- Sep 20, 2010, 12:44:47 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/AMetaData/maintain.inc.php
r6891 r6977 29 29 30 30 31 global $gpc _installed, $gpcNeeded, $lang; //needed for plugin manager compatibility31 global $gpcInstalled, $lang; //needed for plugin manager compatibility 32 32 33 33 /* ----------------------------------------------------------------------------- 34 34 * AMD needs the Grum Plugin Classe 35 35 * -------------------------------------------------------------------------- */ 36 $gpc_installed=false; 37 $gpcNeeded="3.2.0"; 36 $gpcInstalled=false; 38 37 if(file_exists(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/CommonPlugin.class.inc.php')) 39 38 { … … 43 42 { 44 43 @include_once("amd_install.class.inc.php"); 45 $gpc _installed=true;44 $gpcInstalled=true; 46 45 } 47 46 } … … 49 48 function gpcMsgError(&$errors) 50 49 { 51 global $gpcNeeded; 52 $msg=sprintf(l10n('To install this plugin, you need to install Grum Plugin Classes %s before'), $gpcNeeded); 50 $msg=sprintf(l10n('To install this plugin, you need to install Grum Plugin Classes %s before'), AMD_GPC_NEEDED); 53 51 if(is_array($errors)) 54 52 { … … 68 66 function plugin_install($plugin_id, $plugin_version, &$errors) 69 67 { 70 global $prefixeTable, $gpc _installed, $gpcNeeded;71 if($gpc _installed)68 global $prefixeTable, $gpcInstalled; 69 if($gpcInstalled) 72 70 { 73 71 $amd=new AMD_install($prefixeTable, __FILE__); 74 72 $result=$amd->install(); 75 GPCCore::register($amd->getPluginName(), AMD_VERSION, $gpcNeeded);76 73 } 77 74 else … … 83 80 function plugin_activate($plugin_id, $plugin_version, &$errors) 84 81 { 85 global $prefixeTable, $gpc Needed;86 87 $amd=new AMD_install($prefixeTable, __FILE__);88 $result=$amd->activate();89 GPCCore::register($amd->getPluginName(), AMD_VERSION, $gpcNeeded);90 GPCRequestBuilder::register($amd->getPluginName(), dirname($amd->getFileLocation()).'/amd_rb_callback.class.inc.php');82 global $prefixeTable, $gpcInstalled; 83 if($gpcInstalled) 84 { 85 $amd=new AMD_install($prefixeTable, __FILE__); 86 $result=$amd->activate(); 87 } 91 88 } 92 89 93 90 function plugin_deactivate($plugin_id) 94 91 { 95 global $prefixeTable, $gpc Needed;92 global $prefixeTable, $gpcInstalled; 96 93 97 $amd=new AMD_install($prefixeTable, __FILE__); 98 GPCRequestBuilder::unregister($amd->getPluginName()); 94 if($gpcInstalled) 95 { 96 $amd=new AMD_install($prefixeTable, __FILE__); 97 $amd->deactivate(); 98 } 99 99 } 100 100 101 101 function plugin_uninstall($plugin_id) 102 102 { 103 global $prefixeTable, $gpc _installed, $gpcNeeded;104 if($gpc _installed)103 global $prefixeTable, $gpcInstalled; 104 if($gpcInstalled) 105 105 { 106 106 $amd=new AMD_install($prefixeTable, __FILE__); 107 107 $result=$amd->uninstall(); 108 GPCCore::unregister($amd->getPluginName());109 108 } 110 109 else
Note: See TracChangeset
for help on using the changeset viewer.