Index: trunk/admin/include/elements.php =================================================================== diff -u -r564 -r624 --- trunk/admin/include/elements.php (.../elements.php) (revision 564) +++ trunk/admin/include/elements.php (.../elements.php) (revision 624) @@ -587,16 +587,29 @@ } -function GetTitle($item_phrase, $tab_phrase, $id) +function GetTitle($item_phrase, $tab_phrase, $id, $item_name = false) { - // gets correct caption for editing windows with tabs + //gets correct caption for editing windows with tabs //echo "In: $item_phrase, $tab_phrase, $id"; - $is_new = isset($_REQUEST['new']) && ($_REQUEST['new'] == 1) ? 1 : 0; + $is_new = (isset($_REQUEST['new']) && ($_REQUEST['new'] == 1)) || $id <= 0 ? 1 : 0; $text = $is_new ? 'la_Text_Adding' : 'la_Text_Editing'; $text = admin_language($text).' '.admin_language($item_phrase); - if($is_new == 0) $text .= ' #'.$id; - $text .= ' - '.admin_language($tab_phrase); + if($is_new == 0) { + if ($item_name == false) { + $text .= ' #'.$id; + } + else { + if ($item_name != '') { + $text .= " '".$item_name."'"; + } + } + } + + if ($tab_phrase != '') { + $text .= ' - '.admin_language($tab_phrase); + } + return $text; }