Add clean_file_name function to fix merge conflict
This commit is contained in:
@@ -405,6 +405,18 @@ function getDomainExpirationDate($name){
|
|||||||
return '0000-00-00';
|
return '0000-00-00';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function clean_file_name($string){
|
||||||
|
$string = strtolower($string);
|
||||||
|
|
||||||
|
// Gets rid of spaces
|
||||||
|
$clean_file_name = preg_replace('/\s/', '', $string);
|
||||||
|
|
||||||
|
// Gets rid of non-alphanumerics
|
||||||
|
$clean_file_name = preg_replace( '/[^A-Za-z0-9_]/', '', $string );
|
||||||
|
|
||||||
|
return $clean_file_name;
|
||||||
|
}
|
||||||
|
|
||||||
// Cross-Site Request Forgery check for sensitive functions
|
// Cross-Site Request Forgery check for sensitive functions
|
||||||
// Validates the CSRF token provided matches the one in the users session
|
// Validates the CSRF token provided matches the one in the users session
|
||||||
function validateCSRFToken($token){
|
function validateCSRFToken($token){
|
||||||
|
|||||||
Reference in New Issue
Block a user