SourceForge logo
SourceForge logo
Menu

phpwiki-checkins

From: Reini U. <ru...@us...> - 2004年12月22日 19:02:42
Update of /cvsroot/phpwiki/phpwiki/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6197
Modified Files:
	stdlib.php 
Log Message:
fix glob for starting * or ?
Index: stdlib.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/stdlib.php,v
retrieving revision 1.224
retrieving revision 1.225
diff -u -2 -b -p -d -r1.224 -r1.225
--- stdlib.php	20 Dec 2004 12:11:50 -0000	1.224
+++ stdlib.php	22 Dec 2004 19:02:29 -0000	1.225
@@ -1345,9 +1345,9 @@ function glob_to_pcre ($glob) {
 // first convert some unescaped expressions to pcre style: . => \.
 $escape = ".^$";
- $re = preg_replace('/([^\xff])(['.preg_quote($escape).'])/', "\1円\xff\2円", $glob);
+ $re = preg_replace('/([^\xff])?(['.preg_quote($escape).'])/', "\1円\xff\2円", $glob);
 
 // * => .*, ? => .
- $re = preg_replace('/([^\xff])\*/', '1ドル.*', $re);
- $re = preg_replace('/([^\xff])\?/', '1ドル.', $re);
+ $re = preg_replace('/([^\xff])?\*/', '1ドル.*', $re);
+ $re = preg_replace('/([^\xff])?\?/', '1ドル.', $re);
 if (!preg_match('/^[\?\*]/',$glob))
 $re = '^' . $re;
@@ -1359,5 +1359,5 @@ function glob_to_pcre ($glob) {
 while (strcspn($re, $escape) != strlen($re)) // loop strangely needed
 $re = preg_replace('/([^\xff])(['.preg_quote($escape).'])/', "\1円\xff\2円", $re);
- return str_replace("\xff", "\\", $re);
+ return strtr($re, "\xff", "\\");
 }
 
@@ -1841,4 +1841,7 @@ function printSimpleTrace($bt) {
 
 // $Log$
+// Revision 1.225 2004年12月22日 19:02:29 rurban
+// fix glob for starting * or ?
+//
 // Revision 1.224 2004年12月20日 12:11:50 rurban
 // fix "lib/stdlib.php:1348: Warning[2]: Compilation failed: unmatched parentheses at offset 2"
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /