Minor - format code

pull/2487/head
jmontoyaa 9 years ago
parent 2555ddd36c
commit da1513ecb8
  1. 6
      main/admin/settings.lib.php
  2. 7
      main/inc/lib/document.lib.php

@ -402,16 +402,14 @@ function handleStylesheets()
. '</script>';
}
} 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

@ -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;
}

Loading…
Cancel
Save