@@ -488,7 +488,7 @@ |
||
488 | 488 | $remind_list |
489 | 489 | ); |
490 | 490 | |
491 | - // Destruction of the Question object |
|
491 | + // Destruction of the Question object |
|
492 | 492 | unset($objQuestionTmp); |
493 | 493 | if ($debug) { |
494 | 494 | error_log(" -- end question -- "); |
@@ -731,7 +731,7 @@ discard block |
||
731 | 731 | } |
732 | 732 | |
733 | 733 | break; |
734 | - case 'get_user_skill_ranking': |
|
734 | + case 'get_user_skill_ranking': |
|
735 | 735 | $columns = array('photo', 'firstname', 'lastname', 'skills_acquired', 'currently_learning', 'rank'); |
736 | 736 | $result = $skill->get_user_list_skill_ranking($start, $limit, $sidx, $sord, $whereCondition); |
737 | 737 | $result = msort($result, 'skills_acquired', 'asc'); |
@@ -1281,7 +1281,7 @@ discard block |
||
1281 | 1281 | |
1282 | 1282 | if (!empty($item['certif_min_score']) && !empty($item['document_id'])) { |
1283 | 1283 | $item['certificates'] = Display::return_icon('accept.png', get_lang('WithCertificate'), array(), ICON_SIZE_SMALL); |
1284 | - $item['has_certificates'] = '1'; |
|
1284 | + $item['has_certificates'] = '1'; |
|
1285 | 1285 | } else { |
1286 | 1286 | $item['certificates'] = Display::return_icon('warning.png', get_lang('NoCertificate'), array(), ICON_SIZE_SMALL); |
1287 | 1287 | $item['has_certificates'] = '0'; |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /* For licensing terms, see /license.txt */ |
3 | 3 | /** |
4 | - * Responses to AJAX calls |
|
5 | - */ |
|
4 | + * Responses to AJAX calls |
|
5 | + */ |
|
6 | 6 | |
7 | 7 | require_once '../global.inc.php'; |
8 | 8 | require_once api_get_path(SYS_CODE_PATH).'work/work.lib.php'; |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /* For licensing terms, see /license.txt */ |
3 | 3 | /** |
4 | - * Responses to AJAX calls |
|
5 | - */ |
|
4 | + * Responses to AJAX calls |
|
5 | + */ |
|
6 | 6 | |
7 | 7 | require_once '../global.inc.php'; |
8 | 8 |
@@ -758,7 +758,7 @@ |
||
758 | 758 | // $gidReset = true; |
759 | 759 | } // end else |
760 | 760 | |
761 | - // Now check for anonymous user mode |
|
761 | + // Now check for anonymous user mode |
|
762 | 762 | if (isset($use_anonymous) && $use_anonymous) { |
763 | 763 | //if anonymous mode is set, then try to set the current user as anonymous |
764 | 764 | //if he doesn't have a login yet |
@@ -1229,13 +1229,13 @@ discard block |
||
1229 | 1229 | } |
1230 | 1230 | |
1231 | 1231 | /** |
1232 | - * Get the users by ID |
|
1233 | - * @param array $ids student ids |
|
1234 | - * @param string $active |
|
1235 | - * @param string $order |
|
1236 | - * @param string $limit |
|
1237 | - * @return array $result student information |
|
1238 | - */ |
|
1232 | + * Get the users by ID |
|
1233 | + * @param array $ids student ids |
|
1234 | + * @param string $active |
|
1235 | + * @param string $order |
|
1236 | + * @param string $limit |
|
1237 | + * @return array $result student information |
|
1238 | + */ |
|
1239 | 1239 | public static function get_user_list_by_ids($ids = array(), $active = null, $order = null, $limit = null) |
1240 | 1240 | { |
1241 | 1241 | if (empty($ids)) { |
@@ -3332,12 +3332,12 @@ discard block |
||
3332 | 3332 | if ($tag_id == 0) { |
3333 | 3333 | //the tag doesn't exist |
3334 | 3334 | $sql = "INSERT INTO $table_user_tag (tag, field_id,count) VALUES ('$tag','$field_id', count + 1)"; |
3335 | - Database::query($sql); |
|
3335 | + Database::query($sql); |
|
3336 | 3336 | $last_insert_id = Database::insert_id(); |
3337 | 3337 | } else { |
3338 | 3338 | //the tag exists we update it |
3339 | 3339 | $sql = "UPDATE $table_user_tag SET count = count + 1 WHERE id = $tag_id"; |
3340 | - Database::query($sql); |
|
3340 | + Database::query($sql); |
|
3341 | 3341 | $last_insert_id = $tag_id; |
3342 | 3342 | } |
3343 | 3343 | |
@@ -3532,9 +3532,9 @@ discard block |
||
3532 | 3532 | } |
3533 | 3533 | |
3534 | 3534 | /** |
3535 | - * Get extra filtrable user fields (only type select) |
|
3536 | - * @return array |
|
3537 | - */ |
|
3535 | + * Get extra filtrable user fields (only type select) |
|
3536 | + * @return array |
|
3537 | + */ |
|
3538 | 3538 | public static function get_extra_filtrable_fields() |
3539 | 3539 | { |
3540 | 3540 | $extraFieldList = UserManager::get_extra_fields(); |
@@ -3559,9 +3559,9 @@ discard block |
||
3559 | 3559 | } |
3560 | 3560 | |
3561 | 3561 | /** |
3562 | - * Get extra where clauses for finding users based on extra filtrable user fields (type select) |
|
3563 | - * @return string With AND clauses based on user's ID which have the values to search in extra user fields |
|
3564 | - */ |
|
3562 | + * Get extra where clauses for finding users based on extra filtrable user fields (type select) |
|
3563 | + * @return string With AND clauses based on user's ID which have the values to search in extra user fields |
|
3564 | + */ |
|
3565 | 3565 | public static function get_search_form_where_extra_fields() |
3566 | 3566 | { |
3567 | 3567 | $useExtraFields = false; |
@@ -3869,23 +3869,23 @@ discard block |
||
3869 | 3869 | } |
3870 | 3870 | |
3871 | 3871 | /** |
3872 | - * Get users followed by human resource manager |
|
3873 | - * @param int $userId |
|
3874 | - * @param int $userStatus Filter users by status (STUDENT, COURSEMANAGER, etc) |
|
3875 | - * @param bool $getOnlyUserId |
|
3876 | - * @param bool $getSql |
|
3877 | - * @param bool $getCount |
|
3878 | - * @param int $from |
|
3879 | - * @param int $numberItems |
|
3880 | - * @param int $column |
|
3881 | - * @param string $direction |
|
3882 | - * @param int $active |
|
3883 | - * @param string $lastConnectionDate |
|
3884 | - * @param int $status the function is called by who? COURSEMANAGER, DRH? |
|
3885 | - * @param string $keyword |
|
3872 | + * Get users followed by human resource manager |
|
3873 | + * @param int $userId |
|
3874 | + * @param int $userStatus Filter users by status (STUDENT, COURSEMANAGER, etc) |
|
3875 | + * @param bool $getOnlyUserId |
|
3876 | + * @param bool $getSql |
|
3877 | + * @param bool $getCount |
|
3878 | + * @param int $from |
|
3879 | + * @param int $numberItems |
|
3880 | + * @param int $column |
|
3881 | + * @param string $direction |
|
3882 | + * @param int $active |
|
3883 | + * @param string $lastConnectionDate |
|
3884 | + * @param int $status the function is called by who? COURSEMANAGER, DRH? |
|
3885 | + * @param string $keyword |
|
3886 | 3886 | * |
3887 | - * @return array user list |
|
3888 | - */ |
|
3887 | + * @return array user list |
|
3888 | + */ |
|
3889 | 3889 | public static function getUsersFollowedByUser( |
3890 | 3890 | $userId, |
3891 | 3891 | $userStatus = null, |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Integrate svg-edit with Chamilo |
|
4 | - * @author Juan Carlos Raña Trabado |
|
5 | - * @since 25/september/2010 |
|
6 | - */ |
|
3 | + * Integrate svg-edit with Chamilo |
|
4 | + * @author Juan Carlos Raña Trabado |
|
5 | + * @since 25/september/2010 |
|
6 | + */ |
|
7 | 7 | |
8 | 8 | require_once '../../../inc/global.inc.php';//hack for Chamilo |
9 | 9 | api_protect_course_script(); |
@@ -10,29 +10,29 @@ |
||
10 | 10 | * Copyright(c) 2010 Alexis Deveria |
11 | 11 | * |
12 | 12 | */ |
13 | - // Very minimal PHP file, all we do is Base64 encode the uploaded file and |
|
14 | - // return it to the editor |
|
13 | + // Very minimal PHP file, all we do is Base64 encode the uploaded file and |
|
14 | + // return it to the editor |
|
15 | 15 | |
16 | - $type = $_REQUEST['type']; |
|
17 | - if (!in_array($type, array('load_svg', 'import_svg', 'import_img'))) { |
|
18 | - exit; |
|
19 | - } |
|
20 | - require('allowedMimeTypes.php'); |
|
16 | + $type = $_REQUEST['type']; |
|
17 | + if (!in_array($type, array('load_svg', 'import_svg', 'import_img'))) { |
|
18 | + exit; |
|
19 | + } |
|
20 | + require('allowedMimeTypes.php'); |
|
21 | 21 | |
22 | - $file = $_FILES['svg_file']['tmp_name']; |
|
22 | + $file = $_FILES['svg_file']['tmp_name']; |
|
23 | 23 | |
24 | - $output = file_get_contents($file); |
|
24 | + $output = file_get_contents($file); |
|
25 | 25 | |
26 | - $prefix = ''; |
|
26 | + $prefix = ''; |
|
27 | 27 | |
28 | - // Make Data URL prefix for import image |
|
29 | - if ($type == 'import_img') { |
|
30 | - $info = getimagesize($file); |
|
31 | - if (!in_array($info['mime'], $allowedMimeTypesBySuffix)) { |
|
32 | - exit; |
|
33 | - } |
|
34 | - $prefix = 'data:' . $info['mime'] . ';base64,'; |
|
35 | - } |
|
28 | + // Make Data URL prefix for import image |
|
29 | + if ($type == 'import_img') { |
|
30 | + $info = getimagesize($file); |
|
31 | + if (!in_array($info['mime'], $allowedMimeTypesBySuffix)) { |
|
32 | + exit; |
|
33 | + } |
|
34 | + $prefix = 'data:' . $info['mime'] . ';base64,'; |
|
35 | + } |
|
36 | 36 | ?> |
37 | 37 | <html xmlns="http://www.w3.org/1999/xhtml"> |
38 | 38 | <head> |
@@ -10,12 +10,12 @@ discard block |
||
10 | 10 | */ |
11 | 11 | exit; |
12 | 12 | function encodeRFC5987ValueChars ($str) { |
13 | - // See http://tools.ietf.org/html/rfc5987#section-3.2.1 |
|
14 | - // For better readability within headers, add back the characters escaped by rawurlencode but still allowable |
|
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]); |
|
18 | - }, rawurlencode($str)); |
|
13 | + // See http://tools.ietf.org/html/rfc5987#section-3.2.1 |
|
14 | + // For better readability within headers, add back the characters escaped by rawurlencode but still allowable |
|
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]); |
|
18 | + }, rawurlencode($str)); |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | require('allowedMimeTypes.php'); |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | $mime = !isset($_POST['mime']) || !in_array($_POST['mime'], $allowedMimeTypesBySuffix) ? 'image/svg+xml;charset=UTF-8' : $_POST['mime']; |
24 | 24 | |
25 | 25 | if (!isset($_POST['output_svg']) && !isset($_POST['output_img'])) { |
26 | - die('post fail'); |
|
26 | + die('post fail'); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | $file = ''; |
@@ -31,17 +31,17 @@ discard block |
||
31 | 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') { |
40 | - $contents = $_POST['output_svg']; |
|
40 | + $contents = $_POST['output_svg']; |
|
41 | 41 | } else { |
42 | - $contents = $_POST['output_img']; |
|
43 | - $pos = (strpos($contents, 'base64,') + 7); |
|
44 | - $contents = base64_decode(substr($contents, $pos)); |
|
42 | + $contents = $_POST['output_img']; |
|
43 | + $pos = (strpos($contents, 'base64,') + 7); |
|
44 | + $contents = base64_decode(substr($contents, $pos)); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | header("Cache-Control: public"); |
@@ -49,8 +49,8 @@ discard block |
||
49 | 49 | |
50 | 50 | // See http://tools.ietf.org/html/rfc6266#section-4.1 |
51 | 51 | header("Content-Disposition: attachment; filename*=UTF-8''" . encodeRFC5987ValueChars( |
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 | - $file |
|
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 | + $file |
|
54 | 54 | )); |
55 | 55 | header("Content-Type: " . $mime); |
56 | 56 | header("Content-Transfer-Encoding: binary"); |