add hideFunctionalityFile

pull/31/head^2
qkqpttgf 2020-03-17 11:39:16 +08:00 committed by GitHub
parent 4a8bd8aa90
commit 6cf4f4187e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 0 deletions

View File

@ -12,6 +12,7 @@ $Base64Env = [
//'disktag', //'disktag',
//'downloadencrypt', //'downloadencrypt',
//'function_name', // used in heroku. //'function_name', // used in heroku.
//'hideFunctionalityFile',
//'language', //'language',
//'passfile', //'passfile',
'sitename', 'sitename',
@ -36,6 +37,7 @@ $CommonEnv = [
'background', 'background',
'disktag', 'disktag',
'function_name', // used in heroku. 'function_name', // used in heroku.
'hideFunctionalityFile',
'language', 'language',
'passfile', 'passfile',
'sitename', 'sitename',
@ -52,6 +54,7 @@ $ShowedCommonEnv = [
'background', 'background',
//'disktag', //'disktag',
//'function_name', // used in heroku. //'function_name', // used in heroku.
'hideFunctionalityFile',
'language', 'language',
'passfile', 'passfile',
'sitename', 'sitename',
@ -84,6 +87,20 @@ $ShowedInnerEnv = [
//'token_expires', //'token_expires',
]; ];
function isHideFile($name)
{
$FunctionalityFile = [
'head.md',
'readme.md',
'favicon.ico',
];
if ($name == getConfig('passfile')) return true;
if (substr($name,0,1) == '.') return true;
if (getConfig('hideFunctionalityFile')) if (in_array(strtolower($name), $FunctionalityFile)) return true;
return false;
}
function getcache($str) function getcache($str)
{ {
//$cache = null; //$cache = null;