X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FfetchText.php;h=fc676b89d74c64181eecaebb175e8cb871938c6d;hb=c34a4f9d3def6cc942dc04c9f46e9a4c98e6fbe4;hp=8c46d69682f174b64c5544125bf740abb2aee58d;hpb=117424d9e57256ffb1c27f17ba6eb004d3944ce1;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/fetchText.php b/maintenance/fetchText.php index 8c46d69682..fc676b89d7 100644 --- a/maintenance/fetchText.php +++ b/maintenance/fetchText.php @@ -22,7 +22,7 @@ * @ingroup Maintenance */ -require_once( __DIR__ . '/Maintenance.php' ); +require_once __DIR__ . '/Maintenance.php'; /** * Maintenance script used to fetch page text in a subprocess. @@ -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,9 +82,10 @@ class FetchText extends Maintenance { if ( $text === false ) { return false; } + return $text; } } $maintClass = "FetchText"; -require_once( RUN_MAINTENANCE_IF_MAIN ); +require_once RUN_MAINTENANCE_IF_MAIN;