Fix MySQLi database mode

This commit is contained in:
Trevor Slocum 2014-11-07 17:05:29 -08:00
parent a22a497ce4
commit 8d5986ee83
2 changed files with 2 additions and 2 deletions

View File

@ -14,8 +14,8 @@ For demos see the [TinyIB Installations](https://github.com/tslocum/TinyIB/wiki)
Features
------------
- GIF, JPG, PNG, SWF and WebA/WebM upload.
- CAPTCHA.
- Reference links >>###
- Built-in CAPTCHA system. (Optional)
- Delete post via password.
- Management panel:
- Administrators and moderators use separate passwords.

View File

@ -45,7 +45,7 @@ function postByID($id) {
function threadExistsByID($id) {
global $link;
return mysqli_result(mysqli_query($link, "SELECT COUNT(*) FROM `" . TINYIB_DBPOSTS . "` WHERE `id` = '" . mysqli_real_escape_string($link, $id) . "' AND `parent` = 0 AND `moderated` = 0 LIMIT 1"), 0, 0) > 0;
return mysqli_result(mysqli_query($link, "SELECT COUNT(*) FROM `" . TINYIB_DBPOSTS . "` WHERE `id` = '" . mysqli_real_escape_string($link, $id) . "' AND `parent` = 0 AND `moderated` = 1 LIMIT 1"), 0, 0) > 0;
}
function insertPost($post) {