git-svn-id: file:///svn/phpbb/trunk@6100 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
David M 2006-06-18 15:50:00 +00:00
parent 5735c5176e
commit ac3f3b1ae9

View file

@ -198,10 +198,38 @@ class acp_reasons
$other_reason_id = (int) $db->sql_fetchfield('reason_id');
$db->sql_freeresult($result);
switch (SQL_LAYER)
{
// The ugly one!
case 'mysqli':
case 'mysql4':
case 'mysql':
// Change the reports using this reason to 'other'
$sql = 'UPDATE ' . REPORTS_TABLE . '
SET reason_id = ' . $other_reason_id . ", report_text = CONCAT('" . $db->sql_escape($reason_row['reason_description']) . "\n\n', report_text)
WHERE reason_id = $reason_id";
break;
// Nearly standard, not quite
case 'mssql':
case 'mssql_odbc':
// Change the reports using this reason to 'other'
$sql = 'UPDATE ' . REPORTS_TABLE . '
SET reason_id = ' . $other_reason_id . ", report_text = '" . $db->sql_escape($reason_row['reason_description']) . "\n\n' + report_text
WHERE reason_id = $reason_id";
break;
// Teh standard
case 'postgres':
case 'oracle':
case 'firebird':
case 'sqlite':
// Change the reports using this reason to 'other'
$sql = 'UPDATE ' . REPORTS_TABLE . '
SET reason_id = ' . $other_reason_id . ", report_text = '" . $db->sql_escape($reason_row['reason_description']) . "\n\n' || report_text
WHERE reason_id = $reason_id";
break;
}
$db->sql_query($sql);
$db->sql_query('DELETE FROM ' . REPORTS_REASONS_TABLE . ' WHERE reason_id = ' . $reason_id);