给文章增加一个隐私选项,可以选择让文章不现实出来,而只能通过url访问

增加可以调整分类固定链接样式的选项
This commit is contained in:
joyqi
2013-11-17 21:22:12 +08:00
parent 50c42c5946
commit fc5afc23bc
6 changed files with 47 additions and 12 deletions
+15 -4
View File
@@ -1202,11 +1202,22 @@ class Widget_Archive extends Widget_Abstract_Contents
/** 定时发布功能 */
if (!$selectPlugged) {
if ($this->user->hasLogin()) {
$select = $this->select()->where('table.contents.status = ? OR
(table.contents.status = ? AND table.contents.authorId = ?)', 'publish', 'private', $this->user->uid);
if ('post' == $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 = ?)',
'publish', 'hidden', 'private', $this->user->uid);
} else {
$select = $this->select()->where('table.contents.status = ? OR table.contents.status',
'publish', 'hidden');
}
} else {
$select = $this->select()->where('table.contents.status = ?', 'publish');
if ($this->user->hasLogin()) {
$select = $this->select()->where('table.contents.status = ? OR
(table.contents.status = ? AND table.contents.authorId = ?)', 'publish', 'private', $this->user->uid);
} else {
$select = $this->select()->where('table.contents.status = ?', 'publish');
}
}
$select->where('table.contents.created < ?', $this->options->gmtTime);
}