mirror of
https://github.com/standardebooks/web.git
synced 2025-07-19 04:44:48 -04:00
Use static class names instead of strings when getting objects from the DB
This commit is contained in:
parent
a442f92e28
commit
acb6b2949f
16 changed files with 36 additions and 34 deletions
|
@ -4,7 +4,7 @@ $pastPolls = Db::Query('
|
|||
from Polls
|
||||
where utc_timestamp() >= end
|
||||
order by Start desc
|
||||
', [], 'Poll');
|
||||
', [], Poll::class);
|
||||
|
||||
$openPolls = Db::Query('
|
||||
SELECT *
|
||||
|
@ -15,7 +15,7 @@ $openPolls = Db::Query('
|
|||
(Start is null
|
||||
or Start <= utc_timestamp())
|
||||
order by Start desc
|
||||
', [], 'Poll');
|
||||
', [], Poll::class);
|
||||
|
||||
?><?= Template::Header(['title' => 'Polls', 'highlight' => '', 'description' => 'The various polls active at Standard Ebooks.']) ?>
|
||||
<main>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue