r51856 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51855‎ | r51856 | r51857 >
Date:20:13, 14 June 2009
Author:simetrical
Status:ok
Tags:
Comment:
Use parentheses for bit* to be on the safe side

Follow-up to r51815.
Modified paths:
  • /trunk/phase3/includes/db/Database.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/Database.php
@@ -1445,15 +1445,15 @@
14461446 */
14471447
14481448 function bitNot($field) {
1449 - return '~'.$bitField;
 1449+ return "(~$bitField)";
14501450 }
14511451
14521452 function bitAnd($fieldLeft, $fieldRight) {
1453 - return $fieldLeft.'&'.$fieldRight;
 1453+ return "($fieldLeft & $fieldRight)";
14541454 }
14551455
14561456 function bitOr($fieldLeft, $fieldRight) {
1457 - return $fieldLeft.'|'.$fieldRight;
 1457+ return "($fieldLeft | $fieldRight)";
14581458 }
14591459
14601460 /**

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r51815Added bitwise operations to DatabaseBase and overloaded in DatabaseOracle.freakolowsky06:31, 13 June 2009

Status & tagging log