@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | } |
73 | 73 | |
74 | 74 | if (empty($document_data)) { |
75 | - $document_id = $parent_id = 0; |
|
75 | + $document_id = $parent_id = 0; |
|
76 | 76 | $path = '/'; |
77 | 77 | } else { |
78 | 78 | $document_id = $document_data['id']; |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | |
205 | 205 | // Link back to the documents overview |
206 | 206 | if ($is_certificate_mode) { |
207 | - $actions = '<a href="document.php?id='.$document_id.'&selectcat=' . $selectcat.'&'.api_get_cidreq().'">'. |
|
207 | + $actions = '<a href="document.php?id='.$document_id.'&selectcat='.$selectcat.'&'.api_get_cidreq().'">'. |
|
208 | 208 | Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('CertificateOverview'), '', ICON_SIZE_MEDIUM).'</a>'; |
209 | 209 | } else { |
210 | 210 | $actions = '<a href="document.php?id='.$document_id.'&'.api_get_cidreq().'">'. |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | } |
213 | 213 | |
214 | 214 | // Link to create a folder |
215 | -echo $toolbar = Display::toolbarAction('toolbar-upload', array( 0 => $actions), 1); |
|
215 | +echo $toolbar = Display::toolbarAction('toolbar-upload', array(0 => $actions), 1); |
|
216 | 216 | // Form to select directory |
217 | 217 | $folders = DocumentManager::get_all_document_folders($_course, $groupId, $is_allowed_to_edit); |
218 | 218 | if (!$is_certificate_mode) { |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | ) { |
95 | 95 | require_once api_get_path(SYS_CODE_PATH).'/cron/lang/langstats.class.php'; |
96 | 96 | global $langstats; |
97 | - $langstats->add_use($variable,''); |
|
97 | + $langstats->add_use($variable, ''); |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | if (!isset($used_lang_vars)) { |
@@ -643,10 +643,10 @@ discard block |
||
643 | 643 | // We replace %a %A %b %B masks of date format with translated strings |
644 | 644 | $translated = &_api_get_day_month_names($language); |
645 | 645 | $date_format = str_replace(array('%A', '%a', '%B', '%b'), |
646 | - array($translated['days_long'][(int)strftime('%w', $time )], |
|
647 | - $translated['days_short'][(int)strftime('%w', $time)], |
|
648 | - $translated['months_long'][(int)strftime('%m', $time) - 1], |
|
649 | - $translated['months_short'][(int)strftime('%m', $time) - 1]), |
|
646 | + array($translated['days_long'][(int) strftime('%w', $time)], |
|
647 | + $translated['days_short'][(int) strftime('%w', $time)], |
|
648 | + $translated['months_long'][(int) strftime('%m', $time) - 1], |
|
649 | + $translated['months_short'][(int) strftime('%m', $time) - 1]), |
|
650 | 650 | $date_format); |
651 | 651 | $formatted_date = api_to_system_encoding(strftime($date_format, $time), 'UTF-8'); |
652 | 652 | } |
@@ -744,7 +744,7 @@ discard block |
||
744 | 744 | if ($seconds > $time) { |
745 | 745 | continue; |
746 | 746 | } |
747 | - $current_value = intval($time/$seconds); |
|
747 | + $current_value = intval($time / $seconds); |
|
748 | 748 | |
749 | 749 | if ($current_value != 1) { |
750 | 750 | $date_str = $sec_time_plu[$i]; |
@@ -761,7 +761,7 @@ discard block |
||
761 | 761 | } |
762 | 762 | |
763 | 763 | if (!empty($key_result)) { |
764 | - if ($key_result[0] == $min_day && $key_result[1]== $min_minute) { |
|
764 | + if ($key_result[0] == $min_day && $key_result[1] == $min_minute) { |
|
765 | 765 | $key_result[1] = ' 0 '.$min_hours; |
766 | 766 | $str_result[0] = $time_result[0].' '.$key_result[0]; |
767 | 767 | $str_result[1] = $key_result[1]; |
@@ -1694,7 +1694,7 @@ discard block |
||
1694 | 1694 | * @return string Returns the encoding identificator modified in suitable for comparison way. |
1695 | 1695 | */ |
1696 | 1696 | function api_refine_encoding_id($encoding) { |
1697 | - if (is_array($encoding)){ |
|
1697 | + if (is_array($encoding)) { |
|
1698 | 1698 | return array_map('api_refine_encoding_id', $encoding); |
1699 | 1699 | } |
1700 | 1700 | return strtoupper(str_replace('_', '-', $encoding)); |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | global $current_tag; |
281 | 281 | switch ($data) { |
282 | 282 | case 'Contact': |
283 | - $user = array (); |
|
283 | + $user = array(); |
|
284 | 284 | break; |
285 | 285 | default: |
286 | 286 | $current_tag = $data; |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | $allowed_file_mimetype = array('csv', 'xml'); |
374 | 374 | $error_kind_file = false; |
375 | 375 | |
376 | - $checkUniqueEmail = isset($_POST['check_unique_email']) ? $_POST['check_unique_email'] :null; |
|
376 | + $checkUniqueEmail = isset($_POST['check_unique_email']) ? $_POST['check_unique_email'] : null; |
|
377 | 377 | |
378 | 378 | $uploadInfo = pathinfo($_FILES['import_file']['name']); |
379 | 379 | $ext_import_file = $uploadInfo['extension']; |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | if (strcmp($file_type, 'csv') === 0 && |
383 | 383 | $ext_import_file == $allowed_file_mimetype[0] |
384 | 384 | ) { |
385 | - $users = parse_csv_data($_FILES['import_file']['tmp_name']); |
|
385 | + $users = parse_csv_data($_FILES['import_file']['tmp_name']); |
|
386 | 386 | $errors = validate_data($users, $checkUniqueEmail); |
387 | 387 | $error_kind_file = false; |
388 | 388 | } elseif (strcmp($file_type, 'xml') === 0 && $ext_import_file == $allowed_file_mimetype[1]) { |