* Change uriArgument parsing routine to allow "!" in URLs.
Now we can have absolute serocracy.
This commit is contained in:
parent
876a15980b
commit
be0bdd9cf6
@ -3,6 +3,9 @@
|
||||
Version 1.5 ()
|
||||
------------------------------------------------------------------------
|
||||
|
||||
* Change uriArgument parsing routine to allow "!" in URLs.
|
||||
Now we can have absolute serocracy.
|
||||
|
||||
* Changed image upload workflow so that the upload results/errors
|
||||
are shown on top of the media library, allowing to go on
|
||||
immediately (onli)
|
||||
|
@ -777,7 +777,7 @@ static $indexFile = null;
|
||||
}
|
||||
|
||||
/* Explode the path into sections, to later be able to check for arguments and add our own */
|
||||
preg_match('/^'. preg_quote($serendipity['serendipityHTTPPath'], '/') . '(' . preg_quote($serendipity['indexFile'], '/') . '\?\/)?(' . ($wildcard ? '.+' : '[;,_a-z0-9\-*\/%\+]+') . ')/i', $uri, $_res);
|
||||
preg_match('/^'. preg_quote($serendipity['serendipityHTTPPath'], '/') . '(' . preg_quote($serendipity['indexFile'], '/') . '\?\/)?(' . ($wildcard ? '.+' : '[!;,_a-z0-9\-*\/%\+]+') . ')/i', $uri, $_res);
|
||||
if (strlen($_res[2]) != 0) {
|
||||
$args = explode('/', $_res[2]);
|
||||
if ($args[0] == $indexFile || $args[0] == $serendipity['indexFile']) {
|
||||
|
@ -21,7 +21,8 @@ if (!defined('S9Y_FRAMEWORK_PLUGIN_INTERNAL')) {
|
||||
$uri_addData = array(
|
||||
'startpage' => false,
|
||||
'uriargs' => implode('/', serendipity_getUriArguments($uri, true)),
|
||||
'view' => $serendipity['view']
|
||||
'view' => $serendipity['view'],
|
||||
'viewtype' => $serendipity['viewtype']
|
||||
);
|
||||
if ((empty($uri_addData['uriargs']) || trim($uri_addData['uriargs']) == $serendipity['indexFile']) && empty($serendipity['GET']['subpage'])) {
|
||||
$uri_addData['startpage'] = true;
|
||||
|
@ -307,6 +307,7 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
|
||||
$serendipity['head_subtitle'] = htmlspecialchars($serendipity['blogTitle']);
|
||||
} else {
|
||||
$serendipity['view'] = '404';
|
||||
$serendipity['viewtype'] = '404_1';
|
||||
header('HTTP/1.0 404 Not found');
|
||||
header('Status: 404 Not found');
|
||||
}
|
||||
@ -449,6 +450,7 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
|
||||
|
||||
if (!is_array($cInfo)) {
|
||||
$serendipity['view'] = '404';
|
||||
$serendipity['viewtype'] = '404_2';
|
||||
header('HTTP/1.0 404 Not found');
|
||||
header('Status: 404 Not found');
|
||||
} else {
|
||||
@ -495,6 +497,7 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
|
||||
|
||||
if (!is_array($uInfo)) {
|
||||
$serendipity['view'] = '404';
|
||||
$serendipity['viewtype'] = '404_3';
|
||||
header('HTTP/1.0 404 Not found');
|
||||
header('Status: 404 Not found');
|
||||
} else {
|
||||
@ -608,6 +611,7 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
|
||||
include(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
|
||||
} else {
|
||||
$serendipity['view'] = '404';
|
||||
$serendipity['viewtype'] = '404_4';
|
||||
header('HTTP/1.0 404 Not found');
|
||||
header('Status: 404 Not found');
|
||||
include(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
|
||||
@ -624,6 +628,7 @@ if (!defined('NO_EXIT')) {
|
||||
$serendipity['smarty']->assign_by_ref('raw_data', $raw_data);
|
||||
if (empty($serendipity['smarty_file'])) {
|
||||
$serendipity['smarty_file'] = '404.tpl';
|
||||
$serendipity['viewtype'] = '404_5';
|
||||
}
|
||||
|
||||
serendipity_gzCompression();
|
||||
|
Loading…
x
Reference in New Issue
Block a user