More linting and fixing of comments and PHP Doc, types, etc.

This commit is contained in:
jgen
2014-04-28 01:26:22 -04:00
parent a0a39784d4
commit 022c162f40
11 changed files with 194 additions and 65 deletions

View File

@@ -132,10 +132,13 @@ class Tips extends Extension {
$this->theme->showAll($url, $tips);
}
/**
* @param int $tipID
*/
private function setStatus($tipID) {
global $database;
$tip = $database->get_row("SELECT * FROM tips WHERE id = ? ", array($tipID));
$tip = $database->get_row("SELECT * FROM tips WHERE id = ? ", array(int_escape($tipID)));
if (bool_escape($tip['enable'])) {
$enable = "N";
@@ -143,12 +146,15 @@ class Tips extends Extension {
$enable = "Y";
}
$database->execute("UPDATE tips SET enable = ? WHERE id = ?", array ($enable, $tipID));
$database->execute("UPDATE tips SET enable = ? WHERE id = ?", array ($enable, int_escape($tipID)));
}
/**
* @param int $tipID
*/
private function deleteTip($tipID) {
global $database;
$database->execute("DELETE FROM tips WHERE id = ?", array($tipID));
$database->execute("DELETE FROM tips WHERE id = ?", array(int_escape($tipID)));
}
}