}
$ff = HTML_FlexyFramework::get();
$opt_lang = empty($ff->Pman_Core_I18n) ? array( 'l' => array()) : $ff->Pman_Core_I18n;
+
+ $langs = $opt_lang['l'] ;
+ // see what languages are in there already!?
+ $cl = DB_DataObject::factory('cms_templatestr');
+ $cl->selectAdd();
+ $cl->selectAdd('distinct(lang) as lang');
+ $cl->whereAdd("lang != ''");
+ $dblangs = $cl->fetchAll('lang');
+ foreach($langs as $l) {
+ if (!in_array($$l, $dblangs)) {
+ $dblangs[] = $l;
+ }
+ }
+
+
+
// templates.. -- assume the above does the template syncing..
//DB_DataObject::DebugLevel(1);
echo "Sync the Languages template.....\n";
- foreach($opt_lang['l'] as $l) {
+ foreach($dblangs as $l) {
echo "Sync $l Language.....\n";
$tps = DB_DataObject::factory('cms_templatestr');
$tps->syncLang($l); /// this should be configured somewhere..