From abd536364d5cc2e3be43046ca8bfb9a79cb7c419 Mon Sep 17 00:00:00 2001 From: Scrutinizer Auto-Fixer Date: Tue, 14 Mar 2017 09:30:02 +0000 Subject: [PATCH] Scrutinizer Auto-Fixes This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com --- main/auth/gotocourse.php | 2 +- main/document/download.php | 2 +- main/document/save_pixlr.php | 68 +++++++++---------- main/forum/download.php | 8 +-- main/forum/viewpost.php | 8 +-- main/mySpace/coaches.php | 26 +++---- main/mySpace/progression.php | 8 +-- main/mySpace/user_import.php | 12 ++-- main/social/skills_ranking.php | 4 +- main/social/skills_wheel.php | 2 +- plugin/formLogin_hide_unhide/index.php | 4 +- plugin/formLogin_hide_unhide/plugin.php | 4 +- .../Component/Editor/Driver/DropBoxDriver.php | 4 +- .../Editor/Driver/PersonalDriver.php | 4 +- .../Component/Editor/TinyMce/TinyMce.php | 2 +- .../Repository/ItemPropertyRepository.php | 2 +- src/Chamilo/CoreBundle/Entity/Session.php | 2 +- 17 files changed, 81 insertions(+), 81 deletions(-) diff --git a/main/auth/gotocourse.php b/main/auth/gotocourse.php index 83a1e6b2d4..37476a2260 100755 --- a/main/auth/gotocourse.php +++ b/main/auth/gotocourse.php @@ -51,7 +51,7 @@ if (isset($_GET['firstpage'])) { $msg .= '
'; $msg .= $form->return_form(); - $msg .='
'; + $msg .= ''; if (api_is_cas_activated()) { $msg .= ""; } diff --git a/main/document/download.php b/main/document/download.php index aefb0c6cdc..f3d5fb2fc2 100755 --- a/main/document/download.php +++ b/main/document/download.php @@ -97,7 +97,7 @@ if (Security::check_abs_path($sys_course_path.$doc_url, $sys_course_path.'/')) { } if (!api_is_allowed_to_edit() && !$is_visible) { - Display::display_error_message(get_lang('ProtectedDocument'));//api_not_allowed backbutton won't work. + Display::display_error_message(get_lang('ProtectedDocument')); //api_not_allowed backbutton won't work. exit; // You shouldn't be here anyway. } // Launch event diff --git a/main/document/save_pixlr.php b/main/document/save_pixlr.php index cefc57d207..2f8bf35267 100755 --- a/main/document/save_pixlr.php +++ b/main/document/save_pixlr.php @@ -16,36 +16,36 @@ require_once __DIR__.'/../inc/global.inc.php'; api_protect_course_script(); api_block_anonymous_users(); -if ($_user['user_id']!= api_get_user_id() || api_get_user_id()==0 || $_user['user_id']==0) { +if ($_user['user_id'] != api_get_user_id() || api_get_user_id() == 0 || $_user['user_id'] == 0) { api_not_allowed(); die(); } -if(!isset($_GET['title']) || !isset($_GET['type']) || !isset($_GET['image'])) { +if (!isset($_GET['title']) || !isset($_GET['type']) || !isset($_GET['image'])) { api_not_allowed(); die(); } -if(!isset($_SESSION['paint_dir']) || !isset($_SESSION['whereami']) ){ +if (!isset($_SESSION['paint_dir']) || !isset($_SESSION['whereami'])) { api_not_allowed(); die(); } //pixlr return -$filename=Security::remove_XSS($_GET['title']);//The user preferred file name of the image. -$extension=Security::remove_XSS($_GET['type']);//The image type, "pdx", "jpg", "bmp" or "png". -$urlcontents=Security::remove_XSS($_GET['image']);//A URL to the image on Pixlr.com server or the raw file post of the saved image. +$filename = Security::remove_XSS($_GET['title']); //The user preferred file name of the image. +$extension = Security::remove_XSS($_GET['type']); //The image type, "pdx", "jpg", "bmp" or "png". +$urlcontents = Security::remove_XSS($_GET['image']); //A URL to the image on Pixlr.com server or the raw file post of the saved image. //make variables -$title = Database::escape_string(str_replace('_',' ',$filename)); +$title = Database::escape_string(str_replace('_', ' ', $filename)); $current_session_id = api_get_session_id(); -$groupId= api_get_group_id(); -$relativeUrlPath=$_SESSION['paint_dir']; -$currentTool=$_SESSION['whereami']; +$groupId = api_get_group_id(); +$relativeUrlPath = $_SESSION['paint_dir']; +$currentTool = $_SESSION['whereami']; $dirBaseDocuments = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document'; -$saveDir=$dirBaseDocuments.$_SESSION['paint_dir']; +$saveDir = $dirBaseDocuments.$_SESSION['paint_dir']; $contents = file_get_contents($urlcontents); @@ -71,8 +71,8 @@ $filename = Security::remove_XSS($filename); $filename = api_replace_dangerous_char($filename); $filename = disable_dangerous_file($filename); -if (strlen(trim($filename))==0) { - echo "The title is empty";//if title is empty, headers Content-Type = application/octet-stream, then not create a new title here please +if (strlen(trim($filename)) == 0) { + echo "The title is empty"; //if title is empty, headers Content-Type = application/octet-stream, then not create a new title here please exit; } @@ -83,11 +83,11 @@ if ($contents === false) { } // Extension security -if($extension!= 'jpg' && $extension!= 'png' && $extension!= 'pxd'){ +if ($extension != 'jpg' && $extension != 'png' && $extension != 'pxd') { die(); } -if($extension=='pxd') { - echo "pxd file type does not supported";// not secure because check security headers and finfo() return Content-Type = application/octet-stream +if ($extension == 'pxd') { + echo "pxd file type does not supported"; // not secure because check security headers and finfo() return Content-Type = application/octet-stream exit; } @@ -101,9 +101,9 @@ if ($content_type[0] != "image") { //Verify that the file is an image. Fileinfo method $finfo = new finfo(FILEINFO_MIME); -$current_mime=$finfo->buffer($contents); +$current_mime = $finfo->buffer($contents); finfo_close($finfo); -if(strpos($current_mime, 'image')===false) { +if (strpos($current_mime, 'image') === false) { echo "Invalid mime type file"; exit; } @@ -113,46 +113,46 @@ if(strpos($current_mime, 'image')===false) { $paintFileName = $filename.'.'.$extension; $title = $title.'.'.$extension; -if($currentTool=='document/createpaint'){ +if ($currentTool == 'document/createpaint') { //check save as and prevent rewrite an older file with same name - if (0 != $groupId){ - $group_properties = GroupManager :: get_group_properties($groupId); + if (0 != $groupId) { + $group_properties = GroupManager :: get_group_properties($groupId); $groupPath = $group_properties['directory']; } else { - $groupPath =''; + $groupPath = ''; } - if (file_exists($saveDir.'/'.$filename.'.'.$extension)){ + if (file_exists($saveDir.'/'.$filename.'.'.$extension)) { $i = 1; while (file_exists($saveDir.'/'.$filename.'_'.$i.'.'.$extension)) $i++; - $paintFileName = $filename . '_' . $i . '.'.$extension; - $title = $filename . '_' . $i . '.'.$extension; + $paintFileName = $filename.'_'.$i.'.'.$extension; + $title = $filename.'_'.$i.'.'.$extension; } // $documentPath = $saveDir.'/'.$paintFileName; //add new document to disk - file_put_contents( $documentPath, $contents ); + file_put_contents($documentPath, $contents); //add document to database $doc_id = add_document($_course, $relativeUrlPath.'/'.$paintFileName, 'file', filesize($documentPath), $title); api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'DocumentAdded', $_user['user_id'], $groupId, null, null, null, $current_session_id); -}elseif($currentTool=='document/editpaint'){ +}elseif ($currentTool == 'document/editpaint') { $documentPath = $saveDir.'/'.$paintFileName; //add new document to disk - file_put_contents( $documentPath, $contents ); + file_put_contents($documentPath, $contents); //check path - if(!isset($_SESSION['paint_file'])){ + if (!isset($_SESSION['paint_file'])) { api_not_allowed(); die(); } - if($_SESSION['paint_file']==$paintFileName){ + if ($_SESSION['paint_file'] == $paintFileName) { $document_id = DocumentManager::get_document_id($_course, $relativeUrlPath.'/'.$paintFileName); update_existing_document($_course, $document_id, filesize($documentPath), null); api_item_property_update($_course, TOOL_DOCUMENT, $document_id, 'DocumentUpdated', $_user['user_id'], $groupId, null, null, null, $current_session_id); - }else{ + } else { //add a new document $doc_id = add_document($_course, $relativeUrlPath.'/'.$paintFileName, 'file', filesize($documentPath), $title); api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'DocumentAdded', $_user['user_id'], $groupId, null, null, null, $current_session_id); @@ -161,7 +161,7 @@ if($currentTool=='document/createpaint'){ //delete temporal file -$temp_file_2delete=$_SESSION['temp_realpath_image']; +$temp_file_2delete = $_SESSION['temp_realpath_image']; unlink($temp_file_2delete); //Clean sessions and return to Chamilo file list @@ -171,12 +171,12 @@ unset($_SESSION['whereami']); unset($_SESSION['temp_realpath_image']); if (!isset($_SESSION['exit_pixlr'])) { - $location=api_get_path(WEB_CODE_PATH).'document/document.php'; + $location = api_get_path(WEB_CODE_PATH).'document/document.php'; echo ''; api_not_allowed(true); } else { echo '
'.get_lang('PleaseStandBy').'
'; - $location=api_get_path(WEB_CODE_PATH).'document/document.php?id='.Security::remove_XSS($_SESSION['exit_pixlr']); + $location = api_get_path(WEB_CODE_PATH).'document/document.php?id='.Security::remove_XSS($_SESSION['exit_pixlr']); echo ''; unset($_SESSION['exit_pixlr']); } diff --git a/main/forum/download.php b/main/forum/download.php index e5335e143f..0f2bf37d1c 100755 --- a/main/forum/download.php +++ b/main/forum/download.php @@ -32,7 +32,7 @@ $doc_url = str_replace('///', '&', $doc_url); $doc_url = str_replace(' ', '+', $doc_url); $doc_url = str_replace('/..', '', $doc_url); //echo $doc_url; -if (! isset($_course)) { +if (!isset($_course)) { api_not_allowed(true); } @@ -52,11 +52,11 @@ if (is_dir($full_file_name)) { exit; } -$tbl_forum_attachment = Database::get_course_table(TABLE_FORUM_ATTACHMENT); +$tbl_forum_attachment = Database::get_course_table(TABLE_FORUM_ATTACHMENT); $tbl_forum_post = Database::get_course_table(TABLE_FORUM_POST); $course_id = api_get_course_int_id(); -$courseInfo = api_get_course_info_by_id($course_id); +$courseInfo = api_get_course_info_by_id($course_id); // launch event Event::event_download($doc_url); @@ -86,7 +86,7 @@ $forum_forum_visibility = api_get_item_visibility( api_get_session_id() ); -if ($forum_thread_visibility==1 && $forum_forum_visibility==1) { +if ($forum_thread_visibility == 1 && $forum_forum_visibility == 1) { if (Security::check_abs_path( $full_file_name, api_get_path(SYS_COURSE_PATH).$courseInfo['path'].'/upload/forum/') diff --git a/main/forum/viewpost.php b/main/forum/viewpost.php index 97b82d46b1..f1b00d17f7 100755 --- a/main/forum/viewpost.php +++ b/main/forum/viewpost.php @@ -29,7 +29,7 @@ $(document).ready(function(){ $(\'.hide-me\').slideUp() }); // Are we in a lp ? $origin = ''; if (isset($_GET['origin'])) { - $origin = Security::remove_XSS($_GET['origin']); + $origin = Security::remove_XSS($_GET['origin']); } /* MAIN DISPLAY SECTION */ @@ -46,12 +46,12 @@ $whatsnew_post_info = $_SESSION['whatsnew_post_info']; /* Header and Breadcrumbs */ -if (isset($_SESSION['gradebook'])){ +if (isset($_SESSION['gradebook'])) { $gradebook = $_SESSION['gradebook']; } if (!empty($gradebook) && $gradebook == 'view') { - $interbreadcrumb[] = array ( + $interbreadcrumb[] = array( 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], 'name' => get_lang('ToolGradebook') ); @@ -181,7 +181,7 @@ if ($message != 'PostDeletedSpecial') { echo "\t\n\t\t"; echo ''.prepare4display($current_thread['thread_title']).'
'; - if ($origin!='learnpath') { + if ($origin != 'learnpath') { echo ''.prepare4display($current_forum_category['cat_title']).' - '; } diff --git a/main/mySpace/coaches.php b/main/mySpace/coaches.php index b8ad38330c..b511919a40 100755 --- a/main/mySpace/coaches.php +++ b/main/mySpace/coaches.php @@ -16,10 +16,10 @@ $this_section = SECTION_TRACKING; $nameTools = get_lang('Tutors'); api_block_anonymous_users(); -$interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('MySpace')); +$interbreadcrumb[] = array("url" => "index.php", "name" => get_lang('MySpace')); if (isset($_GET["id_student"])) { - $interbreadcrumb[] = array ("url" => "student.php", "name" => get_lang('Students')); + $interbreadcrumb[] = array("url" => "student.php", "name" => get_lang('Students')); } Display :: display_header($nameTools); @@ -27,14 +27,14 @@ Display :: display_header($nameTools); api_display_tool_title($nameTools); // Database Table Definitions -$tbl_course = Database :: get_main_table(TABLE_MAIN_COURSE); -$tbl_course_user = Database :: get_main_table(TABLE_MAIN_COURSE_USER); -$tbl_user = Database :: get_main_table(TABLE_MAIN_USER); -$tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION); -$tbl_session_rel_course = Database :: get_main_table(TABLE_MAIN_SESSION_COURSE); -$tbl_session_rel_course_rel_user = Database :: get_main_table(TABLE_MAIN_SESSION_COURSE_USER); -$tbl_session_rel_user = Database :: get_main_table(TABLE_MAIN_SESSION_USER); -$tbl_track_login = Database :: get_main_table(TABLE_STATISTIC_TRACK_E_LOGIN); +$tbl_course = Database :: get_main_table(TABLE_MAIN_COURSE); +$tbl_course_user = Database :: get_main_table(TABLE_MAIN_COURSE_USER); +$tbl_user = Database :: get_main_table(TABLE_MAIN_USER); +$tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION); +$tbl_session_rel_course = Database :: get_main_table(TABLE_MAIN_SESSION_COURSE); +$tbl_session_rel_course_rel_user = Database :: get_main_table(TABLE_MAIN_SESSION_COURSE_USER); +$tbl_session_rel_user = Database :: get_main_table(TABLE_MAIN_SESSION_USER); +$tbl_track_login = Database :: get_main_table(TABLE_STATISTIC_TRACK_E_LOGIN); /** * MAIN PART @@ -214,7 +214,7 @@ if (Database::num_rows($result_coachs) > 0) { } echo ''; -if (isset($_POST['export'])){ +if (isset($_POST['export'])) { export_csv($header, $data, 'coaches.csv'); } @@ -222,8 +222,8 @@ echo "

"; echo "

- "; diff --git a/main/mySpace/progression.php b/main/mySpace/progression.php index 127257b2c1..1cdb4b934e 100755 --- a/main/mySpace/progression.php +++ b/main/mySpace/progression.php @@ -16,14 +16,14 @@ $cidReset = true; $this_section = SECTION_TRACKING; api_block_anonymous_users(); -$interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('MySpace')); +$interbreadcrumb[] = array("url" => "index.php", "name" => get_lang('MySpace')); Display :: display_header($nameTools); // Database Table Definitions -$tbl_course = Database :: get_main_table(TABLE_MAIN_COURSE); -$tbl_user = Database :: get_main_table(TABLE_MAIN_USER); +$tbl_course = Database :: get_main_table(TABLE_MAIN_COURSE); +$tbl_user = Database :: get_main_table(TABLE_MAIN_USER); $tbl_session_course = Database :: get_main_table(TABLE_MAIN_SESSION_COURSE); -$tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION); +$tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION); $tbl_track_exercice = Database :: get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); /* diff --git a/main/mySpace/user_import.php b/main/mySpace/user_import.php index a7e3f99989..b19c5595d2 100755 --- a/main/mySpace/user_import.php +++ b/main/mySpace/user_import.php @@ -15,12 +15,12 @@ $this_section = SECTION_PLATFORM_ADMIN; // TODO: Platform admin section? $tool_name = get_lang('ImportUserListXMLCSV'); api_block_anonymous_users(); -$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('MySpace')); +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('MySpace')); $id_session = ''; if (isset($_GET['id_session']) && $_GET['id_session'] != '') { $id_session = intval($_GET['id_session']); - $interbreadcrumb[] = array ('url' => 'session.php', 'name' => get_lang('Sessions')); - $interbreadcrumb[] = array ('url' => 'course.php?id_session='.$id_session.'', 'name' => get_lang('Course')); + $interbreadcrumb[] = array('url' => 'session.php', 'name' => get_lang('Sessions')); + $interbreadcrumb[] = array('url' => 'course.php?id_session='.$id_session.'', 'name' => get_lang('Course')); } // Set this option to true to enforce strict purification for usenames. @@ -62,7 +62,7 @@ if ($_POST['formSent'] && $_FILES['import_file']['size'] !== 0) { if (count($errors) == 0) { if (!empty($id_session)) { - $tbl_session_rel_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE); + $tbl_session_rel_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE); // Selecting all the courses from the session id requested. $sql = "SELECT c_id FROM $tbl_session_rel_course WHERE session_id ='$id_session'"; $result = Database::query($sql); @@ -105,10 +105,10 @@ if (count($errors) != 0) { $form = new FormValidator('user_import'); $form->addElement('hidden', 'formSent'); -$form->addElement('hidden', 'id_session',$id_session); +$form->addElement('hidden', 'id_session', $id_session); $form->addElement('file', 'import_file', get_lang('ImportFileLocation')); $form->addRule('import_file', get_lang('ThisFieldIsRequired'), 'required'); -$allowed_file_types = array ('xml', 'csv'); +$allowed_file_types = array('xml', 'csv'); $form->addRule('import_file', get_lang('InvalidExtension').' ('.implode(',', $allowed_file_types).')', 'filetype', $allowed_file_types); $form->addElement('radio', 'file_type', get_lang('FileType'), 'XML ('.get_lang('ExampleXMLFile').')', 'xml'); $form->addElement('radio', 'file_type', null, 'CSV ('.get_lang('ExampleCSVFile').')', 'csv'); diff --git a/main/social/skills_ranking.php b/main/social/skills_ranking.php index 50e3b8f448..b066008c1a 100755 --- a/main/social/skills_ranking.php +++ b/main/social/skills_ranking.php @@ -13,7 +13,7 @@ require_once __DIR__.'/../inc/global.inc.php'; //Add the JS needed to use the jqgrid $htmlHeadXtra[] = api_get_jqgrid_js(); -$interbreadcrumb[] = array("url" => "index.php","name" => get_lang('Skills')); +$interbreadcrumb[] = array("url" => "index.php", "name" => get_lang('Skills')); //jqgrid will use this URL to do the selects $url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_user_skill_ranking'; @@ -28,7 +28,7 @@ $columns = array( get_lang('Rank') ); -$column_model = array( +$column_model = array( array( 'name' => 'photo', 'index' => 'photo', diff --git a/main/social/skills_wheel.php b/main/social/skills_wheel.php index 7074ff94a7..d008421551 100755 --- a/main/social/skills_wheel.php +++ b/main/social/skills_wheel.php @@ -57,7 +57,7 @@ $tpl->assign('dialogForm', $dialogForm->returnForm()); $url = api_get_path(WEB_AJAX_PATH)."skill.ajax.php?a=get_skills_tree_json&load_user=$userId"; $tpl->assign('wheel_url', $url); -$url = api_get_path(WEB_AJAX_PATH).'skill.ajax.php?1=1'; +$url = api_get_path(WEB_AJAX_PATH).'skill.ajax.php?1=1'; $tpl->assign('url', $url); $tpl->assign('user_info', $userInfo); diff --git a/plugin/formLogin_hide_unhide/index.php b/plugin/formLogin_hide_unhide/index.php index ed36320dcf..9fa1f09260 100755 --- a/plugin/formLogin_hide_unhide/index.php +++ b/plugin/formLogin_hide_unhide/index.php @@ -1,9 +1,9 @@ setDefaults($defaults); $plugin_info['settings_form'] = $form; //set the templates that are going to be used -$plugin_info['templates'] = array('template.tpl'); +$plugin_info['templates'] = array('template.tpl'); diff --git a/src/Chamilo/CoreBundle/Component/Editor/Driver/DropBoxDriver.php b/src/Chamilo/CoreBundle/Component/Editor/Driver/DropBoxDriver.php index c377230aa0..5e11812b6a 100644 --- a/src/Chamilo/CoreBundle/Component/Editor/Driver/DropBoxDriver.php +++ b/src/Chamilo/CoreBundle/Component/Editor/Driver/DropBoxDriver.php @@ -464,7 +464,7 @@ class DropBoxDriver extends \elFinderVolumeMySQL implements DriverInterface * @return resource|false * @author Dmitry (dio) Levashov **/ - protected function _fopen($path, $mode='rb') { + protected function _fopen($path, $mode = 'rb') { $fp = $this->tmbPath ? @fopen($this->tmpname($path), 'w+') : @tmpfile(); @@ -491,7 +491,7 @@ class DropBoxDriver extends \elFinderVolumeMySQL implements DriverInterface * @return bool * @author Dmitry (dio) Levashov **/ - protected function _fclose($fp, $path='') { + protected function _fclose($fp, $path = '') { @fclose($fp); if ($path) { @unlink($this->tmpname($path)); diff --git a/src/Chamilo/CoreBundle/Component/Editor/Driver/PersonalDriver.php b/src/Chamilo/CoreBundle/Component/Editor/Driver/PersonalDriver.php index e96c96503d..fc1eafd104 100644 --- a/src/Chamilo/CoreBundle/Component/Editor/Driver/PersonalDriver.php +++ b/src/Chamilo/CoreBundle/Component/Editor/Driver/PersonalDriver.php @@ -24,8 +24,8 @@ class PersonalDriver extends Driver implements DriverInterface mkdir($dir); } - if (!is_dir($dir . 'my_files')) { - mkdir($dir . 'my_files'); + if (!is_dir($dir.'my_files')) { + mkdir($dir.'my_files'); } } } diff --git a/src/Chamilo/CoreBundle/Component/Editor/TinyMce/TinyMce.php b/src/Chamilo/CoreBundle/Component/Editor/TinyMce/TinyMce.php index 78a39e44f9..0edc95441b 100644 --- a/src/Chamilo/CoreBundle/Component/Editor/TinyMce/TinyMce.php +++ b/src/Chamilo/CoreBundle/Component/Editor/TinyMce/TinyMce.php @@ -47,7 +47,7 @@ class TinyMce extends Editor */ public function editorReplace() { - $toolbar = new Toolbar\Basic($this->urlGenerator, $this->toolbarSet, $this->config, 'TinyMce'); + $toolbar = new Toolbar\Basic($this->urlGenerator, $this->toolbarSet, $this->config, 'TinyMce'); $toolbar->setLanguage($this->getLocale()); $config = $toolbar->getConfig(); $config['selector'] = "#".$this->name; diff --git a/src/Chamilo/CoreBundle/Entity/Repository/ItemPropertyRepository.php b/src/Chamilo/CoreBundle/Entity/Repository/ItemPropertyRepository.php index 569a0982fa..c4dbeda251 100644 --- a/src/Chamilo/CoreBundle/Entity/Repository/ItemPropertyRepository.php +++ b/src/Chamilo/CoreBundle/Entity/Repository/ItemPropertyRepository.php @@ -196,7 +196,7 @@ class ItemPropertyRepository extends EntityRepository $users = \GroupManager::getStudentsAndTutors($groupId); $newUserList = array(); if (!empty($users)) { - foreach($users as $user) { + foreach ($users as $user) { $newUserList[] = $user['user_id']; } $this->unsubcribeUsersToItem( diff --git a/src/Chamilo/CoreBundle/Entity/Session.php b/src/Chamilo/CoreBundle/Entity/Session.php index b68bffca63..611dd10475 100644 --- a/src/Chamilo/CoreBundle/Entity/Session.php +++ b/src/Chamilo/CoreBundle/Entity/Session.php @@ -479,7 +479,7 @@ class Session Criteria::expr()->eq("user", $user) ); - if (!is_null($status)) { + if (!is_null($status)) { $criteria->andWhere( Criteria::expr()->eq("status", $status) );