http://www.mediawiki.org/wiki/Special:Code/MediaWiki/84498

Revision: 84498
Author:   happy-melon
Date:     2011-03-21 23:03:11 +0000 (Mon, 21 Mar 2011)
Log Message:
-----------
Follow-up r84475: fixing the warning is easy enough... :D  Also some random 
tweaks to Database.php documentation.

Modified Paths:
--------------
    trunk/phase3/includes/Block.php
    trunk/phase3/includes/db/Database.php
    trunk/phase3/tests/phpunit/includes/BlockTest.php

Modified: trunk/phase3/includes/Block.php
===================================================================
--- trunk/phase3/includes/Block.php     2011-03-21 22:09:49 UTC (rev 84497)
+++ trunk/phase3/includes/Block.php     2011-03-21 23:03:11 UTC (rev 84498)
@@ -711,7 +711,7 @@
 
                # It's okay to autoblock. Go ahead and create/insert the block.
 
-               $ipblock = Block::newFromDB( $autoblockIP );
+               $ipblock = Block::newFromTarget( $autoblockIP );
                if ( $ipblock ) {
                        # If the user is already blocked. Then check if the 
autoblock would
                        # exceed the user block. If it would exceed, then do 
nothing, else

Modified: trunk/phase3/includes/db/Database.php
===================================================================
--- trunk/phase3/includes/db/Database.php       2011-03-21 22:09:49 UTC (rev 
84497)
+++ trunk/phase3/includes/db/Database.php       2011-03-21 23:03:11 UTC (rev 
84498)
@@ -1119,16 +1119,16 @@
         * @param $table String: table name
         * @param $vars String: the selected variables
         * @param $conds Array: a condition map, terms are ANDed together.
-        *   Items with numeric keys are taken to be literal conditions
-        * Takes an array of selected variables, and a condition map, which is 
ANDed
-        * e.g: selectRow( "page", array( "page_id" ), array( "page_namespace" 
=>
-        * NS_MAIN, "page_title" => "Astronomy" ) )   would return an object 
where
-        * $obj- >page_id is the ID of the Astronomy article
+        *     Items with numeric keys are taken to be literal conditions
+        *     Takes an array of selected variables, and a condition map, which 
is ANDed
+        *     e.g: selectRow( "page", array( "page_id" ), array( 
"page_namespace" =>
+        *     NS_MAIN, "page_title" => "Astronomy" ) )   would return an 
object where
+        *     $obj- >page_id is the ID of the Astronomy article
         * @param $fname String: Calling function name
         * @param $options Array
         * @param $join_conds Array
         *
-        * @todo migrate documentation to phpdocumentor format
+        * @return ResultWrapper|Bool
         */
        function selectRow( $table, $vars, $conds, $fname = 
'DatabaseBase::selectRow', $options = array(), $join_conds = array() ) {
                $options['LIMIT'] = 1;
@@ -3174,7 +3174,7 @@
         * Fields can be retrieved with $row->fieldname, with fields acting like
         * member variables.
         *
-        * @return MySQL row object
+        * @return object
         * @throws DBUnexpectedError Thrown if the database returns an error
         */
        function fetchObject() {
@@ -3185,7 +3185,7 @@
         * Fetch the next row from the given result object, in associative array
         * form.  Fields are retrieved with $row['fieldname'].
         *
-        * @return MySQL row object
+        * @return Array
         * @throws DBUnexpectedError Thrown if the database returns an error
         */
        function fetchRow() {

Modified: trunk/phase3/tests/phpunit/includes/BlockTest.php
===================================================================
--- trunk/phase3/tests/phpunit/includes/BlockTest.php   2011-03-21 22:09:49 UTC 
(rev 84497)
+++ trunk/phase3/tests/phpunit/includes/BlockTest.php   2011-03-21 23:03:11 UTC 
(rev 84498)
@@ -35,7 +35,7 @@
        
        function testInitializerFunctionsReturnCorrectBlock() {
                
-               $this->assertTrue( $this->block->equals( 
Block::newFromDB('UTBlockee') ), "newFromDB() returns the same block as the one 
that was made");
+               $this->assertTrue( $this->block->equals( 
Block::newFromTarget('UTBlockee') ), "newFromTarget() returns the same block as 
the one that was made");
                
                $this->assertTrue( $this->block->equals( Block::newFromID( 1 ) 
), "newFromID() returns the same block as the one that was made");
                


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to