Add public visibility setting to privacy groups (collections). This doesn't yet make them visible, but allows them to be visible (like a Cc: instead of a Bcc:)

This commit is contained in:
friendica
2013-08-07 17:51:10 -07:00
parent 38d9cf4327
commit 4cda133e89
5 changed files with 80 additions and 49 deletions

View File

@@ -1,7 +1,7 @@
<?php /** @file */
function group_add($uid,$name) {
function group_add($uid,$name,$public = 0) {
$ret = false;
if(x($uid) && x($name)) {
@@ -37,10 +37,11 @@ function group_add($uid,$name) {
} while($dups == true);
$r = q("INSERT INTO `group` ( hash, uid, name )
VALUES( '%s', %d, '%s' ) ",
$r = q("INSERT INTO `group` ( hash, uid, visible, name )
VALUES( '%s', %d, %d, '%s' ) ",
dbesc($hash),
intval($uid),
intval($public),
dbesc($name)
);
$ret = $r;