[geeklog-cvs] Geeklog-1.x/sql/updates mysql_1.4.1_to_1.5.0.php, 1.57, 1.58
Dirk Haun
dhaun at qs1489.pair.com
Sun Jan 27 10:23:34 EST 2008
Update of /cvsroot/geeklog/Geeklog-1.x/sql/updates
In directory qs1489.pair.com:/tmp/cvs-serv35636/sql/updates
Modified Files:
mysql_1.4.1_to_1.5.0.php
Log Message:
Got rid of the $_STATES array and turned the states dropdown into a simple text entry field
Index: mysql_1.4.1_to_1.5.0.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/sql/updates/mysql_1.4.1_to_1.5.0.php,v
retrieving revision 1.57
retrieving revision 1.58
diff -C2 -d -r1.57 -r1.58
*** mysql_1.4.1_to_1.5.0.php 27 Jan 2008 10:53:03 -0000 1.57
--- mysql_1.4.1_to_1.5.0.php 27 Jan 2008 15:23:32 -0000 1.58
***************
*** 334,344 ****
function upgrade_CalendarPlugin()
{
! global $_TABLES;
! $sql = "UPDATE {$_TABLES['plugins']} SET pi_version = '1.0.2', pi_gl_version = '1.5.0' WHERE pi_name = 'calendar'";
! $rst = DB_query($sql);
! if (DB_error()) {
! echo "There was an error upgrading the calendar";
! return false;
}
--- 334,362 ----
function upgrade_CalendarPlugin()
{
! global $_TABLES, $_STATES;
! $P_SQL[] = "ALTER TABLE {$_TABLES['events']} CHANGE state state varchar(40) default NULL";
! $P_SQL[] = "ALTER TABLE {$_TABLES['eventsubmission']} CHANGE state state varchar(40) default NULL";
! $P_SQL[] = "ALTER TABLE {$_TABLES['personal_events']} CHANGE state state varchar(40) default NULL";
! $P_SQL[] = "UPDATE {$_TABLES['plugins']} SET pi_version = '1.0.2', pi_gl_version = '1.5.0' WHERE pi_name = 'calendar'";
!
! foreach ($P_SQL as $sql) {
! $rst = DB_query($sql);
! if (DB_error()) {
! echo "There was an error upgrading the calendar";
! return false;
! }
! }
!
! if (isset($_STATES) && is_array($_STATES)) {
! $tables = array($_TABLES['events'], $_TABLES['eventsubmission'],
! $_TABLES['personal_events']);
!
! foreach ($_STATES as $key => $state) {
! foreach ($tables as $table) {
! DB_change($table, 'state', addslashes($state),
! 'state', addslashes($key));
! }
! }
}
More information about the geeklog-cvs
mailing list