Browse Source

Remove unused functions from inc/function.php

strategy_first was left in as I suspect it's a userful example.
main
discomrade 2 years ago
parent
commit
288f09c1f9
  1. 54
      inc/functions.php

54
inc/functions.php

@ -1107,60 +1107,6 @@ function checkWarning($board = false) {
}
}
function threadLocked($id) {
global $board;
if (event('check-locked', $id))
return true;
$query = prepare(sprintf("SELECT `locked` FROM ``posts_%s`` WHERE `id` = :id AND `thread` IS NULL LIMIT 1", $board['uri']));
$query->bindValue(':id', $id, PDO::PARAM_INT);
$query->execute() or error(db_error());
if (($locked = $query->fetchColumn()) === false) {
// Non-existant, so it can't be locked...
return false;
}
return (bool)$locked;
}
function threadSageLocked($id) {
global $board;
if (event('check-sage-locked', $id))
return true;
$query = prepare(sprintf("SELECT `sage` FROM ``posts_%s`` WHERE `id` = :id AND `thread` IS NULL LIMIT 1", $board['uri']));
$query->bindValue(':id', $id, PDO::PARAM_INT);
$query->execute() or error(db_error());
if (($sagelocked = $query->fetchColumn()) === false) {
// Non-existant, so it can't be locked...
return false;
}
return (bool)$sagelocked;
}
function threadExists($id) {
global $board;
$query = prepare(sprintf("SELECT 1 FROM ``posts_%s`` WHERE `id` = :id AND `thread` IS NULL LIMIT 1", $board['uri']));
$query->bindValue(':id', $id, PDO::PARAM_INT);
$query->execute() or error(db_error());
if ($query->rowCount()) {
return true;
}
return false;
}
function insertFloodPost(array $post) {
global $board;

Loading…
Cancel
Save