From 0c65e9b1be5dc53a8f6836657ded7aeec31cf4b9 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Tue, 10 Feb 2015 12:34:40 +0100 Subject: [PATCH] Format code + adding Security::remove_xss --- main/wiki/index.php | 13 ++++++++----- main/wiki/wiki.inc.php | 28 +++++++++++++++++----------- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/main/wiki/index.php b/main/wiki/index.php index 7223f2b076..668b51b1f5 100755 --- a/main/wiki/index.php +++ b/main/wiki/index.php @@ -74,10 +74,13 @@ event_access_tool(TOOL_WIKI); if ($groupId) { $group_properties = GroupManager::get_group_properties($groupId); - $interbreadcrumb[] = array("url" => api_get_path(WEB_CODE_PATH)."group/group.php", "name" => get_lang('Groups')); $interbreadcrumb[] = array( - "url" => api_get_path(WEB_CODE_PATH)."group/group_space.php?gidReq=".$groupId, - "name" => get_lang('GroupSpace').' '.$group_properties['name'] + "url" => api_get_path(WEB_CODE_PATH)."group/group.php?".api_get_cidreq(), + "name" => get_lang('Groups') + ); + $interbreadcrumb[] = array( + "url" => api_get_path(WEB_CODE_PATH)."group/group_space.php?".api_get_cidreq(), + "name" => get_lang('GroupSpace').' '.Security::remove_XSS($group_properties['name']) ); //ensure this tool in groups whe it's private or deactivated if ($group_properties['wiki_state'] == 0) { @@ -95,8 +98,8 @@ $is_allowed_to_edit = api_is_allowed_to_edit(false, true); // The page we are dealing with $page = isset($_GET['title']) ? $_GET['title']: 'index'; -$action = isset($_GET['action']) ? $_GET['action'] : 'showpage'; -$view = isset($_GET['view']) ? $_GET['view'] : null; +$action = isset($_GET['action']) ? Security::remove_XSS($_GET['action']) : 'showpage'; +$view = isset($_GET['view']) ? Security::remove_XSS($_GET['view']) : null; $wiki->page = $page; $wiki->action = $action; diff --git a/main/wiki/wiki.inc.php b/main/wiki/wiki.inc.php index f37c2c5eaf..74f0006cfe 100755 --- a/main/wiki/wiki.inc.php +++ b/main/wiki/wiki.inc.php @@ -4321,17 +4321,18 @@ class Wiki $page = $this->page; echo '
'; - /* echo ' '. - Display::return_icon('wiki.png',get_lang('HomeWiki'),'',ICON_SIZE_MEDIUM).' ';*/ echo '
'; // End actions + echo ''; } /**