]> git.mxchange.org Git - friendica.git/blobdiff - mod/profile.php
Add INNER JOIN to admin pending user list please @annando
[friendica.git] / mod / profile.php
index 8a9b8b66664d21805ac6145f901b5c3d24cc40f6..59835bd4cbf5b3bf85b78818b7f1809c41de0363 100644 (file)
@@ -98,6 +98,8 @@ function profile_content(App $a, $update = 0) {
                $category = ((x($_GET,'category')) ? $_GET['category'] : '');
        }
 
+       $hashtags = (x($_GET, 'tag') ? $_GET['tag'] : '');
+
        if (Config::get('system','block_public') && (! local_user()) && (! remote_user())) {
                return login();
        }
@@ -185,6 +187,7 @@ function profile_content(App $a, $update = 0) {
 
                $a->page['aside'] .= posted_date_widget(System::baseUrl(true) . '/profile/' . $a->profile['nickname'],$a->profile['profile_uid'],true);
                $a->page['aside'] .= categories_widget(System::baseUrl(true) . '/profile/' . $a->profile['nickname'],(x($category) ? xmlify($category) : ''));
+               $a->page['aside'] .= tagcloud_wall_widget();
 
                if (can_write_wall($a,$a->profile['profile_uid'])) {
 
@@ -254,6 +257,11 @@ function profile_content(App $a, $update = 0) {
                        //$sql_extra .= protect_sprintf(file_tag_file_query('item',$category,'category'));
                }
 
+               if (x($hashtags)) {
+                       $sql_post_table .= sprintf("INNER JOIN (SELECT `oid` FROM `term` WHERE `term` = '%s' AND `otype` = %d AND `type` = %d AND `uid` = %d ORDER BY `tid` DESC) AS `term` ON `item`.`id` = `term`.`oid` ",
+                               dbesc(protect_sprintf($hashtags)), intval(TERM_OBJ_POST), intval(TERM_HASHTAG), intval($a->profile['profile_uid']));
+               }
+
                if ($datequery) {
                        $sql_extra2 .= protect_sprintf(sprintf(" AND `thread`.`created` <= '%s' ", dbesc(datetime_convert(date_default_timezone_get(),'',$datequery))));
                }