fixed fatal error when saving (not applying) the prefs and session-type is php-restore:

The way the old Template class works, does not work together with restoring from the session.
This commit is contained in:
Ralf Becker 2006-12-14 15:17:33 +00:00
parent 0fde7842b4
commit b13cf65101
2 changed files with 5 additions and 4 deletions

View File

@ -74,9 +74,9 @@
foreach($_SESSION['egw_included_files'] as $file)
{
//echo "<p>about to include $file</p>\n";
if (basename($file) == 'navbar.inc.php') break; // the rest is not needed and makes only problems
include_once($file);
if (basename($file) == 'class.egw_framework.inc.php') break; // the rest is not needed and makes only problems
}
$GLOBALS['egw'] = unserialize($_SESSION['egw_object_cache']);

View File

@ -46,8 +46,6 @@ class idots_framework extends egw_framework
function idots_framework($template='idots')
{
$this->egw_framework($template); // call the constructor of the extended class
$this->tpl =& new Template(EGW_TEMPLATE_DIR);
}
/**
@ -64,6 +62,9 @@ class idots_framework extends egw_framework
$content = ob_get_contents();
ob_end_clean();
// the instanciation of the template has to be here and not in the constructor,
// as the old Template class has problems if restored from the session (php-restore)
$this->tpl =& new Template(EGW_TEMPLATE_DIR);
$this->tpl->set_file(array('_head' => 'head.tpl'));
$this->tpl->set_block('_head','head');