mirror of
https://github.com/getgrav/grav.git
synced 2026-05-16 06:45:54 +02:00
Merge branch 'develop' into 1.7
This commit is contained in:
@@ -59,6 +59,7 @@
|
||||
|
||||
1. [](#new)
|
||||
* Added support for custom `FormFlash` save locations
|
||||
* Added a new `Utils::arrayLower()` method for lowercasing arrays
|
||||
1. [](#improved)
|
||||
* Use new `Utils::getSupportedPageTypes()` to enforce `html,htm` at the front of the list [#2531](https://github.com/getgrav/grav/issues/2531)
|
||||
1. [](#bugfix)
|
||||
@@ -70,6 +71,7 @@
|
||||
* Fixed Flex User to have permissions to save and delete his own user
|
||||
* Fixed new Flex User creation not being possible because of username could not be given
|
||||
* Fixed fatal error 'Expiration date must be an integer, a DateInterval or null, "double" given' [#2529](https://github.com/getgrav/grav/issues/2529)
|
||||
* Fixed non-existing Flex object having a bad media folder
|
||||
|
||||
# v1.6.11
|
||||
## 06/21/2019
|
||||
|
||||
@@ -323,6 +323,17 @@ abstract class Utils
|
||||
return (object)array_merge((array)$obj1, (array)$obj2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lowercase an entire array. Useful when combined with `in_array()`
|
||||
*
|
||||
* @param array $a
|
||||
* @return array|false
|
||||
*/
|
||||
public static function arrayLower(Array $a)
|
||||
{
|
||||
return array_combine(array_map('strtolower', $a), $a);
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple function to remove item/s in an array by value
|
||||
*
|
||||
|
||||
@@ -49,7 +49,7 @@ trait FlexMediaTrait
|
||||
*/
|
||||
public function getStorageFolder()
|
||||
{
|
||||
return $this->getFlexDirectory()->getStorageFolder($this->getStorageKey());
|
||||
return $this->exists() ? $this->getFlexDirectory()->getStorageFolder($this->getStorageKey()) : '';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -57,7 +57,7 @@ trait FlexMediaTrait
|
||||
*/
|
||||
public function getMediaFolder()
|
||||
{
|
||||
return $this->getFlexDirectory()->getMediaFolder($this->getStorageKey());
|
||||
return $this->exists() ? $this->getFlexDirectory()->getMediaFolder($this->getStorageKey()) : '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user