function test_import($app) { list($app) = explode('.', $app); if (!$app || $GLOBALS['phpgw_info']['etemplate']['import_tested'][$app]) { return ''; // ensure test is done only once per call and app } $GLOBALS['phpgw_info']['etemplate']['import_tested'][$app] = True; // need to be done before new ... $path = PHPGW_SERVER_ROOT . "/{$app}/setup/etemplates.inc.php"; if ($time = @filemtime($path)) { $templ = new soetemplate(".{$app}", '', '##'); if ($templ->lang != '##' || $templ->modified < $time) { $ret = $this->import_dump($app); $templ->modified = $time; $templ->save(".{$app}", '', '##'); } } return $ret; }
function save($name = '', $template = '.', $lang = '.', $group = '', $version = '.') { if ($result = soetemplate::save($name, $template, $lang, $group, $version)) { $this->store_in_cache(); } return $result; }