コード例 #1
0
 /**
  * This tries to pick up external authors in the source files so that they
  * are not lost if those authors are not among those who have translated in
  * the wiki.
  *
  * @todo Get rid of this
  * @param string $filename
  * @param MessageCollection $collection
  */
 protected function tryReadSource($filename, MessageCollection $collection)
 {
     if (get_class($this->group->getFFS()) !== get_class($this)) {
         return;
     }
     $sourceText = $this->tryReadFile($filename);
     // No need to do anything in SimpleFFS if it's false,
     // it only reads author data from it.
     if ($sourceText !== false) {
         $sourceData = $this->readFromVariable($sourceText);
         if (isset($sourceData['AUTHORS'])) {
             $collection->addCollectionAuthors($sourceData['AUTHORS']);
         }
     }
 }