mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 17:54:55 +02:00
* fixed viewing pages with capital letters (like serverInfo) on case sensitive systems
* fixed changing comment of characters with space and other special characters in name (#29) * fixed viewing guilds with space and other special characters in name (#29) * (kathrine template) fixed displaying menu when no URI is set (URI = '/') * added some additional checks for Validator guildName and rankName if name is empty * (internal) new twig filter: urlencode, which is using urlencode php function
This commit is contained in:
@@ -364,6 +364,11 @@ class Validator
|
||||
*/
|
||||
public static function guildName($name)
|
||||
{
|
||||
if(empty($name)) {
|
||||
self::$lastError = 'Please enter guild name.';
|
||||
return false;
|
||||
}
|
||||
|
||||
if(strspn($name, "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0123456789- ") != strlen($name)) {
|
||||
self::$lastError = 'Invalid guild name format.';
|
||||
return false;
|
||||
@@ -386,6 +391,11 @@ class Validator
|
||||
*/
|
||||
public static function rankName($name)
|
||||
{
|
||||
if(empty($name)) {
|
||||
self::$lastError = 'Please enter rank name.';
|
||||
return false;
|
||||
}
|
||||
|
||||
if(strspn($name, "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0123456789-[ ] ") != strlen($name)) {
|
||||
self::$lastError = 'Invalid rank name. Please use only a-Z, 0-9 and spaces.';
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user