diff --git a/var/Widget/Archive.php b/var/Widget/Archive.php index 611bebeb..6ba38fb1 100644 --- a/var/Widget/Archive.php +++ b/var/Widget/Archive.php @@ -1208,9 +1208,7 @@ class Archive extends Contents input = document.createElement('input'); input.type = 'hidden'; input.name = '_'; - input.value = " . Common::shuffleScriptVar( - $this->security->getToken($this->request->getRequestUrl()) - ) . " + input.value = " . Common::shuffleScriptVar($this->security->getToken($this->request->getRequestUrl())) . " if (null != r) { var forms = r.getElementsByTagName('form'); diff --git a/var/Widget/Comments/Archive.php b/var/Widget/Comments/Archive.php index fb589744..b4366d49 100644 --- a/var/Widget/Comments/Archive.php +++ b/var/Widget/Comments/Archive.php @@ -93,7 +93,14 @@ class Archive extends Comments $commentsAuthor = Cookie::get('__typecho_remember_author'); $commentsMail = Cookie::get('__typecho_remember_mail'); $select = $this->select()->where('table.comments.cid = ?', $this->parameter->parentId) - ->where('table.comments.status = ? OR (table.comments.author = ? AND table.comments.mail = ? AND table.comments.status = ?)', 'approved', $commentsAuthor, $commentsMail, 'waiting'); + ->where( + 'table.comments.status = ? OR (table.comments.author = ?' + . ' AND table.comments.mail = ? AND table.comments.status = ?)', + 'approved', + $commentsAuthor, + $commentsMail, + 'waiting' + ); $threadedSelect = null; if ($this->options->commentsShowCommentOnly) { @@ -312,7 +319,9 @@ class Archive extends Comments ?>">
' + $errorStr .= + '
' . ' '; $rewrite->addRule([$this, 'checkRewrite'], $errorStr); } @@ -228,10 +229,14 @@ RewriteRule . {$basePath}index.php [L] } $patterns = [ - '/archives/[cid:digital]/' => _t('默认风格') . '
/archives/{cid}/', - '/archives/[slug].html' => _t('wordpress风格') . '/archives/{slug}.html', - '/[year:digital:4]/[month:digital:2]/[day:digital:2]/[slug].html' => _t('按日期归档') . '/{year}/{month}/{day}/{slug}.html', - '/[category]/[slug].html' => _t('按分类归档') . '/{category}/{slug}.html' + '/archives/[cid:digital]/' => _t('默认风格') + . '/archives/{cid}/', + '/archives/[slug].html' => _t('wordpress风格') + . '/archives/{slug}.html', + '/[year:digital:4]/[month:digital:2]/[day:digital:2]/[slug].html' => _t('按日期归档') + . '/{year}/{month}/{day}/{slug}.html', + '/[category]/[slug].html' => _t('按分类归档') + . '/{category}/{slug}.html' ]; /** 自定义文章路径 */ diff --git a/var/Widget/Options/Reading.php b/var/Widget/Options/Reading.php index a072bbdb..0ad5904f 100644 --- a/var/Widget/Options/Reading.php +++ b/var/Widget/Options/Reading.php @@ -122,9 +122,11 @@ class Reading extends Permalink $frontPattern = '' . 'options->frontArchive && 'recent' != $frontPageType ? ' checked' : '') . ' /> -