[geeklog-cvs] Geeklog-1.x/plugins/staticpages functions.inc, 1.111, 1.112
Dirk Haun
dhaun at qs1489.pair.com
Sat Jan 26 06:47:24 EST 2008
Update of /cvsroot/geeklog/Geeklog-1.x/plugins/staticpages
In directory qs1489.pair.com:/tmp/cvs-serv75487/plugins/staticpages
Modified Files:
functions.inc
Log Message:
Remove Static Pages plugin version number from the config and added it to functions.inc instead
Index: functions.inc
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/plugins/staticpages/functions.inc,v
retrieving revision 1.111
retrieving revision 1.112
diff -C2 -d -r1.111 -r1.112
*** functions.inc 19 Jan 2008 19:36:11 -0000 1.111
--- functions.inc 26 Jan 2008 11:47:22 -0000 1.112
***************
*** 11,15 ****
// | Pages' PHP files. |
// +---------------------------------------------------------------------------+
! // | Copyright (C) 2000-2007 by the following authors: |
// | |
// | Authors: Tony Bibbs - tony AT tonybibbs DOT com |
--- 11,15 ----
// | Pages' PHP files. |
// +---------------------------------------------------------------------------+
! // | Copyright (C) 2000-2008 by the following authors: |
// | |
// | Authors: Tony Bibbs - tony AT tonybibbs DOT com |
***************
*** 66,69 ****
--- 66,70 ----
}
+ $_SP_CONF['version'] = '1.5.0';
// +---------------------------------------------------------------------------+
***************
*** 1025,1033 ****
// the plugin needs this function so complain when it doesn't exist
! if (!function_exists ('SEC_getGroupDropdown')) {
return 3002;
}
! $pi_version = DB_getItem($_TABLES['plugins'],'pi_version',"pi_name='staticpages'");
if ($pi_version == '1.4.3') { // Need to initialize the config table - GL 1.5+ feature
--- 1026,1035 ----
// the plugin needs this function so complain when it doesn't exist
! if (!function_exists('SEC_getGroupDropdown')) {
return 3002;
}
! $pi_version = DB_getItem($_TABLES['plugins'], 'pi_version',
! "pi_name = 'staticpages'");
if ($pi_version == '1.4.3') { // Need to initialize the config table - GL 1.5+ feature
***************
*** 1036,1041 ****
$sp_config = config::get_instance();
$sp_config->initConfig();
! if(! $sp_config->group_exists('staticpages')){
! $sp_config->add('version', '1.5', 'text', 0, 0, null, 0, true, 'staticpages');
$sp_config->add('allow_php', $_SP_CONF['allow_php'], 'select', 0, 0, 0, 10, true, 'staticpages');
$sp_config->add('sort_by', $_SP_CONF['sort_by'], 'select', 0, 0, 2, 20, true, 'staticpages');
--- 1038,1042 ----
$sp_config = config::get_instance();
$sp_config->initConfig();
! if (! $sp_config->group_exists('staticpages')) {
$sp_config->add('allow_php', $_SP_CONF['allow_php'], 'select', 0, 0, 0, 10, true, 'staticpages');
$sp_config->add('sort_by', $_SP_CONF['sort_by'], 'select', 0, 0, 2, 20, true, 'staticpages');
***************
*** 1056,1070 ****
if (!$ret) {
COM_errorLog("Staticpages upgrade to 1.5 error - unable to rename plugins config.php to complete upgrade");
! return '3003';
! } elseif($sp_config->group_exists('staticpages')){
! DB_query ("UPDATE {$_TABLES['plugins']} SET pi_version = '1.5' WHERE pi_name = 'staticpages'");
} else {
COM_errorLog("Staticpages upgrade to 1.5 failed");
! return '3001';
}
}
} else {
COM_errorLog("Staticpages upgrade to 1.5 failed - missing plugins config.php");
! return '3004';
}
--- 1057,1071 ----
if (!$ret) {
COM_errorLog("Staticpages upgrade to 1.5 error - unable to rename plugins config.php to complete upgrade");
! return 3003;
! } elseif ($sp_config->group_exists('staticpages')) {
! DB_query ("UPDATE {$_TABLES['plugins']} SET pi_version = '1.5.0' WHERE pi_name = 'staticpages'");
} else {
COM_errorLog("Staticpages upgrade to 1.5 failed");
! return 3001;
}
}
} else {
COM_errorLog("Staticpages upgrade to 1.5 failed - missing plugins config.php");
! return 3004;
}
More information about the geeklog-cvs
mailing list