cvs: phd /include PhDHelper.class.php
| From: | Hannes Magnusson | Date: | Mon, 01 Oct 2007 17:43:23 +0000 |
| Subject: | cvs: phd /include PhDHelper.class.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-119@lists.php.net to get a copy of this message | ||
bjori Mon Oct 1 17:43:23 2007 UTC
Modified files:
/phd/include PhDHelper.class.php
Log:
Fallback to english if the translation file doesn't exist
http://cvs.php.net/viewvc.cgi/phd/include/PhDHelper.class.php?r1=1.5&r2=1.6&diff_format=u
Index: phd/include/PhDHelper.class.php
diff -u phd/include/PhDHelper.class.php:1.5 phd/include/PhDHelper.class.php:1.6
--- phd/include/PhDHelper.class.php:1.5 Mon Oct 1 13:48:53 2007
+++ phd/include/PhDHelper.class.php Mon Oct 1 17:43:23 2007
@@ -1,5 +1,5 @@
<?php
-/* $Id: PhDHelper.class.php,v 1.5 2007/10/01 13:48:53 bjori Exp $ */
+/* $Id: PhDHelper.class.php,v 1.6 2007/10/01 17:43:23 bjori Exp $ */
class PhDHelper {
private $IDs = array();
@@ -38,7 +38,7 @@
$filename = dirname(__FILE__) ."/langs/$lang.xml";
$r = new XMLReader;
if (!$r->open($filename)) {
- throw new Exception("Could not open $filename");
+ return $this->autogen($text, "en");
}
$autogen = array();
while ($r->read()) {