]> git.mxchange.org Git - friendica.git/blobdiff - mod/group.php
new api for notifications
[friendica.git] / mod / group.php
index e9f9561f4613eaa0728b06f5e1113828e1cb7c15..2f8053eefb8ed5bb717b528841aa91f3930c9a3b 100644 (file)
@@ -1,18 +1,21 @@
 <?php
 
+if(! function_exists('validate_members')) {
 function validate_members(&$item) {
        $item = intval($item);
 }
+}
 
+if(! function_exists('group_init')) {
 function group_init(&$a) {
        if(local_user()) {
                require_once('include/group.php');
                $a->page['aside'] = group_side('contacts','group','extended',(($a->argc > 1) ? intval($a->argv[1]) : 0));
        }
 }
+}
 
-
-
+if(! function_exists('group_post')) {
 function group_post(&$a) {
 
        if(! local_user()) {
@@ -64,7 +67,9 @@ function group_post(&$a) {
        }
        return;
 }
+}
 
+if(! function_exists('group_content')) {
 function group_content(&$a) {
        $change = false;
 
@@ -190,6 +195,7 @@ function group_content(&$a) {
                'label_members' => t('Members'),
                'members' => array(),
                'label_contacts' => t('All Contacts'),
+               'group_is_empty' => t('Group is empty'),
                'contacts' => array(),
        );
 
@@ -204,7 +210,7 @@ function group_content(&$a) {
                        group_rmv_member(local_user(),$group['name'],$member['id']);
        }
 
-       $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `blocked` = 0 and `pending` = 0 and `self` = 0 ORDER BY `name` ASC",
+       $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND NOT `blocked` AND NOT `pending` AND NOT `self` ORDER BY `name` ASC",
                intval(local_user())
        );
 
@@ -228,5 +234,5 @@ function group_content(&$a) {
        }
 
        return replace_macros($tpl, $context);
-
+}
 }