diff options
| author | cflip <36554078+cflip@users.noreply.github.com> | 2021-06-05 11:18:10 -0600 | 
|---|---|---|
| committer | cflip <36554078+cflip@users.noreply.github.com> | 2021-06-05 11:18:10 -0600 | 
| commit | 24efe49bc2b545e3a3e46d7d6f2bd1166163e52b (patch) | |
| tree | c1852447d06c062052def6fc89be2e2dece17c78 /index.php | |
| parent | 45acfc48b3dd80b945a1501edea9ad4faa700c0f (diff) | |
Move object related functions into their classes.
Some of the pages are still broken from this commit, but I plan
to either rewrite or ignore them.
Diffstat (limited to 'index.php')
| -rw-r--r-- | index.php | 5 | 
1 files changed, 2 insertions, 3 deletions
| @@ -27,10 +27,9 @@          <th>Latest Thread</th>      </tr>  	<?php -    include_once './includes/functions_category.php';      include_once './includes/model/Category.php'; -	$categories = get_all_categories(); +	$categories = Category::get_all_categories();  	foreach ($categories as $category) {  		$latest_thread = $category->get_latest_thread(); @@ -42,7 +41,7 @@  		echo '</td>';  		echo '<td>' . $category->thread_count . '</td>';  		echo '<td>' . $category->post_count . '</td>'; -		if (!is_null($latest_thread)) { +		if ($latest_thread->has_value()) {  			echo '<td><b><a href="viewthread.php?id=' . $latest_thread->id . '">' . $latest_thread->subject . '</a></b><br>';  			echo '<small>by <b><a href="viewuser.php?id=' . $latest_thread->author->id . '">' . $latest_thread->author->name . '</a></b>, ' . $latest_thread->date_created . '</small></td>';  		} else { | 
