From: Janusz Dobrowolski Date: Sun, 27 Jul 2008 21:55:35 +0000 (+0000) Subject: Fixed record selection on pages using non-numeric selectors with simple_page_mode... X-Git-Tag: v2.4.2~19^2~1879 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=ac4ae9a8e2329bb8d56c06759246d02067e2fe09;p=fa-stable.git Fixed record selection on pages using non-numeric selectors with simple_page_mode() helper. --- diff --git a/includes/ui/ui_controls.inc b/includes/ui/ui_controls.inc index 217be194..c9bae54f 100644 --- a/includes/ui/ui_controls.inc +++ b/includes/ui/ui_controls.inc @@ -165,8 +165,13 @@ function delete_link_cell($param, $title=false) function edit_button_cell($name, $value, $title=false) { - label_cell("\n"); +// php silently changes dots,spaces,'[' and characters 128-159 +// to underscore in POST names, to maintain compatibility with register_globals + + label_cell("'=2E',' '=>'=20','='=>'=3D','['=>'=5B'))) + ."\" value=\"$value\"" + .($title ? " title='$title'":'')." />\n"); } //----------------------------------------------------------------------------------- diff --git a/includes/ui/ui_input.inc b/includes/ui/ui_input.inc index 65ac068f..f1fb3691 100644 --- a/includes/ui/ui_input.inc +++ b/includes/ui/ui_input.inc @@ -53,7 +53,9 @@ function simple_page_mode($numeric_id = true) foreach (array('Edit', 'Delete') as $m) { foreach ($_POST as $p => $pvar) { if (strpos($p, $m) === 0) { - $selected_id = substr($p, strlen($m)); +// $selected_id = strtr(substr($p, strlen($m)), array('%2E'=>'.')); + unset($_POST['_focus']); // focus on first form entry + $selected_id = quoted_printable_decode(substr($p, strlen($m))); $Ajax->activate('_page_body'); $Mode = $m; return; diff --git a/inventory/manage/item_units.php b/inventory/manage/item_units.php index 61e4e685..d06828e0 100644 --- a/inventory/manage/item_units.php +++ b/inventory/manage/item_units.php @@ -1,5 +1,4 @@