Skip to content

Commit

Permalink
V3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
liaocp666 committed Jan 9, 2025
1 parent 3311634 commit 20291e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 37 deletions.
20 changes: 1 addition & 19 deletions widget/HotPost.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,9 @@ class HotPost extends Recent
*/
public function execute()
{

$this->parameter->setDefault(['pageSize' => 7]);

$this->db->fetchAll($this->select(
'table.contents.cid',
'table.contents.title',
'table.contents.slug',
'table.contents.created',
'table.contents.modified',
'table.contents.text',
'table.contents.type',
'table.contents.status',
'table.contents.commentsNum',
'table.contents.allowComment',
'table.contents.allowPing',
'table.contents.allowFeed',
'table.contents.template',
'table.contents.password',
'table.contents.authorId',
'table.contents.parent',
)
$this->db->fetchAll($this->select()
->where('table.contents.status = ?', 'publish')
->where('table.contents.created < ?', $this->options->time)
->where('table.contents.type = ?', 'post')
Expand Down
19 changes: 1 addition & 18 deletions widget/TopUpContent.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,7 @@ public function execute()
{
$this->parameter->setDefault(['pageSize' => 7]);

$this->db->fetchAll($this->select(
'table.contents.cid',
'table.contents.title',
'table.contents.slug',
'table.contents.created',
'table.contents.modified',
'table.contents.text',
'table.contents.type',
'table.contents.status',
'table.contents.commentsNum',
'table.contents.allowComment',
'table.contents.allowPing',
'table.contents.allowFeed',
'table.contents.template',
'table.contents.password',
'table.contents.authorId',
'table.contents.parent',
)
$this->db->fetchAll($this->select()
->join('table.fields', 'table.contents.cid=table.fields.cid')
->where('table.fields.name = ?', 'topUp')
->where('table.fields.str_value = ?', '1')
Expand Down

0 comments on commit 20291e6

Please sign in to comment.