mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-18 03:33:26 +02:00
Forum: better error messages (Suggested by @anyeor)
This commit is contained in:
@@ -17,14 +17,16 @@ $errors = [];
|
||||
if(!empty($action))
|
||||
{
|
||||
if(!ctype_alnum(str_replace(array('-', '_'), '', $action))) {
|
||||
error('Error: Action contains illegal characters.');
|
||||
$errors[] = 'Error: Action contains illegal characters.';
|
||||
displayErrorBoxWithBackButton($errors, getLink('forum'));
|
||||
}
|
||||
else if(file_exists(PAGES . 'forum/' . $action . '.php')) {
|
||||
require PAGES . 'forum/' . $action . '.php';
|
||||
return;
|
||||
}
|
||||
else {
|
||||
error('This page does not exists.');
|
||||
$errors[] = 'This page does not exists.';
|
||||
displayErrorBoxWithBackButton($errors, getLink('forum'));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user