}
- function updateData()
+ function updateData() // this does everything?? not used?
+
{
$this->scanProjectBJS();
$this->scanPmanBJS();
}
- function scanProjectBJS()
+ function scanProjectBJS() // this is probably not used (replace by the CMS scanner)
{
$ff = HTML_FlexyFramework::get();
function scanPmanBJS()
{
-
$ids = array();
foreach ($this->modules() as $m){
$view_name = "Pman.$m";
'view_name' => $view_name,
));
+
+
$o = false;
if($template->find(true)){
$o = clone ($template);
}
+ $updated = empty($template->updated) ? '1970-01-01' : $template->updated ;
+
$template->is_deleted = 0;
$template->filetype = 'bjs';
$template->updated = $template->sqlValue("NOW()");
(empty($o)) ? $template->insert() : $template->update($o);
+
+ if (strtotime($updated) >= filemtime('Pman' . '/' . $m . '/' . $fn)) {
+ continue;
+ }
+
$ids[] = $template->id;
$data = json_decode(file_get_contents('Pman' . '/' . $m . '/' . $fn), true);
if($this->cli){
echo "Sync tables.....\n";
}
+
+ // deactivate all table translation
+ $t = DB_DataObject::factory('core_templatestr');
+ $t->query(
+ "UPDATE core_templatestr
+ SET active = 0
+ WHERE on_table != ''"
+ );
+ // activate the used table translation
foreach($ff->Pman_Core['DataObjects_Core_templatestr']['tables'] as $table=>$cols){
$t = DB_DataObject::factory($table);
foreach($t->fetchAll() as $d) {