示例#1
0
 /**
  * @brief check if the given class is in the given user's blacklist
  * @param string $uid user
  * @param string $class class id
  * @return true if the class is blocked by the user, otherwise false
  */
 private static function isBlacklisted($uid, $class)
 {
     if (!isset(self::$isBlockedStmt)) {
         self::$isBlockedStmt = OCP\DB::prepare("SELECT COUNT(*) FROM *PREFIX*notification_blacklist WHERE uid = ? AND class = ?");
     }
     return (bool) self::$isBlockedStmt->execute(array($uid, $class))->fetchOne();
 }