/////////////////////////////////////////////////
// PukiWiki - Yet another WikiWikiWeb clone.
//
-// $Id: ref.inc.php,v 1.25 2004/08/18 13:28:25 henoheno Exp $
+// $Id: ref.inc.php,v 1.26 2004/08/18 13:36:45 henoheno Exp $
//
/*
if (! is_dir(UPLOAD_DIR)) {
$params['_error'] = 'No UPLOAD_DIR';
return $params;
+ } else {
+ $file = UPLOAD_DIR . encode($page) . '_' . encode($name);
+ if (! is_file($file)) {
+ $params['_error'] = 'File not found';
+ return $params;
+ }
}
// ¥Ú¡¼¥¸»ØÄê¤Î¥Á¥§¥Ã¥¯
if ($matches[1] == '.' || $matches[1] == '..') {
$matches[1] .= '/';
}
- $page = get_fullname($matches[1],$page);
+ $page = get_fullname($matches[1], $page);
$name = $matches[2];
}
$title = htmlspecialchars($name);
- $file = UPLOAD_DIR . encode($page) . '_' . encode($name);
-
- if (! is_file($file)) {
- $params['_error'] = 'File not found';
- return $params;
- }
$is_image = (! $params['noimg'] && preg_match('/\.(gif|png|jpe?g)$/i', $name));