X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FfetchText.php;h=fc676b89d74c64181eecaebb175e8cb871938c6d;hb=a15fe7dd93cfcd9510b54b8481b4c3aa891ac380;hp=05470d307f24fcd324da66c33cdc4b3b9db9384f;hpb=7ab280ca486e3fef0fd1cbdbc18017d9455f04a1;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/fetchText.php b/maintenance/fetchText.php index 05470d307f..fc676b89d7 100644 --- a/maintenance/fetchText.php +++ b/maintenance/fetchText.php @@ -37,11 +37,11 @@ class FetchText extends Maintenance { /** * returns a string containing the following in order: - * textid - * \n - * length of text (-1 on error = failure to retrieve/unserialize/gunzip/etc) - * \n - * text (may be empty) + * textid + * \n + * length of text (-1 on error = failure to retrieve/unserialize/gunzip/etc) + * \n + * text (may be empty) * * note that that the text string itself is *not* followed by newline */ @@ -59,8 +59,7 @@ class FetchText extends Maintenance { if ( $text === false ) { # actual error, not zero-length text $textLen = "-1"; - } - else { + } else { $textLen = strlen( $text ); } $this->output( $textId . "\n" . $textLen . "\n" . $text ); @@ -69,9 +68,9 @@ class FetchText extends Maintenance { /** * May throw a database error if, say, the server dies during query. - * @param $db DatabaseBase object - * @param $id int The old_id - * @return String + * @param DatabaseBase $db + * @param int $id The old_id + * @return string */ private function doGetText( $db, $id ) { $id = intval( $id ); @@ -83,6 +82,7 @@ class FetchText extends Maintenance { if ( $text === false ) { return false; } + return $text; } }