clear icon cache after modify

This commit is contained in:
xiaomlove
2023-02-06 14:25:05 +08:00
parent 23ea393ffe
commit 59b7a2916e
12 changed files with 35 additions and 13 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
<?php
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.0');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2023-02-01');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2023-02-06');
defined('IN_TRACKER') || define('IN_TRACKER', false);
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
+1 -1
View File
@@ -26,7 +26,7 @@ function emu_getallheaders() {
function block_browser()
{
$agent = $_SERVER["HTTP_USER_AGENT"];
$agent = $_SERVER["HTTP_USER_AGENT"] ?? '';
if (preg_match("/^Mozilla/", $agent) || preg_match("/^Opera/", $agent) || preg_match("/^Links/", $agent) || preg_match("/^Lynx/", $agent) )
err("Browser access blocked!");
// check headers
+9
View File
@@ -1044,6 +1044,15 @@ function clear_search_box_cache()
\Nexus\Database\NexusDB::cache_del("search_box_content");
}
/**
* @see functions.php::get_category_icon_row()
*/
function clear_icon_cache()
{
do_log("clear_icon_cache");
\Nexus\Database\NexusDB::cache_del("category_icon_content");
}
function user_can($permission, $fail = false, $uid = 0): bool
{
$log = "permission: $permission, fail: $fail, user: $uid";