OSDN Git Service
(root)
/
pukiwiki
/
pukiwiki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef5eebe
)
Support simple page name expression with '&'-params as query string
author
umorigu
<umorigu@gmail.com>
Sun, 12 Jul 2015 14:43:45 +0000
(23:43 +0900)
committer
umorigu
<umorigu@gmail.com>
Wed, 20 Jan 2016 17:31:11 +0000
(
02:31
+0900)
For example, a URL "/?FrontPage&a=b&c=d" is recognized as "FrontPage"
page with a=b and c=d parammeteers.
lib/init.php
patch
|
blob
|
history
diff --git
a/lib/init.php
b/lib/init.php
index
2561fc8
..
4224b0f
100644
(file)
--- a/
lib/init.php
+++ b/
lib/init.php
@@
-354,6
+354,7
@@
if (! isset($vars['cmd']) && ! isset($vars['plugin'])) {
$get['cmd'] = $post['cmd'] = $vars['cmd'] = 'read';
+ $arg = preg_replace("#^([^&]*)&.*$#", "$1", $arg);
if ($arg == '') $arg = $defaultpage;
$arg = rawurldecode($arg);
$arg = strip_bracket($arg);