mirror of
https://github.com/getgrav/grav.git
synced 2026-05-07 20:37:03 +02: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
|
* 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
|
* Removed extra authenticated/authorized fields when saving existing user from a form
|
||||||
* Fixed `Grav\Framework\Route::__toString()` returning relative URL, not relative route
|
* 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
|
# v1.6.0-beta.7
|
||||||
## 12/14/2018
|
## 12/14/2018
|
||||||
|
|||||||
@@ -23,7 +23,10 @@ trait MediaTrait
|
|||||||
*
|
*
|
||||||
* @return array Empty array means default ordering.
|
* @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.
|
* Get URI ot the associated media. Method will return null if path isn't URI.
|
||||||
@@ -95,6 +98,8 @@ trait MediaTrait
|
|||||||
$cache = $this->getMediaCache();
|
$cache = $this->getMediaCache();
|
||||||
$cacheKey = md5('media' . $this->getCacheKey());
|
$cacheKey = md5('media' . $this->getCacheKey());
|
||||||
$cache->delete($cacheKey);
|
$cache->delete($cacheKey);
|
||||||
|
|
||||||
|
$this->media = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ namespace Grav\Common\Service;
|
|||||||
|
|
||||||
use Grav\Common\Config\Config;
|
use Grav\Common\Config\Config;
|
||||||
use Grav\Common\Debugger;
|
use Grav\Common\Debugger;
|
||||||
use Grav\Common\Inflector;
|
|
||||||
use Grav\Common\Session;
|
use Grav\Common\Session;
|
||||||
use Grav\Common\Uri;
|
use Grav\Common\Uri;
|
||||||
use Pimple\Container;
|
use Pimple\Container;
|
||||||
|
|||||||
Reference in New Issue
Block a user