fix: check for database connection and podcasts table existence before redirecting to install

fix signature regex
This commit is contained in:
Yassine Doghri 2021-06-10 13:18:58 +00:00
commit eb74e81c3d
No known key found for this signature in database
GPG key ID: 3E7F89498B960C9F
6 changed files with 22 additions and 29 deletions

View file

@ -39,10 +39,6 @@ class NoteController extends Controller
public function _remap(string $method, string ...$params): mixed
{
if (count($params) < 1) {
throw PageNotFoundException::forPageNotFound();
}
if (($note = model('NoteModel')->getNoteById($params[0])) === null) {
throw PageNotFoundException::forPageNotFound();
}
@ -80,9 +76,9 @@ class NoteController extends Controller
->where('`published_at` <= NOW()', null, false)
->orderBy('published_at', 'ASC');
$pageNumber = $this->request->getGet('page');
$pageNumber = (int) $this->request->getGet('page');
if (! isset($pageNumber)) {
if ($pageNumber < 1) {
$noteReplies->paginate(12);
$pager = $noteReplies->pager;
$collection = new OrderedCollectionObject(null, $pager);