diff options
Diffstat (limited to 'views/default/navigation/viewtype.php')
-rw-r--r-- | views/default/navigation/viewtype.php | 50 |
1 files changed, 23 insertions, 27 deletions
diff --git a/views/default/navigation/viewtype.php b/views/default/navigation/viewtype.php index c5f3a80a1..fcea39b61 100644 --- a/views/default/navigation/viewtype.php +++ b/views/default/navigation/viewtype.php @@ -1,34 +1,30 @@ <?php +/** + * Elgg list view switcher + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + */ - /** - * Elgg list view switcher - * - * @package Elgg - * @subpackage Core +$baseurl = preg_replace('/[\&\?]search\_viewtype\=[A-Za-z0-9]*/',"",$vars['baseurl']); - * @author Curverider Ltd +if ($vars['viewtype'] == "list") { + $viewtype = "gallery"; +} else { + $viewtype = "list"; +} - * @link http://elgg.org/ - */ - - - $baseurl = preg_replace('/[\&\?]search\_viewtype\=[A-Za-z0-9]*/',"",$vars['baseurl']); - - if ($vars['viewtype'] == "list") { - $viewtype = "gallery"; - } else { - $viewtype = "list"; - } - - if (substr_count($baseurl,'?')) { - $baseurl .= "&search_viewtype=" . $viewtype; - } else { - $baseurl .= "?search_viewtype=" . $viewtype; - } +if (substr_count($baseurl,'?')) { + $baseurl .= "&search_viewtype=" . $viewtype; +} else { + $baseurl .= "?search_viewtype=" . $viewtype; +} ?> - <div class="contentWrapper"> - <?php echo elgg_echo("viewtype:change") ?>: - <a href="<?php echo $baseurl; ?>"><?php echo elgg_echo("viewtype:{$viewtype}"); ?></a> - </div>
\ No newline at end of file +<div class="contentWrapper"> + <?php echo elgg_echo("viewtype:change") ?>: + <a href="<?php echo $baseurl; ?>"><?php echo elgg_echo("viewtype:{$viewtype}"); ?></a> +</div>
\ No newline at end of file |