mirror of
https://github.com/getgrav/grav.git
synced 2025-12-05 15:29:57 +01:00
Fixed MediaTrait::getMedia() to return refreshed Media object after calling MediaTrait::clearMediaCache()
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
* Fixed failed login if user attempts to log in with upper case non-english letters
|
||||
* Removed extra authenticated/authorized fields when saving existing user from a form
|
||||
* Fixed `Grav\Framework\Route::__toString()` returning relative URL, not relative route
|
||||
* Fixed `MediaTrait::getMedia()` to return refreshed `Media` object after calling `MediaTrait::clearMediaCache()`
|
||||
|
||||
# v1.6.0-beta.7
|
||||
## 12/14/2018
|
||||
|
||||
@@ -23,7 +23,10 @@ trait MediaTrait
|
||||
*
|
||||
* @return array Empty array means default ordering.
|
||||
*/
|
||||
abstract public function getMediaOrder();
|
||||
public function getMediaOrder()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get URI ot the associated media. Method will return null if path isn't URI.
|
||||
@@ -95,6 +98,8 @@ trait MediaTrait
|
||||
$cache = $this->getMediaCache();
|
||||
$cacheKey = md5('media' . $this->getCacheKey());
|
||||
$cache->delete($cacheKey);
|
||||
|
||||
$this->media = null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,7 +10,6 @@ namespace Grav\Common\Service;
|
||||
|
||||
use Grav\Common\Config\Config;
|
||||
use Grav\Common\Debugger;
|
||||
use Grav\Common\Inflector;
|
||||
use Grav\Common\Session;
|
||||
use Grav\Common\Uri;
|
||||
use Pimple\Container;
|
||||
|
||||
Reference in New Issue
Block a user