r77317 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77316‎ | r77317 | r77318 >
Date:02:37, 26 November 2010
Author:mah
Status:ok
Tags:
Comment:
revert r77271 since it was an expensive fix to a non-existant problem.
Modified paths:
  • /trunk/phase3/includes/db/Database.php (modified) (history)
  • /trunk/phase3/includes/db/DatabaseSqlite.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/Database.php
@@ -597,14 +597,6 @@
598598 }
599599
600600 /**
601 - * Database specific translations like MySQL's UNIX_TIMESTAMP() to
602 - * something the DB can use.
603 - */
604 - function translateSQLFunctions( $vars ) {
605 - return $vars;
606 - }
607 -
608 - /**
609601 * Usually aborts on failure. If errors are explicitly ignored, returns success.
610602 *
611603 * @param $sql String: SQL query
@@ -658,7 +650,7 @@
659651 } else {
660652 $userName = '';
661653 }
662 - $commentedSql = $this->translateSQLFunctions( preg_replace( '/\s/', " /* $fname $userName */ ", $sql, 1 ) );
 654+ $commentedSql = preg_replace( '/\s/', " /* $fname $userName */ ", $sql, 1 );
663655 # } else {
664656 # $commentedSql = $sql;
665657 # }
Index: trunk/phase3/includes/db/DatabaseSqlite.php
@@ -364,15 +364,6 @@
365365 }
366366
367367 /**
368 - * Database specific translations like MySQL's UNIX_TIMESTAMP() to
369 - * something the DB can use.
370 - */
371 - function translateSQLFunctions( $vars ) {
372 - return preg_replace( '/UNIX_TIMESTAMP\(([^()]+)\)/', 'strftime("%s",\1)', $vars );
373 - }
374 -
375 -
376 - /**
377368 * Based on generic method (parent) with some prior SQLite-sepcific adjustments
378369 */
379370 function insert( $table, $a, $fname = 'DatabaseSqlite::insert', $options = array() ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r77271Give SQLite a translation for MySQL's UNIX_TIMESTAMP() functions. Pg will pro...mah07:39, 25 November 2010

Status & tagging log