From 179ace0dcf68e4b8a51c199127627daac252a5d5 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Mon, 25 Oct 2010 16:38:17 +0000 Subject: [PATCH] Fixed tabbed_content behaviour. --- CHANGELOG.txt | 2 ++ includes/ui/ui_controls.inc | 15 +++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 1faa3256..f967533b 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -23,6 +23,8 @@ $ -> Affected files ! Release 2.3RC3 25-Oct-2010 Janusz Dobrowolski $ version.php +# Small fix to tabbed_content behaviour. +$ /includes/ui/ui_controls.inc 22-Oct-2010 Janusz Dobrowolski + Added greek installer translation by Kyriakos Tsoukalas diff --git a/includes/ui/ui_controls.inc b/includes/ui/ui_controls.inc index 43b7fd81..a6fd2ef6 100644 --- a/includes/ui/ui_controls.inc +++ b/includes/ui/ui_controls.inc @@ -379,14 +379,13 @@ function tabbed_content_start($name, $tabs, $dft='') { $selname = '_'.$name.'_sel'; $div = '_'.$name.'_div'; - if ($dft=='') - $dft = key($tabs); - $sel = find_submit($name.'_', ''); + $sel = find_submit($name.'_', false); + if($sel==null) + $sel = get_post($selname, (string)($dft==='' ? key($tabs) : $dft)); + + if ($sel!==@$_POST[$selname]) + $Ajax->activate($name); - if ($sel != '') { - $Ajax->activate($name); - } else - $sel = get_post($selname, $dft); $_POST[$selname] = $sel; div_start($name); @@ -397,7 +396,7 @@ function tabbed_content_start($name, $tabs, $dft='') { $disabled = (is_array($tab) && !$tab[1]) ? 'disabled ' : ''; $str .= ( "
  • " ."\n" ."
  • \n" ); -- 2.30.2