Index: trunk/phase3/includes/db/DatabaseIbm_db2.php |
— | — | @@ -2,7 +2,7 @@ |
3 | 3 | /** |
4 | 4 | * This is the IBM DB2 database abstraction layer. |
5 | 5 | * See maintenance/ibm_db2/README for development notes |
6 | | - * and other specific information |
| 6 | + * and other specific information |
7 | 7 | * |
8 | 8 | * @file |
9 | 9 | * @ingroup Database |
— | — | @@ -37,13 +37,17 @@ |
38 | 38 | FROM sysibm.syscolumns |
39 | 39 | WHERE tbcreator=%s AND tbname=%s AND name=%s; |
40 | 40 | SQL; |
41 | | - $res = $db->query( sprintf( $q, |
| 41 | + $res = $db->query( |
| 42 | + sprintf( $q, |
42 | 43 | $db->addQuotes( $wgDBmwschema ), |
43 | 44 | $db->addQuotes( $table ), |
44 | | - $db->addQuotes( $field )) ); |
| 45 | + $db->addQuotes( $field ) |
| 46 | + ) |
| 47 | + ); |
45 | 48 | $row = $db->fetchObject( $res ); |
46 | | - if ( !$row ) |
| 49 | + if ( !$row ) { |
47 | 50 | return null; |
| 51 | + } |
48 | 52 | $n = new IBM_DB2Field; |
49 | 53 | $n->type = $row->typname; |
50 | 54 | $n->nullable = ( $row->attnotnull == 'N' ); |
— | — | @@ -94,10 +98,9 @@ |
95 | 99 | return $this->mData; |
96 | 100 | } |
97 | 101 | |
98 | | - public function __toString() |
99 | | - { |
100 | | - return $this->mData; |
101 | | - } |
| 102 | + public function __toString() { |
| 103 | + return $this->mData; |
| 104 | + } |
102 | 105 | } |
103 | 106 | |
104 | 107 | /** |
— | — | @@ -142,7 +145,7 @@ |
143 | 146 | public $mStmtOptions = array(); |
144 | 147 | |
145 | 148 | /** Default schema */ |
146 | | - const USE_GLOBAL = "mediawiki"; |
| 149 | + const USE_GLOBAL = 'mediawiki'; |
147 | 150 | |
148 | 151 | /** Option that applies to nothing */ |
149 | 152 | const NONE_OPTION = 0x00; |
— | — | @@ -275,8 +278,7 @@ |
276 | 279 | |
277 | 280 | if ( $schema == self::USE_GLOBAL ) { |
278 | 281 | $this->mSchema = $wgDBmwschema; |
279 | | - } |
280 | | - else { |
| 282 | + } else { |
281 | 283 | $this->mSchema = $schema; |
282 | 284 | } |
283 | 285 | |
— | — | @@ -298,15 +300,14 @@ |
299 | 301 | * @param $type Integer: whether this is a Connection or Statement otion |
300 | 302 | */ |
301 | 303 | private function setDB2Option( $name, $const, $type ) { |
302 | | - if ( defined( $const )) { |
| 304 | + if ( defined( $const ) ) { |
303 | 305 | if ( $type & self::CONN_OPTION ) { |
304 | 306 | $this->mConnOptions[$name] = constant( $const ); |
305 | 307 | } |
306 | 308 | if ( $type & self::STMT_OPTION ) { |
307 | 309 | $this->mStmtOptions[$name] = constant( $const ); |
308 | 310 | } |
309 | | - } |
310 | | - else { |
| 311 | + } else { |
311 | 312 | $this->installPrint( |
312 | 313 | "$const is not defined. ibm_db2 version is likely too low." ); |
313 | 314 | } |
— | — | @@ -327,14 +328,14 @@ |
328 | 329 | /** |
329 | 330 | * Opens a database connection and returns it |
330 | 331 | * Closes any existing connection |
331 | | - * @return a fresh connection |
| 332 | + * |
332 | 333 | * @param $server String: hostname |
333 | 334 | * @param $user String |
334 | 335 | * @param $password String |
335 | 336 | * @param $dbName String: database name |
| 337 | + * @return a fresh connection |
336 | 338 | */ |
337 | | - public function open( $server, $user, $password, $dbName ) |
338 | | - { |
| 339 | + public function open( $server, $user, $password, $dbName ) { |
339 | 340 | // Load the port number |
340 | 341 | global $wgDBport; |
341 | 342 | wfProfileIn( __METHOD__ ); |
— | — | @@ -352,7 +353,7 @@ |
353 | 354 | $this->reportConnectionError( $error ); |
354 | 355 | } |
355 | 356 | |
356 | | - if ( strlen( $user ) < 1) { |
| 357 | + if ( strlen( $user ) < 1 ) { |
357 | 358 | return null; |
358 | 359 | } |
359 | 360 | |
— | — | @@ -393,8 +394,7 @@ |
394 | 395 | /** |
395 | 396 | * Opens a cataloged database connection, sets mConn |
396 | 397 | */ |
397 | | - protected function openCataloged( $dbName, $user, $password ) |
398 | | - { |
| 398 | + protected function openCataloged( $dbName, $user, $password ) { |
399 | 399 | @$this->mConn = db2_pconnect( $dbName, $user, $password ); |
400 | 400 | } |
401 | 401 | |
— | — | @@ -422,12 +422,11 @@ |
423 | 423 | public function close() { |
424 | 424 | $this->mOpened = false; |
425 | 425 | if ( $this->mConn ) { |
426 | | - if ($this->trxLevel() > 0) { |
| 426 | + if ( $this->trxLevel() > 0 ) { |
427 | 427 | $this->commit(); |
428 | 428 | } |
429 | 429 | return db2_close( $this->mConn ); |
430 | | - } |
431 | | - else { |
| 430 | + } else { |
432 | 431 | return true; |
433 | 432 | } |
434 | 433 | } |
— | — | @@ -503,15 +502,15 @@ |
504 | 503 | $this->applySchema(); |
505 | 504 | |
506 | 505 | $ret = db2_exec( $this->mConn, $sql, $this->mStmtOptions ); |
507 | | - if( $ret == FALSE ) { |
| 506 | + if( $ret == false ) { |
508 | 507 | $error = db2_stmt_errormsg(); |
509 | 508 | $this->installPrint( "<pre>$sql</pre>" ); |
510 | 509 | $this->installPrint( $error ); |
511 | | - throw new DBUnexpectedError( $this, 'SQL error: ' |
| 510 | + throw new DBUnexpectedError( $this, 'SQL error: ' |
512 | 511 | . htmlspecialchars( $error ) ); |
513 | 512 | } |
514 | 513 | $this->mLastResult = $ret; |
515 | | - $this->mAffectedRows = null; // Not calculated until asked for |
| 514 | + $this->mAffectedRows = null; // Not calculated until asked for |
516 | 515 | return $ret; |
517 | 516 | } |
518 | 517 | |
— | — | @@ -534,12 +533,14 @@ |
535 | 534 | WHERE ST.NAME = '$table' AND ST.CREATOR = '$schema' |
536 | 535 | EOF; |
537 | 536 | $res = $this->query( $sql ); |
538 | | - if ( !$res ) return false; |
| 537 | + if ( !$res ) { |
| 538 | + return false; |
| 539 | + } |
539 | 540 | |
540 | 541 | // If the table exists, there should be one of it |
541 | 542 | @$row = $this->fetchRow( $res ); |
542 | 543 | $count = $row[0]; |
543 | | - if ( $count == '1' or $count == 1 ) { |
| 544 | + if ( $count == '1' || $count == 1 ) { |
544 | 545 | return true; |
545 | 546 | } |
546 | 547 | |
— | — | @@ -569,7 +570,7 @@ |
570 | 571 | |
571 | 572 | /** |
572 | 573 | * Fetch the next row from the given result object, in associative array |
573 | | - * form. Fields are retrieved with $row['fieldname']. |
| 574 | + * form. Fields are retrieved with $row['fieldname']. |
574 | 575 | * |
575 | 576 | * @param $res SQL result object as returned from Database::query(), etc. |
576 | 577 | * @return DB2 row object |
— | — | @@ -607,15 +608,15 @@ |
608 | 609 | |
609 | 610 | $res = $this->sourceFile( "../maintenance/ibm_db2/tables.sql" ); |
610 | 611 | if ( $res !== true ) { |
611 | | - print " <b>FAILED</b>: " . htmlspecialchars( $res ) . "</li>"; |
| 612 | + print ' <b>FAILED</b>: ' . htmlspecialchars( $res ) . '</li>'; |
612 | 613 | } else { |
613 | | - print " done</li>"; |
| 614 | + print ' done</li>'; |
614 | 615 | } |
615 | 616 | $res = $this->sourceFile( "../maintenance/ibm_db2/foreignkeys.sql" ); |
616 | 617 | if ( $res !== true ) { |
617 | | - print " <b>FAILED</b>: " . htmlspecialchars( $res ) . "</li>"; |
| 618 | + print ' <b>FAILED</b>: ' . htmlspecialchars( $res ) . '</li>'; |
618 | 619 | } else { |
619 | | - print "<li>Foreign keys done</li>"; |
| 620 | + print '<li>Foreign keys done</li>'; |
620 | 621 | } |
621 | 622 | $res = null; |
622 | 623 | |
— | — | @@ -623,16 +624,13 @@ |
624 | 625 | |
625 | 626 | if ( $this->lastError() ) { |
626 | 627 | $this->installPrint( |
627 | | - "Errors encountered during table creation -- rolled back" ); |
628 | | - $this->installPrint( "Please install again" ); |
| 628 | + 'Errors encountered during table creation -- rolled back' ); |
| 629 | + $this->installPrint( 'Please install again' ); |
629 | 630 | $this->rollback(); |
630 | | - } |
631 | | - else { |
| 631 | + } else { |
632 | 632 | $this->commit(); |
633 | 633 | } |
634 | | - } |
635 | | - catch ( MWException $mwe ) |
636 | | - { |
| 634 | + } catch ( MWException $mwe ) { |
637 | 635 | print "<br><pre>$mwe</pre><br>"; |
638 | 636 | } |
639 | 637 | } |
— | — | @@ -640,43 +638,44 @@ |
641 | 639 | /** |
642 | 640 | * Escapes strings |
643 | 641 | * Doesn't escape numbers |
| 642 | + * |
644 | 643 | * @param $s String: string to escape |
645 | 644 | * @return escaped string |
646 | 645 | */ |
647 | 646 | public function addQuotes( $s ) { |
648 | 647 | //$this->installPrint( "DB2::addQuotes( $s )\n" ); |
649 | 648 | if ( is_null( $s ) ) { |
650 | | - return "NULL"; |
651 | | - } else if ( $s instanceof Blob ) { |
| 649 | + return 'NULL'; |
| 650 | + } elseif ( $s instanceof Blob ) { |
652 | 651 | return "'" . $s->fetch( $s ) . "'"; |
653 | | - } else if ( $s instanceof IBM_DB2Blob ) { |
| 652 | + } elseif ( $s instanceof IBM_DB2Blob ) { |
654 | 653 | return "'" . $this->decodeBlob( $s ) . "'"; |
655 | 654 | } |
656 | 655 | $s = $this->strencode( $s ); |
657 | 656 | if ( is_numeric( $s ) ) { |
658 | 657 | return $s; |
659 | | - } |
660 | | - else { |
| 658 | + } else { |
661 | 659 | return "'$s'"; |
662 | 660 | } |
663 | 661 | } |
664 | 662 | |
665 | 663 | /** |
666 | 664 | * Verifies that a DB2 column/field type is numeric |
667 | | - * @return bool true if numeric |
| 665 | + * |
668 | 666 | * @param $type String: DB2 column type |
| 667 | + * @return Boolean: true if numeric |
669 | 668 | */ |
670 | 669 | public function is_numeric_type( $type ) { |
671 | | - switch ( strtoupper( $type )) { |
672 | | - case 'SMALLINT': |
673 | | - case 'INTEGER': |
674 | | - case 'INT': |
675 | | - case 'BIGINT': |
676 | | - case 'DECIMAL': |
677 | | - case 'REAL': |
678 | | - case 'DOUBLE': |
679 | | - case 'DECFLOAT': |
680 | | - return true; |
| 670 | + switch ( strtoupper( $type ) ) { |
| 671 | + case 'SMALLINT': |
| 672 | + case 'INTEGER': |
| 673 | + case 'INT': |
| 674 | + case 'BIGINT': |
| 675 | + case 'DECIMAL': |
| 676 | + case 'REAL': |
| 677 | + case 'DOUBLE': |
| 678 | + case 'DECFLOAT': |
| 679 | + return true; |
681 | 680 | } |
682 | 681 | return false; |
683 | 682 | } |
— | — | @@ -695,7 +694,7 @@ |
696 | 695 | $s = utf8_encode( $s ); |
697 | 696 | // Fix its stupidity |
698 | 697 | $from = array( "\\\\", "\\'", '\\n', '\\t', '\\"', '\\r' ); |
699 | | - $to = array( "\\", "''", "\n", "\t", '"', "\r" ); |
| 698 | + $to = array( "\\", "''", "\n", "\t", '"', "\r" ); |
700 | 699 | $s = str_replace( $from, $to, $s ); // DB2 expects '', not \' escaping |
701 | 700 | return $s; |
702 | 701 | } |
— | — | @@ -778,8 +777,7 @@ |
779 | 778 | foreach ( $a as $field => $value ) { |
780 | 779 | if ( !$first ) { |
781 | 780 | $list .= ", $field = ?"; |
782 | | - } |
783 | | - else { |
| 781 | + } else { |
784 | 782 | $list .= "$field = ?"; |
785 | 783 | $first = false; |
786 | 784 | } |
— | — | @@ -796,6 +794,7 @@ |
797 | 795 | /** |
798 | 796 | * Construct a LIMIT query with optional offset |
799 | 797 | * This is used for query pages |
| 798 | + * |
800 | 799 | * @param $sql string SQL query we will append the limit too |
801 | 800 | * @param $limit integer the SQL limit |
802 | 801 | * @param $offset integer the SQL offset (default false) |
— | — | @@ -808,8 +807,7 @@ |
809 | 808 | if( $offset ) { |
810 | 809 | if ( stripos( $sql, 'where' ) === false ) { |
811 | 810 | return "$sql AND ( ROWNUM BETWEEN $offset AND $offset+$limit )"; |
812 | | - } |
813 | | - else { |
| 811 | + } else { |
814 | 812 | return "$sql WHERE ( ROWNUM BETWEEN $offset AND $offset+$limit )"; |
815 | 813 | } |
816 | 814 | } |
— | — | @@ -818,8 +816,9 @@ |
819 | 817 | |
820 | 818 | /** |
821 | 819 | * Handle reserved keyword replacement in table names |
822 | | - * @return |
| 820 | + * |
823 | 821 | * @param $name Object |
| 822 | + * @return String |
824 | 823 | */ |
825 | 824 | public function tableName( $name ) { |
826 | 825 | // we want maximum compatibility with MySQL schema |
— | — | @@ -828,10 +827,11 @@ |
829 | 828 | |
830 | 829 | /** |
831 | 830 | * Generates a timestamp in an insertable format |
832 | | - * @return string timestamp value |
| 831 | + * |
833 | 832 | * @param $ts timestamp |
| 833 | + * @return String: timestamp value |
834 | 834 | */ |
835 | | - public function timestamp( $ts=0 ) { |
| 835 | + public function timestamp( $ts = 0 ) { |
836 | 836 | // TS_MW cannot be easily distinguished from an integer |
837 | 837 | return wfTimestamp( TS_DB2, $ts ); |
838 | 838 | } |
— | — | @@ -867,6 +867,7 @@ |
868 | 868 | /** |
869 | 869 | * Updates the mInsertId property with the value of the last insert |
870 | 870 | * into a generated column |
| 871 | + * |
871 | 872 | * @param $table String: sanitized table name |
872 | 873 | * @param $primaryKey Mixed: string name of the primary key |
873 | 874 | * @param $stmt Resource: prepared statement resource |
— | — | @@ -925,7 +926,7 @@ |
926 | 927 | // assume success |
927 | 928 | $res = true; |
928 | 929 | // If we are not in a transaction, we need to be for savepoint trickery |
929 | | - if ( ! $this->mTrxLevel ) { |
| 930 | + if ( !$this->mTrxLevel ) { |
930 | 931 | $this->begin(); |
931 | 932 | } |
932 | 933 | |
— | — | @@ -950,14 +951,13 @@ |
951 | 952 | // insert each row into the database |
952 | 953 | $res = $res & $this->execute( $stmt, $row ); |
953 | 954 | if ( !$res ) { |
954 | | - $this->installPrint( "Last error:" ); |
| 955 | + $this->installPrint( 'Last error:' ); |
955 | 956 | $this->installPrint( $this->lastError() ); |
956 | 957 | } |
957 | 958 | // get the last inserted value into a generated column |
958 | 959 | $this->calcInsertId( $table, $primaryKey, $stmt ); |
959 | 960 | } |
960 | | - } |
961 | | - else { |
| 961 | + } else { |
962 | 962 | $olde = error_reporting( 0 ); |
963 | 963 | // For future use, we may want to track the number of actual inserts |
964 | 964 | // Right now, insert (all writes) simply return true/false |
— | — | @@ -970,11 +970,10 @@ |
971 | 971 | $overhead = "SAVEPOINT $ignore ON ROLLBACK RETAIN CURSORS"; |
972 | 972 | db2_exec( $this->mConn, $overhead, $this->mStmtOptions ); |
973 | 973 | |
974 | | - |
975 | 974 | $this->execute( $stmt, $row ); |
976 | 975 | |
977 | 976 | if ( !$res2 ) { |
978 | | - $this->installPrint( "Last error:" ); |
| 977 | + $this->installPrint( 'Last error:' ); |
979 | 978 | $this->installPrint( $this->lastError() ); |
980 | 979 | } |
981 | 980 | // get the last inserted value into a generated column |
— | — | @@ -984,8 +983,7 @@ |
985 | 984 | if ( $errNum ) { |
986 | 985 | db2_exec( $this->mConn, "ROLLBACK TO SAVEPOINT $ignore", |
987 | 986 | $this->mStmtOptions ); |
988 | | - } |
989 | | - else { |
| 987 | + } else { |
990 | 988 | db2_exec( $this->mConn, "RELEASE SAVEPOINT $ignore", |
991 | 989 | $this->mStmtOptions ); |
992 | 990 | $numrowsinserted++; |
— | — | @@ -1015,12 +1013,14 @@ |
1016 | 1014 | $schema = $this->mSchema; |
1017 | 1015 | // find out the primary keys |
1018 | 1016 | $keyres = db2_primary_keys( $this->mConn, null, strtoupper( $schema ), |
1019 | | - strtoupper( $table )); |
| 1017 | + strtoupper( $table ) |
| 1018 | + ); |
1020 | 1019 | $keys = array(); |
1021 | 1020 | for ( |
1022 | 1021 | $row = $this->fetchObject( $keyres ); |
1023 | 1022 | $row != null; |
1024 | | - $row = $this->fetchObject( $keyres )) |
| 1023 | + $row = $this->fetchObject( $keyres ) |
| 1024 | + ) |
1025 | 1025 | { |
1026 | 1026 | $keys[] = strtolower( $row->column_name ); |
1027 | 1027 | } |
— | — | @@ -1060,7 +1060,7 @@ |
1061 | 1061 | $sql .= " WHERE " . $this->makeList( $conds, LIST_AND ); |
1062 | 1062 | } |
1063 | 1063 | $stmt = $this->prepare( $sql ); |
1064 | | - $this->installPrint( "UPDATE: " . print_r( $values, TRUE )); |
| 1064 | + $this->installPrint( 'UPDATE: ' . print_r( $values, true ) ); |
1065 | 1065 | // assuming for now that an array with string keys will work |
1066 | 1066 | // if not, convert to simple array first |
1067 | 1067 | $result = $this->execute( $stmt, $values ); |
— | — | @@ -1098,8 +1098,9 @@ |
1099 | 1099 | // Forced result for simulated queries |
1100 | 1100 | return $this->mAffectedRows; |
1101 | 1101 | } |
1102 | | - if( empty( $this->mLastResult ) ) |
| 1102 | + if( empty( $this->mLastResult ) ) { |
1103 | 1103 | return 0; |
| 1104 | + } |
1104 | 1105 | return db2_num_rows( $this->mLastResult ); |
1105 | 1106 | } |
1106 | 1107 | |
— | — | @@ -1133,7 +1134,7 @@ |
1134 | 1135 | foreach ( $uniqueIndexes as $index ) { |
1135 | 1136 | if ( $first ) { |
1136 | 1137 | $first = false; |
1137 | | - $sql .= "( "; |
| 1138 | + $sql .= '( '; |
1138 | 1139 | } else { |
1139 | 1140 | $sql .= ' ) OR ( '; |
1140 | 1141 | } |
— | — | @@ -1175,8 +1176,7 @@ |
1176 | 1177 | } |
1177 | 1178 | if ( $this->mNumRows ) { |
1178 | 1179 | return $this->mNumRows; |
1179 | | - } |
1180 | | - else { |
| 1180 | + } else { |
1181 | 1181 | return 0; |
1182 | 1182 | } |
1183 | 1183 | } |
— | — | @@ -1208,7 +1208,7 @@ |
1209 | 1209 | $res = $res->result; |
1210 | 1210 | } |
1211 | 1211 | if ( !@db2_free_result( $res ) ) { |
1212 | | - throw new DBUnexpectedError( $this, "Unable to free DB2 result\n" ); |
| 1212 | + throw new DBUnexpectedError( $this, "Unable to free DB2 result\n" ); |
1213 | 1213 | } |
1214 | 1214 | } |
1215 | 1215 | |
— | — | @@ -1255,7 +1255,7 @@ |
1256 | 1256 | * @return Mixed: database result resource for fetch functions or false |
1257 | 1257 | * on failure |
1258 | 1258 | */ |
1259 | | - public function select( $table, $vars, $conds='', $fname = 'DatabaseIbm_db2::select', $options = array(), $join_conds = array() ) |
| 1259 | + public function select( $table, $vars, $conds = '', $fname = 'DatabaseIbm_db2::select', $options = array(), $join_conds = array() ) |
1260 | 1260 | { |
1261 | 1261 | $res = parent::select( $table, $vars, $conds, $fname, $options, |
1262 | 1262 | $join_conds ); |
— | — | @@ -1291,7 +1291,6 @@ |
1292 | 1292 | $obj = $this->fetchObject( $res2 ); |
1293 | 1293 | $this->mNumRows = $obj->num_rows; |
1294 | 1294 | |
1295 | | - |
1296 | 1295 | return $res; |
1297 | 1296 | } |
1298 | 1297 | |
— | — | @@ -1337,10 +1336,10 @@ |
1338 | 1337 | |
1339 | 1338 | /** |
1340 | 1339 | * Returns link to IBM DB2 free download |
1341 | | - * @return string wikitext of a link to the server software's web site |
| 1340 | + * @return String: wikitext of a link to the server software's web site |
1342 | 1341 | */ |
1343 | 1342 | public static function getSoftwareLink() { |
1344 | | - return "[http://www.ibm.com/db2/express/ IBM DB2]"; |
| 1343 | + return '[http://www.ibm.com/db2/express/ IBM DB2]'; |
1345 | 1344 | } |
1346 | 1345 | |
1347 | 1346 | /** |
— | — | @@ -1350,7 +1349,7 @@ |
1351 | 1350 | * @return String |
1352 | 1351 | */ |
1353 | 1352 | public function getSearchEngine() { |
1354 | | - return "SearchIBM_DB2"; |
| 1353 | + return 'SearchIBM_DB2'; |
1355 | 1354 | } |
1356 | 1355 | |
1357 | 1356 | /** |
— | — | @@ -1392,9 +1391,9 @@ |
1393 | 1392 | * Not implemented |
1394 | 1393 | * @return string '' |
1395 | 1394 | */ |
1396 | | - public function getStatus( $which="%" ) { |
1397 | | - $this->installPrint( 'Not implemented for DB2: getStatus()' ); |
1398 | | - return ''; |
| 1395 | + public function getStatus( $which = '%' ) { |
| 1396 | + $this->installPrint( 'Not implemented for DB2: getStatus()' ); |
| 1397 | + return ''; |
1399 | 1398 | } |
1400 | 1399 | /** |
1401 | 1400 | * Not implemented |
— | — | @@ -1443,8 +1442,9 @@ |
1444 | 1443 | $row = $this->fetchObject( $res ); |
1445 | 1444 | if ( $row != null ) { |
1446 | 1445 | return $row; |
| 1446 | + } else { |
| 1447 | + return false; |
1447 | 1448 | } |
1448 | | - else return false; |
1449 | 1449 | } |
1450 | 1450 | |
1451 | 1451 | /** |
— | — | @@ -1681,7 +1681,7 @@ |
1682 | 1682 | * Switches module between regular and install modes |
1683 | 1683 | */ |
1684 | 1684 | public function setMode( $mode ) { |
1685 | | - $old = $this->mMode; |
| 1685 | + $old = $this->mMode; |
1686 | 1686 | $this->mMode = $mode; |
1687 | 1687 | return $old; |
1688 | 1688 | } |
— | — | @@ -1693,7 +1693,7 @@ |
1694 | 1694 | * @return String |
1695 | 1695 | */ |
1696 | 1696 | function bitNot( $field ) { |
1697 | | - //expecting bit-fields smaller than 4bytes |
| 1697 | + // expecting bit-fields smaller than 4bytes |
1698 | 1698 | return "BITNOT( $field )"; |
1699 | 1699 | } |
1700 | 1700 | |