Ignore:
Timestamp:
Jul 27, 2015 7:56:08 AM (9 years ago)
Author:
anonymous
Message:

Improved module maker validation output. Allow disabling cache at run time for ACL. Added ACL getList() method. Improved ACL CLI listing. Fixed app boomerang array initialization. Now retaining identical boomerang URLs if the key is different. Added a maximum boomerang time. Added a way to disable cache per request through a query string. Added validator isDecimal() method. Added disableSelectOptions() HTML method. Added getGravatarURL() method. Change how navigation page array is managed. Updated navigation currentPage() method to test an array of URLs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FormValidator.inc.php

    r502 r534  
    384384
    385385    /**
     386     * Check whether input is a Decimal or Fixed type. Check values to be stored in mysql decimal, numeric, num, or fixed types.
     387     * Note: some integers and floats will also pass this test.
     388     * https://dev.mysql.com/doc/refman/5.5/en/fixed-point-types.html
     389     *
     390     * @param  string $form_name the name of the incoming form variable
     391     * @param  string $msg       the message to display on error
     392     * @param  string $val The input data to validate.
     393     * @param  bool $negative_ok  If the value can be unsigned.
     394     * @param  int  $max    Total max number of digits.
     395     * @param  int  $dec    Total max number of digits after the decimal place.
     396     * @return bool   true if value is a float
     397     */
     398    public function isDecimal($form_name, $msg='', $negative_ok=false, $max=10, $dec=2)
     399    {
     400        if (Validator::isDecimal(getFormData($form_name), $negative_ok, $max, $dec)) {
     401            return true;
     402        } else {
     403            $this->addError($form_name, $msg);
     404            return false;
     405        }
     406    }
     407
     408    /**
    386409     * Check whether input is an array.
    387410     *
Note: See TracChangeset for help on using the changeset viewer.