From 36f955285ed6534e54f1ee6a67e6c59073a10c24 Mon Sep 17 00:00:00 2001 From: Garvin Hicking Date: Fri, 26 Mar 2010 13:55:04 +0000 Subject: [PATCH] fix ategory for pathnames startin gwith a number --- docs/NEWS | 3 +++ index.php | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/NEWS b/docs/NEWS index 8fd09a2f..a11c2b02 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -3,6 +3,9 @@ Version 1.6 () ------------------------------------------------------------------------ + * Fix "viewAuthor" URL detection routine if the path name of a + domain begins with a number. (garvinhicking) + * Fix SQLite substring search to use % instead of * for secondary matches (SvOlli) diff --git a/index.php b/index.php index 47343f9d..e7316cf3 100644 --- a/index.php +++ b/index.php @@ -465,9 +465,11 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range $serendipity['GET']['viewAuthor'] = implode(';', $serendipity['POST']['multiAuth']); $serendipity['uriArguments'][] = PATH_AUTHORS; $serendipity['uriArguments'][] = serendipity_db_escape_string($serendipity['GET']['viewAuthor']) . '-multi'; - } elseif (preg_match('@/([0-9;]+)@', $uri, $multimatch)) { + } elseif (empty($matches[1]) && preg_match('@/([0-9;]+)@', $uri, $multimatch)) { $is_multiauth = true; $serendipity['GET']['viewAuthor'] = $multimatch[1]; + } else { + $serendipity['GET']['viewAuthor'] = $matches[1]; } $serendipity['GET']['action'] = 'read';