aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-12-19 23:56:37 -0800
committerfriendica <info@friendica.com>2013-12-19 23:56:37 -0800
commit2c0fbc508e44ebc96b00e4e8a5e166324fbcf9b3 (patch)
tree1a523306c9a87a0259a324e04eb2fd4906d3d07c /include
parentcd78f9d13df721ea218cc8ba023470899b64a151 (diff)
downloadvolse-hubzilla-2c0fbc508e44ebc96b00e4e8a5e166324fbcf9b3.tar.gz
volse-hubzilla-2c0fbc508e44ebc96b00e4e8a5e166324fbcf9b3.tar.bz2
volse-hubzilla-2c0fbc508e44ebc96b00e4e8a5e166324fbcf9b3.zip
comanchify connedit, group
Diffstat (limited to 'include')
-rw-r--r--include/group.php2
-rw-r--r--include/widgets.php35
2 files changed, 33 insertions, 4 deletions
diff --git a/include/group.php b/include/group.php
index 8f690785d..c19c83c80 100644
--- a/include/group.php
+++ b/include/group.php
@@ -229,7 +229,7 @@ function mini_group_select($uid,$group = '') {
-function group_side($every="contacts",$each="group",$edit = false, $group_id = 0, $cid = '',$mode = 1) {
+function group_side($every="connections",$each="group",$edit = false, $group_id = 0, $cid = '',$mode = 1) {
$o = '';
diff --git a/include/widgets.php b/include/widgets.php
index 5bb937c2e..2591a9d09 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -34,10 +34,39 @@ function widget_tagcloud($args) {
function widget_collections($args) {
require_once('include/group.php');
- $page = argv(0);
- $gid = $_REQUEST['gid'];
- return group_side($page,$page,true,$_REQUEST['gid'],'',0);
+ $mode = ((array_key_exists('mode',$args)) ? $args['mode'] : 'conversation');
+ switch($mode) {
+ case 'conversation':
+ $every = argv(0);
+ $each = argv(0);
+ $edit = true;
+ $current = $_REQUEST['gid'];
+ $abook_id = 0;
+ $wmode = 0;
+ break;
+ case 'groups':
+ $every = 'connections';
+ $each = argv(0);
+ $edit = false;
+ $current = intval(argv(1));
+ $abook_id = 0;
+ $wmode = 1;
+ break;
+ case 'abook':
+ $every = 'connections';
+ $each = 'group';
+ $edit = false;
+ $current = 0;
+ $abook_id = get_app()->poi['abook_xchan'];
+ $wmode = 1;
+ break;
+ default:
+ return '';
+ break;
+ }
+
+ return group_side($every, $each, $edit, $current, $abook_id, $wmode);
}