header('Location: ' . $loginurl);
} elseif (AUTH_TYPE_EXTERNAL === $auth_type ||
AUTH_TYPE_SAML === $auth_type) {
- $url_after_login = get_script_uri() . '?' . $g_query_string;
+ $url_after_login = get_base_uri(PKWK_URI_ABSOLUTE) . '?' . $g_query_string;
$loginurl = get_auth_external_login_url($page, $url_after_login);
header('HTTP/1.0 302 Found');
header('Location: ' . $loginurl);
if ($location) {
header('Location: ' . $location);
} else {
- $url = get_script_uri() . '?' . $page;
+ $url = get_page_uri($page, PKWK_URI_ROOT);
header('Location: ' . $url);
}
}
if ($notify_diff_only) $str = preg_replace('/^[^-+].*\n/m', '', $str);
$footer['ACTION'] = 'Page update';
$footer['PAGE'] = $page;
- $footer['URI'] = get_script_uri() . '?' . pagename_urlencode($page);
+ $footer['URI'] = get_page_uri($page, PKWK_URI_ABSOLUTE);
$footer['USER_AGENT'] = TRUE;
$footer['REMOTE_ADDR'] = TRUE;
pkwk_mail_notify($notify_subject, $str, $footer) or
}
$new_page = get_pagename_on_redirect($page);
if ($new_page != false) {
- header('Location: ' . get_script_uri() . '?' .
- pagename_urlencode($new_page));
+ header('Location: ' . get_page_uri($new_page, PKWK_URI_ROOT));
return TRUE;
}
return FALSE;
//
// Amazon plugin: Book-review maker via amazon.com/amazon.jp
//
-// Copyright:
-// 2004-2016 PukiWiki Development Team
+// Copyright
+// 2004-2017 PukiWiki Development Team
// 2003 閑舎 <raku@rakunet.org> (Original author)
//
// License: GNU/GPL
if ($edit_auth && ($auth_user == '' || ! isset($edit_auth_users[$auth_user]) ||
$edit_auth_users[$auth_user] != $_SERVER['PHP_AUTH_PW'])) {
// Edit-auth failed. Just look the page
- header('Location: ' . get_script_uri() . '?' . $r_page_url);
+ header('Location: ' . get_page_uri($r_page, PKWK_URI_ROOT));
} else {
$title = plugin_amazon_get_asin_title();
if ($title == '' || preg_match('#^/#', $s_page)) {
// Invalid page name
- header('Location: ' . get_script_uri() . '?' . pagename_urlencode($s_page));
+ header('Location: ' . get_page_uri($s_page, PKWK_URI_ROOT));
} else {
$body = '#amazon(' . $asin_all . ',,image)' . "\n" .
'*' . $title . "\n" . $amazon_body;
plugin_amazon_review_save($r_page, $body);
- header('Location: ' . get_script_uri() .
+ header('Location: ' . get_base_uri(PKWK_URI_ROOT) .
'?cmd=edit&page=' . $r_page_url);
}
}
if ($notify) {
$footer['ACTION'] = 'File attached';
- $footer['FILENAME'] = & $file['name'];
- $footer['FILESIZE'] = & $file['size'];
- $footer['PAGE'] = & $page;
-
- $footer['URI'] = get_script_uri() .
- //'?' . pagename_urlencode($page);
+ $footer['FILENAME'] = $file['name'];
+ $footer['FILESIZE'] = $file['size'];
+ $footer['PAGE'] = $page;
+ $footer['URI'] = get_base_uri(PKWK_URI_ABSOLUTE) .
// MD5 may heavy
'?plugin=attach' .
'&refer=' . rawurlencode($page) .
if ($notify) {
$footer['ACTION'] = 'File deleted';
- $footer['FILENAME'] = & $this->file;
- $footer['PAGE'] = & $this->page;
- $footer['URI'] = get_script_uri() .
- '?' . pagename_urlencode($this->page);
+ $footer['FILENAME'] = $this->file;
+ $footer['PAGE'] = $this->page;
+ $footer['URI'] = get_page_uri($this->page, PKWK_URI_ABSOLUTE);
$footer['USER_AGENT'] = TRUE;
$footer['REMOTE_ADDR'] = TRUE;
pkwk_mail_notify($notify_subject, "\n", $footer) or
$post['version'], $post['body']);
pkwk_headers_sent();
- header('Location: ' . get_script_uri() . '?' . pagename_urlencode($page));
+ header('Location: ' . get_page_uri($page, PKWK_URI_ROOT));
exit;
}
*/
function plugin_bugtrack_list_convert()
{
- global $script, $vars, $_plugin_bugtrack, $_title_cannotread;
+ global $vars, $_plugin_bugtrack, $_title_cannotread;
$cache_format_version = 1;
$cache_expire_time = 60 * 60 * 24;
$cache_refresh_time_prev;
page_write($page, $postdata, $notimeupdate != 0 && $notimestamp);
pkwk_headers_sent();
- header('Location: ' . get_script_uri() . '?' . pagename_urlencode($page));
+ header('Location: ' . get_page_uri($page, PKWK_URI_ROOT));
exit;
}
{
global $vars;
pkwk_headers_sent();
- header('Location: ' . get_script_uri() . '?' . pagename_urlencode($vars['page']));
+ header('Location: ' . get_page_uri($vars['page'], PKWK_URI_ROOT));
exit;
}
<?php
-// $Id: newpage.inc.php,v 1.16 2011/01/25 15:01:01 henoheno Exp $
+// PukiWiki - Yet another WikiWikiWeb clone.
+// newpage.inc.php
+// Copyright 2002-2017 PukiWiki Development Team
+// License: GPL v2 or (at your option) any later version
//
// Newpage plugin
$r_refer = rawurlencode($vars['refer']);
pkwk_headers_sent();
- header('Location: ' . get_script_uri() .
+ header('Location: ' . get_base_uri(PKWK_URI_ROOT) .
'?cmd=read&page=' . $r_page . '&refer=' . $r_refer);
exit;
}
}
-?>
<?php
// PukiWiki - Yet another WikiWikiWeb clone
-// $Id: pcomment.inc.php,v 1.48 2011/01/25 15:01:01 henoheno Exp $
+// pcomment.inc.php
+// Copyright 2002-2017 PukiWiki Development Team
+// License: GPL v2 or (at your option) any later version
//
// pcomment plugin - Show/Insert comments into specified (another) page
-//
+
// Usage: #pcomment([page][,max][,options])
//
// page -- An another page-name that holds comments
}
pkwk_headers_sent();
- header('Location: ' . get_script_uri() . '?' . pagename_urlencode($refer));
+ header('Location: ' . get_page_uri($refer, PKWK_URI_ROOT));
exit;
}
return array($comments, $digest);
}
-
if ($page == '') $page = PLUGIN_RENAME_LOGPAGE;
pkwk_headers_sent();
- header('Location: ' . get_script_uri() . '?' . pagename_urlencode($page));
+ header('Location: ' . get_page_uri($page, PKWK_URI_ROOT));
exit;
}
<?php
// PukiWiki - Yet another WikiWikiWeb clone
-// $Id: rss.inc.php,v 1.21 2007/02/11 05:53:31 henoheno Exp $
+// rss.inc.php
+// Copyright 2003-2017 PukiWiki Development Team
+// License: GPL v2 or (at your option) any later version
//
// RSS plugin: Publishing RSS of RecentChanges
-//
+
// Usage: plugin=rss[&ver=[0.91|1.0|2.0]] (Default: 0.91)
//
// NOTE for acronyms
$lang = LANG;
$page_title_utf8 = mb_convert_encoding($page_title, 'UTF-8', SOURCE_ENCODING);
- $self = get_script_uri();
+ $self = get_base_uri(PKWK_URI_ABSOLUTE);
// Creating <item>
$items = $rdf_li = '';
}
exit;
}
-
<?php
+// PukiWiki - Yet another WikiWikiWeb clone
+// rss10.inc.php
+// Copyright 2003-2017 PukiWiki Development Team
+//
// RSS 1.0 plugin - had been merged into rss plugin
-// $Id: rss10.inc.php,v 1.17 2005/09/24 01:16:43 henoheno Exp $
function plugin_rss10_action()
{
pkwk_headers_sent();
header('Status: 301 Moved Permanently');
- header('Location: ' . get_script_uri() . '?cmd=rss&ver=1.0'); // HTTP
+ header('Location: ' . get_base_uri(PKWK_URI_ROOT) . '?cmd=rss&ver=1.0'); // HTTP
exit;
}
-?>
// Writing page data, without touch
page_write($page, join('', $postdata));
-
- $r_page = pagename_urlencode($page);
-
pkwk_headers_sent();
- header('Location: ' . get_script_uri() . '?' . $r_page);
+ header('Location: ' . get_page_uri($page, PKWK_URI_ROOT));
exit;
}