https://bugzilla.wikimedia.org/show_bug.cgi?id=22093
--- Comment #9 from Max Semenik <maxsem.w...@gmail.com> 2010-04-27 06:04:10 UTC --- Few comments on patch: * Other Database*.php files list their main database classes first, you should do it too. > $sql = str_replace("EXTRACT(epoch FROM ", > "DATEDIFF(s,CONVERT(datetime,'1/1/1970'),", $sql); This is unreliable, as it doesn't take into account possible variations in spacing and casing. Use regex? > class result_mssqlnative { This name doesn't follow our naming conventions. > wfDebug("SQL: [$sql]<br/>\n"); Debug log is in plaintext, tags make no sense here. > if ( preg_match( '/\bLIMIT\s*/i', $sql ) ) > 0) { Ideally, extensions not using limitResult() should be fixed instead. > $message = "A database error has occurred<br/>\n" . > "Query: $sql<br/>\n" . You're mixing tags with unescaped data - are you sure that there is no XSS or tag breakage by overescaping? > if ((strpos(" ".$sql, "SELECT") > 0) Use strict comparison (===) with FASLE instead, it will be more readable. > $bAllOk We don't use Hungarian notation. > # Copyright (C) 2004 Brion Vibber <br...@pobox.com> Not anymore :) > "FROM $page,FREETEXTTABLE($searchindex , $match, LANGUAGE > 'English') as ftindex " . Use $wgContLang to determine the correct language instead of assuming that it is always English. * Our coding conventions (<http://www.mediawiki.org/wiki/Manual:Coding_conventions>) aren't strictly followed, use stylize.php from trunk/tools/code-utils/ to at least fix spacing problems. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l