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 ?>">
gravatar($singleCommentOptions->avatarSize, $singleCommentOptions->defaultAvatar); ?> + itemprop="image"> + gravatar($singleCommentOptions->avatarSize, $singleCommentOptions->defaultAvatar); ?> + beforeAuthor(); $this->author(); $singleCommentOptions->afterAuthor(); ?> @@ -320,9 +329,11 @@ class Archive extends Comments
+ datetime="date('c'); ?>">beforeDate(); + $this->date($singleCommentOptions->dateFormat); + $singleCommentOptions->afterDate(); + ?> status) { ?> commentStatus(); ?> diff --git a/var/Widget/Comments/Edit.php b/var/Widget/Comments/Edit.php index 078f21ce..dfd591da 100644 --- a/var/Widget/Comments/Edit.php +++ b/var/Widget/Comments/Edit.php @@ -187,7 +187,6 @@ class Edit extends Comments implements ActionInterface 'message' => _t('删除评论失败') ]); } - } else { /** 设置提示信息 */ Notice::alloc() diff --git a/var/Widget/Comments/Ping.php b/var/Widget/Comments/Ping.php index 080cf137..4866bbf9 100644 --- a/var/Widget/Comments/Ping.php +++ b/var/Widget/Comments/Ping.php @@ -124,7 +124,7 @@ class Ping extends Comments $singlePingOptions->beforeTitle(); $this->author(true); $singlePingOptions->afterTitle(); - ?> + ?>
beforeDate(); diff --git a/var/Widget/Contents/Attachment/Edit.php b/var/Widget/Contents/Attachment/Edit.php index a54381c2..4b85811b 100644 --- a/var/Widget/Contents/Attachment/Edit.php +++ b/var/Widget/Contents/Attachment/Edit.php @@ -136,7 +136,6 @@ class Edit extends PostEdit implements ActionInterface Notice::alloc()->set('publish' == $this->status ? _t('文件 %s 已经被更新', $this->permalink, $this->title) : _t('未归档文件 %s 已经被更新', $this->title), 'success'); - } /** 转向原页 */ diff --git a/var/Widget/Contents/Post/Edit.php b/var/Widget/Contents/Post/Edit.php index 13eccde4..debc1cf2 100644 --- a/var/Widget/Contents/Post/Edit.php +++ b/var/Widget/Contents/Post/Edit.php @@ -424,7 +424,6 @@ class Edit extends Contents implements ActionInterface if ($this->update($contents, $this->db->sql()->where('cid = ?', $this->cid))) { $realId = $this->cid; } - } else { /** 发布一个新内容 */ $realId = $this->insert($contents); @@ -727,7 +726,6 @@ class Edit extends Contents implements ActionInterface if ($this->update($contents, $this->db->sql()->where('cid = ?', $this->draft['cid']))) { $realId = $this->draft['cid']; } - } else { if ($this->have()) { $contents['parent'] = $this->cid; diff --git a/var/Widget/Menu.php b/var/Widget/Menu.php index 1d50a6b1..faf0ab26 100644 --- a/var/Widget/Menu.php +++ b/var/Widget/Menu.php @@ -314,4 +314,3 @@ class Menu extends Base } } } - diff --git a/var/Widget/Options.php b/var/Widget/Options.php index be184f8f..e5a0dd72 100644 --- a/var/Widget/Options.php +++ b/var/Widget/Options.php @@ -91,6 +91,7 @@ if (!defined('__TYPECHO_ROOT_DIR__')) { * @property int $postsListSize * @property bool $feedFullText * @property int $defaultCategory + * @property bool $frontArchive */ class Options extends Base { diff --git a/var/Widget/Options/Permalink.php b/var/Widget/Options/Permalink.php index 705e5e7b..2371d04d 100644 --- a/var/Widget/Options/Permalink.php +++ b/var/Widget/Options/Permalink.php @@ -219,7 +219,8 @@ RewriteRule . {$basePath}index.php [L] . _t('请调整你的目录权限, 或者手动创建一个.htaccess文件.') . ''; } - $errorStr .= '
' + $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' : '') . ' /> -