mod.php: remove last mod_page_* handler, use only mod_* for mod pages

This commit is contained in:
Zankaria 2024-08-11 15:45:24 +02:00 committed by Zankaria
parent 98fb50e050
commit cb71e00b50
2 changed files with 1 additions and 3 deletions

View file

@ -868,7 +868,7 @@ function mod_ip_remove_note($ip, $id) {
header('Location: ?/IP/' . $ip . '#notes', true, $config['redirect_http']); header('Location: ?/IP/' . $ip . '#notes', true, $config['redirect_http']);
} }
function mod_page_ip($ip, string $encoded_cursor = '') { function mod_ip($ip, string $encoded_cursor = '') {
global $config, $mod; global $config, $mod;
if (filter_var($ip, FILTER_VALIDATE_IP) === false) if (filter_var($ip, FILTER_VALIDATE_IP) === false)

View file

@ -201,8 +201,6 @@ foreach ($pages as $uri => $handler) {
if (is_string($handler)) { if (is_string($handler)) {
if ($handler[0] == ':') { if ($handler[0] == ':') {
header('Location: ' . substr($handler, 1), true, $config['redirect_http']); header('Location: ' . substr($handler, 1), true, $config['redirect_http']);
} elseif (is_callable("mod_page_$handler")) {
call_user_func_array("mod_page_$handler", $matches);
} elseif (is_callable("mod_$handler")) { } elseif (is_callable("mod_$handler")) {
call_user_func_array("mod_$handler", $matches); call_user_func_array("mod_$handler", $matches);
} else { } else {