dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39343a5
)
More general thumbnail filename check on purge, to allow for general parameter strings
author
Tim Starling
<tstarling@users.mediawiki.org>
Mon, 30 Apr 2007 10:28:21 +0000
(10:28 +0000)
committer
Tim Starling
<tstarling@users.mediawiki.org>
Mon, 30 Apr 2007 10:28:21 +0000
(10:28 +0000)
includes/Image.php
patch
|
blob
|
history
diff --git
a/includes/Image.php
b/includes/Image.php
index
0c40c92
..
8cc8c39
100644
(file)
--- a/
includes/Image.php
+++ b/
includes/Image.php
@@
-1075,7
+1075,9
@@
class Image
$urls = array();
foreach ( $files as $file ) {
$m = array();
- if ( preg_match( '/^\d+px/', $file, $m ) ) {
+ # Check that the base image name is part of the thumb name
+ # This is a basic sanity check to avoid erasing unrelated directories
+ if ( strpos( $file, $this->name ) !== false ) {
$url = $this->thumbUrlFromName( $file );
$urls[] = $url;
@unlink( "$dir/$file" );