diff --git a/main/admin/legal_add.php b/main/admin/legal_add.php index 34e847bc64..cb58019888 100755 --- a/main/admin/legal_add.php +++ b/main/admin/legal_add.php @@ -41,7 +41,7 @@ foreach ($types as $variable => $name) { 'changeable' => true, 'filter' => true, 'visible_to_self' => true, - 'visible_to_others' => true + 'visible_to_others' => true, ]; $extraField->save($params); } @@ -162,10 +162,8 @@ if (isset($_POST['language'])) { [], false, true - ); - $jqueryReady = $returnParams['jquery_ready_content']; $form->addElement('textarea', 'changes', get_lang('ExplainChanges'), ['width' => '20']); diff --git a/main/auth/courses_controller.php b/main/auth/courses_controller.php index f64cf3d01a..df517fb00e 100755 --- a/main/auth/courses_controller.php +++ b/main/auth/courses_controller.php @@ -111,7 +111,6 @@ class CoursesController //$browse_course_categories = CoursesAndSessionsCatalog::getCourseCategories(); $listCategories = CoursesAndSessionsCatalog::getCourseCategoriesTree(); - $data['countCoursesInCategory'] = CourseCategory::countCoursesInCategory($category_code); if ($action === 'display_random_courses') { // Random value is used instead limit filter @@ -122,7 +121,6 @@ class CoursesController $data['countCoursesInCategory'] = count($data['browse_courses_in_category']); } else { - if (!isset($category_code)) { $category_code = $listCategories['ALL']['code']; // by default first category } diff --git a/main/inc/lib/CoursesAndSessionsCatalog.class.php b/main/inc/lib/CoursesAndSessionsCatalog.class.php index 409a0cf3f9..55a31ed352 100644 --- a/main/inc/lib/CoursesAndSessionsCatalog.class.php +++ b/main/inc/lib/CoursesAndSessionsCatalog.class.php @@ -174,7 +174,7 @@ class CoursesAndSessionsCatalog 'parent_id' => null, 'tree_pos' => 0, 'number_courses' => $countCourses, - 'level' => 0 + 'level' => 0, ]; $allCategories = CourseCategory::getAllCategories(); @@ -205,7 +205,7 @@ class CoursesAndSessionsCatalog 'auth_course_child' => true, 'auth_cat_child' => true, 'number_courses' => $count_courses, - 'level' => 0 + 'level' => 0, ]; $result = array_merge($list, $categories); @@ -213,7 +213,6 @@ class CoursesAndSessionsCatalog return $result; } - /** * @return array */ @@ -382,7 +381,6 @@ class CoursesAndSessionsCatalog $visibilityCondition ORDER BY title $limitFilter "; } else { - $sql = "SELECT *, id as real_id FROM $tbl_course course WHERE $conditionCode @@ -694,9 +692,11 @@ class CoursesAndSessionsCatalog } /** - * Build a recursive tree of course categories + * Build a recursive tree of course categories. + * * @param $categories * @param $parentId + * * @return array */ public static function buildCourseCategoryTree($categories, $parentId = 0, $level = 0) @@ -731,8 +731,10 @@ class CoursesAndSessionsCatalog } /** - * List Code Search Category + * List Code Search Category. + * * @param $code + * * @return array */ public static function childrenCategories($code) diff --git a/main/inc/lib/extra_field.lib.php b/main/inc/lib/extra_field.lib.php index 3fb8d774d2..a638e1b41d 100755 --- a/main/inc/lib/extra_field.lib.php +++ b/main/inc/lib/extra_field.lib.php @@ -51,7 +51,7 @@ class ExtraField extends Model 'extra_field_type', //Enable this when field_loggeable is introduced as a table field (2.0) //'field_loggeable', - 'created_at' + 'created_at', ]; public $ops = [ @@ -1107,7 +1107,7 @@ class ExtraField extends Model $translatedDisplayText = get_lang($field_details['display_text'], true); $translatedDisplayHelpText = ''; if ($help) { - $translatedDisplayHelpText .= get_lang($field_details['display_text'] . 'Help'); + $translatedDisplayHelpText .= get_lang($field_details['display_text'].'Help'); } $label = [$translatedDisplayText, $translatedDisplayHelpText]; if (!empty($translatedDisplayText)) { @@ -1148,7 +1148,6 @@ class ExtraField extends Model 'Width' => '100%', 'Height' => '130', 'id' => 'extra_'.$field_details['variable'], - ] ); $form->applyFilter('extra_'.$field_details['variable'], 'stripslashes');