mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
- should fix some Firebird issues ( can't believe that nobody found this until now )
git-svn-id: file:///svn/phpbb/trunk@6954 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -167,6 +167,7 @@ class acp_database
|
||||
// Get the table structure
|
||||
if ($structure)
|
||||
{
|
||||
$sql_data .= "\n";
|
||||
switch ($db->sql_layer)
|
||||
{
|
||||
case 'mysqli':
|
||||
@@ -213,7 +214,18 @@ class acp_database
|
||||
else
|
||||
{
|
||||
// We might wanna empty out all that junk :D
|
||||
$sql_data .= (($db->sql_layer == 'sqlite') ? 'DELETE FROM ' : 'TRUNCATE TABLE ') . $table_name . ";\n";
|
||||
switch ($db->sql_layer)
|
||||
{
|
||||
case 'sqlite':
|
||||
case 'firebird':
|
||||
$sql_data .= 'DELETE FROM ';
|
||||
break;
|
||||
|
||||
default:
|
||||
$sql_data .= 'TRUNCATE TABLE ';
|
||||
break;
|
||||
}
|
||||
$sql_data .= $table_name . ";\n";
|
||||
}
|
||||
|
||||
// Now write the data for the first time. :)
|
||||
@@ -757,7 +769,7 @@ class acp_database
|
||||
|
||||
if ($retrieved_data)
|
||||
{
|
||||
$sql_data = "\nGO\n";
|
||||
$sql_data = "GO\n";
|
||||
if ($ident_set)
|
||||
{
|
||||
$sql_data .= "\nSET IDENTITY_INSERT $table_name OFF\nGO\n";
|
||||
|
@@ -334,7 +334,17 @@ class acp_icons
|
||||
// The user has already selected a smilies_pak file
|
||||
if ($current == 'delete')
|
||||
{
|
||||
$db->sql_query((($db->sql_layer != 'sqlite') ? 'TRUNCATE TABLE ' : 'DELETE FROM ') . $table);
|
||||
switch ($db->sql_layer)
|
||||
{
|
||||
case 'sqlite':
|
||||
case 'firebird':
|
||||
$db->sql_query('DELETE FROM ' . $table);
|
||||
break;
|
||||
|
||||
default:
|
||||
$db->sql_query('TRUNCATE TABLE ' . $table);
|
||||
break;
|
||||
}
|
||||
|
||||
switch ($mode)
|
||||
{
|
||||
|
@@ -147,7 +147,17 @@ class acp_main
|
||||
break;
|
||||
|
||||
case 'db_track':
|
||||
$db->sql_query((($db->sql_layer != 'sqlite') ? 'TRUNCATE TABLE ' : 'DELETE FROM ') . TOPICS_POSTED_TABLE);
|
||||
switch ($db->sql_layer)
|
||||
{
|
||||
case 'sqlite':
|
||||
case 'firebird':
|
||||
$db->sql_query('DELETE FROM ' . TOPICS_POSTED_TABLE);
|
||||
break;
|
||||
|
||||
default:
|
||||
$db->sql_query('TRUNCATE TABLE ' . TOPICS_POSTED_TABLE);
|
||||
break;
|
||||
}
|
||||
|
||||
// This can get really nasty... therefore we only do the last six months
|
||||
$get_from_time = time() - (6 * 4 * 7 * 24 * 60 * 60);
|
||||
|
Reference in New Issue
Block a user