Skip to content

Commit

Permalink
deprecated obsolete method getNumReviews
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketMan committed Jul 14, 2019
1 parent 49f90c5 commit 790cb8c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
1 change: 0 additions & 1 deletion engine/IReview.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
* Music review operations
*/
interface IReview {
function getNumReviews($tag, $loggedIn = 0);
function getRecentReviews($user = "", $weeks = 0, $limit = 0, $loggedIn = 0);
function getReviews($tag, $byName=1, $user = "", $loggedIn = 0);
function insertReview($tag, $private, $airname, $review, $user);
Expand Down
11 changes: 0 additions & 11 deletions engine/impl/Review.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,6 @@
* Music review operations
*/
class ReviewImpl extends BaseImpl implements IReview {
public function getNumReviews($tag, $loggedIn = 0) {
settype($tag, "integer");
$query = "SELECT count(*) FROM reviews WHERE tag=?";
if(!$loggedIn)
$query .= " AND private = 0";
$stmt = $this->prepare($query);
$stmt->bindValue(1, tag);
$row = $this->executeAndFetch($stmt, \PDO::FETCH_BOTH);
return $row[0];
}

private function getRecentSubquery($user = "", $weeks = 0, $loggedIn = 0) {
$query = "SELECT r.tag, a.airname, r.user, r.created FROM reviews r ";

Expand Down

0 comments on commit 790cb8c

Please sign in to comment.