mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:19:00 +01:00
fixed error messages if olny an other version of an eTemplate is found.
added message if an imported eTemplate/xul-file contains more than one template.
This commit is contained in:
parent
7e2f07bde1
commit
7751df9f39
@ -328,10 +328,14 @@
|
||||
{
|
||||
return $this->list_result(array('result' => $result));
|
||||
}
|
||||
elseif (!count($result) || $this->etemplate->read($result[0]))
|
||||
elseif (!count($result) || !$this->etemplate->read($result[0]))
|
||||
{
|
||||
$msg = $this->messages['not_found'];
|
||||
}
|
||||
elseif ($content['name'] == $result[0]['name'])
|
||||
{
|
||||
$msg = $this->messages['other_version'];
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif ($newest_version != '' && $this->etemplate->version != $newest_version)
|
||||
@ -445,13 +449,20 @@
|
||||
{
|
||||
$this->etemplate->xul_io = CreateObject('etemplate.xul_io');
|
||||
}
|
||||
$msg = $this->etemplate->xul_io->import(&$this->etemplate,$xul);
|
||||
$imported = $this->etemplate->xul_io->import(&$this->etemplate,$xul);
|
||||
|
||||
if (!$msg)
|
||||
if (is_array($imported))
|
||||
{
|
||||
$msg = sprintf($this->messages['imported'],$this->etemplate->name);
|
||||
if (count($imported) == 1)
|
||||
{
|
||||
$imported = sprintf($this->messages['imported'],$this->etemplate->name);
|
||||
}
|
||||
else
|
||||
{
|
||||
$imported = 'File contains more than one etemplates, last one is shown !!!';
|
||||
}
|
||||
}
|
||||
return $msg;
|
||||
return $imported;
|
||||
}
|
||||
|
||||
function delete($post_vars='',$back = 'edit')
|
||||
|
Loading…
Reference in New Issue
Block a user