mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
force re-import of etemplates if app-version changes
This commit is contained in:
parent
1c013e92f0
commit
639fd82199
@ -969,12 +969,15 @@ class boetemplate extends soetemplate
|
||||
if (($time = @filemtime($path)))
|
||||
{
|
||||
$templ = new boetemplate(array('name' => '.'.$app,'lang' => '##'));
|
||||
if ($templ->lang != '##' || $templ->modified < $time) // need to import
|
||||
if ($templ->lang != '##' || $templ->version != $GLOBALS['egw_info']['apps'][$app]['version'] ||
|
||||
$templ->modified < $time) // need to import
|
||||
{
|
||||
$templ->delete(); // delete old timestamp
|
||||
//echo "<p>".__METHOD__."($app) import necessary, as app-modified=$templ->modified < filemtime($path)=$time test-tpl=".array2string($templ->as_array(1))."</p>\n";
|
||||
$ret = self::import_dump($app);
|
||||
$templ->modified = $time;
|
||||
$templ->save('.'.$app,'','##');
|
||||
// store new timestamp incl. app version
|
||||
$templ->save('.'.$app,'','##',0,$GLOBALS['egw_info']['apps'][$app]['version']);
|
||||
}
|
||||
}
|
||||
return $ret;
|
||||
|
Loading…
Reference in New Issue
Block a user