Localization update for he.
[lhc/web/wiklou.git] / maintenance / fetchText.php
index 38ba3fb..91b78be 100644 (file)
@@ -1,7 +1,9 @@
 <?php
-
 /**
  * Communications protocol...
+ *
+ * @file
+ * @ingroup Maintenance
  */
 
 require "commandLine.inc";
@@ -10,6 +12,10 @@ $db = wfGetDB( DB_SLAVE );
 $stdin = fopen( "php://stdin", "rt" );
 while( !feof( $stdin ) ) {
        $line = fgets( $stdin );
+       if( $line === false ) {
+               // We appear to have lost contact...
+               break;
+       }
        $textId = intval( $line );
        $text = doGetText( $db, $textId );
        echo strlen( $text ) . "\n";
@@ -29,10 +35,5 @@ function doGetText( $db, $id ) {
        if( $text === false ) {
                return false;
        }
-       $stripped = str_replace( "\r", "", $text );
-       $normalized = UtfNormal::cleanUp( $stripped );
-       return $normalized;
+       return $text;
 }
-
-
-?>
\ No newline at end of file