[geeklog-cvs] Geeklog-1.x/plugins/spamx functions.inc,1.34,1.35
Dirk Haun
dhaun at qs1489.pair.com
Mon Mar 17 17:12:56 EDT 2008
- Previous message (by thread): [geeklog-cvs] Geeklog-1.x/plugins/links functions.inc,1.105,1.106
- Next message (by thread): [geeklog-cvs] Geeklog-1.x/plugins/polls/language chinese_simplified_utf-8.php, 1.4, 1.5 chinese_traditional_utf-8.php, 1.4, 1.5 dutch.php, 1.3, 1.4 english.php, 1.17, 1.18 english_utf-8.php, 1.8, 1.9 estonian.php, 1.1, 1.2 estonian_utf-8.php, 1.1, 1.2 french_canada.php, 1.1, 1.2 german.php, 1.6, 1.7 german_formal.php, 1.5, 1.6 german_formal_utf-8.php, 1.5, 1.6 german_utf-8.php, 1.5, 1.6 japanese.php, 1.9, 1.10 japanese_utf-8.php, 1.9, 1.10 korean.php, 1.1, 1.2 korean_utf-8.php, 1.1, 1.2 russian.php, 1.3, 1.4 slovenian.php, 1.1, 1.2 slovenian_utf-8.php, 1.1, 1.2 spanish_utf-8.php, 1.1, 1.2 ukrainian.php, 1.4, 1.5 ukrainian_koi8-u.php, 1.1, 1.2 ukrainian_utf-8.php, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/geeklog/Geeklog-1.x/plugins/spamx
In directory qs1489.pair.com:/tmp/cvs-serv17216/spamx
Modified Files:
functions.inc
Log Message:
Plugins are updated by the install script, so we don't need to maintain the plugin's upgrade function
Index: functions.inc
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/plugins/spamx/functions.inc,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** functions.inc 16 Mar 2008 09:33:23 -0000 1.34
--- functions.inc 17 Mar 2008 21:12:54 -0000 1.35
***************
*** 170,219 ****
function plugin_upgrade_spamx()
{
! global $_CONF, $_TABLES, $_SPX_CONF, $plugin_path;
!
! if (!function_exists('PLG_spamAction')) {
! return 3002; // plugin not compatible with this Geeklog version
! }
!
! $v = DB_getItem($_TABLES['plugins'], 'pi_version', "pi_name = 'spamx'");
! if ($v != $_SPX_CONF['version']) {
!
! switch ($v) {
! case '1.0.1':
! // Add the counter
! DB_query("INSERT INTO {$_TABLES['vars']} VALUES ('spamx.counter', '0')");
! DB_query("UPDATE {$_TABLES['plugins']} SET pi_version = '1.1.0', pi_gl_version = '1.4.1' WHERE pi_name = 'spamx'");
! break;
!
! case '1.1.0':
! require_once $_CONF['path_system'] . 'classes/config.class.php';
! require_once $plugin_path . 'install_defaults.php';
!
! if (!plugin_initconfig_spamx()) {
! COM_errorLog("Spam-X upgrade to 1.1.1 failed");
! return 3002;
! }
!
! if (file_exists($plugin_path . 'config.php')) {
! // Rename the existing config.php as it's not needed any more
! $ren = @rename($plugin_path . 'config.php',
! $plugin_path . 'config-pre1.5.0.php');
! if (!$ren) {
! COM_errorLog("Could not rename the ages Spam-X plugin's config.php file. Please remove if manually, as it is not needed any more.");
! }
! }
!
! $spx_config = config::get_instance();
! if ($spx_config->group_exists('spamx')) {
! DB_query("UPDATE {$_TABLES['plugins']} SET pi_version = '1.1.1', pi_gl_version = '1.5.0' WHERE pi_name = 'spamx'");
! } else {
! COM_errorLog("Spam-X upgrade to 1.1.1 failed");
! return 3002;
! }
! break;
! }
}
! return 3001; // success msg
}
--- 170,182 ----
function plugin_upgrade_spamx()
{
! // the plugin needs these function so complain when they don't exist
! if (!function_exists('PLG_uninstall') ||
! !function_exists('COM_createLink')) {
! return 3002;
}
! // upgrades are done by the install script - return a generic error
! COM_errorLog("Plugin upgrade function not implemented");
! return 3001;
}
- Previous message (by thread): [geeklog-cvs] Geeklog-1.x/plugins/links functions.inc,1.105,1.106
- Next message (by thread): [geeklog-cvs] Geeklog-1.x/plugins/polls/language chinese_simplified_utf-8.php, 1.4, 1.5 chinese_traditional_utf-8.php, 1.4, 1.5 dutch.php, 1.3, 1.4 english.php, 1.17, 1.18 english_utf-8.php, 1.8, 1.9 estonian.php, 1.1, 1.2 estonian_utf-8.php, 1.1, 1.2 french_canada.php, 1.1, 1.2 german.php, 1.6, 1.7 german_formal.php, 1.5, 1.6 german_formal_utf-8.php, 1.5, 1.6 german_utf-8.php, 1.5, 1.6 japanese.php, 1.9, 1.10 japanese_utf-8.php, 1.9, 1.10 korean.php, 1.1, 1.2 korean_utf-8.php, 1.1, 1.2 russian.php, 1.3, 1.4 slovenian.php, 1.1, 1.2 slovenian_utf-8.php, 1.1, 1.2 spanish_utf-8.php, 1.1, 1.2 ukrainian.php, 1.4, 1.5 ukrainian_koi8-u.php, 1.1, 1.2 ukrainian_utf-8.php, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the geeklog-cvs
mailing list