$ -> Affected files
22-Mar-2010 Joe Hunt
-# Error editing (updating) Account Groups
+# Error editing (updating) Account Groups and problem
+ with "00" == "0" in php.
$ /gl/includes/db/gl_db_account_types.inc
/gl/manage/gl_account_classes.php
/gl/manage/gl_account_types.php
{
global $selected_id;
- /*if (!input_num('id'))
+ if ($_POST['id'] == "")
{
- display_error( _("The account id must be an integer and cannot be empty."));
+ display_error( _("The account group id cannot be empty."));
set_focus('id');
return false;
- }*/
+ }
if (strlen($_POST['name']) == 0)
{
display_error( _("The account group name cannot be empty."));
return false;
}
- if (isset($selected_id) && ($selected_id == $_POST['parent']))
+ if (strcmp($_POST['id'], $_POST['parent']) == 0)
{
- display_error(_("You cannot set an account group to be a subgroup of itself."));
+ display_error("id = {$_POST['id']}, parent = {$_POST['parent']}");
+ //display_error(_("You cannot set an account group to be a subgroup of itself."));
return false;
}
end_table(1);
-submit_add_or_update_center($selected_id == -1, '', 'both');
+submit_add_or_update_center($selected_id == "", '', 'both');
end_form();