[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: etemplate/inc class.editor.inc.php,1.12,1.13
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: etemplate/inc class.editor.inc.php,1.12,1.13 |
Date: |
Thu, 12 Sep 2002 06:58:00 -0400 |
Update of /cvsroot/phpgroupware/etemplate/inc
In directory subversions:/tmp/cvs-serv22920
Modified Files:
class.editor.inc.php
Log Message:
some improvements fixes in the exitor:
- editor warns now if newer version of template exists
- import xml is not longer Show-template page (etemplate.editor.buttons
splitted in 2 templates one for show and one for edit)
Index: class.editor.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/etemplate/inc/class.editor.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** class.editor.inc.php 12 Sep 2002 10:03:52 -0000 1.12
--- class.editor.inc.php 12 Sep 2002 10:57:58 -0000 1.13
***************
*** 29,33 ****
'no_filename'=> 'no filename given or selected via
Browse...',
'not_writeable' => "Error: webserver is not allowed to
write into '%s' !!!",
! 'exported' => "eTemplate '%s' written to '%s'"
);
var $aligns = array(
--- 29,34 ----
'no_filename'=> 'no filename given or selected via
Browse...',
'not_writeable' => "Error: webserver is not allowed to
write into '%s' !!!",
! 'exported' => "eTemplate '%s' written to '%s'",
! 'newer_version' => "newer version '%s' exists !!!"
);
var $aligns = array(
***************
*** 101,105 ****
each($this->etemplate->data);
}
! $no_button = array('values' => True,'edit' => True);
while (list($row,$cols) = each($this->etemplate->data))
{
--- 102,106 ----
each($this->etemplate->data);
}
! $no_button = array();
while (list($row,$cols) = each($this->etemplate->data))
{
***************
*** 306,309 ****
--- 307,318 ----
if ($content['read'])
{
+ if ($content['version'] != '')
+ {
+ $save_version = $content['version'];
+ unset($content['version']);
+ $this->etemplate->read($content);
+ $newest_version =
$this->etemplate->version;
+ $content['version'] = $save_version;
+ }
if (!$this->etemplate->read($content))
{
***************
*** 326,329 ****
--- 335,342 ----
}
}
+ elseif ($newest_version != '' &&
$this->etemplate->version != $newest_version)
+ {
+ $msg =
sprintf($this->messages['newer_version'],$newest_version);
+ }
}
elseif ($content['delete'])
***************
*** 566,569 ****
--- 579,591 ----
{
$msg = $this->messages['not_found'];
+
+ if (isset($post_vars['name']))
+ {
+ $post_vars['version'] = ''; //
trying it without version
+ if ($this->etemplate->read($post_vars))
+ {
+ $msg =
$this->messages['other_version'];
+ }
+ }
}
if (!$msg && isset($post_vars['delete']))
***************
*** 580,591 ****
$show = new etemplate('etemplate.editor.show');
- $no_buttons = array(
- 'save' => True,
- 'show' => True,
- 'dump' => True,
- 'langfile' => True,
- 'size' => True,
- 'export_xml' => True
- );
if (!$msg && isset($post_vars['values']) &&
!isset($post_vars['vals']))
{
--- 602,605 ----
***************
*** 611,615 ****
}
}
!
$show->exec('etemplate.editor.show',$content,array(),$no_buttons,array('olds'
=> $vals),'');
}
--- 625,629 ----
}
}
!
$show->exec('etemplate.editor.show',$content,array(),'',array('olds' =>
$vals),'');
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: etemplate/inc class.editor.inc.php,1.12,1.13,
Ralf Becker <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: etemplate/setup etemplates.inc.php,1.13,1.14 phpgw_en.lang,1.8,1.9
- Next by Date:
[Phpgroupware-cvs] CVS: etemplate/setup etemplates.inc.php,1.14,1.15 phpgw_en.lang,1.9,1.10
- Previous by thread:
[Phpgroupware-cvs] CVS: etemplate/setup etemplates.inc.php,1.13,1.14 phpgw_en.lang,1.8,1.9
- Next by thread:
[Phpgroupware-cvs] CVS: etemplate/setup etemplates.inc.php,1.14,1.15 phpgw_en.lang,1.9,1.10
- Index(es):