]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19229 backup regexp - some servers seem to require the /u modifier if unicode...
authorstronk7 <stronk7>
Thu, 28 May 2009 14:45:04 +0000 (14:45 +0000)
committerstronk7 <stronk7>
Thu, 28 May 2009 14:45:04 +0000 (14:45 +0000)
backup/backuplib.php

index e3aa6202c7df200a55318d4a2bcdfe2dd8f409c6..97a79ad62ccce81f85b18eed9db9440f1c6535e5 100644 (file)
         // This way, backup contents will be neutral and independent of slasharguments configuration. MDL-18799
         // Based in $unicoderegexp, decide the regular expression to use
         if ($unicoderegexp) { //We can use unicode modifiers
-            $search = '/(\$@FILEPHP@\$)((?:(?:\/|%2f|%2F))(?:(?:\([-;:@#&=\pL0-9\$~_.+!*\',]*?\))|[-;:@#&=\pL0-9\$~_.+!*\',]|%[a-fA-F0-9]{2}|\/)*)?(\?(?:(?:(?:\([-;:@#&=\pL0-9\$~_.+!*\',]*?\))|[-;:@#&=?\pL0-9\$~_.+!*\',]|%[a-fA-F0-9]{2}|\/)*))?(?<![,.;])/';
+            $search = '/(\$@FILEPHP@\$)((?:(?:\/|%2f|%2F))(?:(?:\([-;:@#&=\pL0-9\$~_.+!*\',]*?\))|[-;:@#&=\pL0-9\$~_.+!*\',]|%[a-fA-F0-9]{2}|\/)*)?(\?(?:(?:(?:\([-;:@#&=\pL0-9\$~_.+!*\',]*?\))|[-;:@#&=?\pL0-9\$~_.+!*\',]|%[a-fA-F0-9]{2}|\/)*))?(?<![,.;])/u';
         } else { //We cannot ue unicode modifiers
             $search = '/(\$@FILEPHP@\$)((?:(?:\/|%2f|%2F))(?:(?:\([-;:@#&=a-zA-Z0-9\$~_.+!*\',]*?\))|[-;:@#&=a-zA-Z0-9\$~_.+!*\',]|%[a-fA-F0-9]{2}|\/)*)?(\?(?:(?:(?:\([-;:@#&=a-zA-Z0-9\$~_.+!*\',]*?\))|[-;:@#&=?a-zA-Z0-9\$~_.+!*\',]|%[a-fA-F0-9]{2}|\/)*))?(?<![,.;])/';
         }