diff -ru pukiwiki-1.4.4/lib/func.php pukiwiki/lib/func.php
--- pukiwiki-1.4.4/lib/func.php 2004-08-07 00:39:52.000000000 +0900
+++ pukiwiki/lib/func.php 2004-10-21 01:11:47.000000000 +0900
@@ -635,6 +635,12 @@
}
}
+// PukiWikiの階層をディレクトリに偽装
+function anchor_replace($anchor)
+{
+ return str_replace('%2F', '/', $anchor);
+}
+
//// Compat ////
diff -ru pukiwiki-1.4.4/lib/html.php pukiwiki/lib/html.php
--- pukiwiki-1.4.4/lib/html.php 2004-08-07 00:41:41.000000000 +0900
+++ pukiwiki/lib/html.php 2004-10-21 01:14:01.000000000 +0900
@@ -24,13 +24,13 @@
$link_add = "$script?cmd=add&page=$r_page";
$link_edit = "$script?cmd=edit&page=$r_page";
$link_diff = "$script?cmd=diff&page=$r_page";
- $link_top = "$script?".rawurlencode($defaultpage);
+ $link_top = '/pukiwiki/'.anchor_replace(rawurlencode($defaultpage)).'/';
$link_list = "$script?cmd=list";
$link_filelist = "$script?cmd=filelist";
$link_search = "$script?cmd=search";
- $link_whatsnew = "$script?".rawurlencode($whatsnew);
+ $link_whatsnew = '/pukiwiki/'.anchor_replace(rawurlencode($whatsnew)).'/';
$link_backup = "$script?cmd=backup&page=$r_page";
- $link_help = "$script?".rawurlencode($help_page);
+ $link_help = '/pukiwiki/'.anchor_replace(rawurlencode($help_page)).'/';
$link_rss = "$script?cmd=rss10";
$link_freeze = "$script?cmd=freeze&page=$r_page";
$link_unfreeze = "$script?cmd=unfreeze&page=$r_page";
@@ -232,8 +232,8 @@
$s_page = htmlspecialchars($page);
$passage = get_passage($lastmod);
$_links[] = $tag ?
- "$s_page" :
- "$s_page$passage";
+ anchor_replace("$s_page") :
+ anchor_replace("$s_page$passage");
}
if (count($_links) == 0)
diff -ru pukiwiki-1.4.4/lib/make_link.php pukiwiki/lib/make_link.php
--- pukiwiki-1.4.4/lib/make_link.php 2004-08-01 10:54:35.000000000 +0900
+++ pukiwiki/lib/make_link.php 2004-10-21 01:15:11.000000000 +0900
@@ -670,7 +670,7 @@
{
$passage = get_pg_passage($page,FALSE);
$title = $link_compact ? '' : " title=\"$s_page$passage\"";
- return "$s_alias";
+ return anchor_replace("$s_alias");
}
else
{
diff -ru pukiwiki-1.4.4/plugin/calendar2.inc.php pukiwiki/plugin/calendar2.inc.php
--- pukiwiki-1.4.4/plugin/calendar2.inc.php 2004-07-31 12:09:20.000000000 +0900
+++ pukiwiki/plugin/calendar2.inc.php 2004-10-21 01:17:47.000000000 +0900
@@ -121,7 +121,7 @@
}
if (is_page($page)) {
- $link = "$day";
+ $link = anchor_replace("$day");
}
else {
$link = "$day";
diff -ru pukiwiki-1.4.4/plugin/diff.inc.php pukiwiki/plugin/diff.inc.php
--- pukiwiki-1.4.4/plugin/diff.inc.php 2004-08-07 01:05:18.000000000 +0900
+++ pukiwiki/plugin/diff.inc.php 2004-10-21 01:18:56.000000000 +0900
@@ -38,7 +38,7 @@
$is_page = is_page($page);
if ($is_page) {
- $menu[] = '
' . str_replace('$1', "$s_page", $_msg_goto) . '';
+ $menu[] = ' ' . str_replace('$1', anchor_replace("$s_page"), $_msg_goto) . '';
} else {
$menu[] = ' ' . str_replace('$1', $s_page,$_msg_deleted) . '';
}
diff -ru pukiwiki-1.4.4/plugin/edit.inc.php pukiwiki/plugin/edit.inc.php
--- pukiwiki-1.4.4/plugin/edit.inc.php 2004-07-31 12:09:20.000000000 +0900
+++ pukiwiki/plugin/edit.inc.php 2004-10-21 01:20:28.000000000 +0900
@@ -117,7 +117,7 @@
page_write($page, $postdata, $notimestamp);
if ($postdata) {
- header("Location: $script?" . rawurlencode($page));
+ header('Location: '.anchor_replace(rawurlencode($page)).'/');
exit;
}
diff -ru pukiwiki-1.4.4/plugin/recent.inc.php pukiwiki/plugin/recent.inc.php
--- pukiwiki-1.4.4/plugin/recent.inc.php 2004-09-04 23:26:52.000000000 +0900
+++ pukiwiki/plugin/recent.inc.php 2004-10-21 01:21:17.000000000 +0900
@@ -52,7 +52,7 @@
// No need to link itself, notifies where you just read
$items .= " $s_page\n";
} else {
- $items .= " $s_page\n";
+ $items .= anchor_replace(" $s_page\n");
}
}
if (! empty($lines)) $items .= "\n";
diff -ru pukiwiki-1.4.4/plugin/rename.inc.php pukiwiki/plugin/rename.inc.php
--- pukiwiki-1.4.4/plugin/rename.inc.php 2004-07-31 12:09:20.000000000 +0900
+++ pukiwiki/plugin/rename.inc.php 2004-10-21 01:21:45.000000000 +0900
@@ -472,7 +472,7 @@
{
$page = RENAME_LOGPAGE;
}
- header("Location: $script?" . rawurlencode($page));
+ header('Location: '.anchor_replace(rawurlencode($page)).'/');
die();
}
diff -ru pukiwiki-1.4.4/plugin/topicpath.inc.php pukiwiki/plugin/topicpath.inc.php
--- pukiwiki-1.4.4/plugin/topicpath.inc.php 2004-08-12 22:02:26.000000000 +0900
+++ pukiwiki/plugin/topicpath.inc.php 2004-10-21 01:31:13.000000000 +0900
@@ -48,7 +48,7 @@
$landing = rawurlencode(join('/', $parts));
$element = htmlspecialchars(array_pop($parts));
if ($b_link) {
- $topic_path[] = "$element";
+ $topic_path[] = anchor_replace("$element");
} else {
$topic_path[] = $element;
$b_link = TRUE; // Maybe reacheable once at a time
diff -ru pukiwiki-1.4.4/plugin/yetlist.inc.php pukiwiki/plugin/yetlist.inc.php
--- pukiwiki-1.4.4/plugin/yetlist.inc.php 2004-07-31 12:09:20.000000000 +0900
+++ pukiwiki/plugin/yetlist.inc.php 2004-10-21 01:24:04.000000000 +0900
@@ -46,7 +46,7 @@
$r_refer = rawurlencode($_refer);
$s_refer = htmlspecialchars($_refer);
- $link_refs[] = "$s_refer";
+ $link_refs[] = anchor_replace("$s_refer");
}
$link_ref = join(' ',$link_refs);
// 参照元ページが複数あった場合、referは最後のページを指す(いいのかな)
diff -ru pukiwiki-1.4.4/pukiwiki.ini.php pukiwiki/pukiwiki.ini.php
--- pukiwiki-1.4.4/pukiwiki.ini.php 2004-09-04 09:02:03.000000000 +0900
+++ pukiwiki/pukiwiki.ini.php 2004-10-21 01:09:16.000000000 +0900
@@ -37,7 +37,7 @@
// して下さい
// 画像ファイル格納ディレクトリ
-define('IMAGE_DIR', 'image/');
+define('IMAGE_DIR', '/pukiwiki/image/');
// このディレクトリ以下の全てのファイルは
// Webブラウザから見える場所(./IMAGE_DIR)に配置
// して下さい
diff -ru pukiwiki-1.4.4/skin/pukiwiki.skin.en.php pukiwiki/skin/pukiwiki.skin.en.php
--- pukiwiki-1.4.4/skin/pukiwiki.skin.en.php 2004-08-08 14:33:43.000000000 +0900
+++ pukiwiki/skin/pukiwiki.skin.en.php 2004-10-21 01:08:43.000000000 +0900
@@ -27,14 +27,14 @@
-
-
+
+
-
+
diff -ru pukiwiki-1.4.4/skin/pukiwiki.skin.ja.php pukiwiki/skin/pukiwiki.skin.ja.php
--- pukiwiki-1.4.4/skin/pukiwiki.skin.ja.php 2004-08-08 14:33:43.000000000 +0900
+++ pukiwiki/skin/pukiwiki.skin.ja.php 2004-10-21 01:08:43.000000000 +0900
@@ -27,14 +27,14 @@
-
-
+
+
-
+