|
|
|
@ -78,6 +78,7 @@ class MessageManager |
|
|
|
user_receiver_id = ".api_get_user_id()." |
|
|
|
user_receiver_id = ".api_get_user_id()." |
|
|
|
$keywordCondition |
|
|
|
$keywordCondition |
|
|
|
"; |
|
|
|
"; |
|
|
|
|
|
|
|
|
|
|
|
$result = Database::query($sql); |
|
|
|
$result = Database::query($sql); |
|
|
|
$result = Database::fetch_array($result); |
|
|
|
$result = Database::fetch_array($result); |
|
|
|
|
|
|
|
|
|
|
|
@ -847,15 +848,11 @@ class MessageManager |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static function delete_message_by_user_sender($user_sender_id, $id) |
|
|
|
public static function delete_message_by_user_sender($user_sender_id, $id) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if ($id != strval(intval($id))) { |
|
|
|
$user_sender_id = (int) $user_sender_id; |
|
|
|
return false; |
|
|
|
$id = (int) $id; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$table = Database::get_main_table(TABLE_MESSAGE); |
|
|
|
$table = Database::get_main_table(TABLE_MESSAGE); |
|
|
|
|
|
|
|
|
|
|
|
$id = intval($id); |
|
|
|
|
|
|
|
$user_sender_id = intval($user_sender_id); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$sql = "SELECT * FROM $table WHERE id='$id'"; |
|
|
|
$sql = "SELECT * FROM $table WHERE id='$id'"; |
|
|
|
$rs = Database::query($sql); |
|
|
|
$rs = Database::query($sql); |
|
|
|
|
|
|
|
|
|
|
|
@ -865,7 +862,7 @@ class MessageManager |
|
|
|
// delete message |
|
|
|
// delete message |
|
|
|
$sql = "UPDATE $table |
|
|
|
$sql = "UPDATE $table |
|
|
|
SET msg_status = ".MESSAGE_STATUS_DELETED." |
|
|
|
SET msg_status = ".MESSAGE_STATUS_DELETED." |
|
|
|
WHERE user_sender_id='$user_sender_id' AND id='$id'"; |
|
|
|
WHERE user_sender_id= $user_sender_id AND id= $id"; |
|
|
|
Database::query($sql); |
|
|
|
Database::query($sql); |
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
return true; |
|
|
|
|