OSDN Git Service

Cleanup about $file
authorhenoheno <henoheno>
Mon, 23 Aug 2004 14:59:11 +0000 (23:59 +0900)
committerhenoheno <henoheno>
Mon, 23 Aug 2004 14:59:11 +0000 (23:59 +0900)
plugin/ref.inc.php

index fff7256..3f66e51 100644 (file)
@@ -2,7 +2,7 @@
 /////////////////////////////////////////////////
 // PukiWiki - Yet another WikiWikiWeb clone.
 //
-// $Id: ref.inc.php,v 1.30 2004/08/21 02:36:57 henoheno Exp $
+// $Id: ref.inc.php,v 1.31 2004/08/23 14:59:11 henoheno Exp $
 //
 
 // UPLOAD_DIR ¤Î¥Ç¡¼¥¿(²èÁü¥Õ¥¡¥¤¥ë¤Î¤ß)¤ËľÀÜ¥¢¥¯¥»¥¹¤µ¤»¤ë
@@ -204,17 +204,17 @@ function plugin_ref_body($args)
                        return $params;
                }
 
-               // ¥Ú¡¼¥¸»ØÄê¤Î¥Á¥§¥Ã¥¯
+               // ¥Ú¡¼¥¸Ì¾¤È¥Õ¥¡¥¤¥ë̾¤Îʬ²ò (pagename/separated/with/slash/FILENAME)
                if (preg_match('/^(.+)\/([^\/]+)$/', $name, $matches)) {
                        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);
 
+               $file = UPLOAD_DIR . encode($page) . '_' . encode($name);
                if (! is_file($file)) {
                        $params['_error'] = 'File not found';
                        return $params;