]> git.mxchange.org Git - friendica.git/blobdiff - mod/notifications.php
Removed many "limit 1" at update and delete queries since they were superflous und...
[friendica.git] / mod / notifications.php
index 03a39a268e59da896c3a74db5c3f0ba57a1f7bc2..c7f8e1bbd912e9cab3e97d9a1db9d87c6ca76aa9 100644 (file)
@@ -145,12 +145,7 @@ function notifications_content(&$a) {
 
                                        $return_addr = bin2hex($a->user['nickname'] . '@' . $a->get_hostname() . (($a->path) ? '/' . $a->path : ''));
 
-                                       $includes = array(
-                                               '$field_checkbox' => 'field_checkbox.tpl',
-                                       );
-                                       $includes = set_template_includes($a->theme['template_engine'], $includes);
-
-                                       $notif_content .= replace_macros($sugg,$includes + array(
+                                       $notif_content .= replace_macros($sugg, array(
                                                '$str_notifytype' => t('Notification type: '),
                                                '$notify_type' => t('Friend Suggestion'),
                                                '$intro_id' => $rr['intro_id'],
@@ -196,12 +191,7 @@ function notifications_content(&$a) {
                                        ));
                                }                       
 
-                               $includes = array(
-                                       '$field_checkbox' => 'field_checkbox.tpl',
-                               );
-                               $includes = set_template_includes($a->theme['template_engine'], $includes);
-
-                               $notif_content .= replace_macros($tpl,$includes + array(
+                               $notif_content .= replace_macros($tpl, array(
                                        '$str_notifytype' => t('Notification type: '),
                                        '$notify_type' => (($rr['network'] !== NETWORK_OSTATUS) ? t('Friend/Connect Request') : t('New Follower')),
                                        '$dfrn_text' => $dfrn_text,     
@@ -226,14 +216,9 @@ function notifications_content(&$a) {
                else
                        info( t('No introductions.') . EOL);
 
-               $includes = array(
-                       '$common_tabs' => 'common_tabs.tpl',
-               );
-               $includes = set_template_includes($a->theme['template_engine'], $includes);
-
-               $o .= replace_macros($notif_tpl,$includes + array(
+               $o .= replace_macros($notif_tpl, array(
                        '$notif_header' => t('Notifications'),
-                       '$tabs_data' => $tabs,
+                       '$tabs' => $tabs,
                        '$notif_content' => $notif_content,
                ));
                
@@ -248,7 +233,7 @@ function notifications_content(&$a) {
                                `item`.`author-link`, `item`.`author-avatar`, `item`.`created`, `item`.`object` as `object`, 
                                `pitem`.`author-name` as `pname`, `pitem`.`author-link` as `plink` 
                                FROM `item` INNER JOIN `item` as `pitem` ON  `pitem`.`id`=`item`.`parent`
-                               WHERE `item`.`unseen` = 1 AND `item`.`visible` = 1 AND `pitem`.`parent` != 0
+                               WHERE `item`.`unseen` = 1 AND `item`.`visible` = 1 AND `pitem`.`parent` != 0 AND
                                 `item`.`deleted` = 0 AND `item`.`uid` = %d AND `item`.`wall` = 0 ORDER BY `item`.`created` DESC" ,
                        intval(local_user())
                );
@@ -317,14 +302,9 @@ function notifications_content(&$a) {
                        $notif_content = t('No more network notifications.');
                }
                
-               $includes = array(
-                       '$common_tabs' => 'common_tabs.tpl',
-               );
-               $includes = set_template_includes($a->theme['template_engine'], $includes);
-
-               $o .= replace_macros($notif_tpl,$includes + array(
+               $o .= replace_macros($notif_tpl, array(
                        '$notif_header' => t('Network Notifications'),
-                       '$tabs_data' => $tabs,
+                       '$tabs' => $tabs,
                        '$notif_content' => $notif_content,
                ));
                
@@ -352,14 +332,9 @@ function notifications_content(&$a) {
                        $notif_content .= t('No more system notifications.');
                }
                
-               $includes = array(
-                       '$common_tabs' => 'common_tabs.tpl',
-               );
-               $includes = set_template_includes($a->theme['template_engine'], $includes);
-
-               $o .= replace_macros($notif_tpl,$includes + array(
+               $o .= replace_macros($notif_tpl, array(
                        '$notif_header' => t('System Notifications'),
-                       '$tabs_data' => $tabs,
+                       '$tabs' => $tabs,
                        '$notif_content' => $notif_content,
                ));
 
@@ -452,14 +427,9 @@ function notifications_content(&$a) {
                        $notif_content = t('No more personal notifications.');
                }
                
-               $includes = array(
-                       '$common_tabs' => 'common_tabs.tpl',
-               );
-               $includes = set_template_includes($a->theme['template_engine'], $includes);
-
-               $o .= replace_macros($notif_tpl,$includes + array(
+               $o .= replace_macros($notif_tpl, array(
                        '$notif_header' => t('Personal Notifications'),
-                       '$tabs_data' => $tabs,
+                       '$tabs' => $tabs,
                        '$notif_content' => $notif_content,
                ));
                
@@ -538,14 +508,9 @@ function notifications_content(&$a) {
                        $notif_content = t('No more home notifications.');
                }
                
-               $includes = array(
-                       '$common_tabs' => 'common_tabs.tpl',
-               );
-               $includes = set_template_includes($a->theme['template_engine'], $includes);
-
-               $o .= replace_macros($notif_tpl,$includes + array(
+               $o .= replace_macros($notif_tpl, array(
                        '$notif_header' => t('Home Notifications'),
-                       '$tabs_data' => $tabs,
+                       '$tabs' => $tabs,
                        '$notif_content' => $notif_content,
                ));
        }