Esempio n. 1
0
 static function deleteLoan($_loanId)
 {
     $loan = self::getLoan($_loanId);
     $objectId = $loan["LoanObject"];
     if (Db::execute("DELETE FROM Loans\n            WHERE LoanId = ?", $_loanId)) {
         return Db::execute("UPDATE Objects\n                                SET ObjectIsLent = 0\n                                WHERE ObjectID = ?", $objectId);
     } else {
         return false;
     }
 }
Esempio n. 2
0
 static function deleteRight($_objectId, $_userId)
 {
     return Db::execute("DELETE FROM RightExceptions\n                                WHERE RightExceptionObject = ? AND RightExceptionUser = ?", array($_objectId, $_userId));
 }
Esempio n. 3
0
 static function setUserMobileToken($_userId, $_value)
 {
     return Db::execute("UPDATE Users\n                SET UserMobileToken = ?\n                WHERE UserId = ?", array($_value, $_userId));
 }