X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/febc815b2c9d85be5717da9e8d164bd2daa97e31..16e7b37c7914d753890c1a05a9335f3b43751eb8:/wp-includes/pomo/mo.php diff --git a/wp-includes/pomo/mo.php b/wp-includes/pomo/mo.php index 6bc44d61..47e9b6af 100644 --- a/wp-includes/pomo/mo.php +++ b/wp-includes/pomo/mo.php @@ -15,16 +15,37 @@ class MO extends Gettext_Translations { var $_nplurals = 2; + /** + * Loaded MO file. + * + * @var string + */ + private $filename = ''; + + /** + * Returns the loaded MO file. + * + * @return string The loaded MO file. + */ + public function get_filename() { + return $this->filename; + } + /** * Fills up with the entries from MO file $filename * * @param string $filename MO file to load */ function import_from_file($filename) { - $reader = new POMO_FileReader($filename); - if (!$reader->is_resource()) + $reader = new POMO_FileReader( $filename ); + + if ( ! $reader->is_resource() ) { return false; - return $this->import_from_reader($reader); + } + + $this->filename = (string) $filename; + + return $this->import_from_reader( $reader ); } /** @@ -299,4 +320,4 @@ class MO extends Gettext_Translations { return $this->_nplurals; } } -endif; \ No newline at end of file +endif;