Skip to content

Commit

Permalink
Merge pull request #402 from codeigniter4projects/limit-news
Browse files Browse the repository at this point in the history
fix: Limit news posts grabbed from the forums and fix deployment.
  • Loading branch information
kenjis authored Sep 29, 2023
2 parents bcbd7d6 + 89de25c commit 0410ccc
Show file tree
Hide file tree
Showing 3 changed files with 316 additions and 342 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: 'Deploy to Production'
name: "Deploy to Production"

on:
push:
branches: [ master ]
branches: [master]

jobs:
deploy:
name: 'Deploy to Production'
name: "Deploy to Production"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -68,4 +68,4 @@ jobs:
echo $'Set up Links\n'
cd $RELEASE_DIR
sudo ln -nsf $RELEASE_DIR/$RELEASE "../current"
sudo service php7.4-fpm reload
sudo service php8.1-fpm reload
1 change: 1 addition & 0 deletions app/Models/MyBBModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public function getRecentNews(int $limit = 5, string $order = 'desc')
$query = $builder->select('tid, subject, username, lastpost, lastposter')
->where($where)
->whereIn('username', $admins)
->limit($limit, 0)
->orderBy('lastpost', $order)
->get();

Expand Down
Loading

0 comments on commit 0410ccc

Please sign in to comment.