Loading src/Plugin/ImcePlugin/Rename.php +1 −3 Original line number Diff line number Diff line Loading @@ -47,10 +47,8 @@ class Rename extends ImcePluginBase { // Check type. if ($old_file->type == 'file') { // Delete dots and space at the beginning/end name. $new_name = trim($fm->getPost('new_name'), "\x00..\x1F."); // Crop string up to 50 characters. $new_name = mb_substr($new_name,0,50); $new_name = mb_substr($fm->getPost('new_name'),0,50); // Delete special symbols. $new_name = preg_replace('/[^\w_-]+/u', '', $new_name); $new_name = $new_name . '.' . pathinfo($old_name, PATHINFO_EXTENSION); Loading Loading
src/Plugin/ImcePlugin/Rename.php +1 −3 Original line number Diff line number Diff line Loading @@ -47,10 +47,8 @@ class Rename extends ImcePluginBase { // Check type. if ($old_file->type == 'file') { // Delete dots and space at the beginning/end name. $new_name = trim($fm->getPost('new_name'), "\x00..\x1F."); // Crop string up to 50 characters. $new_name = mb_substr($new_name,0,50); $new_name = mb_substr($fm->getPost('new_name'),0,50); // Delete special symbols. $new_name = preg_replace('/[^\w_-]+/u', '', $new_name); $new_name = $new_name . '.' . pathinfo($old_name, PATHINFO_EXTENSION); Loading