From bdfe575365366690fe6a3934e793c67db1a2d623 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Fri, 27 Dec 2019 20:48:47 -0500 Subject: [PATCH] [various] Remove redundant profile_uid field from profile query --- forumdirectory/forumdirectory.php | 2 +- widgets/widget_friendheader.php | 2 +- widgets/widget_friends.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/forumdirectory/forumdirectory.php b/forumdirectory/forumdirectory.php index 2d07c829..5baad462 100644 --- a/forumdirectory/forumdirectory.php +++ b/forumdirectory/forumdirectory.php @@ -105,7 +105,7 @@ function forumdirectory_content(App $a) $limit = $pager->getStart()."," . $pager->getItemsPerPage(); - $r = DBA::p("SELECT `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname`, `user`.`timezone` , `user`.`page-flags`, + $r = DBA::p("SELECT `profile`.*, `user`.`nickname`, `user`.`timezone` , `user`.`page-flags`, `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` diff --git a/widgets/widget_friendheader.php b/widgets/widget_friendheader.php index f47b1b57..c4031290 100644 --- a/widgets/widget_friendheader.php +++ b/widgets/widget_friendheader.php @@ -25,7 +25,7 @@ function friendheader_widget_size() function friendheader_widget_content(&$a, $conf) { - $r = q("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `user`.* FROM `profile` + $r = q("SELECT `profile`.* , `user`.* FROM `profile` LEFT JOIN `user` ON `profile`.`uid` = `user`.`uid` WHERE `user`.`uid` = %s LIMIT 1", intval($conf['uid']) diff --git a/widgets/widget_friends.php b/widgets/widget_friends.php index a3951cdc..08b7415c 100644 --- a/widgets/widget_friends.php +++ b/widgets/widget_friends.php @@ -27,7 +27,7 @@ function friends_widget_size() function friends_widget_content(&$a, $conf) { - $r = q("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `user`.* FROM `profile` + $r = q("SELECT `profile`.* , `user`.* FROM `profile` LEFT JOIN `user` ON `profile`.`uid` = `user`.`uid` WHERE `user`.`uid` = %s LIMIT 1", intval($conf['uid']) -- 2.39.5