From 14acb7d7cfe3c1dea64b489431346e60994ca011 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 27 Jan 2020 23:09:29 -0500 Subject: [PATCH 1/3] [forumdirectory] Remove uses of deprecated profile fields --- forumdirectory/forumdirectory.php | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/forumdirectory/forumdirectory.php b/forumdirectory/forumdirectory.php index 44d9aebd..2d07c829 100644 --- a/forumdirectory/forumdirectory.php +++ b/forumdirectory/forumdirectory.php @@ -85,23 +85,16 @@ function forumdirectory_content(App $a) (`profile`.`locality` LIKE '%$search%') OR (`profile`.`region` LIKE '%$search%') OR (`profile`.`country-name` LIKE '%$search%') OR - (`profile`.`gender` LIKE '%$search%') OR - (`profile`.`marital` LIKE '%$search%') OR - (`profile`.`sexual` LIKE '%$search%') OR - (`profile`.`about` LIKE '%$search%') OR - (`profile`.`romance` LIKE '%$search%') OR - (`profile`.`work` LIKE '%$search%') OR - (`profile`.`education` LIKE '%$search%') OR (`profile`.`pub_keywords` LIKE '%$search%') OR (`profile`.`prv_keywords` LIKE '%$search%'))"; } - $publish = DI::config()->get('system', 'publish_all') ? '' : " AND `publish` = 1 "; + $publish = DI::config()->get('system', 'publish_all') ? '' : "`publish` = 1"; $total = 0; $cnt = DBA::fetchFirst("SELECT COUNT(*) AS `total` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` - WHERE `is-default` $publish AND NOT `user`.`blocked` AND NOT `user`.`account_removed` `user`.`page-flags` = 2 $sql_extra"); + WHERE $publish AND NOT `user`.`blocked` AND NOT `user`.`account_removed` `user`.`page-flags` = 2 $sql_extra"); if (DBA::isResult($cnt)) { $total = $cnt['total']; } @@ -116,7 +109,7 @@ function forumdirectory_content(App $a) `contact`.`addr`, `contact`.`url` AS `profile_url` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` LEFT JOIN `contact` ON `contact`.`uid` = `user`.`uid` - WHERE `is-default` $publish AND NOT `user`.`blocked` AND NOT `user`.`account_removed` AND `user`.`page-flags` = 2 AND `contact`.`self` + WHERE $publish AND NOT `user`.`blocked` AND NOT `user`.`account_removed` AND `user`.`page-flags` = 2 AND `contact`.`self` $sql_extra $order LIMIT $limit" ); From 6f45425817c8f4a79a94ba0b98ec642522348613 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 27 Jan 2020 23:09:41 -0500 Subject: [PATCH 2/3] [morechoice] Deprecate addon --- morechoice/morechoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/morechoice/morechoice.php b/morechoice/morechoice.php index e1976c5d..1505176e 100644 --- a/morechoice/morechoice.php +++ b/morechoice/morechoice.php @@ -5,7 +5,7 @@ * Version: 1.0 * Author: Mike Macgirvin * - who takes no responsibility for any additional content which may appear herein - * + * Status: Deprecated */ use Friendica\Core\Hook; From 53d3c372f35d0402aaa4ac876446f9eaa856640d Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 27 Jan 2020 23:09:59 -0500 Subject: [PATCH 3/3] [widgets] Remove uses of deprecated profile field --- widgets/widget_friendheader.php | 2 +- widgets/widget_friends.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/widgets/widget_friendheader.php b/widgets/widget_friendheader.php index 8ce1eac6..f47b1b57 100644 --- a/widgets/widget_friendheader.php +++ b/widgets/widget_friendheader.php @@ -27,7 +27,7 @@ function friendheader_widget_content(&$a, $conf) { $r = q("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `user`.* FROM `profile` LEFT JOIN `user` ON `profile`.`uid` = `user`.`uid` - WHERE `user`.`uid` = %s AND `profile`.`is-default` = 1 LIMIT 1", + WHERE `user`.`uid` = %s LIMIT 1", intval($conf['uid']) ); if (!count($r)) { diff --git a/widgets/widget_friends.php b/widgets/widget_friends.php index c49d052d..a3951cdc 100644 --- a/widgets/widget_friends.php +++ b/widgets/widget_friends.php @@ -29,7 +29,7 @@ function friends_widget_content(&$a, $conf) { $r = q("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `user`.* FROM `profile` LEFT JOIN `user` ON `profile`.`uid` = `user`.`uid` - WHERE `user`.`uid` = %s AND `profile`.`is-default` = 1 LIMIT 1", + WHERE `user`.`uid` = %s LIMIT 1", intval($conf['uid']) );