mirror of
https://github.com/typecho/typecho.git
synced 2025-04-14 06:41:53 +02:00
fix #1159
This commit is contained in:
parent
4ad930a31d
commit
eb77897ab6
@ -10,7 +10,11 @@ use Typecho\Widget\Terminal;
|
||||
/**
|
||||
* Typecho组件基类
|
||||
*
|
||||
* @package Widget
|
||||
* @property $sequence
|
||||
* @property $length
|
||||
* @property-read $request
|
||||
* @property-read $response
|
||||
* @property-read $parameter
|
||||
*/
|
||||
abstract class Widget
|
||||
{
|
||||
@ -33,14 +37,14 @@ abstract class Widget
|
||||
*
|
||||
* @var WidgetRequest
|
||||
*/
|
||||
public $request;
|
||||
protected $request;
|
||||
|
||||
/**
|
||||
* response对象
|
||||
*
|
||||
* @var Response
|
||||
* @var WidgetResponse
|
||||
*/
|
||||
public $response;
|
||||
protected $response;
|
||||
|
||||
/**
|
||||
* 数据堆栈
|
||||
@ -436,4 +440,28 @@ abstract class Widget
|
||||
{
|
||||
return $this->length;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return WidgetRequest
|
||||
*/
|
||||
public function ___request(): WidgetRequest
|
||||
{
|
||||
return $this->request;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return WidgetRequest
|
||||
*/
|
||||
public function ___response(): WidgetRequest
|
||||
{
|
||||
return $this->request;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Config
|
||||
*/
|
||||
public function ___parameter(): Config
|
||||
{
|
||||
return $this->parameter;
|
||||
}
|
||||
}
|
||||
|
@ -86,10 +86,10 @@ class Admin extends Comments
|
||||
if (!$this->user->pass('editor', true)) {
|
||||
$select->where('table.comments.ownerId = ?', $this->user->uid);
|
||||
} elseif (!isset($this->request->cid)) {
|
||||
if ('on' == $this->request->_typecho_all_comments) {
|
||||
if ('on' == $this->request->__typecho_all_comments) {
|
||||
Cookie::set('__typecho_all_comments', 'on');
|
||||
} else {
|
||||
if ('off' == $this->request->_typecho_all_comments) {
|
||||
if ('off' == $this->request->__typecho_all_comments) {
|
||||
Cookie::set('__typecho_all_comments', 'off');
|
||||
}
|
||||
|
||||
|
@ -100,10 +100,10 @@ class Admin extends Contents
|
||||
if (!$this->user->pass('editor', true)) {
|
||||
$select->where('table.contents.authorId = ?', $this->user->uid);
|
||||
} else {
|
||||
if ('on' == $this->request->_typecho_all_posts) {
|
||||
if ('on' == $this->request->__typecho_all_posts) {
|
||||
Cookie::set('__typecho_all_posts', 'on');
|
||||
} else {
|
||||
if ('off' == $this->request->_typecho_all_posts) {
|
||||
if ('off' == $this->request->__typecho_all_posts) {
|
||||
Cookie::set('__typecho_all_posts', 'off');
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user