From da1513ecb840167511d8754ceeb61cd250d01d20 Mon Sep 17 00:00:00 2001 From: jmontoyaa Date: Wed, 14 Sep 2016 11:41:35 +0200 Subject: [PATCH] Minor - format code --- main/admin/settings.lib.php | 6 ++---- main/inc/lib/document.lib.php | 7 ++----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/main/admin/settings.lib.php b/main/admin/settings.lib.php index 905d58ea8c..fa35a4d248 100755 --- a/main/admin/settings.lib.php +++ b/main/admin/settings.lib.php @@ -402,16 +402,14 @@ function handleStylesheets() . ''; } } elseif (isset($_POST['logo_upload'])) { - $logoForm->addRule('new_logo', get_lang('InvalidExtension').' ('.implode(',', $allowedFileTypes).')', 'filetype', $allowedFileTypes); $logoForm->addRule('new_logo', get_lang('ThisFieldIsRequired'), 'required'); if ($logoForm->validate()) { - $imageInfo = getimagesize($_FILES['new_logo']['tmp_name']); $width = $imageInfo[0]; $height = $imageInfo[1]; - if ($width <= 250 && $height <= 70 ) { + if ($width <= 250 && $height <= 70) { if (is_file($dir.$newLogoFileName)) { unlink($dir.$newLogoFileName); } @@ -1523,7 +1521,7 @@ function generateSettingsForm($settings, $settings_by_access_list) if (empty($timezone)) { $timezone = _api_get_timezone(); } - $form->addElement('html', sprintf(get_lang('LocalTimeUsingPortalTimezoneXIsY'), $timezone, api_get_local_time())); + $form->addLabel('', sprintf(get_lang('LocalTimeUsingPortalTimezoneXIsY'), $timezone, api_get_local_time())); break; } } // end for diff --git a/main/inc/lib/document.lib.php b/main/inc/lib/document.lib.php index bdac7108b6..16805abe68 100755 --- a/main/inc/lib/document.lib.php +++ b/main/inc/lib/document.lib.php @@ -743,6 +743,7 @@ class DocumentManager * @param array $_course * @param int $to_group_id iid * @param boolean $can_see_invisible + * @param boolean $getInvisibleList * * @return array with paths */ @@ -762,8 +763,6 @@ class DocumentManager api_get_session_id() ); - $sharedCondition = null; - if (!empty($students)) { $conditionList = array(); foreach ($students as $studentId => $studentInfo) { @@ -780,7 +779,7 @@ class DocumentManager // condition for the session $session_id = api_get_session_id(); $condition_session = api_get_session_condition($session_id, true, false, 'docs.session_id'); - $show_users_condition = ""; + $show_users_condition = ''; if (api_get_setting('show_users_folders') === 'false') { $show_users_condition = " AND docs.path NOT LIKE '%shared_folder%'"; } @@ -844,7 +843,6 @@ class DocumentManager return false; } } else { - // No invisible folders // Condition for the session $session_id = api_get_session_id(); @@ -878,7 +876,6 @@ class DocumentManager } if ($getInvisibleList) { - return $visibleFolders; }