# HG changeset patch # User dan # Date 1187552101 14400 # Node ID 1dac77b46f07c8825bdea95c3d1cc3df6a048fac # Parent 8fc95816826144d00ed265bc42b8139a8f62d208 Changed style of copyright in St. Patty; first attempt at fixing some upgrade issues from beta 3 or so diff -r 8fc958168261 -r 1dac77b46f07 themes/stpatty/footer.tpl --- a/themes/stpatty/footer.tpl Fri Aug 17 12:35:29 2007 -0400 +++ b/themes/stpatty/footer.tpl Sun Aug 19 15:35:01 2007 -0400 @@ -9,7 +9,8 @@ -Dan --> - {COPYRIGHT} • Powered by Enano | Valid XHTML 1.1 | Valid CSS | [[Stats]] + {COPYRIGHT}
+ Powered by Enano | Valid XHTML 1.1 | Valid CSS | [[Stats]] diff -r 8fc958168261 -r 1dac77b46f07 upgrade.php --- a/upgrade.php Fri Aug 17 12:35:29 2007 -0400 +++ b/upgrade.php Sun Aug 19 15:35:01 2007 -0400 @@ -214,23 +214,25 @@ return true; // Find the first unused user ID $used = Array(); - $q = $db->sql_query('SELECT user_id FROM '.table_prefix.'users'); + $q = $db->sql_query('SELECT user_id FROM '.table_prefix.'users;'); if ( !$q ) $db->_die(); - $c = false; + $notfirst = false; while ( $row = $db->fetchrow() ) { $i = intval($row['user_id']); $used[$i] = true; - if ( !isset($used[$i - 1]) && $c ) + if ( !isset($used[$i - 1]) && $notfirst ) { $id = $i - 1; break; } - $c = true; + $notfirst = true; } if ( !isset($id) ) $id = $i + 1; + if ( $id == 0 ) + $id = 2; $db->free_result(); $q = $db->sql_query('UPDATE '.table_prefix.'users SET user_id=' . $id . ' WHERE user_id=1;'); @@ -373,7 +375,7 @@ function u_1_0_RC3_make_users_extra() { global $db; - $q = $db->sql_query('SELECT user_id FROM '.table_prefix.'users WHERE user_id > 1;'); + $q = $db->sql_query('SELECT user_id FROM '.table_prefix.'users WHERE user_id > 0;'); if ( !$q ) $db->_die(); @@ -384,6 +386,8 @@ } $ids = '(' . implode('),(', $ids) . ')'; + if ( $ids == '' ) + return false; $sql = "INSERT INTO " . table_prefix . "users_extra(user_id) VALUES$ids;"; if ( !$db->sql_query($sql) )