From: <sy...@us...> - 2006-01-06 16:39:36
|
Update of /cvsroot/tikiwiki/tiki In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9221 Modified Files: Tag: BRANCH-1-9 tiki-view_tracker.php tiki-view_tracker_item.php Log Message: mandatory category field is checked now Index: tiki-view_tracker.php =================================================================== RCS file: /cvsroot/tikiwiki/tiki/tiki-view_tracker.php,v retrieving revision 1.72.2.30 retrieving revision 1.72.2.31 diff -u -d -r1.72.2.30 -r1.72.2.31 --- tiki-view_tracker.php 20 Dec 2005 18:16:34 -0000 1.72.2.30 +++ tiki-view_tracker.php 6 Jan 2006 16:39:28 -0000 1.72.2.31 @@ -440,7 +440,13 @@ // Check field values for each type and presence of mandatory ones $mandatory_missing = array(); $err_fields = array(); - $field_errors = $trklib->check_field_values($ins_fields); + $ins_categs = array(); + while (list($postVar, $postVal) = each($_REQUEST)) { + if(preg_match("/^ins_cat_[0-9]+/", $postVar)) { + $ins_categs[] = $postVal[0]; + } + } + $field_errors = $trklib->check_field_values($ins_fields, $ins_categs); $smarty->assign('err_mandatory', $field_errors['err_mandatory']); $smarty->assign('err_value', $field_errors['err_value']); @@ -456,15 +462,6 @@ $itemid = $trklib->replace_item($_REQUEST["trackerId"], $_REQUEST["itemId"], $ins_fields, $_REQUEST['status']); $cookietab = "1"; $smarty->assign('itemId', ''); - // Monchofix 2005. Vamo lo pibeh. - $ins_categs = array(); - while (list($postVar, $postVal) = each($_REQUEST)) - { - if(preg_match("/^ins_cat_[0-9]+/", $postVar)) - { - $ins_categs[] = $postVal[0]; - } - } if (count($ins_categs) > 0) { $cat_type = "tracker ".$_REQUEST["trackerId"]; $cat_objid = $_REQUEST["itemId"]; Index: tiki-view_tracker_item.php =================================================================== RCS file: /cvsroot/tikiwiki/tiki/tiki-view_tracker_item.php,v retrieving revision 1.69.2.63 retrieving revision 1.69.2.64 diff -u -d -r1.69.2.63 -r1.69.2.64 --- tiki-view_tracker_item.php 19 Dec 2005 19:17:13 -0000 1.69.2.63 +++ tiki-view_tracker_item.php 6 Jan 2006 16:39:28 -0000 1.69.2.64 @@ -441,7 +441,7 @@ // Check field values for each type and presence of mandatory ones $mandatory_missing = array(); $err_fields = array(); - $field_errors = $trklib->check_field_values($ins_fields); + $field_errors = $trklib->check_field_values($ins_fields, $ins_categs); $smarty->assign('err_mandatory', $field_errors['err_mandatory']); $smarty->assign('err_value', $field_errors['err_value']); |