mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
commit
c1b2b5f56f
|
|
@ -85,7 +85,7 @@ class Config extends General
|
|||
}
|
||||
$vars = implode("\n", $vars);
|
||||
|
||||
return "<?php\nnamespace Grav;\n\nclass Config extends \\Grav\\Common\\Config {\n {$vars}\n}";
|
||||
return "<?php\nnamespace Grav;\n\nclass Config extends \\Grav\\Common\\Config {\n {$vars}\n}";
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ abstract class Getters implements \ArrayAccess, \Countable
|
|||
*/
|
||||
public function __get($offset)
|
||||
{
|
||||
return $this->offsetGet($offset);
|
||||
return $this->offsetGet($offset);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ use \Grav\Common\Page\Pages;
|
|||
* @version 0.8.0
|
||||
*
|
||||
* Originally based on Pico by Gilbert Pellegrom - http://pico.dev7studios.com
|
||||
* Influeced by Pico, Stacey, Kirby, PieCrust and other great platforms...
|
||||
* Influenced by Pico, Stacey, Kirby, PieCrust and other great platforms...
|
||||
*
|
||||
* @property Plugins $plugins
|
||||
* @property Config $config
|
||||
|
|
|
|||
|
|
@ -489,7 +489,7 @@ class Pages
|
|||
|
||||
$child = isset($this->instances[$key]) ? $this->instances[$key] : null;
|
||||
if (!$child) {
|
||||
throw new \RuntimeException("Page does not exist: {$key}");
|
||||
throw new \RuntimeException("Page does not exist: {$key}");
|
||||
}
|
||||
|
||||
switch ($order_by) {
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ class Session implements \IteratorAggregate
|
|||
$this->started = true;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get session ID
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class Themes
|
|||
*
|
||||
* @return array|Data\Data[]
|
||||
*/
|
||||
static public function all()
|
||||
public static function all()
|
||||
{
|
||||
$list = array();
|
||||
$iterator = new \DirectoryIterator(THEMES_DIR);
|
||||
|
|
@ -43,7 +43,7 @@ class Themes
|
|||
* @return Data\Data
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
static public function get($type)
|
||||
public static function get($type)
|
||||
{
|
||||
if (!$type) {
|
||||
throw new \RuntimeException('Theme name not provided.');
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ abstract class Authentication
|
|||
* @param string $password Plaintext password.
|
||||
* @return string|bool
|
||||
*/
|
||||
static public function create($password)
|
||||
public static function create($password)
|
||||
{
|
||||
return password_hash($password, PASSWORD_DEFAULT);
|
||||
}
|
||||
|
|
@ -27,7 +27,7 @@ abstract class Authentication
|
|||
* @param string $hash Hash to verify against.
|
||||
* @return int Returns 0 if the check fails, 1 if password matches, 2 if hash needs to be updated.
|
||||
*/
|
||||
static public function verify($password, $hash)
|
||||
public static function verify($password, $hash)
|
||||
{
|
||||
// Always accept plaintext passwords (needs an update).
|
||||
// FIXME: not safe to do this...
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ abstract class Utils
|
|||
// delete tag from $open_tags list
|
||||
$pos = array_search($tag_matchings[1], $open_tags);
|
||||
if ($pos !== false) {
|
||||
unset($open_tags[$pos]);
|
||||
unset($open_tags[$pos]);
|
||||
}
|
||||
// if tag is an opening tag
|
||||
} else if (preg_match('/^<\s*([^\s>!]+).*?>$/s', $line_matchings[1], $tag_matchings)) {
|
||||
|
|
@ -102,14 +102,14 @@ abstract class Utils
|
|||
}
|
||||
}
|
||||
$truncate .= substr($line_matchings[2], 0, $left+$entities_length);
|
||||
// maximum lenght is reached, so get off the loop
|
||||
// maximum length is reached, so get off the loop
|
||||
break;
|
||||
} else {
|
||||
$truncate .= $line_matchings[2];
|
||||
$total_length += $content_length;
|
||||
}
|
||||
// if the maximum length is reached, get off the loop
|
||||
if($total_length>= $length) {
|
||||
if ($total_length >= $length) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -131,7 +131,7 @@ abstract class Utils
|
|||
}
|
||||
// add the defined ending to the text
|
||||
$truncate .= $ending;
|
||||
if($considerHtml) {
|
||||
if ($considerHtml) {
|
||||
// close all unclosed html-tags
|
||||
foreach ($open_tags as $tag) {
|
||||
$truncate .= '</' . $tag . '>';
|
||||
|
|
|
|||
|
|
@ -86,7 +86,6 @@ EOT
|
|||
|
||||
// Copy the Core STuff
|
||||
} else {
|
||||
$options = true;
|
||||
// Create Some core stuff if it doesn't exist
|
||||
$this->createDirectories($output);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user