fetch_by_identifier($pluginid); if($plugin) { $modules = unserialize($plugin['modules']); if($modules['system'] > 0) { if($pluginarray['plugin']['version'] != $plugin['version']) { pluginupgrade($pluginarray, ''); if($pluginarray['upgradefile']) { $plugindir = DISCUZ_ROOT.'./source/plugin/'.$pluginarray['plugin']['directory']; if(file_exists($plugindir.'/'.$pluginarray['upgradefile'])) { @include_once $plugindir.'/'.$pluginarray['upgradefile']; } } } if($modules['system'] != $systemvalue) { $modules['system'] = $systemvalue; $modules = serialize($modules); C::t('common_plugin')->update($plugin['pluginid'], array('modules' => $modules)); } continue; } C::t('common_plugin')->delete_by_identifier($pluginid); } if($plugin['available']) { $opens[] = $pluginid; } $pluginarray['plugin']['modules'] = unserialize(dstripslashes($pluginarray['plugin']['modules'])); $pluginarray['plugin']['modules']['system'] = $systemvalue; $pluginarray['plugin']['modules'] = serialize($pluginarray['plugin']['modules']); plugininstall($pluginarray, '', in_array($pluginid, $opens)); if($pluginarray['installfile']) { $plugindir = DISCUZ_ROOT.'./source/plugin/'.$pluginarray['plugin']['directory']; if(file_exists($plugindir.'/'.$pluginarray['installfile'])) { @include_once $plugindir.'/'.$pluginarray['installfile']; } } } ?>