mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-22 10:57:27 +08:00
clear icon cache after modify
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user