Changed name of context class and global variable.
This commit is contained in:
parent
82129ce9e6
commit
5f0e94350f
11 changed files with 23 additions and 23 deletions
|
@ -102,7 +102,7 @@ define('MSZ_STORAGE', $cfg->getValue('storage.path', CfgType::T_STR, MSZ_ROOT .
|
|||
if(!is_dir(MSZ_STORAGE))
|
||||
mkdir(MSZ_STORAGE, 0775, true);
|
||||
|
||||
$ctx = new MszContext($db, $cfg);
|
||||
$msz = new MisuzuContext($db, $cfg);
|
||||
|
||||
if(MSZ_CLI) { // Temporary backwards compatibility measure, remove this later
|
||||
if(realpath($_SERVER['SCRIPT_FILENAME']) === __FILE__) {
|
||||
|
@ -133,7 +133,7 @@ if(!is_readable(MSZ_STORAGE) || !is_writable(MSZ_STORAGE)) {
|
|||
exit;
|
||||
}
|
||||
|
||||
IPAddress::init($ctx);
|
||||
IPAddress::init($msz);
|
||||
|
||||
if(!MSZ_DEBUG) {
|
||||
$twigCacheDirSfx = GitInfo::hash(true);
|
||||
|
@ -145,7 +145,7 @@ if(!MSZ_DEBUG) {
|
|||
mkdir($twigCache, 0775, true);
|
||||
}
|
||||
|
||||
Template::init($ctx, $twigCache ?? null, MSZ_DEBUG);
|
||||
Template::init($msz, $twigCache ?? null, MSZ_DEBUG);
|
||||
|
||||
Template::set('globals', [
|
||||
'site_name' => $cfg->getValue('site.name', CfgType::T_STR, 'Misuzu'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue