]> git.mxchange.org Git - friendica.git/blobdiff - mod/notifications.php
Warnings removed
[friendica.git] / mod / notifications.php
index c7421b2d42589e78872d625f5a2699c7d71c7813..e0f07118f733d7f75178be66f0b0c00ca29a04a3 100644 (file)
@@ -3,7 +3,6 @@ include_once("include/bbcode.php");
 include_once("include/contact_selectors.php");
 include_once("include/Scrape.php");
 
-if(! function_exists('notifications_post')) {
 function notifications_post(&$a) {
 
        if(! local_user()) {
@@ -50,20 +49,20 @@ function notifications_post(&$a) {
                                        intval(local_user())
                                );
                        }
-                       goaway($a->get_baseurl(true) . '/notifications/intros');
+                       goaway('notifications/intros');
                }
                if($_POST['submit'] == t('Ignore')) {
                        $r = q("UPDATE `intro` SET `ignore` = 1 WHERE `id` = %d",
                                intval($intro_id));
-                       goaway($a->get_baseurl(true) . '/notifications/intros');
+                       goaway('notifications/intros');
                }
        }
 }
-}
 
 
 
-if(! function_exists('notifications_content')) {
+
+
 function notifications_content(&$a) {
 
        if(! local_user()) {
@@ -80,37 +79,37 @@ function notifications_content(&$a) {
        $tabs = array(
                array(
                        'label' => t('System'),
-                       'url'=>$a->get_baseurl(true) . '/notifications/system',
+                       'url'=>'notifications/system',
                        'sel'=> (($a->argv[1] == 'system') ? 'active' : ''),
                        'accesskey' => 'y',
                ),
                array(
                        'label' => t('Network'),
-                       'url'=>$a->get_baseurl(true) . '/notifications/network',
+                       'url'=>'notifications/network',
                        'sel'=> (($a->argv[1] == 'network') ? 'active' : ''),
                        'accesskey' => 'w',
                ),
                array(
                        'label' => t('Personal'),
-                       'url'=>$a->get_baseurl(true) . '/notifications/personal',
+                       'url'=>'notifications/personal',
                        'sel'=> (($a->argv[1] == 'personal') ? 'active' : ''),
                        'accesskey' => 'r',
                ),
                array(
                        'label' => t('Home'),
-                       'url' => $a->get_baseurl(true) . '/notifications/home',
+                       'url' => 'notifications/home',
                        'sel'=> (($a->argv[1] == 'home') ? 'active' : ''),
                        'accesskey' => 'h',
                ),
                array(
                        'label' => t('Introductions'),
-                       'url' => $a->get_baseurl(true) . '/notifications/intros',
+                       'url' => 'notifications/intros',
                        'sel'=> (($a->argv[1] == 'intros') ? 'active' : ''),
                        'accesskey' => 'i',
                ),
                /*array(
                        'label' => t('Messages'),
-                       'url' => $a->get_baseurl(true) . '/message',
+                       'url' => 'message',
                        'sel'=> '',
                ),*/ /*while I can have notifications for messages, this tablist is not place for message page link */
        );
@@ -139,6 +138,8 @@ function notifications_content(&$a) {
                        $a->set_pager_itemspage(20);
                }
 
+               /// @todo Fetch contact details by "get_contact_details_by_url" instead of queries to contact, fcontact and gcontact
+
                $r = q("SELECT `intro`.`id` AS `intro_id`, `intro`.*, `contact`.*, `fcontact`.`name` AS `fname`,`fcontact`.`url` AS `furl`,`fcontact`.`photo` AS `fphoto`,`fcontact`.`request` AS `frequest`,
                                `gcontact`.`location` AS `glocation`, `gcontact`.`about` AS `gabout`,
                                `gcontact`.`keywords` AS `gkeywords`, `gcontact`.`gender` AS `ggender`,
@@ -580,4 +581,3 @@ function notifications_content(&$a) {
        $o .= paginate($a);
        return $o;
 }
-}