@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | if (!in_array($info['mime'], $allowedMimeTypesBySuffix)) { |
32 | 32 | exit; |
33 | 33 | } |
34 | - $prefix = 'data:' . $info['mime'] . ';base64,'; |
|
34 | + $prefix = 'data:'.$info['mime'].';base64,'; |
|
35 | 35 | } |
36 | 36 | ?> |
37 | 37 | <html xmlns="http://www.w3.org/1999/xhtml"> |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | top.svgEditor.processFile("<?php |
43 | 43 | |
44 | 44 | // This should be safe since SVG edit does its own filtering (e.g., if an SVG file contains scripts) |
45 | -echo $prefix . base64_encode($output); |
|
45 | +echo $prefix.base64_encode($output); |
|
46 | 46 | |
47 | 47 | ?>", "<?php echo $type; ?>"); |
48 | 48 | </script> |
@@ -9,12 +9,12 @@ discard block |
||
9 | 9 | * |
10 | 10 | */ |
11 | 11 | exit; |
12 | -function encodeRFC5987ValueChars ($str) { |
|
12 | +function encodeRFC5987ValueChars($str) { |
|
13 | 13 | // See http://tools.ietf.org/html/rfc5987#section-3.2.1 |
14 | 14 | // For better readability within headers, add back the characters escaped by rawurlencode but still allowable |
15 | 15 | // Although RFC3986 reserves "!" (%21), RFC5987 does not |
16 | - return preg_replace_callback('@%(2[1346B]|5E|60|7C)@', function ($matches) { |
|
17 | - return chr('0x' . $matches[1]); |
|
16 | + return preg_replace_callback('@%(2[1346B]|5E|60|7C)@', function($matches) { |
|
17 | + return chr('0x'.$matches[1]); |
|
18 | 18 | }, rawurlencode($str)); |
19 | 19 | } |
20 | 20 | |
@@ -28,12 +28,12 @@ discard block |
||
28 | 28 | |
29 | 29 | $file = ''; |
30 | 30 | |
31 | -$suffix = '.' . array_search($mime, $allowedMimeTypesBySuffix); |
|
31 | +$suffix = '.'.array_search($mime, $allowedMimeTypesBySuffix); |
|
32 | 32 | |
33 | 33 | if (isset($_POST['filename']) && strlen($_POST['filename']) > 0) { |
34 | - $file = $_POST['filename'] . $suffix; |
|
34 | + $file = $_POST['filename'].$suffix; |
|
35 | 35 | } else { |
36 | - $file = 'image' . $suffix; |
|
36 | + $file = 'image'.$suffix; |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | if ($suffix == '.svg') { |
@@ -48,11 +48,11 @@ discard block |
||
48 | 48 | header("Content-Description: File Transfer"); |
49 | 49 | |
50 | 50 | // See http://tools.ietf.org/html/rfc6266#section-4.1 |
51 | -header("Content-Disposition: attachment; filename*=UTF-8''" . encodeRFC5987ValueChars( |
|
51 | +header("Content-Disposition: attachment; filename*=UTF-8''".encodeRFC5987ValueChars( |
|
52 | 52 | // preg_replace('@[\\\\/:*?"<>|]@', '', $file) // If we wanted to strip Windows-disallowed characters server-side (but not a security issue, so we can strip client-side instead) |
53 | 53 | $file |
54 | 54 | )); |
55 | -header("Content-Type: " . $mime); |
|
55 | +header("Content-Type: ".$mime); |
|
56 | 56 | header("Content-Transfer-Encoding: binary"); |
57 | 57 | |
58 | 58 | echo $contents; |
@@ -8,7 +8,7 @@ |
||
8 | 8 | exit; |
9 | 9 | } |
10 | 10 | $svg = $_POST['output_svg']; |
11 | - $filename = (isset($_POST['filename']) && !empty($_POST['filename']) ? preg_replace('@[\\\\/:*?"<>|]@u', '_', $_POST['filename']) : 'saved') . '.svg'; // These characters are indicated as prohibited by Windows |
|
11 | + $filename = (isset($_POST['filename']) && !empty($_POST['filename']) ? preg_replace('@[\\\\/:*?"<>|]@u', '_', $_POST['filename']) : 'saved').'.svg'; // These characters are indicated as prohibited by Windows |
|
12 | 12 | |
13 | 13 | $fh = fopen($filename, 'w') or die("Can't open file"); |
14 | 14 | fwrite($fh, $svg); |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | $is_allowed_to_edit = api_is_allowed_to_edit(null, true); |
14 | 14 | |
15 | -$curdirpath='/images/gallery'; //path of library directory |
|
15 | +$curdirpath = '/images/gallery'; //path of library directory |
|
16 | 16 | |
17 | 17 | $course_info = api_get_course_info(); |
18 | 18 | |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $slideshow_extension = strrchr($file, '.'); |
37 | 37 | $slideshow_extension = strtolower($slideshow_extension); |
38 | 38 | if (in_array($slideshow_extension, $accepted_extensions)) { |
39 | - $png_svg_files[] =$file; |
|
39 | + $png_svg_files[] = $file; |
|
40 | 40 | } |
41 | 41 | } |
42 | 42 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $style = '<style>'; |
48 | 48 | $style .= '@import "'.api_get_path(WEB_CSS_PATH).'base.css";'; |
49 | 49 | $style .= '@import "'.api_get_path(WEB_CSS_PATH).'themes/'.api_get_visual_theme().'/default.css";'; |
50 | -$style .='</style>'; |
|
50 | +$style .= '</style>'; |
|
51 | 51 | |
52 | 52 | ?> |
53 | 53 | <!doctype html> |
@@ -59,10 +59,10 @@ discard block |
||
59 | 59 | if (!empty($png_svg_files)) { |
60 | 60 | echo '<h3>'.get_lang('SelectSVGEditImage').'</h3>'; |
61 | 61 | echo '<ul>'; |
62 | - foreach($png_svg_files as $filename) { |
|
63 | - $image=$disk_path.$filename; |
|
62 | + foreach ($png_svg_files as $filename) { |
|
63 | + $image = $disk_path.$filename; |
|
64 | 64 | |
65 | - if (strpos($filename, "svg")){ |
|
65 | + if (strpos($filename, "svg")) { |
|
66 | 66 | $new_sizes['width'] = 60; |
67 | 67 | $new_sizes['height'] = 60; |
68 | 68 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $slideshow_extension = strrchr($file, '.'); |
48 | 48 | $slideshow_extension = strtolower($slideshow_extension); |
49 | 49 | if (in_array($slideshow_extension, $accepted_extensions)) { |
50 | - $png_svg_files[] =$file; |
|
50 | + $png_svg_files[] = $file; |
|
51 | 51 | } |
52 | 52 | } |
53 | 53 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $style = '<style>'; |
56 | 56 | $style .= '@import "'.api_get_path(WEB_CSS_PATH).'base.css";'; |
57 | 57 | $style .= '@import "'.api_get_path(WEB_CSS_PATH).'themes/'.api_get_visual_theme().'/default.css";'; |
58 | -$style .='</style>'; |
|
58 | +$style .= '</style>'; |
|
59 | 59 | |
60 | 60 | ?> |
61 | 61 | <!doctype html> |
@@ -68,15 +68,15 @@ discard block |
||
68 | 68 | if (( |
69 | 69 | $group_properties['doc_state'] == 2 && |
70 | 70 | ($is_allowed_to_edit || GroupManager :: is_user_in_group($_user['user_id'], $groupId))) || $group_properties['doc_state'] == 1 |
71 | -){ |
|
71 | +) { |
|
72 | 72 | |
73 | 73 | if (!empty($png_svg_files)) { |
74 | 74 | echo '<h3>'.get_lang('SelectSVGEditImage').'</h3>'; |
75 | 75 | echo '<ul>'; |
76 | - foreach($png_svg_files as $filename) { |
|
76 | + foreach ($png_svg_files as $filename) { |
|
77 | 77 | $image = $group_disk_path.$filename; |
78 | 78 | |
79 | - if (strpos($filename, "svg")){ |
|
79 | + if (strpos($filename, "svg")) { |
|
80 | 80 | $new_sizes['width'] = 60; |
81 | 81 | $new_sizes['height'] = 60; |
82 | 82 | } else { |
@@ -25,14 +25,14 @@ discard block |
||
25 | 25 | $slideshow_extension = strrchr($file, '.'); |
26 | 26 | $slideshow_extension = strtolower($slideshow_extension); |
27 | 27 | if (in_array($slideshow_extension, $accepted_extensions)) { |
28 | - $png_svg_files[] =$file; |
|
28 | + $png_svg_files[] = $file; |
|
29 | 29 | } |
30 | 30 | } |
31 | 31 | } |
32 | 32 | $style = '<style>'; |
33 | 33 | $style .= '@import "'.api_get_path(WEB_CSS_PATH).'base.css";'; |
34 | 34 | $style .= '@import "'.api_get_path(WEB_CSS_PATH).'themes/'.api_get_visual_theme().'/default.css";'; |
35 | -$style .='</style>'; |
|
35 | +$style .= '</style>'; |
|
36 | 36 | |
37 | 37 | ?> |
38 | 38 | <!doctype html> |
@@ -48,10 +48,10 @@ discard block |
||
48 | 48 | if (!empty($png_svg_files)) { |
49 | 49 | echo '<h3>'.get_lang('SelectSVGEditImage').'</h3>'; |
50 | 50 | echo '<ul>'; |
51 | - foreach($png_svg_files as $filename) { |
|
51 | + foreach ($png_svg_files as $filename) { |
|
52 | 52 | $image = $user_disk_path.$filename; |
53 | 53 | |
54 | - if (strpos($filename, "svg")){ |
|
54 | + if (strpos($filename, "svg")) { |
|
55 | 55 | $new_sizes['width'] = 60; |
56 | 56 | $new_sizes['height'] = 60; |
57 | 57 | } else { |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | if ($i == $max_level) { |
332 | 332 | $select_part .= "rg$rg_number.group_id as id_$rg_number "; |
333 | 333 | } else { |
334 | - $select_part .="rg$rg_number.group_id as id_$rg_number, "; |
|
334 | + $select_part .= "rg$rg_number.group_id as id_$rg_number, "; |
|
335 | 335 | } |
336 | 336 | if ($i == 1) { |
337 | 337 | $cond_part .= "FROM $t_rel_group rg0 LEFT JOIN $t_rel_group rg$i on rg$rg_number.group_id = rg$i.subgroup_id "; |
@@ -1334,14 +1334,14 @@ discard block |
||
1334 | 1334 | */ |
1335 | 1335 | public static function get_groups_by_user_count($user_id = null, $relation_type = GROUP_USER_PERMISSION_READER, $with_image = false) |
1336 | 1336 | { |
1337 | - $table_group_rel_user = Database::get_main_table(TABLE_MAIN_USER_REL_GROUP); |
|
1338 | - $tbl_group = Database::get_main_table(TABLE_MAIN_GROUP); |
|
1337 | + $table_group_rel_user = Database::get_main_table(TABLE_MAIN_USER_REL_GROUP); |
|
1338 | + $tbl_group = Database::get_main_table(TABLE_MAIN_GROUP); |
|
1339 | 1339 | $user_id = intval($user_id); |
1340 | 1340 | |
1341 | 1341 | if ($relation_type == 0) { |
1342 | 1342 | $where_relation_condition = ''; |
1343 | 1343 | } else { |
1344 | - $relation_type = intval($relation_type); |
|
1344 | + $relation_type = intval($relation_type); |
|
1345 | 1345 | $where_relation_condition = "AND gu.relation_type = $relation_type "; |
1346 | 1346 | } |
1347 | 1347 | |
@@ -1394,7 +1394,7 @@ discard block |
||
1394 | 1394 | |
1395 | 1395 | // Picture |
1396 | 1396 | $form->addElement('file', 'picture', get_lang('AddPicture')); |
1397 | - $allowed_picture_types = array ('jpg', 'jpeg', 'png', 'gif'); |
|
1397 | + $allowed_picture_types = array('jpg', 'jpeg', 'png', 'gif'); |
|
1398 | 1398 | $form->addRule('picture', get_lang('OnlyImagesAllowed').' ('.implode(',', $allowed_picture_types).')', 'filetype', $allowed_picture_types); |
1399 | 1399 | |
1400 | 1400 | if (!empty($groupData)) { |
@@ -26,19 +26,19 @@ discard block |
||
26 | 26 | ); |
27 | 27 | |
28 | 28 | public $ops = array( |
29 | - 'eq' => '=', //equal |
|
30 | - 'ne' => '<>', //not equal |
|
31 | - 'lt' => '<', //less than |
|
32 | - 'le' => '<=', //less than or equal |
|
33 | - 'gt' => '>', //greater than |
|
34 | - 'ge' => '>=', //greater than or equal |
|
35 | - 'bw' => 'LIKE', //begins with |
|
29 | + 'eq' => '=', //equal |
|
30 | + 'ne' => '<>', //not equal |
|
31 | + 'lt' => '<', //less than |
|
32 | + 'le' => '<=', //less than or equal |
|
33 | + 'gt' => '>', //greater than |
|
34 | + 'ge' => '>=', //greater than or equal |
|
35 | + 'bw' => 'LIKE', //begins with |
|
36 | 36 | 'bn' => 'NOT LIKE', //doesn't begin with |
37 | - 'in' => 'LIKE', //is in |
|
37 | + 'in' => 'LIKE', //is in |
|
38 | 38 | 'ni' => 'NOT LIKE', //is not in |
39 | - 'ew' => 'LIKE', //ends with |
|
39 | + 'ew' => 'LIKE', //ends with |
|
40 | 40 | 'en' => 'NOT LIKE', //doesn't end with |
41 | - 'cn' => 'LIKE', //contains |
|
41 | + 'cn' => 'LIKE', //contains |
|
42 | 42 | 'nc' => 'NOT LIKE' //doesn't contain |
43 | 43 | ); |
44 | 44 | |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | */ |
324 | 324 | public static function get_extra_fields_by_handler($handler) |
325 | 325 | { |
326 | - $types= array(); |
|
326 | + $types = array(); |
|
327 | 327 | $types[self::FIELD_TYPE_TEXT] = get_lang('FieldTypeText'); |
328 | 328 | $types[self::FIELD_TYPE_TEXTAREA] = get_lang('FieldTypeTextarea'); |
329 | 329 | $types[self::FIELD_TYPE_RADIO] = get_lang('FieldTypeRadio'); |
@@ -962,7 +962,7 @@ discard block |
||
962 | 962 | // chzn-select doesn't work for sessions?? |
963 | 963 | $form->addElement( |
964 | 964 | 'select', |
965 | - 'extra_' . $field_details['variable'], |
|
965 | + 'extra_'.$field_details['variable'], |
|
966 | 966 | $field_details['display_text'], |
967 | 967 | $options, |
968 | 968 | array('id' => 'extra_'.$field_details['variable']) |
@@ -1021,7 +1021,7 @@ discard block |
||
1021 | 1021 | |
1022 | 1022 | if (!$admin_permissions) { |
1023 | 1023 | if ($field_details['visible'] == 0) { |
1024 | - $form->freeze('extra_' . $field_details['variable']); |
|
1024 | + $form->freeze('extra_'.$field_details['variable']); |
|
1025 | 1025 | } |
1026 | 1026 | } |
1027 | 1027 | break; |
@@ -1369,9 +1369,9 @@ discard block |
||
1369 | 1369 | |
1370 | 1370 | if (is_array($extraData) && array_key_exists($fieldVariable, $extraData)) { |
1371 | 1371 | |
1372 | - if (file_exists(api_get_path(SYS_UPLOAD_PATH) . $extraData[$fieldVariable])) { |
|
1372 | + if (file_exists(api_get_path(SYS_UPLOAD_PATH).$extraData[$fieldVariable])) { |
|
1373 | 1373 | $fieldTexts[] = Display::img( |
1374 | - api_get_path(WEB_UPLOAD_PATH) . $extraData[$fieldVariable], |
|
1374 | + api_get_path(WEB_UPLOAD_PATH).$extraData[$fieldVariable], |
|
1375 | 1375 | $field_details['display_text'], |
1376 | 1376 | array('width' => '300') |
1377 | 1377 | ); |
@@ -1388,10 +1388,10 @@ discard block |
||
1388 | 1388 | $form->applyFilter('extra_'.$field_details['variable'], 'stripslashes'); |
1389 | 1389 | $form->applyFilter('extra_'.$field_details['variable'], 'trim'); |
1390 | 1390 | |
1391 | - $allowed_picture_types = array ('jpg', 'jpeg', 'png', 'gif'); |
|
1391 | + $allowed_picture_types = array('jpg', 'jpeg', 'png', 'gif'); |
|
1392 | 1392 | $form->addRule( |
1393 | 1393 | 'extra_'.$field_details['variable'], |
1394 | - get_lang('OnlyImagesAllowed') . ' ('.implode(',', $allowed_picture_types).')', |
|
1394 | + get_lang('OnlyImagesAllowed').' ('.implode(',', $allowed_picture_types).')', |
|
1395 | 1395 | 'filetype', |
1396 | 1396 | $allowed_picture_types |
1397 | 1397 | ); |
@@ -1433,10 +1433,10 @@ discard block |
||
1433 | 1433 | if (is_array($extraData) && |
1434 | 1434 | array_key_exists($fieldVariable, $extraData) |
1435 | 1435 | ) { |
1436 | - if (file_exists(api_get_path(SYS_UPLOAD_PATH) . $extraData[$fieldVariable])) { |
|
1436 | + if (file_exists(api_get_path(SYS_UPLOAD_PATH).$extraData[$fieldVariable])) { |
|
1437 | 1437 | $fieldTexts[] = Display::url( |
1438 | - api_get_path(WEB_UPLOAD_PATH) . $extraData[$fieldVariable], |
|
1439 | - api_get_path(WEB_UPLOAD_PATH) . $extraData[$fieldVariable], |
|
1438 | + api_get_path(WEB_UPLOAD_PATH).$extraData[$fieldVariable], |
|
1439 | + api_get_path(WEB_UPLOAD_PATH).$extraData[$fieldVariable], |
|
1440 | 1440 | array( |
1441 | 1441 | 'title' => $field_details['display_text'], |
1442 | 1442 | 'target' => '_blank' |
@@ -1486,12 +1486,12 @@ discard block |
||
1486 | 1486 | "extra_{$field_details['variable']}", |
1487 | 1487 | $field_details['display_text'] |
1488 | 1488 | ); |
1489 | - $form->applyFilter('extra_' . $field_details['variable'], 'stripslashes'); |
|
1489 | + $form->applyFilter('extra_'.$field_details['variable'], 'stripslashes'); |
|
1490 | 1490 | |
1491 | 1491 | if (!$admin_permissions) { |
1492 | 1492 | if ($field_details['visible'] == 0) { |
1493 | 1493 | $form->freeze( |
1494 | - 'extra_' . $field_details['variable'] |
|
1494 | + 'extra_'.$field_details['variable'] |
|
1495 | 1495 | ); |
1496 | 1496 | } |
1497 | 1497 | } |
@@ -1502,13 +1502,13 @@ discard block |
||
1502 | 1502 | $field_details['display_text'] |
1503 | 1503 | ); |
1504 | 1504 | $form->applyFilter( |
1505 | - 'extra_' . $field_details['variable'], |
|
1505 | + 'extra_'.$field_details['variable'], |
|
1506 | 1506 | 'stripslashes' |
1507 | 1507 | ); |
1508 | 1508 | if (!$admin_permissions) { |
1509 | 1509 | if ($field_details['visible'] == 0) { |
1510 | 1510 | $form->freeze( |
1511 | - 'extra_' . $field_details['variable'] |
|
1511 | + 'extra_'.$field_details['variable'] |
|
1512 | 1512 | ); |
1513 | 1513 | } |
1514 | 1514 | } |
@@ -1518,12 +1518,12 @@ discard block |
||
1518 | 1518 | "extra_{$field_details['variable']}", |
1519 | 1519 | $field_details['display_text'] |
1520 | 1520 | ); |
1521 | - $form->applyFilter('extra_' . $field_details['variable'], 'stripslashes'); |
|
1521 | + $form->applyFilter('extra_'.$field_details['variable'], 'stripslashes'); |
|
1522 | 1522 | |
1523 | 1523 | if (!$admin_permissions) { |
1524 | 1524 | if ($field_details['visible'] == 0) { |
1525 | 1525 | $form->freeze( |
1526 | - 'extra_' . $field_details['variable'] |
|
1526 | + 'extra_'.$field_details['variable'] |
|
1527 | 1527 | ); |
1528 | 1528 | } |
1529 | 1529 | } |
@@ -1534,13 +1534,13 @@ discard block |
||
1534 | 1534 | $field_details['display_text'] |
1535 | 1535 | ); |
1536 | 1536 | $form->applyFilter( |
1537 | - 'extra_' . $field_details['variable'], |
|
1537 | + 'extra_'.$field_details['variable'], |
|
1538 | 1538 | 'stripslashes' |
1539 | 1539 | ); |
1540 | 1540 | if (!$admin_permissions) { |
1541 | 1541 | if ($field_details['visible'] == 0) { |
1542 | 1542 | $form->freeze( |
1543 | - 'extra_' . $field_details['variable'] |
|
1543 | + 'extra_'.$field_details['variable'] |
|
1544 | 1544 | ); |
1545 | 1545 | } |
1546 | 1546 | } |
@@ -2221,19 +2221,19 @@ discard block |
||
2221 | 2221 | break; |
2222 | 2222 | } |
2223 | 2223 | |
2224 | - if (!file_exists(api_get_path(SYS_UPLOAD_PATH) . $valueData['value'])) { |
|
2224 | + if (!file_exists(api_get_path(SYS_UPLOAD_PATH).$valueData['value'])) { |
|
2225 | 2225 | break; |
2226 | 2226 | } |
2227 | 2227 | |
2228 | 2228 | $image = Display::img( |
2229 | - api_get_path(WEB_UPLOAD_PATH) . $valueData['value'], |
|
2229 | + api_get_path(WEB_UPLOAD_PATH).$valueData['value'], |
|
2230 | 2230 | $field['display_text'], |
2231 | 2231 | array('width' => '300') |
2232 | 2232 | ); |
2233 | 2233 | |
2234 | 2234 | $displayedValue = Display::url( |
2235 | 2235 | $image, |
2236 | - api_get_path(WEB_UPLOAD_PATH) . $valueData['value'], |
|
2236 | + api_get_path(WEB_UPLOAD_PATH).$valueData['value'], |
|
2237 | 2237 | array('target' => '_blank') |
2238 | 2238 | ); |
2239 | 2239 | break; |
@@ -2242,13 +2242,13 @@ discard block |
||
2242 | 2242 | break; |
2243 | 2243 | } |
2244 | 2244 | |
2245 | - if (!file_exists(api_get_path(SYS_UPLOAD_PATH) . $valueData['value'])) { |
|
2245 | + if (!file_exists(api_get_path(SYS_UPLOAD_PATH).$valueData['value'])) { |
|
2246 | 2246 | break; |
2247 | 2247 | } |
2248 | 2248 | |
2249 | 2249 | $displayedValue = Display::url( |
2250 | 2250 | get_lang('Download'), |
2251 | - api_get_path(WEB_UPLOAD_PATH) . $valueData['value'], |
|
2251 | + api_get_path(WEB_UPLOAD_PATH).$valueData['value'], |
|
2252 | 2252 | array( |
2253 | 2253 | 'title' => $field['display_text'], |
2254 | 2254 | 'target' => '_blank' |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | $content = '<li class="help">'; |
265 | 265 | $content .= Display::url( |
266 | 266 | Display::return_icon('help.large.png', get_lang('Help')), |
267 | - api_get_path(WEB_CODE_PATH) . 'help/help.php?open=' . $help, |
|
267 | + api_get_path(WEB_CODE_PATH).'help/help.php?open='.$help, |
|
268 | 268 | [ |
269 | 269 | 'class' => 'ajax', |
270 | 270 | 'data-title' => get_lang('Help') |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | 'web_course' => api_get_path(WEB_COURSE_PATH), |
479 | 479 | 'web_main' => api_get_path(WEB_CODE_PATH), |
480 | 480 | 'web_css' => api_get_path(WEB_CSS_PATH), |
481 | - 'web_css_theme' => api_get_path(WEB_CSS_PATH) . 'themes/' . $this->theme . '/', |
|
481 | + 'web_css_theme' => api_get_path(WEB_CSS_PATH).'themes/'.$this->theme.'/', |
|
482 | 482 | 'web_ajax' => api_get_path(WEB_AJAX_PATH), |
483 | 483 | 'web_img' => api_get_path(WEB_IMG_PATH), |
484 | 484 | 'web_plugin' => api_get_path(WEB_PLUGIN_PATH), |
@@ -536,12 +536,12 @@ discard block |
||
536 | 536 | foreach ($bowerCSSFiles as $file) { |
537 | 537 | $css[] = api_get_path(WEB_PATH).'web/assets/'.$file; |
538 | 538 | } |
539 | - $css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/bootstrap-select/css/bootstrap-select.min.css'; |
|
540 | - $css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/chosen/chosen.css'; |
|
541 | - $css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/tag/style.css'; |
|
539 | + $css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/bootstrap-select/css/bootstrap-select.min.css'; |
|
540 | + $css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/chosen/chosen.css'; |
|
541 | + $css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/tag/style.css'; |
|
542 | 542 | |
543 | 543 | if (api_is_global_chat_enabled()) { |
544 | - $css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/chat/css/chat.css'; |
|
544 | + $css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/chat/css/chat.css'; |
|
545 | 545 | } |
546 | 546 | |
547 | 547 | //THEME CSS STYLE |
@@ -608,7 +608,7 @@ discard block |
||
608 | 608 | |
609 | 609 | $style_print = ''; |
610 | 610 | if (is_readable(api_get_path(SYS_CSS_PATH).$this->theme.'/print.css')) { |
611 | - $style_print = api_get_css(api_get_cdn_path(api_get_path(WEB_CSS_PATH) . $this->theme . '/print.css'), |
|
611 | + $style_print = api_get_css(api_get_cdn_path(api_get_path(WEB_CSS_PATH).$this->theme.'/print.css'), |
|
612 | 612 | 'print'); |
613 | 613 | } |
614 | 614 | $this->assign('css_style_print', $style_print); |
@@ -631,10 +631,10 @@ discard block |
||
631 | 631 | |
632 | 632 | $isoCode = api_get_language_isocode(); |
633 | 633 | |
634 | - $selectLink = 'bootstrap-select/js/i18n/defaults-' . $isoCode . '_' . strtoupper($isoCode) . '.min.js'; |
|
634 | + $selectLink = 'bootstrap-select/js/i18n/defaults-'.$isoCode.'_'.strtoupper($isoCode).'.min.js'; |
|
635 | 635 | |
636 | 636 | if ($isoCode == 'en') { |
637 | - $selectLink = 'bootstrap-select/js/i18n/defaults-' . $isoCode . '_US.min.js'; |
|
637 | + $selectLink = 'bootstrap-select/js/i18n/defaults-'.$isoCode.'_US.min.js'; |
|
638 | 638 | } |
639 | 639 | // JS files |
640 | 640 | $js_files = array( |
@@ -684,8 +684,8 @@ discard block |
||
684 | 684 | } |
685 | 685 | |
686 | 686 | if ($isoCode != 'en') { |
687 | - $bowerJsFiles[] = 'jqueryui-timepicker-addon/dist/i18n/jquery-ui-timepicker-' . $isoCode . '.js'; |
|
688 | - $bowerJsFiles[] = 'jquery-ui/ui/minified/i18n/datepicker-' . $isoCode . '.min.js'; |
|
687 | + $bowerJsFiles[] = 'jqueryui-timepicker-addon/dist/i18n/jquery-ui-timepicker-'.$isoCode.'.js'; |
|
688 | + $bowerJsFiles[] = 'jquery-ui/ui/minified/i18n/datepicker-'.$isoCode.'.min.js'; |
|
689 | 689 | } |
690 | 690 | |
691 | 691 | foreach ($bowerJsFiles as $file) { |
@@ -766,7 +766,7 @@ discard block |
||
766 | 766 | } |
767 | 767 | |
768 | 768 | $this->assign('online_button', Display::return_icon('statusonline.png', null, null, ICON_SIZE_ATOM)); |
769 | - $this->assign('offline_button',Display::return_icon('statusoffline.png', null, null, ICON_SIZE_ATOM)); |
|
769 | + $this->assign('offline_button', Display::return_icon('statusoffline.png', null, null, ICON_SIZE_ATOM)); |
|
770 | 770 | |
771 | 771 | // Get language iso-code for this page - ignore errors |
772 | 772 | $this->assign('document_language', api_get_language_isocode()); |
@@ -825,15 +825,15 @@ discard block |
||
825 | 825 | $this->assign('section_name', 'section-'.$this_section); |
826 | 826 | |
827 | 827 | //Defaul root chamilo favicon |
828 | - $favico = '<link rel="shortcut icon" href="' . api_get_path(WEB_PATH) . 'favicon.ico" type="image/x-icon" />'; |
|
828 | + $favico = '<link rel="shortcut icon" href="'.api_get_path(WEB_PATH).'favicon.ico" type="image/x-icon" />'; |
|
829 | 829 | |
830 | 830 | //Added to verify if in the current Chamilo Theme exist a favicon |
831 | - $favicoThemeUrl = api_get_path(SYS_CSS_PATH) . 'themes/' . $this->theme . '/images/'; |
|
831 | + $favicoThemeUrl = api_get_path(SYS_CSS_PATH).'themes/'.$this->theme.'/images/'; |
|
832 | 832 | |
833 | 833 | //If exist pick the current chamilo theme favicon |
834 | - if (is_file($favicoThemeUrl . 'favicon.ico')) { |
|
835 | - $favico = '<link rel="shortcut icon" href="' . api_get_path(WEB_CSS_PATH) |
|
836 | - . 'themes/' . $this->theme . '/images/favicon.ico" type="image/x-icon" />'; |
|
834 | + if (is_file($favicoThemeUrl.'favicon.ico')) { |
|
835 | + $favico = '<link rel="shortcut icon" href="'.api_get_path(WEB_CSS_PATH) |
|
836 | + . 'themes/'.$this->theme.'/images/favicon.ico" type="image/x-icon" />'; |
|
837 | 837 | } |
838 | 838 | |
839 | 839 | if (api_is_multiple_url_enabled()) { |
@@ -863,7 +863,7 @@ discard block |
||
863 | 863 | if (api_get_setting('show_link_bug_notification') == 'true' && $this->user_is_logged_in) { |
864 | 864 | $bug_notification_link = '<li class="report"> |
865 | 865 | <a href="http://support.chamilo.org/projects/chamilo-18/wiki/How_to_report_bugs" target="_blank"> |
866 | - '. $iconBug . ' |
|
866 | + '. $iconBug.' |
|
867 | 867 | </a> |
868 | 868 | </li>'; |
869 | 869 | } |
@@ -975,26 +975,26 @@ discard block |
||
975 | 975 | $socialMeta = ''; |
976 | 976 | $metaTitle = api_get_setting('meta_title'); |
977 | 977 | if (!empty($metaTitle)) { |
978 | - $socialMeta .= '<meta name="twitter:card" content="summary" />' . "\n"; |
|
979 | - $socialMeta .= '<meta property="og:title" content="' . $metaTitle . '" />' . "\n"; |
|
980 | - $socialMeta .= '<meta property="og:url" content="' . api_get_path(WEB_PATH) . '" />' . "\n"; |
|
978 | + $socialMeta .= '<meta name="twitter:card" content="summary" />'."\n"; |
|
979 | + $socialMeta .= '<meta property="og:title" content="'.$metaTitle.'" />'."\n"; |
|
980 | + $socialMeta .= '<meta property="og:url" content="'.api_get_path(WEB_PATH).'" />'."\n"; |
|
981 | 981 | $metaDescription = api_get_setting('meta_description'); |
982 | 982 | if (!empty($metaDescription)) { |
983 | - $socialMeta .= '<meta property="og:description" content="' . $metaDescription . '" />' . "\n"; |
|
983 | + $socialMeta .= '<meta property="og:description" content="'.$metaDescription.'" />'."\n"; |
|
984 | 984 | } |
985 | 985 | $metaSite = api_get_setting('meta_twitter_site'); |
986 | 986 | if (!empty($metaSite)) { |
987 | - $socialMeta .= '<meta name="twitter:site" content="' . $metaSite . '" />' . "\n"; |
|
987 | + $socialMeta .= '<meta name="twitter:site" content="'.$metaSite.'" />'."\n"; |
|
988 | 988 | $metaCreator = api_get_setting('meta_twitter_creator'); |
989 | 989 | if (!empty($metaCreator)) { |
990 | - $socialMeta .= '<meta name="twitter:creator" content="' . $metaCreator . '" />' . "\n"; |
|
990 | + $socialMeta .= '<meta name="twitter:creator" content="'.$metaCreator.'" />'."\n"; |
|
991 | 991 | } |
992 | 992 | } |
993 | 993 | $metaImage = api_get_setting('meta_image_path'); |
994 | 994 | if (!empty($metaImage)) { |
995 | - if (is_file(api_get_path(SYS_PATH) . $metaImage)) { |
|
996 | - $path = api_get_path(WEB_PATH) . $metaImage; |
|
997 | - $socialMeta .= '<meta property="og:image" content="' . $path . '" />' . "\n"; |
|
995 | + if (is_file(api_get_path(SYS_PATH).$metaImage)) { |
|
996 | + $path = api_get_path(WEB_PATH).$metaImage; |
|
997 | + $socialMeta .= '<meta property="og:image" content="'.$path.'" />'."\n"; |
|
998 | 998 | } |
999 | 999 | } |
1000 | 1000 | } |
@@ -1027,7 +1027,7 @@ discard block |
||
1027 | 1027 | // Tutor name |
1028 | 1028 | if (api_get_setting('show_tutor_data') == 'true') { |
1029 | 1029 | // Course manager |
1030 | - $courseId = api_get_course_int_id(); |
|
1030 | + $courseId = api_get_course_int_id(); |
|
1031 | 1031 | $id_session = api_get_session_id(); |
1032 | 1032 | if (!empty($courseId)) { |
1033 | 1033 | $tutor_data = ''; |
@@ -1059,7 +1059,7 @@ discard block |
||
1059 | 1059 | $courseId = api_get_course_int_id(); |
1060 | 1060 | if (!empty($courseId)) { |
1061 | 1061 | $teacher_data = ''; |
1062 | - $mail= CourseManager::get_emails_of_tutors_to_course($courseId); |
|
1062 | + $mail = CourseManager::get_emails_of_tutors_to_course($courseId); |
|
1063 | 1063 | if (!empty($mail)) { |
1064 | 1064 | $teachers_parsed = array(); |
1065 | 1065 | foreach ($mail as $value) { |
@@ -1293,7 +1293,7 @@ discard block |
||
1293 | 1293 | 'sessionVar' => basename(__FILE__, '.php'), |
1294 | 1294 | 'imageOptions' => array( |
1295 | 1295 | 'font_size' => 20, |
1296 | - 'font_path' => api_get_path(SYS_FONTS_PATH) . 'opensans/', |
|
1296 | + 'font_path' => api_get_path(SYS_FONTS_PATH).'opensans/', |
|
1297 | 1297 | 'font_file' => 'OpenSans-Regular.ttf', |
1298 | 1298 | //'output' => 'gif' |
1299 | 1299 | ) |