mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 11:11:39 +09:00
Merge branch 'develop' into refactor/minify-on-the-fly
This commit is contained in:
commit
8e05c56e4e
5 changed files with 199 additions and 252 deletions
8
classes/cache/CacheFile.class.php
vendored
8
classes/cache/CacheFile.class.php
vendored
|
|
@ -78,10 +78,6 @@ class CacheFile extends CacheBase
|
|||
$content[] = 'if(!defined(\'__XE__\')) { exit(); }';
|
||||
$content[] = 'return \'' . addslashes(serialize($obj)) . '\';';
|
||||
FileHandler::writeFile($cache_file, implode(PHP_EOL, $content));
|
||||
if(function_exists('opcache_invalidate'))
|
||||
{
|
||||
@opcache_invalidate($cache_file, true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -145,10 +141,6 @@ class CacheFile extends CacheBase
|
|||
function _delete($_key)
|
||||
{
|
||||
$cache_file = $this->getCacheFileName($_key);
|
||||
if(function_exists('opcache_invalidate'))
|
||||
{
|
||||
@opcache_invalidate($cache_file, true);
|
||||
}
|
||||
FileHandler::removeFile($cache_file);
|
||||
}
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -156,6 +156,10 @@ class FileHandler
|
|||
|
||||
@file_put_contents($filename, $buff, $flags|LOCK_EX);
|
||||
@chmod($filename, 0644);
|
||||
if(function_exists('opcache_invalidate') && substr($filename, -4) === '.php')
|
||||
{
|
||||
@opcache_invalidate($filename, true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -166,7 +170,16 @@ class FileHandler
|
|||
*/
|
||||
public static function removeFile($filename)
|
||||
{
|
||||
return (($filename = self::exists($filename)) !== FALSE) && @unlink($filename);
|
||||
if(($filename = self::exists($filename)) === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$status = @unlink($filename);
|
||||
if(function_exists('opcache_invalidate') && substr($filename, -4) === '.php')
|
||||
{
|
||||
@opcache_invalidate($filename, true);
|
||||
}
|
||||
return $status;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -366,14 +366,9 @@ class TemplateHandler
|
|||
return;
|
||||
}
|
||||
|
||||
$__Context = &$GLOBALS['__Context__'];
|
||||
$__Context = Context::getInstance();
|
||||
$__Context->tpl_path = $this->path;
|
||||
|
||||
if($_SESSION['is_logged'])
|
||||
{
|
||||
$__Context->logged_info = Context::get('logged_info');
|
||||
}
|
||||
|
||||
$level = ob_get_level();
|
||||
ob_start();
|
||||
if(substr($buff, 0, 7) == 'file://')
|
||||
|
|
|
|||
|
|
@ -371,6 +371,11 @@ class autoinstallAdminModel extends autoinstall
|
|||
$directModuleInstall = FALSE;
|
||||
$arrUnwritableDir[] = $output->get('path');
|
||||
}
|
||||
|
||||
if(!is_array($package->depends))
|
||||
{
|
||||
$package->depends = array();
|
||||
}
|
||||
|
||||
foreach($package->depends as $dep)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue