[geeklog-cvs] Geeklog-1.x/plugins/polls functions.inc,1.85,1.86
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/calendar functions.inc, 1.80, 1.81
- Next message (by thread): [geeklog-cvs] Geeklog-1.x/plugins/calendar/language czech.php, 1.1, 1.2 dutch.php, 1.2, 1.3 english.php, 1.14, 1.15 english_utf-8.php, 1.4, 1.5 estonian.php, 1.1, 1.2 estonian_utf-8.php, 1.1, 1.2 french_canada.php, 1.1, 1.2 german.php, 1.4, 1.5 german_formal.php, 1.2, 1.3 german_utf-8.php, 1.2, 1.3 japanese.php, 1.4, 1.5 japanese_utf-8.php, 1.4, 1.5 korean.php, 1.1, 1.2 korean_utf-8.php, 1.1, 1.2 russian.php, 1.1, 1.2 russian_utf-8.php, 1.1, 1.2 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.1, 1.2 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/polls
In directory qs1489.pair.com:/tmp/cvs-serv17216/polls
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/polls/functions.inc,v
retrieving revision 1.85
retrieving revision 1.86
diff -C2 -d -r1.85 -r1.86
*** functions.inc 16 Mar 2008 09:33:23 -0000 1.85
--- functions.inc 17 Mar 2008 21:12:54 -0000 1.86
***************
*** 1107,1153 ****
*
*/
! function plugin_upgrade_polls ()
{
! global $_TABLES, $_PO_CONF;
!
! // the plugin needs this function so complain when it doesn't exist
! if (!function_exists ('SEC_getGroupDropdown')) {
return 3002;
}
! $current_version = DB_getItem ($_TABLES['plugins'], 'pi_version',
! "pi_name = 'polls'");
! if ($current_version == '1.0') {
! $sql = "ALTER TABLE {$_TABLES['pollanswers']} ADD remark VARCHAR(255) NULL AFTER votes;";
! $result = DB_query ($sql);
! } else if ($current_version == '1.1.0') {
! $_SQL[] = "RENAME TABLE `{$_TABLES['pollquestions']}` TO `{$_TABLES['polltopics']}`;";
! $_SQL[] = "ALTER TABLE `{$_TABLES['polltopics']}` CHANGE `question` `topic` VARCHAR( 255 ) NULL DEFAULT NULL";
! $_SQL[] = "ALTER TABLE `{$_TABLES['polltopics']}` CHANGE `qid` `pid` VARCHAR( 20 ) NOT NULL";
! $_SQL[] = "ALTER TABLE `{$_TABLES['polltopics']}` ADD questions int(11) NOT NULL AFTER voters";
! $_SQL[] = "ALTER TABLE `{$_TABLES['polltopics']}` ADD open tinyint(1) NOT NULL default '1' AFTER display";
! $_SQL[] = "ALTER TABLE `{$_TABLES['polltopics']}` ADD hideresults tinyint(1) NOT NULL default '0' AFTER open";
! $_SQL[] = "ALTER TABLE `{$_TABLES['pollanswers']}` CHANGE `qid` `pid` VARCHAR( 20 ) NOT NULL";
! $_SQL[] = "ALTER TABLE `{$_TABLES['pollanswers']}` ADD `qid` VARCHAR( 20 ) NOT NULL DEFAULT '0' AFTER `pid`;";
! $_SQL[] = "ALTER TABLE `{$_TABLES['pollvoters']}` CHANGE `qid` `pid` VARCHAR( 20 ) NOT NULL";
! $_SQL[] = "CREATE TABLE {$_TABLES['pollquestions']} (
! qid mediumint(9) NOT NULL DEFAULT '0',
! pid varchar(20) NOT NULL,
! question varchar(255) NOT NULL,
! PRIMARY KEY (qid)
! ) TYPE=MyISAM
! ";
!
! $_SQL[] = "INSERT INTO {$_TABLES['pollquestions']} (pid, question) SELECT pid, topic FROM {$_TABLES['polltopics']}";
!
! for ($i=0; $i<count($_SQL); $i++) {
! $result = DB_query ($_SQL[$i]);
! }
!
! }
!
! DB_query ("UPDATE {$_TABLES['plugins']} SET pi_version = '{$_PO_CONF['version']}', pi_gl_version = '" . VERSION . "' WHERE pi_name = 'polls'");
!
! return true;
}
--- 1107,1121 ----
*
*/
! function plugin_upgrade_polls()
{
! // 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/calendar functions.inc, 1.80, 1.81
- Next message (by thread): [geeklog-cvs] Geeklog-1.x/plugins/calendar/language czech.php, 1.1, 1.2 dutch.php, 1.2, 1.3 english.php, 1.14, 1.15 english_utf-8.php, 1.4, 1.5 estonian.php, 1.1, 1.2 estonian_utf-8.php, 1.1, 1.2 french_canada.php, 1.1, 1.2 german.php, 1.4, 1.5 german_formal.php, 1.2, 1.3 german_utf-8.php, 1.2, 1.3 japanese.php, 1.4, 1.5 japanese_utf-8.php, 1.4, 1.5 korean.php, 1.1, 1.2 korean_utf-8.php, 1.1, 1.2 russian.php, 1.1, 1.2 russian_utf-8.php, 1.1, 1.2 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.1, 1.2 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