Zeile 37 | Zeile 37 |
---|
{ $db->write_query("ALTER TABLE ".TABLE_PREFIX."adminoptions DROP codepress;"); }
|
{ $db->write_query("ALTER TABLE ".TABLE_PREFIX."adminoptions DROP codepress;"); }
|
$db->write_query("ALTER TABLE ".TABLE_PREFIX."adminoptions ADD codepress int(1) NOT NULL default '1' AFTER cpstyle");
| if($db->type == "pgsql") { $db->write_query("ALTER TABLE ".TABLE_PREFIX."adminoptions ADD codepress int NOT NULL default '1' AFTER cpstyle"); } else { $db->write_query("ALTER TABLE ".TABLE_PREFIX."adminoptions ADD codepress int(1) NOT NULL default '1' AFTER cpstyle"); }
|
if($db->type != "sqlite2" && $db->type != "sqlite3") {
|
if($db->type != "sqlite2" && $db->type != "sqlite3") {
|
$query = $db->query("SHOW INDEX FROM ".TABLE_PREFIX."users"); while($ukey = $db->fetch_array($query)) { if($ukey['Key_name'] == "longregip") { $longregip_index = true; continue; } if($ukey['Key_name'] == "longlastip") { $longlastip_index = true; continue; } }
| $longregip_index = $db->index_exists("users", "longregip"); $longlastip_index = $db->index_exists("users", "longlastip");
|
if($longlastip_index == true) { $db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP KEY longlastip");
| if($longlastip_index == true) { $db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP KEY longlastip");
|
Zeile 65 | Zeile 61 |
---|
{ $db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP KEY longregip"); }
|
{ $db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP KEY longregip"); }
|
$query = $db->query("SHOW INDEX FROM ".TABLE_PREFIX."posts"); while($pkey = $db->fetch_array($query)) { if($pkey['Key_name'] == "longipaddress") { $longipaddress_index = true; break; } } if($longipaddress_index == true) { $db->write_query("ALTER TABLE ".TABLE_PREFIX."posts DROP KEY longipaddress"); }
| $longipaddress_index = $db->index_exists("posts", "longipaddress"); if($longipaddress_index == true) { $db->write_query("ALTER TABLE ".TABLE_PREFIX."posts DROP KEY longipaddress"); }
|
} if($db->field_exists('loginattempts', "sessions"))
| } if($db->field_exists('loginattempts', "sessions"))
|
Zeile 90 | Zeile 78 |
---|
{ $db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP loginattempts;"); }
|
{ $db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP loginattempts;"); }
|
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD loginattempts tinyint(2) NOT NULL default '1';");
| if($db->type == "pgsql") { $db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD loginattempts smallint NOT NULL default '1';"); } else { $db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD loginattempts tinyint(2) NOT NULL default '1';"); }
|
if($db->field_exists('failedlogin', "sessions")) { $db->write_query("ALTER TABLE ".TABLE_PREFIX."sessions DROP failedlogin;");
|
if($db->field_exists('failedlogin', "sessions")) { $db->write_query("ALTER TABLE ".TABLE_PREFIX."sessions DROP failedlogin;");
|
}
| }
|
if($db->field_exists('failedlogin', "users"))
|
if($db->field_exists('failedlogin', "users"))
|
{
| {
|
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP failedlogin;"); }
|
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP failedlogin;"); }
|
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD failedlogin bigint(30) NOT NULL default '0';");
| if($db->type == "pgsql") { $db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD failedlogin bigint NOT NULL default '0';"); } else { $db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD failedlogin bigint(30) NOT NULL default '0';"); }
|
if($db->type == "mysql" || $db->type == "mysqli") {
| if($db->type == "mysql" || $db->type == "mysqli") {
|
Zeile 115 | Zeile 119 |
---|
// *sigh* This is the 21st century, right? $query = $db->simple_select("datacache"); while($datacache = $db->fetch_array($query))
|
// *sigh* This is the 21st century, right? $query = $db->simple_select("datacache"); while($datacache = $db->fetch_array($query))
|
{
| {
|
$temp_datacache[$datacache['title']] = array('title' => $db->escape_string($datacache['title']), 'cache' => $db->escape_string($datacache['cache'])); }
| $temp_datacache[$datacache['title']] = array('title' => $db->escape_string($datacache['title']), 'cache' => $db->escape_string($datacache['cache'])); }
|
Zeile 134 | Zeile 138 |
---|
} else if($db->type == "pgsql") {
|
} else if($db->type == "pgsql") {
|
$db->write_query("ALTER TABLE ".TABLE_PREFIX."datacache ADD PRIMARY KEY (title)");
| if(!$db->index_exists("datacache", "title")) { $db->write_query("ALTER TABLE ".TABLE_PREFIX."datacache ADD PRIMARY KEY (title)"); }
|
}
$contents .= "Click next to continue with the upgrade process.</p>";
| }
$contents .= "Click next to continue with the upgrade process.</p>";
|