/////////////////////////////////////////////////
// PukiWiki - Yet another WikiWikiWeb clone.
//
-// $Id: ref.inc.php,v 1.37 2004/08/29 10:24:45 henoheno Exp $
+// $Id: ref.inc.php,v 1.38 2004/09/01 13:15:16 henoheno Exp $
//
// UPLOAD_DIR ¤Î¥Ç¡¼¥¿(²èÁü¥Õ¥¡¥¤¥ë¤Î¤ß)¤ËľÀÜ¥¢¥¯¥»¥¹¤µ¤»¤ë
// źÉÕ¥Õ¥¡¥¤¥ë¤Î¤¢¤ë¥Ú¡¼¥¸: default¤Ï¸½ºß¤Î¥Ú¡¼¥¸Ì¾
$page = isset($vars['page']) ? $vars['page'] : '';
- // źÉÕ¥Õ¥¡¥¤¥ë̾
+ // źÉÕ¥Õ¥¡¥¤¥ë¤Î¥Õ¥¡¥¤¥ë̾
$name = '';
+ // źÉÕ¥Õ¥¡¥¤¥ë¤Þ¤Ç¤Î¥Ñ¥¹¤ª¤è¤Ó(¼ÂºÝ¤Î)¥Õ¥¡¥¤¥ë̾
+ $file = '';
+
// Âè°ì°ú¿ô: "[¥Ú¡¼¥¸Ì¾¤ª¤è¤Ó/]źÉÕ¥Õ¥¡¥¤¥ë̾"¡¢¤¢¤ë¤¤¤Ï"URL"¤ò¼èÆÀ
$name = array_shift($args);
$is_url = is_url($name);
}
$name = $matches[2];
$page = get_fullname(strip_bracket($matches[1]), $page); // strip is a compat
- $is_file = is_file(UPLOAD_DIR . encode($page) . '_' . encode($name));
+ $file = UPLOAD_DIR . encode($page) . '_' . encode($name);
+ $is_file = is_file($file);
// ÂèÆó°ú¿ô°Ê¹ß¤¬Â¸ºß¤·¡¢¤½¤ì¤Ïref¤Î¥ª¥×¥·¥ç¥ó̾¾Î¤Ê¤É¤È°ìÃפ·¤Ê¤¤
} else if (isset($args[0]) && $args[0] != '' && ! isset($params[$args[0]])) {
// Try the second argument, as a page-name or a path-name
$_arg = get_fullname(strip_bracket($args[0]), $page); // strip is a compat
- $is_file_second = is_file(UPLOAD_DIR . encode($_arg) . '_' . $e_name);
+ $file = UPLOAD_DIR . encode($_arg) . '_' . $e_name;
+ $is_file_second = is_file($file);
// If the second argument is WikiName, or double-bracket-inserted pagename (compat)
$is_bracket_bracket = preg_match("/^($WikiName|\[\[$BracketName\]\])$/", $args[0]);
}
} else {
// Simple single argument
- $is_file = is_file(UPLOAD_DIR . encode($page) . '_' . encode($name));
+ $file = UPLOAD_DIR . encode($page) . '_' . encode($name);
+ $is_file = is_file($file);
}
if (! $is_file) {
$params['_error'] = htmlspecialchars('File not found: "' .
źÉÕ¥Õ¥¡¥¤¥ë¤Î¤È¤ : ¥Õ¥¡¥¤¥ë¤ÎºÇ½ª¹¹¿·Æü¤È¥µ¥¤¥º
URL¤Î¤È¤ : URL¤½¤Î¤â¤Î
*/
- $file = $title = $url = $url2 = $info = '';
+ $title = $url = $url2 = $info = '';
$width = $height = 0;
$matches = array();