mirror of
https://github.com/typecho/typecho.git
synced 2025-04-14 06:41:53 +02:00
fix format
This commit is contained in:
parent
0f3f15c0ca
commit
74b0f45a72
@ -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');
|
||||
|
@ -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
|
||||
?>">
|
||||
<div class="comment-author" itemprop="creator" itemscope itemtype="http://schema.org/Person">
|
||||
<span
|
||||
itemprop="image"><?php $this->gravatar($singleCommentOptions->avatarSize, $singleCommentOptions->defaultAvatar); ?></span>
|
||||
itemprop="image">
|
||||
<?php $this->gravatar($singleCommentOptions->avatarSize, $singleCommentOptions->defaultAvatar); ?>
|
||||
</span>
|
||||
<cite class="fn" itemprop="name"><?php $singleCommentOptions->beforeAuthor();
|
||||
$this->author();
|
||||
$singleCommentOptions->afterAuthor(); ?></cite>
|
||||
@ -320,9 +329,11 @@ class Archive extends Comments
|
||||
<div class="comment-meta">
|
||||
<a href="<?php $this->permalink(); ?>">
|
||||
<time itemprop="commentTime"
|
||||
datetime="<?php $this->date('c'); ?>"><?php $singleCommentOptions->beforeDate();
|
||||
$this->date($singleCommentOptions->dateFormat);
|
||||
$singleCommentOptions->afterDate(); ?></time>
|
||||
datetime="<?php $this->date('c'); ?>"><?php
|
||||
$singleCommentOptions->beforeDate();
|
||||
$this->date($singleCommentOptions->dateFormat);
|
||||
$singleCommentOptions->afterDate();
|
||||
?></time>
|
||||
</a>
|
||||
<?php if ('waiting' == $this->status) { ?>
|
||||
<em class="comment-awaiting-moderation"><?php $singleCommentOptions->commentStatus(); ?></em>
|
||||
|
@ -187,7 +187,6 @@ class Edit extends Comments implements ActionInterface
|
||||
'message' => _t('删除评论失败')
|
||||
]);
|
||||
}
|
||||
|
||||
} else {
|
||||
/** 设置提示信息 */
|
||||
Notice::alloc()
|
||||
|
@ -124,7 +124,7 @@ class Ping extends Comments
|
||||
$singlePingOptions->beforeTitle();
|
||||
$this->author(true);
|
||||
$singlePingOptions->afterTitle();
|
||||
?></cite>
|
||||
?></cite>
|
||||
</div>
|
||||
<div class="ping-meta">
|
||||
<a href="<?php $this->permalink(); ?>"><?php $singlePingOptions->beforeDate();
|
||||
|
@ -136,7 +136,6 @@ class Edit extends PostEdit implements ActionInterface
|
||||
Notice::alloc()->set('publish' == $this->status ?
|
||||
_t('文件 <a href="%s">%s</a> 已经被更新', $this->permalink, $this->title) :
|
||||
_t('未归档文件 %s 已经被更新', $this->title), 'success');
|
||||
|
||||
}
|
||||
|
||||
/** 转向原页 */
|
||||
|
@ -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;
|
||||
|
@ -314,4 +314,3 @@ class Menu extends Base
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -219,7 +219,8 @@ RewriteRule . {$basePath}index.php [L]
|
||||
. _t('请调整你的目录权限, 或者手动创建一个.htaccess文件.') . '</strong>';
|
||||
}
|
||||
|
||||
$errorStr .= '<br /><input type="checkbox" name="enableRewriteAnyway" id="enableRewriteAnyway" value="1" />'
|
||||
$errorStr .=
|
||||
'<br /><input type="checkbox" name="enableRewriteAnyway" id="enableRewriteAnyway" value="1" />'
|
||||
. ' <label for="enableRewriteAnyway">' . _t('如果你仍然想启用此功能, 请勾选这里') . '</label>';
|
||||
$rewrite->addRule([$this, 'checkRewrite'], $errorStr);
|
||||
}
|
||||
@ -228,10 +229,14 @@ RewriteRule . {$basePath}index.php [L]
|
||||
}
|
||||
|
||||
$patterns = [
|
||||
'/archives/[cid:digital]/' => _t('默认风格') . ' <code>/archives/{cid}/</code>',
|
||||
'/archives/[slug].html' => _t('wordpress风格') . ' <code>/archives/{slug}.html</code>',
|
||||
'/[year:digital:4]/[month:digital:2]/[day:digital:2]/[slug].html' => _t('按日期归档') . ' <code>/{year}/{month}/{day}/{slug}.html</code>',
|
||||
'/[category]/[slug].html' => _t('按分类归档') . ' <code>/{category}/{slug}.html</code>'
|
||||
'/archives/[cid:digital]/' => _t('默认风格')
|
||||
. ' <code>/archives/{cid}/</code>',
|
||||
'/archives/[slug].html' => _t('wordpress风格')
|
||||
. ' <code>/archives/{slug}.html</code>',
|
||||
'/[year:digital:4]/[month:digital:2]/[day:digital:2]/[slug].html' => _t('按日期归档')
|
||||
. ' <code>/{year}/{month}/{day}/{slug}.html</code>',
|
||||
'/[category]/[slug].html' => _t('按分类归档')
|
||||
. ' <code>/{category}/{slug}.html</code>'
|
||||
];
|
||||
|
||||
/** 自定义文章路径 */
|
||||
|
@ -122,9 +122,11 @@ class Reading extends Permalink
|
||||
$frontPattern = '</label></span><span class="multiline front-archive%class%">'
|
||||
. '<input type="checkbox" id="frontArchive" name="frontArchive" value="1"'
|
||||
. ($this->options->frontArchive && 'recent' != $frontPageType ? ' checked' : '') . ' />
|
||||
<label for="frontArchive">' . _t('同时将文章列表页路径更改为 %s',
|
||||
<label for="frontArchive">' . _t(
|
||||
'同时将文章列表页路径更改为 %s',
|
||||
'<input type="text" name="archivePattern" class="w-20 mono" value="'
|
||||
. htmlspecialchars($this->decodeRule($this->options->routingTable['archive']['url'])) . '" />')
|
||||
. htmlspecialchars($this->decodeRule($this->options->routingTable['archive']['url'])) . '" />'
|
||||
)
|
||||
. '</label>';
|
||||
|
||||
// 页面列表
|
||||
|
Loading…
x
Reference in New Issue
Block a user