Index: trunk/admin/config/edit_label.php =================================================================== diff -u -r13 -r38 --- trunk/admin/config/edit_label.php (.../edit_label.php) (revision 13) +++ trunk/admin/config/edit_label.php (.../edit_label.php) (revision 38) @@ -97,26 +97,28 @@ } $section = "in-portal:phrase_editor"; -$ids = $_GET["PhraseId"]; +$ids = GetVar('PhraseId'); -if(strlen($ids)) +if( strlen($ids) ) { + // useless code: begin $ids = str_replace("[","",$ids); $ids = str_replace("]","",$ids); $ids = str_replace("\"","",$ids); $ids = str_replace("\\","",$ids); + // useless code: end $PhraseIds = explode(",",$ids); } else { $LangId = $_GET["LanguageId"]; } -$EditDirect = (int)$_GET["direct"]; +$EditDirect = GetVar('direct'); if($EditDirect) { - $NewLabel = $_GET["label"]; + $NewLabel = GetVar('label'); if(!$LangId) { $LangId = $objSession->Get("Language"); @@ -125,24 +127,24 @@ unset($objEditItems); -if (count($PhraseIds) > 1) { +if ( isset($PhraseIds) && count($PhraseIds) > 1) { $print_list = true; } else { $ado = GetADODBConnection(); $sql = "SELECT PhraseId FROM ".$objSession->GetEditTable("Phrase"); - if ($LangId) { + if ( isset($LangId) && $LangId > 0 ) { $sql .= " WHERE LanguageId = $LangId"; } $rs = $ado->Execute($sql); - if (!$_GET['en']) { + if ( GetVar('en') === false ) { $selected_id = $PhraseIds[0]; } else { - $selected_id = $_GET['PhraseId']; + $selected_id = GetVar('PhraseId'); } $PhraseIdList = ''; @@ -168,9 +170,7 @@ $objListToolBar->Set("CheckClass","ThemeChecks"); $objListToolBar->Add("select", "la_ToolTip_Select","#","swap('select','toolbar/tool_select_f2.gif');", - "swap('select', 'toolbar/tool_select.gif');", - "LangSubmit();", - "tool_select.gif"); + "swap('select', 'toolbar/tool_select.gif');", "LangSubmit();", "tool_select.gif"); $objListToolBar->Add("cancel", "la_ToolTip_Stop","#","swap('cancel','toolbar/tool_stop_f2.gif');", "swap('cancel', 'toolbar/tool_stop.gif');","window.close();","tool_stop.gif"); @@ -209,17 +209,15 @@