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';