X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fnotifications.php;h=f5bbe9a1692d0f95ecd70d9e35c10ac87346ad6c;hb=023dd993f60a103601c4943a33678356d919a643;hp=1064729ffdf2de1abebb0451d7feb9a949d524e7;hpb=6348e70daa113e8b3203de8fbc919d08c90d972e;p=friendica.git diff --git a/mod/notifications.php b/mod/notifications.php index 1064729ffd..f5bbe9a169 100644 --- a/mod/notifications.php +++ b/mod/notifications.php @@ -28,7 +28,7 @@ function notifications_post(&$a) { return; } if($_POST['submit'] == 'Discard') { - $r = q("DELETE `intro` WHERE `id` = %d LIMIT 1", intval($intro_id)); + $r = q("DELETE FROM `intro` WHERE `id` = %d LIMIT 1", intval($intro_id)); $r = q("DELETE `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1", intval($request_id), intval($_SESSION['uid'])); @@ -65,12 +65,12 @@ function notifications_content(&$a) { '$hide_url' => ((strlen($sql_extra)) ? 'notifications/all' : 'notifications' ), '$hide_text' => ((strlen($sql_extra)) ? 'Show Ignored Requests' : 'Hide Ignored Requests') )); -dbg(2); + $r = q("SELECT `intro`.`id` AS `intro-id`, `intro`.*, `contact`.* FROM `intro` LEFT JOIN `contact` ON `intro`.`contact-id` = `contact`.`id` WHERE `intro`.`uid` = %d $sql_extra AND `intro`.`blocked` = 0 ", intval($_SESSION['uid'])); -dbg(0); + if(($r !== false) && (count($r))) {