Skip to content

Commit

Permalink
Merge branch 'xupdate' into CorePack
Browse files Browse the repository at this point in the history
  • Loading branch information
nao-pon committed Oct 6, 2017
2 parents d15a19d + 045e77a commit bd75da9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
Expand Up @@ -14,9 +14,9 @@ public function __construct()
public function _unzipFile()
{
// local file name
$downloadDirPath = realpath($this->Xupdate->params['temp_path']);
$downloadDirPath = str_replace(DIRECTORY_SEPARATOR, '/', realpath($this->Xupdate->params['temp_path']));
$downloadFilePath = $this->Xupdate->params['temp_path'].'/'.$this->download_file;
$exploredDirPath = realpath($downloadDirPath.'/'.$this->target_key);
$exploredDirPath = str_replace(DIRECTORY_SEPARATOR, '/', realpath($downloadDirPath.'/'.$this->target_key));
if (empty($downloadFilePath)) {
$this->_set_error_log('getDownloadFilePath not found error in: '.$this->_getDownloadFilePath());
return false;
Expand Down
Expand Up @@ -124,7 +124,7 @@ private function _processCache($cacheCheckMd5, $checkonly)

if (($checkonly && $cacheCheckStr === 'running')
|| (!$checkonly && $cacheCheckStr === 'bg_ok'.$cacheCheckMd5)
|| @ filemtime($cacheCheckFile) + $this->cacheTTL > $_SERVER['REQUEST_TIME'] && $cacheCheckStr === ($checkonly? 'bg_ok' : 'ok').$cacheCheckMd5
|| (@ filemtime($cacheCheckFile) + $this->cacheTTL > $_SERVER['REQUEST_TIME'] && $cacheCheckStr === ($checkonly? 'bg_ok' : 'ok').$cacheCheckMd5)
) {
return false;
}
Expand Down
Expand Up @@ -68,7 +68,7 @@ public function preBlockFilter()
$this->mRoot->mDelegateManager->add('Legacy_Utils.CreateBlockProcedure', 'Xupdate_AssetPreloadBase::getBlock');

$this->mRoot->mDelegateManager->add('Legacy.Admin.Event.ModuleListSave.Success', array(&$this, '_setNeedCacheRemake'));
$this->mRoot->mDelegateManager->add('Legacy.Admin.Event.ModuleInstall.Success', array(&$this, '_setNeedCacheRemake'));
$this->mRoot->mDelegateManager->add('Legacy.Admin.Event.ModuleInstall.Success', array(&$this, '_setNeedCacheRemakeOnInstall'));
$this->mRoot->mDelegateManager->add('Legacy.Admin.Event.ModuleUpdate.Success', array(&$this, '_setNeedCacheRemake'));
$this->mRoot->mDelegateManager->add('Legacy.Admin.Event.ModuleUninstall.Success', array(&$this, '_setNeedCacheRemake'));

Expand Down Expand Up @@ -127,6 +127,12 @@ public function _setNeedCacheRemake()
$handler->setNeedCacheRemake();
}

public function _setNeedCacheRemakeOnInstall()
{
$handler = Legacy_Utils::getModuleHandler('store', 'xupdate');
$handler->setNeedCacheRemake(true);
}

/**
* getManager
*
Expand Down
2 changes: 1 addition & 1 deletion xoops_trust_path/modules/xupdate/xoops_version.php
Expand Up @@ -22,7 +22,7 @@
//
$modversion['name'] = _MI_XUPDATE_LANG_XUPDATE;
$modversion['version'] = '0.72';
$modversion['detailed_version'] = '0.72.0';
$modversion['detailed_version'] = '0.72.1';
$modversion['description'] = _MI_XUPDATE_DESC_XUPDATE;
$modversion['author'] = _MI_XUPDATE_LANG_AUTHOR;
$modversion['credits'] = _MI_XUPDATE_LANG_CREDITS;
Expand Down

0 comments on commit bd75da9

Please sign in to comment.