mirror of https://github.com/itflow-org/itflow
Add clean_file_name function to fix merge conflict
This commit is contained in:
parent
61777116a9
commit
705060d1df
|
|
@ -405,6 +405,18 @@ function getDomainExpirationDate($name){
|
|||
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
|
||||
// Validates the CSRF token provided matches the one in the users session
|
||||
function validateCSRFToken($token){
|
||||
|
|
|
|||
Loading…
Reference in New Issue