mirror of
https://github.com/getgrav/grav.git
synced 2026-03-04 19:41:36 +01:00
Merge branch 'develop' of https://github.com/getgrav/grav into 2.0
# Conflicts: # CHANGELOG.md
This commit is contained in:
13
CHANGELOG.md
13
CHANGELOG.md
@@ -10,6 +10,19 @@
|
||||
1. [](#improved)
|
||||
* Make it possible to include debug bar also into non-HTML responses
|
||||
|
||||
# v1.3.0-rc.5
|
||||
## xx/xx/2017
|
||||
|
||||
1. [](#new)
|
||||
* Setting `system.session.timeout` to 0 clears the session when the browser session ends [#1538](https://github.com/getgrav/grav/pull/1538)
|
||||
* Created a `CODE_OF_CONDUCT.md` so everyone knows how to behave :)
|
||||
1. [](#improved)
|
||||
* Renamed new `media()` Twig function to `media_directory()` to avoid conflict with Page's `media` object
|
||||
1. [](#bugfix)
|
||||
* Fixed global media files disappearing after a reload [#1545](https://github.com/getgrav/grav/issues/1545)
|
||||
* Fix for broken regex redirects/routes via `site.yaml`
|
||||
* Sanitize the error message in the error handler page
|
||||
|
||||
# v1.3.0-rc.4
|
||||
## 06/22/2017
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ class SimplePageHandler extends Handler
|
||||
$vars = array(
|
||||
"stylesheet" => file_get_contents($cssFile),
|
||||
"code" => $code,
|
||||
"message" => $message,
|
||||
"message" => filter_var(rawurldecode($message), FILTER_SANITIZE_STRING),
|
||||
);
|
||||
|
||||
$helper->setVariables($vars);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -480,7 +480,7 @@ class Pages
|
||||
$site_redirects = $config->get("site.redirects");
|
||||
if (is_array($site_redirects)) {
|
||||
foreach ((array)$site_redirects as $pattern => $replace) {
|
||||
$pattern = '#^' . preg_quote(ltrim($pattern, '^')) . '#';
|
||||
$pattern = '#^' . str_replace('/', '\/', ltrim($pattern, '^')) . '#';
|
||||
try {
|
||||
$found = preg_replace($pattern, $replace, $source_url);
|
||||
if ($found != $source_url) {
|
||||
@@ -496,7 +496,7 @@ class Pages
|
||||
$site_routes = $config->get("site.routes");
|
||||
if (is_array($site_routes)) {
|
||||
foreach ((array)$site_routes as $pattern => $replace) {
|
||||
$pattern = '#^' . preg_quote(ltrim($pattern, '^')) . '#';
|
||||
$pattern = '#^' . str_replace('/', '\/', ltrim($pattern, '^')) . '#';
|
||||
try {
|
||||
$found = preg_replace($pattern, $replace, $source_url);
|
||||
if ($found != $source_url) {
|
||||
|
||||
@@ -84,7 +84,7 @@ class Session extends BaseSession
|
||||
}
|
||||
$this->setName($session_name);
|
||||
$this->start();
|
||||
setcookie(session_name(), session_id(), time() + $session_timeout, $session_path, $domain, $secure, $httponly);
|
||||
setcookie(session_name(), session_id(), $session_timeout ? time() + $session_timeout : 0, $session_path, $domain, $secure, $httponly);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user