]> git.mxchange.org Git - friendica.git/blobdiff - include/group.php
We have to disable the SSL checks, otherwise the communication will fail for servers...
[friendica.git] / include / group.php
index abfe42df726b525ae2ee1323481ce7e064a3bd25..380c4eecc9c0c7b5fb99ffb1c229fb4254139f01 100644 (file)
@@ -8,17 +8,17 @@ function group_add($uid,$name) {
                $r = group_byname($uid,$name); // check for dups
                if($r !== false) {
 
-                       // This could be a problem. 
+                       // This could be a problem.
                        // Let's assume we've just created a group which we once deleted
                        // all the old members are gone, but the group remains so we don't break any security
                        // access lists. What we're doing here is reviving the dead group, but old content which
-                       // was restricted to this group may now be seen by the new group members. 
+                       // was restricted to this group may now be seen by the new group members.
 
                        $z = q("SELECT * FROM `group` WHERE `id` = %d LIMIT 1",
                                intval($r)
                        );
                        if(count($z) && $z[0]['deleted']) {
-                               $r = q("UPDATE `group` SET `deleted` = 0 WHERE `uid` = %d AND `name` = '%s' LIMIT 1",
+                               $r = q("UPDATE `group` SET `deleted` = 0 WHERE `uid` = %d AND `name` = '%s'",
                                        intval($uid),
                                        dbesc($name)
                                );
@@ -32,7 +32,7 @@ function group_add($uid,$name) {
                        dbesc($name)
                );
                $ret = $r;
-       }       
+       }
        return $ret;
 }
 
@@ -87,7 +87,7 @@ function group_rmv($uid,$name) {
                );
 
                // remove group
-               $r = q("UPDATE `group` SET `deleted` = 1 WHERE `uid` = %d AND `name` = '%s' LIMIT 1",
+               $r = q("UPDATE `group` SET `deleted` = 1 WHERE `uid` = %d AND `name` = '%s'",
                        intval($uid),
                        dbesc($name)
                );
@@ -117,13 +117,13 @@ function group_rmv_member($uid,$name,$member) {
                return false;
        if(! ( $uid && $gid && $member))
                return false;
-       $r = q("DELETE FROM `group_member` WHERE `uid` = %d AND `gid` = %d AND `contact-id` = %d LIMIT 1 ",
+       $r = q("DELETE FROM `group_member` WHERE `uid` = %d AND `gid` = %d AND `contact-id` = %d",
                intval($uid),
                intval($gid),
                intval($member)
        );
        return $r;
-       
+
 
 }
 
@@ -134,13 +134,13 @@ function group_add_member($uid,$name,$member,$gid = 0) {
        if((! $gid) || (! $uid) || (! $member))
                return false;
 
-       $r = q("SELECT * FROM `group_member` WHERE `uid` = %d AND `gid` = %d AND `contact-id` = %d LIMIT 1",    
+       $r = q("SELECT * FROM `group_member` WHERE `uid` = %d AND `gid` = %d AND `contact-id` = %d LIMIT 1",
                intval($uid),
                intval($gid),
                intval($member)
        );
        if(count($r))
-               return true;    // You might question this, but 
+               return true;    // You might question this, but
                                // we indicate success because the group member was in fact created
                                // -- It was just created at another time
        if(! count($r))