mirror of
https://github.com/getformwork/formwork.git
synced 2025-01-17 21:49:04 +01:00
Cleanup code
This commit is contained in:
parent
d67c103536
commit
628817ebca
@ -42,6 +42,7 @@ class Template
|
||||
if (static::$rendering) {
|
||||
throw new RuntimeException(__METHOD__ . ' not allowed while rendering');
|
||||
}
|
||||
|
||||
$this->vars['page'] = $page;
|
||||
$this->vars = array_merge($this->vars, $vars);
|
||||
|
||||
@ -85,7 +86,9 @@ class Template
|
||||
if (static::$rendering) {
|
||||
throw new RuntimeException(__METHOD__ . ' not allowed while rendering');
|
||||
}
|
||||
|
||||
ob_start();
|
||||
|
||||
static::$rendering = true;
|
||||
$this->insert($this->name);
|
||||
static::$rendering = false;
|
||||
|
@ -19,8 +19,7 @@ class Uri
|
||||
public static function scheme($uri = null)
|
||||
{
|
||||
if (is_null($uri)) {
|
||||
if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) !== 'OFF' ||
|
||||
$_SERVER['SERVER_PORT'] === '443') {
|
||||
if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off' || $_SERVER['SERVER_PORT'] == 443) {
|
||||
return 'https';
|
||||
}
|
||||
return 'http';
|
||||
|
Loading…
x
Reference in New Issue
Block a user