Localization update for he.
[lhc/web/wiklou.git] / maintenance / fetchText.php
index 3b745c0..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";
@@ -31,6 +37,3 @@ function doGetText( $db, $id ) {
        }
        return $text;
 }
-
-
-?>
\ No newline at end of file