mirror of
https://github.com/getgrav/grav.git
synced 2026-05-07 23:16:59 +02:00
Merge remote-tracking branch 'origin/feature/objects' into feature/objects
This commit is contained in:
@@ -5,11 +5,14 @@
|
||||
* Added default setting to only allow `direct-installs` from official GPM. Can be configured in `system.yaml`
|
||||
* Added a new `Utils::isValidUrl()` method
|
||||
* Added optional parameter to `|markdown(false)` filter to toggle block/line processing (default|true = `block`)
|
||||
* Added new `Page::folderExists()` method
|
||||
1. [](#improved)
|
||||
* Genericized `direct-install` so it can be called via Admin plugin
|
||||
1. [](#bugfix)
|
||||
* Fixed a minor bug in Number validation [#1329](https://github.com/getgrav/grav/issues/1329)
|
||||
* Fixed exception when trying to find user account and there is no `user://accounts` folder
|
||||
* Fixed issue when setting `Page::expires(0)` [Admin #1009](https://github.com/getgrav/grav-plugin-admin/issues/1009)
|
||||
* Removed ID from `nonce_field()` Twig function causing validation errors [Form #115](https://github.com/getgrav/grav-plugin-form/issues/115)
|
||||
|
||||
# v1.1.17
|
||||
## 02/17/2017
|
||||
|
||||
@@ -339,7 +339,7 @@ class Validation
|
||||
|
||||
protected static function filterNumber($value, array $params, array $field)
|
||||
{
|
||||
return self::validateFloat($value, $params) ? (float) $value : (int) $value;
|
||||
return (string)(int)$value !== (string)(float)$value ? (float) $value : (int) $value;
|
||||
}
|
||||
|
||||
protected static function filterDateTime($value, array $params, array $field)
|
||||
|
||||
@@ -1208,7 +1208,7 @@ class Page
|
||||
$this->expires = $var;
|
||||
}
|
||||
|
||||
return empty($this->expires) ? Grav::instance()['config']->get('system.pages.expires') : $this->expires;
|
||||
return !isset($this->expires) ? Grav::instance()['config']->get('system.pages.expires') : $this->expires;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2560,6 +2560,16 @@ class Page
|
||||
return $file && $file->exists();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether or not the current folder exists
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function folderExists()
|
||||
{
|
||||
return file_exists($this->path());
|
||||
}
|
||||
|
||||
/**
|
||||
* Cleans the path.
|
||||
*
|
||||
|
||||
@@ -784,7 +784,7 @@ class TwigExtension extends \Twig_Extension
|
||||
*/
|
||||
public function nonceFieldFunc($action, $nonceParamName = 'nonce')
|
||||
{
|
||||
$string = '<input type="hidden" id="' . $nonceParamName . '" name="' . $nonceParamName . '" value="' . Utils::getNonce($action) . '" />';
|
||||
$string = '<input type="hidden" name="' . $nonceParamName . '" value="' . Utils::getNonce($action) . '" />';
|
||||
|
||||
return $string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user