OSDN Git Service

Overhaul.
authorhenoheno <henoheno>
Tue, 23 Nov 2004 09:16:32 +0000 (18:16 +0900)
committerhenoheno <henoheno>
Tue, 23 Nov 2004 09:16:32 +0000 (18:16 +0900)
Added a header, strict argument checks and its usage.
Rename variables. Removed strip_tags() in htmlspecialchars().
Allow using this plugin with zero and one argument.
Clearly prohibit using GET method to stop GET loop.

plugin/lookup.inc.php

index 9698f3b..b902db2 100644 (file)
@@ -2,7 +2,7 @@
 /////////////////////////////////////////////////
 // PukiWiki - Yet another WikiWikiWeb clone.
 //
-// $Id: lookup.inc.php,v 1.11 2004/11/23 09:09:10 henoheno Exp $
+// $Id: lookup.inc.php,v 1.12 2004/11/23 09:16:32 henoheno Exp $
 //
 // Lookup plugin
 
@@ -42,7 +42,8 @@ function plugin_lookup_action()
 
        $page  = isset($post['page'])  ? $post['page']  : '';
        $inter = isset($post['inter']) ? $post['inter'] : '';
-       if ($page == '' || $inter == '') return array(msg=>'Invalid access', body=>'');
+       if ($page == '') return FALSE; // Do nothing
+       if ($inter == '') return array(msg=>'Invalid access', body=>'');
 
        $url = get_interwiki_url($inter, $page);
        if ($url === FALSE) {