"0", 'Version'=> "2.1.1", ); $q = ' INSERT INTO '.CONFIG_TABLE.' (param,value,comment) VALUES ("HistoryIPConfig","'.pwg_db_real_escape_string(serialize($default)).'","History IP Excluder options"); '; pwg_query($q); upgrade_211(); } function upgrade_211() { global $conf; // Create new HIPE entry in plugins table $query = ' INSERT INTO '.PLUGINS_TABLE.' (id, state, version) VALUES ("HistoryIPExcluder","active","2.2.0") ;'; pwg_query($query); // Delete old plugin entry in plugins table $query = ' DELETE FROM '.PLUGINS_TABLE.' WHERE id="nbc_HistoryIPExcluder" LIMIT 1 ;'; pwg_query($query); // rename directory if (!rename(PHPWG_PLUGINS_PATH.'nbc_HistoryIPExcluder', PHPWG_PLUGINS_PATH.'HistoryIPExcluder')) { die('Fatal error on plugin upgrade process : Unable to rename directory ! Please, rename manualy the plugin directory name from ../plugins/nbc_HistoryIPExcluder to ../plugins/HistoryIPExcluder.'); } } ?>