mirror of
https://github.com/getgrav/grav.git
synced 2026-07-10 23:02:45 +02:00
Merge branch '1.7' into feature/clockwork-twig
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -125,6 +125,7 @@ log:
|
||||
|
||||
debugger:
|
||||
enabled: false # Enable Grav debugger and following settings
|
||||
provider: debugbar # Debugger provider
|
||||
shutdown:
|
||||
close_connection: true # Close the connection before calling onShutdown(). false for debugging
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
// Some standard defines
|
||||
define('GRAV', true);
|
||||
define('GRAV_VERSION', '1.6.9');
|
||||
define('GRAV_TESTING', false);
|
||||
define('GRAV_VERSION', '1.7.0-dev');
|
||||
define('GRAV_TESTING', true);
|
||||
define('DS', '/');
|
||||
|
||||
if (!defined('GRAV_PHP_MIN')) {
|
||||
|
||||
@@ -118,11 +118,15 @@ class Debugger
|
||||
if ($this->enabled) {
|
||||
$this->initialized = true;
|
||||
|
||||
// Clockwork initialization.
|
||||
$this->clockwork = $clockwork = new Clockwork();
|
||||
$clockwork = $debugbar = null;
|
||||
|
||||
// Debugbar initialization.
|
||||
$this->debugbar = $debugbar = new DebugBar();
|
||||
switch ($this->config->get('system.debugger.provider', 'debugbar')) {
|
||||
case 'clockwork':
|
||||
$this->clockwork = $clockwork = new Clockwork();
|
||||
break;
|
||||
default:
|
||||
$this->debugbar = $debugbar = new DebugBar();
|
||||
}
|
||||
|
||||
$plugins_config = (array)$this->config->get('plugins');
|
||||
ksort($plugins_config);
|
||||
@@ -169,7 +173,7 @@ class Debugger
|
||||
$debugbar['time']->addMeasure('Site Setup', $this->currentTime, microtime(true));
|
||||
}
|
||||
|
||||
$this->addMessage('Grav v' . GRAV_VERSION);
|
||||
$this->addMessage('Grav v' . GRAV_VERSION . ' - PHP ' . PHP_VERSION);
|
||||
$this->config->debug();
|
||||
|
||||
if ($clockwork) {
|
||||
|
||||
@@ -300,16 +300,17 @@ class Uri
|
||||
* Get URI parameter.
|
||||
*
|
||||
* @param string $id
|
||||
* @param bool $default
|
||||
*
|
||||
* @return bool|string
|
||||
*/
|
||||
public function param($id)
|
||||
public function param($id, $default = false)
|
||||
{
|
||||
if (isset($this->params[$id])) {
|
||||
return html_entity_decode(rawurldecode($this->params[$id]));
|
||||
}
|
||||
|
||||
return false;
|
||||
return $default;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1260,7 +1260,7 @@ abstract class Utils
|
||||
*/
|
||||
public static function sortArrayByArray(array $array, array $orderArray)
|
||||
{
|
||||
$ordered = array();
|
||||
$ordered = [];
|
||||
foreach ($orderArray as $key) {
|
||||
if (array_key_exists($key, $array)) {
|
||||
$ordered[$key] = $array[$key];
|
||||
|
||||
Reference in New Issue
Block a user