aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-07-11 06:06:30 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-07-11 06:06:30 -0700
commit83dc89d8594e5de56f7bdc173048e93a5c73d488 (patch)
treeee47fd73d7a87935b7ddf7e9f16b10824e0609c3 /include
parent0d14d88ef4503681359d6dfec08b56d1685095bd (diff)
downloadvolse-hubzilla-83dc89d8594e5de56f7bdc173048e93a5c73d488.tar.gz
volse-hubzilla-83dc89d8594e5de56f7bdc173048e93a5c73d488.tar.bz2
volse-hubzilla-83dc89d8594e5de56f7bdc173048e93a5c73d488.zip
group creation
Diffstat (limited to 'include')
-rw-r--r--include/group.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/group.php b/include/group.php
index 598d09c2e..585b2eab9 100644
--- a/include/group.php
+++ b/include/group.php
@@ -2,13 +2,13 @@
function group_add($uid,$name) {
-
+dbg(2);
$ret = false;
if(x($uid) && x($name)) {
$r = group_byname($uid,$name); // check for dups
if($r !== false)
return true;
- $r = q("INSERT INTO `group` ( `uid`', `name` )
+ $r = q("INSERT INTO `group` ( `uid`, `name` )
VALUES( %d, '%s' ) ",
intval($uid),
dbesc($name)
@@ -120,8 +120,9 @@ $o .= <<< EOT
</div>
<div id="sidebar-group-list">
-<ul id="sidebar-group-ul">
-<li class="sidebar-group-li"><a href="contacts">Everybody</a></li>
+ <ul id="sidebar-group-ul">
+ <li class="sidebar-group-li" ><a href="contacts">Everybody</a></li>
+
EOT;
$r = q("SELECT * FROM `group` WHERE `uid` = %d",
@@ -129,9 +130,9 @@ EOT;
);
if(count($r)) {
foreach($r as $rr)
- $o .= "<li class=\"sidebar-group-li\"><a href=\"group/{$rr['id']}\">{$rr['name']}</li>";
+ $o .= " <li class=\"sidebar-group-li\"><a href=\"group/{$rr['id']}\">{$rr['name']}</a></li>\r\n";
}
- $o .= '</ul></div></div>';
+ $o .= " </ul>\r\n </div>\r\n</div>";
return $o;
} \ No newline at end of file