mirror of
https://github.com/getgrav/grav.git
synced 2026-07-20 08:51:56 +02:00
Fixed global media files disappearing after a reload (#1545)
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
# v1.3.0-rc.5
|
||||
## mm/dd/2017
|
||||
|
||||
1. [](#bugfix)
|
||||
* Fixed global media files disappearing after a reload (#1545)
|
||||
|
||||
# v1.3.0-rc.4
|
||||
## 06/22/2017
|
||||
|
||||
|
||||
@@ -30,12 +30,19 @@ class Media extends AbstractMedia
|
||||
{
|
||||
$this->path = $path;
|
||||
|
||||
$this->__wakeup();
|
||||
$this->init();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize static variables on unserialize.
|
||||
*/
|
||||
public function __wakeup()
|
||||
{
|
||||
if (!isset(static::$global)) {
|
||||
// Add fallback to global media.
|
||||
static::$global = new GlobalMedia($path);
|
||||
static::$global = new GlobalMedia();
|
||||
}
|
||||
|
||||
$this->init();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user