From 8a028c00fea57b04b2d4500a054a67e2650ef6af Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Thu, 14 Mar 2019 08:41:09 +0100 Subject: [PATCH] Minor - format code, use int casting --- main/calendar/agenda_list.php | 9 ++++----- main/lp/lp_update_scorm.php | 1 - main/survey/survey_invite.php | 2 +- .../Component/CourseCopy/Resources/LearnPathCategory.php | 6 ++---- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/main/calendar/agenda_list.php b/main/calendar/agenda_list.php index f1d1c5ae95..cad5594c9a 100755 --- a/main/calendar/agenda_list.php +++ b/main/calendar/agenda_list.php @@ -13,7 +13,6 @@ $logInfo = [ 'tool_id' => 0, 'tool_id_detail' => 0, 'action' => $action, - 'info' => '', ]; Event::registerLog($logInfo); @@ -31,12 +30,12 @@ if (!empty($groupId)) { $groupProperties = GroupManager::get_group_properties($groupId); $groupId = $groupProperties['iid']; $interbreadcrumb[] = [ - "url" => api_get_path(WEB_CODE_PATH)."group/group.php?".api_get_cidreq(), - "name" => get_lang('Groups'), + 'url' => api_get_path(WEB_CODE_PATH)."group/group.php?".api_get_cidreq(), + 'name' => get_lang('Groups'), ]; $interbreadcrumb[] = [ - "url" => api_get_path(WEB_CODE_PATH)."group/group_space.php?".api_get_cidreq(), - "name" => get_lang('GroupSpace').' '.$groupProperties['name'], + 'url' => api_get_path(WEB_CODE_PATH)."group/group_space.php?".api_get_cidreq(), + 'name' => get_lang('GroupSpace').' '.$groupProperties['name'], ]; } diff --git a/main/lp/lp_update_scorm.php b/main/lp/lp_update_scorm.php index 7324d07ecd..adec371a8f 100644 --- a/main/lp/lp_update_scorm.php +++ b/main/lp/lp_update_scorm.php @@ -8,7 +8,6 @@ * * @package chamilo.learnpath */ - require_once __DIR__.'/../inc/global.inc.php'; $this_section = SECTION_COURSES; diff --git a/main/survey/survey_invite.php b/main/survey/survey_invite.php index 5d44239fc5..ebd13c5722 100755 --- a/main/survey/survey_invite.php +++ b/main/survey/survey_invite.php @@ -26,7 +26,7 @@ $course_id = api_get_course_int_id(); $_course = api_get_course_info(); // Getting the survey information -$survey_id = Security::remove_XSS($_GET['survey_id']); +$survey_id = (int) $_GET['survey_id']; $survey_data = SurveyManager::get_survey($survey_id); if (empty($survey_data)) { api_not_allowed(true); diff --git a/src/Chamilo/CourseBundle/Component/CourseCopy/Resources/LearnPathCategory.php b/src/Chamilo/CourseBundle/Component/CourseCopy/Resources/LearnPathCategory.php index 7645009502..36088b073f 100644 --- a/src/Chamilo/CourseBundle/Component/CourseCopy/Resources/LearnPathCategory.php +++ b/src/Chamilo/CourseBundle/Component/CourseCopy/Resources/LearnPathCategory.php @@ -21,10 +21,8 @@ class LearnPathCategory extends Resource * @param int $id * @param string $object */ - public function __construct( - $id, - $object - ) { + public function __construct($id, $object) + { parent::__construct($id, RESOURCE_LEARNPATH_CATEGORY); $this->object = $object; }