Version 4.2.0
This commit is contained in:
1 parent
0dc2aee5ed
commit
96997ddd8e
2074 files changed
+125454
-55780
No files matched your search
@@ -1,12 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Date input class for Form Builder
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @since 8 Mar 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\Helpers\Form;
|
||||
@@ -65,7 +64,7 @@ class _Date extends FormAbstract
|
||||
* Constructor
|
||||
* Formats the value appropriately
|
||||
*
|
||||
* @see \IPS\Helpers\Form\Abstract::__construct
|
||||
* @see \IPS\Helpers\Form\FormAbstract::__construct
|
||||
* @param string $name Name
|
||||
* @param mixed $defaultValue Default value
|
||||
* @param bool $required Required?
|
||||
@@ -90,7 +89,7 @@ class _Date extends FormAbstract
|
||||
call_user_func_array( 'parent::__construct', func_get_args() );
|
||||
|
||||
/* Set min/max - hardcoded to 32bit values rather than using PHP_INT_MAX because the MySQL server may be 32-bit even if the web server is 64 */
|
||||
if ( !isset( $this->options['min'] ) or $this->options['min']->getTimestamp() < 2147483648 )
|
||||
if ( !isset( $this->options['min'] ) or $this->options['min']->getTimestamp() < -2147483648 )
|
||||
{
|
||||
$this->options['min'] = \IPS\DateTime::ts( -2147483648 );
|
||||
}
|
||||
@@ -275,7 +274,7 @@ class _Date extends FormAbstract
|
||||
/* Unlimited is fine */
|
||||
if ( $this->options['unlimited'] !== NULL and $this->value === $this->options['unlimited'] )
|
||||
{
|
||||
return;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Check it's valid */
|
||||
|
||||
Reference in new issue
Block a user