summaryrefslogtreecommitdiff
path: root/model
diff options
context:
space:
mode:
Diffstat (limited to 'model')
-rw-r--r--model/Category.php3
-rw-r--r--model/Thread.php3
2 files changed, 4 insertions, 2 deletions
diff --git a/model/Category.php b/model/Category.php
index 5a2c11c..1b699fb 100644
--- a/model/Category.php
+++ b/model/Category.php
@@ -18,7 +18,7 @@ class Category {
}
if (mysqli_num_rows($result) == 0) {
- echo 'Category does not exist!';
+ return 0;
} else {
while ($row = mysqli_fetch_assoc($result)) {
$this->id = $id;
@@ -30,6 +30,7 @@ class Category {
}
mysqli_free_result($result);
+ return 1;
}
function get_threads($dbc) {
diff --git a/model/Thread.php b/model/Thread.php
index 20c6c0a..aa48cfd 100644
--- a/model/Thread.php
+++ b/model/Thread.php
@@ -21,7 +21,7 @@ class Thread {
}
if (mysqli_num_rows($result) == 0) {
-
+ return 0;
} else {
while ($row = mysqli_fetch_assoc($result)) {
$this->id = $id;
@@ -38,6 +38,7 @@ class Thread {
}
mysqli_free_result($result);
+ return 1;
}
function get_posts($dbc) {