3 require_once 'Pman.php'; /// needed as we might not be included from pman..
5 class Pman_Cms_OutputTranslations extends Pman
16 $template = DB_DataObject::factory('cms_template');
18 foreach ($template->fetchAll() as $tmpl){
19 $base = DB_DataObject::factory('cms_templatestr');
21 'template_id' => $template->id,
25 $base = $base->fetchAll('id');
27 $translation = DB_DataObject::factory('cms_templatestr');
28 $translation->autoJoin();
29 $translation->setFrom(array(
30 'template_id' => $template->id,
31 'lang' => $this->lang,
34 $translation->whereAddIn('cms_templatestr.src_id', $base, 'int');
36 foreach ($translation->fetchAll() as $t){
37 if(!isset($ret[$tmpl->template])){
38 $ret[$tmpl->template] = array();
41 $ret[$tmpl->template][$t->src_id_mdsum] = (empty($t->txt)) ? $t->src_id_txt : $t->txt;