diff --git a/etemplate/inc/class.editor.inc.php b/etemplate/inc/class.editor.inc.php index 40fea14f12..4e682feaff 100644 --- a/etemplate/inc/class.editor.inc.php +++ b/etemplate/inc/class.editor.inc.php @@ -1529,13 +1529,16 @@ if (is_array($content)) { $path = $content['goto'] ? $content['goto'] : ($content['goto2'] ? $content['goto2'] : $content['path']); - $Ok = $this->etemplate->read($content['name'],$content['template'],$content['lang'],$content['old_version']); + $Ok = $this->etemplate->read($content['name'],$content['template'],$content['lang'],0,$path ? $content['version'] : $content['old_version']); } else { //echo "

".($_GET['path']).":

\n"; - list($name,$path) = explode(':',$_GET['path'],2); // : - $Ok = $this->etemplate->read($name); + list($name,$version,$path) = explode(':',$_GET['path'],3); // :: + $Ok = $this->etemplate->read(array( + 'name' => $name, + 'version' => $version, + )); } if (!$Ok && !$content['cancel']) { diff --git a/etemplate/inc/class.uietemplate.inc.php b/etemplate/inc/class.uietemplate.inc.php index ea8d0374be..a04f5a540f 100644 --- a/etemplate/inc/class.uietemplate.inc.php +++ b/etemplate/inc/class.uietemplate.inc.php @@ -958,7 +958,7 @@ if (!isset($cell['obj']->onclick_handler)) $cell['obj']->onclick_handler = $this->onclick_handler; if ($cell['obj']->no_onclick) { - $cell['obj']->onclick_proxy = $this->onclick_proxy ? $this->onclick_proxy : $this->name.':'.$path; + $cell['obj']->onclick_proxy = $this->onclick_proxy ? $this->onclick_proxy : $this->name.':'.$this->version.':'.$path; } $html = $cell['obj']->show($content,$this->sel_options,$readonlys,$cname,$show_c,$show_row); break; @@ -1253,7 +1253,7 @@ //echo "

$this->name($this->onclick_handler:$this->no_onclick:$this->onclick_proxy): $cell[type]/$cell[name]

\n"; if ($this->onclick_handler && !isset($this->widgets_with_children[$cell['type']])) { - $handler = str_replace('%p',$this->no_onclick ? $this->onclick_proxy : $this->name.':'.$path, + $handler = str_replace('%p',$this->no_onclick ? $this->onclick_proxy : $this->name.':'.$this->version.':'.$path, $this->onclick_handler); if ($type == 'button' || !$label) // add something to click on {