diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-13 01:42:18 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-13 01:42:18 +0000 |
commit | dd08cd1133ea8c82acfb7624efcf83571568ee42 (patch) | |
tree | d97ea30b007260e7adc5723010c790cffc4bf5e0 /mod/riverdashboard/index.php | |
parent | 402134632f0d60e9644d0121c2a84db4a4c1a169 (diff) | |
download | elgg-dd08cd1133ea8c82acfb7624efcf83571568ee42.tar.gz elgg-dd08cd1133ea8c82acfb7624efcf83571568ee42.tar.bz2 |
attempting to standardize riverdashboard plugin in similar manner as 1.7 branch revision [5943]
git-svn-id: http://code.elgg.org/elgg/trunk@6021 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/riverdashboard/index.php')
-rw-r--r-- | mod/riverdashboard/index.php | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/mod/riverdashboard/index.php b/mod/riverdashboard/index.php index 371845213..2eb659e76 100644 --- a/mod/riverdashboard/index.php +++ b/mod/riverdashboard/index.php @@ -11,8 +11,9 @@ gatekeeper(); $type = get_input('type'); $subtype = get_input('subtype'); $orient = get_input('display'); -if(!$orient) +if(!$orient) { $orient = 'all'; +} $callback = get_input('callback'); if ($type == 'all') { @@ -24,37 +25,40 @@ $body = ''; switch($orient) { case 'mine': - $subject_guid = $_SESSION['user']->guid; - $relationship_type = ''; - $title_wording = elgg_echo('river:mine'); - break; - case 'friends': $subject_guid = $_SESSION['user']->guid; - $relationship_type = 'friend'; - $title_wording = elgg_echo('river:friends'); - break; - default: $subject_guid = 0; - $relationship_type = ''; - $title_wording = elgg_echo('river:all'); - break; + $subject_guid = $_SESSION['user']->guid; + $relationship_type = ''; + $title_wording = elgg_echo('river:mine'); + break; + case 'friends': + $subject_guid = $_SESSION['user']->guid; + $relationship_type = 'friend'; + $title_wording = elgg_echo('river:friends'); + break; + default: + $subject_guid = 0; + $relationship_type = ''; + $title_wording = elgg_echo('river:all'); + break; } $title = elgg_view_title($title_wording); //select the correct river -if (get_plugin_setting('activitytype', 'riverdashboard') == 'classic') +if (get_plugin_setting('activitytype', 'riverdashboard') == 'classic') { $river = elgg_view_river_items($subject_guid, 0, $relationship_type, $type, $subtype, '', 20, 0, 0, true, true) . "</div>"; -else +} else { $river = elgg_view_river_items($subject_guid, 0, $relationship_type, $type, $subtype, '', 20, 0, 0, true, false) . "</div>"; +} // Replacing callback calls in the nav with something meaningless $river = str_replace('callback=true','replaced=88,334',$river); $nav = elgg_view('riverdashboard/nav',array('type' => $type,'subtype' => $subtype,'orient' => $orient)); -if(isloggedin()){ +if (isloggedin()) { $sidebar = elgg_view("riverdashboard/menu",array('type' => $type,'subtype' => $subtype,'orient' => $orient)); $sidebar .= elgg_view("riverdashboard/sidebar", array("object_type" => 'riverdashboard')); -}else{ +} else { $sidebar = ''; } set_context('riverdashboard'); |