! -> Note
$ -> Affected files
+14-Oct-2010 Joe Hunt
+# Check for empty class ID and better test for type/account id/name.
+$ /gl/manage/gl_account_classes.php
+ /gl/manage/gl_account_types.php
+ /gl/manage/gl_accounts.php
+
12-Oct-2010 Janusz Dobrowolski
# Upgrade failed when MySQL run in strict mode.
$ /sql/alter2.3.sql
function can_process()
{
global $use_oldstyle_convert;
- /*if (!is_numeric($_POST['id']))
+
+ if (strlen(trim($_POST['id'])) == 0)
{
- display_error( _("The account class ID must be numeric."));
+ display_error( _("The account class ID cannot be empty."));
set_focus('id');
return false;
- }*/
- if (strlen($_POST['name']) == 0)
+ }
+ if (strlen(trim($_POST['name'])) == 0)
{
display_error( _("The account class name cannot be empty."));
set_focus('name');
function can_process()
{
- if ($_POST['id'] == "")
+ if (strlen(trim($_POST['id'])) == 0)
{
display_error( _("The account group id cannot be empty."));
set_focus('id');
return false;
}
- if (strlen($_POST['name']) == 0)
+ if (strlen(trim($_POST['name'])) == 0)
{
display_error( _("The account group name cannot be empty."));
set_focus('name');
$input_error = 0;
- if (strlen($_POST['account_code']) == 0)
+ if (strlen(trim($_POST['account_code'])) == 0)
{
$input_error = 1;
display_error( _("The account code must be entered."));
set_focus('account_code');
}
- elseif (strlen($_POST['account_name']) == 0)
+ elseif (strlen(trim($_POST['account_name'])) == 0)
{
$input_error = 1;
display_error( _("The account name cannot be empty."));