Index: trunk/phase3/tests/phpunit/includes/BlockTest.php |
— | — | @@ -35,7 +35,7 @@ |
36 | 36 | |
37 | 37 | function testInitializerFunctionsReturnCorrectBlock() { |
38 | 38 | |
39 | | - $this->assertTrue( $this->block->equals( Block::newFromDB('UTBlockee') ), "newFromDB() returns the same block as the one that was made"); |
| 39 | + $this->assertTrue( $this->block->equals( Block::newFromTarget('UTBlockee') ), "newFromTarget() returns the same block as the one that was made"); |
40 | 40 | |
41 | 41 | $this->assertTrue( $this->block->equals( Block::newFromID( 1 ) ), "newFromID() returns the same block as the one that was made"); |
42 | 42 | |
Index: trunk/phase3/includes/db/Database.php |
— | — | @@ -1119,16 +1119,16 @@ |
1120 | 1120 | * @param $table String: table name |
1121 | 1121 | * @param $vars String: the selected variables |
1122 | 1122 | * @param $conds Array: a condition map, terms are ANDed together. |
1123 | | - * Items with numeric keys are taken to be literal conditions |
1124 | | - * Takes an array of selected variables, and a condition map, which is ANDed |
1125 | | - * e.g: selectRow( "page", array( "page_id" ), array( "page_namespace" => |
1126 | | - * NS_MAIN, "page_title" => "Astronomy" ) ) would return an object where |
1127 | | - * $obj- >page_id is the ID of the Astronomy article |
| 1123 | + * Items with numeric keys are taken to be literal conditions |
| 1124 | + * Takes an array of selected variables, and a condition map, which is ANDed |
| 1125 | + * e.g: selectRow( "page", array( "page_id" ), array( "page_namespace" => |
| 1126 | + * NS_MAIN, "page_title" => "Astronomy" ) ) would return an object where |
| 1127 | + * $obj- >page_id is the ID of the Astronomy article |
1128 | 1128 | * @param $fname String: Calling function name |
1129 | 1129 | * @param $options Array |
1130 | 1130 | * @param $join_conds Array |
1131 | 1131 | * |
1132 | | - * @todo migrate documentation to phpdocumentor format |
| 1132 | + * @return ResultWrapper|Bool |
1133 | 1133 | */ |
1134 | 1134 | function selectRow( $table, $vars, $conds, $fname = 'DatabaseBase::selectRow', $options = array(), $join_conds = array() ) { |
1135 | 1135 | $options['LIMIT'] = 1; |
— | — | @@ -3174,7 +3174,7 @@ |
3175 | 3175 | * Fields can be retrieved with $row->fieldname, with fields acting like |
3176 | 3176 | * member variables. |
3177 | 3177 | * |
3178 | | - * @return MySQL row object |
| 3178 | + * @return object |
3179 | 3179 | * @throws DBUnexpectedError Thrown if the database returns an error |
3180 | 3180 | */ |
3181 | 3181 | function fetchObject() { |
— | — | @@ -3185,7 +3185,7 @@ |
3186 | 3186 | * Fetch the next row from the given result object, in associative array |
3187 | 3187 | * form. Fields are retrieved with $row['fieldname']. |
3188 | 3188 | * |
3189 | | - * @return MySQL row object |
| 3189 | + * @return Array |
3190 | 3190 | * @throws DBUnexpectedError Thrown if the database returns an error |
3191 | 3191 | */ |
3192 | 3192 | function fetchRow() { |
Index: trunk/phase3/includes/Block.php |
— | — | @@ -711,7 +711,7 @@ |
712 | 712 | |
713 | 713 | # It's okay to autoblock. Go ahead and create/insert the block. |
714 | 714 | |
715 | | - $ipblock = Block::newFromDB( $autoblockIP ); |
| 715 | + $ipblock = Block::newFromTarget( $autoblockIP ); |
716 | 716 | if ( $ipblock ) { |
717 | 717 | # If the user is already blocked. Then check if the autoblock would |
718 | 718 | # exceed the user block. If it would exceed, then do nothing, else |