+ function beforeUpdate($old, $q, $roo)
+ {
+ if (!empty($q['_rescan'])){
+ if ($this->filetype != 'html') {
+ $roo->jerr("can not update a php source file currently - TDOD");
+ }
+ $pg = HTML_FlexyFramework::get()->page;
+
+ $this->syncTemplatePage(array(
+ 'template_dir' => $pg->rootDir . '/'. str_replace('.', '/', $this->view_name). '/templates',
+ 'template' => $this->template,
+ 'base' => $this->view_name,
+ 'force' => true
+ ));
+ // update the different langage versions of this page.
+ $x = DB_Dataobject::Factory('core_templatestr');
+ $x->selectAdd();
+ $x->selectAdd('distinct(lang) as lang');
+ $x->whereAdd("lang != ''");
+ $langs = $x->fetchAll('lang');
+ foreach($langs as $l) {
+ $x = DB_Dataobject::Factory('core_templatestr');
+ $x->syncLang($l, $this->id);
+ }
+
+
+ $roo->jok("updated -" . $this->template);
+ }
+ }
+
+
+
+