Changeset 6976 for extensions/ColorStat/admin
- Timestamp:
- Sep 20, 2010, 12:43:52 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/ColorStat/admin/plugin_admin.php
r5961 r6976 14 14 if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); } 15 15 16 global $prefixeTable ;16 global $prefixeTable, $template; 17 17 load_language('plugin.lang', CSTAT_PATH); 18 18 19 19 $main_plugin_object = get_plugin_data($plugin_id); 20 20 21 /*22 * if the plugin is newly installed, display a special configuration page23 * otherwise, display normal page24 */25 21 26 $config=Array(); 27 GPCCore::loadConfig('cstat', $config); 22 if(CommonPlugin::checkGPCRelease(3,2,0)) 23 { 24 $config=Array(); 25 GPCCore::loadConfig('cstat', $config); 28 26 29 if($config['newInstall']=='n') 30 { 31 include(CSTAT_PATH."cstat_aip.class.inc.php"); 32 $plugin_aip = new CStat_AIP($prefixeTable, $main_plugin_object->getFileLocation()); 27 if(!isset($config['installed'])) $config['installed']='01.00.01'; 28 if($config['installed']!=CSTAT_VERSION2) 29 { 30 /* the plugin was updated without being deactivated 31 * deactivate + activate the plugin to process the database upgrade 32 */ 33 include(CSTAT_PATH."cstat_install.class.inc.php"); 34 $cstat=new CStat_Install($prefixeTable, dirname(__FILE__)); 35 $cstat->deactivate(); 36 $cstat->activate(); 37 $template->delete_compiled_templates(); 38 $config['newInstall']='n'; 39 } 40 41 /* 42 * if the plugin is newly installed, display a special configuration page 43 * otherwise, display normal page 44 */ 45 if($config['newInstall']=='n') 46 { 47 include(CSTAT_PATH."cstat_aip.class.inc.php"); 48 $plugin_ai = new CStat_AIP($prefixeTable, $main_plugin_object->getFileLocation()); 49 } 50 else 51 { 52 include(CSTAT_PATH."cstat_aip_install.class.inc.php"); 53 $plugin_ai = new CStat_AIPInstall($prefixeTable, $main_plugin_object->getFileLocation()); 54 } 33 55 } 34 56 else 35 57 { 36 include(CSTAT_PATH."cstat_aip_install.class.inc.php"); 37 $plugin_aip = new CStat_AIPInstall($prefixeTable, $main_plugin_object->getFileLocation()); 58 /* 59 * plugin was upgraded, but GPC was not 60 * display a page to inform user to upgrade GPC 61 */ 62 include(CSTAT_PATH."cstat_aip_release.class.inc.php"); 63 $plugin_ai = new CStat_AIPRelease($prefixeTable, $main_plugin_object->getFileLocation()); 38 64 } 39 65 40 $plugin_aip->manage(); 66 $plugin_ai->manage(); 67 68 69 41 70 ?>
Note: See TracChangeset
for help on using the changeset viewer.