mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
Revert "Display the current site's favicon if favicon.ico is requested"
This reverts commit 9fcd472d3f.
This commit is contained in:
parent
9fcd472d3f
commit
c0f9c77902
3 changed files with 6 additions and 51 deletions
|
|
@ -64,12 +64,6 @@ class Router
|
||||||
'extra_vars' => ['act' => 'dispAdminRewriteTest'],
|
'extra_vars' => ['act' => 'dispAdminRewriteTest'],
|
||||||
'priority' => 0,
|
'priority' => 0,
|
||||||
),
|
),
|
||||||
'favicon\.ico' => array(
|
|
||||||
'regexp' => '#^favicon\.ico$#',
|
|
||||||
'vars' => [],
|
|
||||||
'extra_vars' => ['module' => 'module', 'act' => 'dispModuleCurrentSiteFavicon'],
|
|
||||||
'priority' => 0,
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -6,18 +6,17 @@
|
||||||
<action name="dispModuleSkinInfo" type="view" permission="all-managers" meta-noindex="true" />
|
<action name="dispModuleSkinInfo" type="view" permission="all-managers" meta-noindex="true" />
|
||||||
<action name="dispModuleFileBox" type="view" permission="root" meta-noindex="true" />
|
<action name="dispModuleFileBox" type="view" permission="root" meta-noindex="true" />
|
||||||
<action name="dispModuleFileBoxAdd" type="view" permission="root" meta-noindex="true" />
|
<action name="dispModuleFileBoxAdd" type="view" permission="root" meta-noindex="true" />
|
||||||
<action name="dispModuleCurrentSiteFavicon" type="view" standalone="true" />
|
|
||||||
<action name="dispModuleChangeLang" type="view" />
|
<action name="dispModuleChangeLang" type="view" />
|
||||||
|
|
||||||
<action name="getModuleSkinInfoList" type="model" permission="root" />
|
<action name="getModuleSkinInfoList" type="model" permission="root" />
|
||||||
<action name="getFileBoxListHtml" type="model" permission="root" />
|
<action name="getFileBoxListHtml" type="model" permission="root" />
|
||||||
<action name="getModuleInfoByMenuItemSrl" type="model" permission="root" />
|
<action name="getModuleInfoByMenuItemSrl" type="model" permission="root" />
|
||||||
<action name="getLangListByLangcodeForAutoComplete" type="model" permission="manager" />
|
<action name="getLangListByLangcodeForAutoComplete" type="model" permission="manager" />
|
||||||
<action name="getLangByLangcode" type="model" />
|
<action name="getLangByLangcode" type="model" />
|
||||||
|
|
||||||
<action name="procModuleFileBoxAdd" type="controller" permission="root" />
|
<action name="procModuleFileBoxAdd" type="controller" permission="root" />
|
||||||
<action name="procModuleFileBoxDelete" type="controller" permission="root" />
|
<action name="procModuleFileBoxDelete" type="controller" permission="root" />
|
||||||
|
|
||||||
<action name="dispModuleAdminContent" type="view" menu_name="installedModule" menu_index="true" admin_index="true" />
|
<action name="dispModuleAdminContent" type="view" menu_name="installedModule" menu_index="true" admin_index="true" />
|
||||||
<action name="dispModuleAdminCategory" type="view" menu_name="installedModule" />
|
<action name="dispModuleAdminCategory" type="view" menu_name="installedModule" />
|
||||||
<action name="dispModuleAdminInfo" type="view" />
|
<action name="dispModuleAdminInfo" type="view" />
|
||||||
|
|
@ -27,7 +26,7 @@
|
||||||
<action name="dispModuleAdminCopyModule" type="view" />
|
<action name="dispModuleAdminCopyModule" type="view" />
|
||||||
<action name="dispModuleAdminFileBox" type="view" menu_name="filebox" menu_index="true" />
|
<action name="dispModuleAdminFileBox" type="view" menu_name="filebox" menu_index="true" />
|
||||||
<action name="dispModuleAdminLangcode" type="view" menu_name="multilingual" menu_index="true" />
|
<action name="dispModuleAdminLangcode" type="view" menu_name="multilingual" menu_index="true" />
|
||||||
|
|
||||||
<action name="getModuleAdminModuleList" type="model" />
|
<action name="getModuleAdminModuleList" type="model" />
|
||||||
<action name="getModuleAdminModuleInfo" type="model" />
|
<action name="getModuleAdminModuleInfo" type="model" />
|
||||||
<action name="getModuleAdminGrant" type="model" />
|
<action name="getModuleAdminGrant" type="model" />
|
||||||
|
|
@ -37,12 +36,12 @@
|
||||||
<action name="getModuleAdminModuleSearcherHtml" type="model" />
|
<action name="getModuleAdminModuleSearcherHtml" type="model" />
|
||||||
<action name="getModuleAdminMultilingualHtml" type="model" permission="manager" />
|
<action name="getModuleAdminMultilingualHtml" type="model" permission="manager" />
|
||||||
<action name="getModuleAdminLangListHtml" type="model" permission="manager" />
|
<action name="getModuleAdminLangListHtml" type="model" permission="manager" />
|
||||||
|
|
||||||
<action name="procModuleAdminInsertCategory" type="controller" ruleset="insertCategory" />
|
<action name="procModuleAdminInsertCategory" type="controller" ruleset="insertCategory" />
|
||||||
<action name="procModuleAdminUpdateCategory" type="controller" ruleset="updateCategory" />
|
<action name="procModuleAdminUpdateCategory" type="controller" ruleset="updateCategory" />
|
||||||
<action name="procModuleAdminDeleteCategory" type="controller" ruleset="deleteCategory" />
|
<action name="procModuleAdminDeleteCategory" type="controller" ruleset="deleteCategory" />
|
||||||
<action name="procModuleAdminModuleSetup" type="controller" ruleset="insertModuleSetup" />
|
<action name="procModuleAdminModuleSetup" type="controller" ruleset="insertModuleSetup" />
|
||||||
<action name="procModuleAdminModuleGrantSetup" type="controller" ruleset="insertModulesGrant" />
|
<action name="procModuleAdminModuleGrantSetup" type="controller" ruleset="insertModulesGrant" />
|
||||||
<action name="procModuleAdminCopyModule" type="controller" ruleset="copyModule" />
|
<action name="procModuleAdminCopyModule" type="controller" ruleset="copyModule" />
|
||||||
<action name="procModuleAdminInsertGrant" type="controller" permission="manager" check_var="module_srl" />
|
<action name="procModuleAdminInsertGrant" type="controller" permission="manager" check_var="module_srl" />
|
||||||
<action name="procModuleAdminUpdateSkinInfo" type="controller" permission="manager" check_var="module_srl" />
|
<action name="procModuleAdminUpdateSkinInfo" type="controller" permission="manager" check_var="module_srl" />
|
||||||
|
|
|
||||||
|
|
@ -143,44 +143,6 @@ class ModuleView extends Module
|
||||||
$this->setTemplateFile('filebox_add');
|
$this->setTemplateFile('filebox_add');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Display the current site's favicon
|
|
||||||
*/
|
|
||||||
public function dispModuleCurrentSiteFavicon()
|
|
||||||
{
|
|
||||||
$domain = ModuleModel::getSiteInfoByDomain($_SERVER['HTTP_HOST']) ?: ModuleModel::getDefaultDomainInfo();
|
|
||||||
$domain_srl = $domain->domain_srl ?? 0;
|
|
||||||
$filename = \RX_BASEDIR . 'files/attach/xeicon/' . ($domain_srl ? ($domain_srl . '/') : '') . 'favicon.ico';
|
|
||||||
|
|
||||||
if (Rhymix\Framework\Storage::exists($filename))
|
|
||||||
{
|
|
||||||
// Handle 304 Not Modified
|
|
||||||
if(isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) > filemtime($uploaded_filename))
|
|
||||||
{
|
|
||||||
header('HTTP/1.1 304 Not Modified');
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Clear buffer
|
|
||||||
while(ob_get_level()) ob_end_clean();
|
|
||||||
|
|
||||||
// Set headers
|
|
||||||
header('Content-Type: image/x-icon');
|
|
||||||
header('Content-Length: ' . filesize($filename));
|
|
||||||
header('Cache-Control: private; max-age=3600');
|
|
||||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
|
||||||
|
|
||||||
// Print icon and exit
|
|
||||||
readfile($filename);
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$this->stop('msg_not_founded');
|
|
||||||
$this->setHttpStatusCode(404);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Moved from mobile class
|
* Moved from mobile class
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue