From: Alan Knowles Date: Fri, 4 Dec 2020 08:10:53 +0000 (+0800) Subject: sync X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=16c5ba5dc49073794be85750f8e710eb9fc871e0 sync --- diff --git a/DataObjects/Core_template.php b/DataObjects/Core_template.php index 551435d0..143e8a72 100644 --- a/DataObjects/Core_template.php +++ b/DataObjects/Core_template.php @@ -464,7 +464,7 @@ WHERE ( if (file_exists($fname) && strtotime($ts->updated) < filemtime($fname)) { return; // file exists and is newer than our updated line. } - DB_DataObject::debugLevel(1); + //DB_DataObject::debugLevel(1); $ts = DB_DataObject::Factory('core_templatestr'); $ts->autoJoin(); @@ -474,7 +474,7 @@ WHERE ( $words = $ts->fetchAll('src_id_txt', 'txt' ); if (!file_exists($fdir)) { - var_dump($fdir); + //var_dump($fdir); mkdir($fdir, 0700, true); } @@ -505,7 +505,7 @@ WHERE ( `$cmd`; - var_dump(_("Number distributed to Journalists")); + return; diff --git a/I18n.php b/I18n.php index 101cdda4..5f70c7a4 100644 --- a/I18n.php +++ b/I18n.php @@ -235,7 +235,12 @@ class Pman_Core_I18n extends Pman if (empty($k)) { return '??'; } - $lang = !$au || empty($au->lang ) ? 'en' : (is_string($au) ? $au : $au->lang); + $fo = &PEAR::getStaticProperty('HTML_Template_Flexy','options'); + + $fallback_lang = empty($fo['locale']) ? 'en' : $fo['locale']; + + + $lang = empty($au ) ? $fallback_lang : (is_string($au) ? $au : $au->lang); // does it need caching?