mirror of
https://github.com/typecho/typecho.git
synced 2025-03-23 11:29:41 +01:00
fixed #80
This commit is contained in:
parent
ef811b2691
commit
b7d24401f0
@ -66,12 +66,6 @@ $stat = Typecho_Widget::widget('Widget_Stat');
|
||||
echo '<em class="status">' . _t('草稿') . '</em>';
|
||||
} else if ('hidden' == $pages->status) {
|
||||
echo '<em class="status">' . _t('隐藏') . '</em>';
|
||||
} else if ('waiting' == $pages->status) {
|
||||
echo '<em class="status">' . _t('待审核') . '</em>';
|
||||
} else if ('private' == $pages->status) {
|
||||
echo '<em class="status">' . _t('私密') . '</em>';
|
||||
} else if ($pages->password) {
|
||||
echo '<em class="status">' . _t('密码保护') . '</em>';
|
||||
}
|
||||
?>
|
||||
<?php if ('page_draft' != $pages->type): ?>
|
||||
|
@ -82,6 +82,14 @@ Typecho_Widget::widget('Widget_Contents_Page_Edit')->to($page);
|
||||
|
||||
<button type="button" id="advance-panel-btn"><?php _e('高级选项'); ?></button>
|
||||
<div id="advance-panel">
|
||||
<section class="typecho-post-option visibility-option">
|
||||
<label class="typecho-label"><?php _e('公开度'); ?></label>
|
||||
<ul>
|
||||
<li><input id="publish" value="publish" name="visibility" type="radio"<?php if ($page->status == 'publish' || !$page->status) { ?> checked="true"<?php } ?> /> <label for="publish"><?php _e('公开'); ?></label></li>
|
||||
<li><input id="hidden" value="hidden" name="visibility" type="radio"<?php if ($page->status == 'hidden') { ?> checked="true"<?php } ?> /> <label for="hidden"><?php _e('隐藏'); ?></label></li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section class="typecho-post-option allow-option">
|
||||
<label class="typecho-label"><?php _e('权限控制'); ?></label>
|
||||
<ul>
|
||||
|
@ -1233,7 +1233,7 @@ class Widget_Archive extends Widget_Abstract_Contents
|
||||
|
||||
/** 定时发布功能 */
|
||||
if (!$selectPlugged) {
|
||||
if ('post' == $this->parameter->type) {
|
||||
if ('post' == $this->parameter->type || 'page' == $this->parameter->type) {
|
||||
if ($this->user->hasLogin()) {
|
||||
$select = $this->select()->where('table.contents.status = ? OR table.contents.status = ? OR
|
||||
(table.contents.status = ? AND table.contents.authorId = ?)',
|
||||
|
@ -60,10 +60,11 @@ class Widget_Contents_Page_Edit extends Widget_Contents_Post_Edit implements Wid
|
||||
public function writePage()
|
||||
{
|
||||
$contents = $this->request->from('text', 'template', 'allowComment',
|
||||
'allowPing', 'allowFeed', 'slug', 'order');
|
||||
'allowPing', 'allowFeed', 'slug', 'order', 'visibility');
|
||||
|
||||
$contents['title'] = $this->request->get('title', _t('未命名页面'));
|
||||
$contents['created'] = $this->getCreated();
|
||||
$contents['visibility'] = ('hidden' == $contents['visibility'] ? 'hidden' : 'publish');
|
||||
|
||||
if ($this->request->markdown && $this->options->markdown) {
|
||||
$contents['text'] = '<!--markdown-->' . $contents['text'];
|
||||
|
Loading…
x
Reference in New Issue
Block a user