Completed
Push — 1.11.x ( 78f130...f6f5c2 )
by José
50:40 queued 24:26
created
main/lp/lp_add.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 }
74 74
 
75 75
 if (!empty($gradebook) && $gradebook == 'view') {
76
-    $interbreadcrumb[]= array (
76
+    $interbreadcrumb[] = array(
77 77
         'url' => '../gradebook/'.$_SESSION['gradebook_dest'],
78 78
         'name' => get_lang('ToolGradebook')
79 79
     );
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 $form = new FormValidator(
98 98
     'lp_add',
99 99
     'post',
100
-    api_get_path(WEB_CODE_PATH) . 'lp/lp_controller.php?'.api_get_cidreq()
100
+    api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?'.api_get_cidreq()
101 101
 );
102 102
 
103 103
 // Form title
@@ -126,17 +126,17 @@  discard block
 block discarded – undo
126 126
 
127 127
 // Start date
128 128
 $form->addElement('checkbox', 'activate_start_date_check', null, get_lang('EnableStartTime'), array('onclick' => 'activate_start_date()'));
129
-$form->addElement('html','<div id="start_date_div" style="display:block;">');
129
+$form->addElement('html', '<div id="start_date_div" style="display:block;">');
130 130
 $form->addDatePicker('publicated_on', get_lang('PublicationDate'));
131
-$form->addElement('html','</div>');
131
+$form->addElement('html', '</div>');
132 132
 
133 133
 //End date
134 134
 $form->addElement('checkbox', 'activate_end_date_check', null, get_lang('EnableEndTime'), array('onclick' => 'activate_end_date()'));
135
-$form->addElement('html','<div id="end_date_div" style="display:none;">');
135
+$form->addElement('html', '<div id="end_date_div" style="display:none;">');
136 136
 $form->addDatePicker('expired_on', get_lang('ExpirationDate'));
137
-$form->addElement('html','</div>');
137
+$form->addElement('html', '</div>');
138 138
 
139
-$form->addElement('html','</div>');
139
+$form->addElement('html', '</div>');
140 140
 
141 141
 $defaults['activate_start_date_check']  = 1;
142 142
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 }
148 148
 
149 149
 $defaults['publicated_on'] = date('Y-m-d 08:00:00');
150
-$defaults['expired_on'] = date('Y-m-d 08:00:00',time()+86400);
150
+$defaults['expired_on'] = date('Y-m-d 08:00:00', time() + 86400);
151 151
 
152 152
 $form->setDefaults($defaults);
153 153
 $form->addButtonCreate(get_lang('CreateLearningPath'));
Please login to merge, or discard this patch.
main/document/record_audio.php 2 patches
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -18,11 +18,11 @@  discard block
 block discarded – undo
18 18
 
19 19
 $document_data = DocumentManager::get_document_data_by_id($_GET['id'], api_get_course_id(), true);
20 20
 if (empty($document_data)) {
21
-	if (api_is_in_group()) {
22
-		$group_properties   = GroupManager::get_group_properties(api_get_group_id());
23
-		$document_id        = DocumentManager::get_document_id(api_get_course_info(), $group_properties['directory']);
24
-		$document_data      = DocumentManager::get_document_data_by_id($document_id, api_get_course_id());
25
-	}
21
+    if (api_is_in_group()) {
22
+        $group_properties   = GroupManager::get_group_properties(api_get_group_id());
23
+        $document_id        = DocumentManager::get_document_id(api_get_course_info(), $group_properties['directory']);
24
+        $document_data      = DocumentManager::get_document_data_by_id($document_id, api_get_course_id());
25
+    }
26 26
 }
27 27
 
28 28
 $document_id = $document_data['id'];
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 //make some vars
32 32
 $wamidir = $dir;
33 33
 if ($wamidir == "/") {
34
-	$wamidir = "";
34
+    $wamidir = "";
35 35
 }
36 36
 $wamiurlplay = api_get_path(WEB_COURSE_PATH).api_get_course_path().'/document'.$wamidir."/";
37 37
 $groupId = api_get_group_id();
@@ -41,48 +41,48 @@  discard block
 block discarded – undo
41 41
 // Please, do not modify this dirname formatting
42 42
 
43 43
 if (strstr($dir, '..')) {
44
-	$dir = '/';
44
+    $dir = '/';
45 45
 }
46 46
 
47 47
 if ($dir[0] == '.') {
48
-	$dir = substr($dir, 1);
48
+    $dir = substr($dir, 1);
49 49
 }
50 50
 
51 51
 if ($dir[0] != '/') {
52
-	$dir = '/'.$dir;
52
+    $dir = '/'.$dir;
53 53
 }
54 54
 
55 55
 if ($dir[strlen($dir) - 1] != '/') {
56
-	$dir .= '/';
56
+    $dir .= '/';
57 57
 }
58 58
 
59 59
 $filepath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document'.$dir;
60 60
 
61 61
 if (!is_dir($filepath)) {
62
-	$filepath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document/';
63
-	$dir = '/';
62
+    $filepath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document/';
63
+    $dir = '/';
64 64
 }
65 65
 
66 66
 //groups //TODO: clean
67 67
 if (!empty($groupId)) {
68
-	$interbreadcrumb[] = array ("url" => "../group/group_space.php?".api_get_cidreq(), "name" => get_lang('GroupSpace'));
69
-	$noPHP_SELF = true;
70
-	$group = GroupManager :: get_group_properties($groupId);
71
-	$path = explode('/', $dir);
72
-	if ('/'.$path[1] != $group['directory']) {
73
-		api_not_allowed(true);
74
-	}
68
+    $interbreadcrumb[] = array ("url" => "../group/group_space.php?".api_get_cidreq(), "name" => get_lang('GroupSpace'));
69
+    $noPHP_SELF = true;
70
+    $group = GroupManager :: get_group_properties($groupId);
71
+    $path = explode('/', $dir);
72
+    if ('/'.$path[1] != $group['directory']) {
73
+        api_not_allowed(true);
74
+    }
75 75
 }
76 76
 
77 77
 $interbreadcrumb[] = array("url" => "./document.php?id=".$document_id.'&'.api_get_cidreq(), "name" => get_lang('Documents'));
78 78
 
79 79
 if (!$is_allowed_in_course) {
80
-	api_not_allowed(true);
80
+    api_not_allowed(true);
81 81
 }
82 82
 
83 83
 if (!($is_allowed_to_edit || $_SESSION['group_member_with_upload_rights'] ||
84
-	DocumentManager::is_my_shared_folder(api_get_user_id(), Security::remove_XSS($dir),api_get_session_id()))) {
85
-	api_not_allowed(true);
84
+    DocumentManager::is_my_shared_folder(api_get_user_id(), Security::remove_XSS($dir),api_get_session_id()))) {
85
+    api_not_allowed(true);
86 86
 }
87 87
 
88 88
 /*	Header */
@@ -90,26 +90,26 @@  discard block
 block discarded – undo
90 90
 
91 91
 $display_dir = $dir;
92 92
 if (isset ($group)) {
93
-	$display_dir = explode('/', $dir);
94
-	unset ($display_dir[0]);
95
-	unset ($display_dir[1]);
96
-	$display_dir = implode('/', $display_dir);
93
+    $display_dir = explode('/', $dir);
94
+    unset ($display_dir[0]);
95
+    unset ($display_dir[1]);
96
+    $display_dir = implode('/', $display_dir);
97 97
 }
98 98
 
99 99
 // Interbreadcrumb for the current directory root path
100 100
 $counter = 0;
101 101
 if (isset($document_data['parents'])) {
102
-	foreach($document_data['parents'] as $document_sub_data) {
103
-		//fixing double group folder in breadcrumb
104
-		if (api_get_group_id()) {
105
-			if ($counter == 0) {
106
-				$counter++;
107
-				continue;
108
-			}
109
-		}
110
-		$interbreadcrumb[] = array('url' => $document_sub_data['document_url'], 'name' => $document_sub_data['title']);
111
-		$counter++;
112
-	}
102
+    foreach($document_data['parents'] as $document_sub_data) {
103
+        //fixing double group folder in breadcrumb
104
+        if (api_get_group_id()) {
105
+            if ($counter == 0) {
106
+                $counter++;
107
+                continue;
108
+            }
109
+        }
110
+        $interbreadcrumb[] = array('url' => $document_sub_data['document_url'], 'name' => $document_sub_data['title']);
111
+        $counter++;
112
+    }
113 113
 }
114 114
 
115 115
 //make some vars
@@ -121,12 +121,12 @@  discard block
 block discarded – undo
121 121
 $htmlHeadXtra[] = '<script type="text/javascript" src="' . api_get_path(WEB_LIBRARY_PATH) . 'swfobject/swfobject.js"></script>';
122 122
 
123 123
 $actions = Display::toolbarButton(
124
-	get_lang('BackTo') . ' ' . get_lang('DocumentsOverview'),
125
-	'document.php?' . api_get_cidreq() . "&id=$document_id",
126
-	'arrow-left',
127
-	'default',
128
-	[],
129
-	false
124
+    get_lang('BackTo') . ' ' . get_lang('DocumentsOverview'),
125
+    'document.php?' . api_get_cidreq() . "&id=$document_id",
126
+    'arrow-left',
127
+    'default',
128
+    [],
129
+    false
130 130
 );
131 131
 
132 132
 $template = new Template($nameTools);
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
 //groups //TODO: clean
67 67
 if (!empty($groupId)) {
68
-	$interbreadcrumb[] = array ("url" => "../group/group_space.php?".api_get_cidreq(), "name" => get_lang('GroupSpace'));
68
+	$interbreadcrumb[] = array("url" => "../group/group_space.php?".api_get_cidreq(), "name" => get_lang('GroupSpace'));
69 69
 	$noPHP_SELF = true;
70 70
 	$group = GroupManager :: get_group_properties($groupId);
71 71
 	$path = explode('/', $dir);
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 }
82 82
 
83 83
 if (!($is_allowed_to_edit || $_SESSION['group_member_with_upload_rights'] ||
84
-	DocumentManager::is_my_shared_folder(api_get_user_id(), Security::remove_XSS($dir),api_get_session_id()))) {
84
+	DocumentManager::is_my_shared_folder(api_get_user_id(), Security::remove_XSS($dir), api_get_session_id()))) {
85 85
 	api_not_allowed(true);
86 86
 }
87 87
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 // Interbreadcrumb for the current directory root path
100 100
 $counter = 0;
101 101
 if (isset($document_data['parents'])) {
102
-	foreach($document_data['parents'] as $document_sub_data) {
102
+	foreach ($document_data['parents'] as $document_sub_data) {
103 103
 		//fixing double group folder in breadcrumb
104 104
 		if (api_get_group_id()) {
105 105
 			if ($counter == 0) {
@@ -115,14 +115,14 @@  discard block
 block discarded – undo
115 115
 //make some vars
116 116
 $wamiuserid = api_get_user_id();
117 117
 
118
-$htmlHeadXtra[] = '<script src="' . api_get_path(WEB_LIBRARY_JS_PATH) . 'rtc/RecordRTC.js"></script>';
119
-$htmlHeadXtra[] = '<script src="' . api_get_path(WEB_LIBRARY_PATH) . 'wami-recorder/recorder.js"></script>';
120
-$htmlHeadXtra[] = '<script src="' . api_get_path(WEB_LIBRARY_PATH) . 'wami-recorder/gui.js"></script>';
121
-$htmlHeadXtra[] = '<script type="text/javascript" src="' . api_get_path(WEB_LIBRARY_PATH) . 'swfobject/swfobject.js"></script>';
118
+$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_JS_PATH).'rtc/RecordRTC.js"></script>';
119
+$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'wami-recorder/recorder.js"></script>';
120
+$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'wami-recorder/gui.js"></script>';
121
+$htmlHeadXtra[] = '<script type="text/javascript" src="'.api_get_path(WEB_LIBRARY_PATH).'swfobject/swfobject.js"></script>';
122 122
 
123 123
 $actions = Display::toolbarButton(
124
-	get_lang('BackTo') . ' ' . get_lang('DocumentsOverview'),
125
-	'document.php?' . api_get_cidreq() . "&id=$document_id",
124
+	get_lang('BackTo').' '.get_lang('DocumentsOverview'),
125
+	'document.php?'.api_get_cidreq()."&id=$document_id",
126 126
 	'arrow-left',
127 127
 	'default',
128 128
 	[],
Please login to merge, or discard this patch.
main/inc/lib/extra_field.lib.php 3 patches
Doc Comments   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     }
141 141
 
142 142
     /**
143
-     * @return array
143
+     * @return string[]
144 144
      */
145 145
     public static function getValidExtraFieldTypes()
146 146
     {
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 
218 218
     /**
219 219
      * @param array $conditions
220
-     * @param null  $order_field_options_by
220
+     * @param string  $order_field_options_by
221 221
      *
222 222
      * @return array
223 223
      */
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
     /**
376 376
      * @param string $handler
377 377
      *
378
-     * @return array
378
+     * @return string[]
379 379
      */
380 380
     public static function get_extra_fields_by_handler($handler)
381 381
     {
@@ -574,7 +574,7 @@  discard block
 block discarded – undo
574 574
     }
575 575
 
576 576
     /**
577
-     * @return array
577
+     * @return string[]
578 578
      */
579 579
     public function get_field_types()
580 580
     {
@@ -584,7 +584,7 @@  discard block
 block discarded – undo
584 584
     /**
585 585
      * @param int $id
586 586
      *
587
-     * @return null
587
+     * @return string|null
588 588
      */
589 589
     public function get_field_type_by_id($id)
590 590
     {
@@ -1826,7 +1826,7 @@  discard block
 block discarded – undo
1826 1826
     }
1827 1827
 
1828 1828
     /**
1829
-     * @return array
1829
+     * @return string[]
1830 1830
      */
1831 1831
     public function getJqgridColumnNames()
1832 1832
     {
@@ -2086,7 +2086,7 @@  discard block
 block discarded – undo
2086 2086
     }
2087 2087
 
2088 2088
     /**
2089
-     * @param array $columns
2089
+     * @param string[] $columns
2090 2090
      * @param array  $column_model
2091 2091
      * @param array  $extraFields
2092 2092
      * @return array
Please login to merge, or discard this patch.
Spacing   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -27,19 +27,19 @@  discard block
 block discarded – undo
27 27
     );
28 28
 
29 29
     public $ops = array(
30
-        'eq' => '=',        //equal
31
-        'ne' => '<>',       //not equal
32
-        'lt' => '<',        //less than
33
-        'le' => '<=',       //less than or equal
34
-        'gt' => '>',        //greater than
35
-        'ge' => '>=',       //greater than or equal
36
-        'bw' => 'LIKE',     //begins with
30
+        'eq' => '=', //equal
31
+        'ne' => '<>', //not equal
32
+        'lt' => '<', //less than
33
+        'le' => '<=', //less than or equal
34
+        'gt' => '>', //greater than
35
+        'ge' => '>=', //greater than or equal
36
+        'bw' => 'LIKE', //begins with
37 37
         'bn' => 'NOT LIKE', //doesn't begin with
38
-        'in' => 'LIKE',     //is in
38
+        'in' => 'LIKE', //is in
39 39
         'ni' => 'NOT LIKE', //is not in
40
-        'ew' => 'LIKE',     //ends with
40
+        'ew' => 'LIKE', //ends with
41 41
         'en' => 'NOT LIKE', //doesn't end with
42
-        'cn' => 'LIKE',     //contains
42
+        'cn' => 'LIKE', //contains
43 43
         'nc' => 'NOT LIKE'  //doesn't contain
44 44
     );
45 45
 
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
      */
385 385
     public static function get_extra_fields_by_handler($handler)
386 386
     {
387
-        $types= array();
387
+        $types = array();
388 388
         $types[self::FIELD_TYPE_TEXT] = get_lang('FieldTypeText');
389 389
         $types[self::FIELD_TYPE_TEXTAREA] = get_lang('FieldTypeTextarea');
390 390
         $types[self::FIELD_TYPE_RADIO] = get_lang('FieldTypeRadio');
@@ -1073,7 +1073,7 @@  discard block
 block discarded – undo
1073 1073
                         // chzn-select doesn't work for sessions??
1074 1074
                         $form->addElement(
1075 1075
                             'select',
1076
-                            'extra_' . $field_details['variable'],
1076
+                            'extra_'.$field_details['variable'],
1077 1077
                             $field_details['display_text'],
1078 1078
                             $options,
1079 1079
                             array('id' => 'extra_'.$field_details['variable'])
@@ -1132,7 +1132,7 @@  discard block
 block discarded – undo
1132 1132
 
1133 1133
                         if (!$admin_permissions) {
1134 1134
                             if ($field_details['visible_to_self'] == 0) {
1135
-                                $form->freeze('extra_' . $field_details['variable']);
1135
+                                $form->freeze('extra_'.$field_details['variable']);
1136 1136
                             }
1137 1137
                         }
1138 1138
                         break;
@@ -1209,7 +1209,7 @@  discard block
 block discarded – undo
1209 1209
                             }
1210 1210
                         });';
1211 1211
 
1212
-                        $first_id  = null;
1212
+                        $first_id = null;
1213 1213
                         if (!empty($extraData)) {
1214 1214
                             if (isset($extraData['extra_'.$field_details['variable']])) {
1215 1215
                                 $first_id = $extraData['extra_'.$field_details['variable']]['extra_'.$field_details['variable']];
@@ -1469,9 +1469,9 @@  discard block
 block discarded – undo
1469 1469
 
1470 1470
                         if (is_array($extraData) && array_key_exists($fieldVariable, $extraData)) {
1471 1471
 
1472
-                            if (file_exists(api_get_path(SYS_UPLOAD_PATH) . $extraData[$fieldVariable])) {
1472
+                            if (file_exists(api_get_path(SYS_UPLOAD_PATH).$extraData[$fieldVariable])) {
1473 1473
                                 $fieldTexts[] = Display::img(
1474
-                                    api_get_path(WEB_UPLOAD_PATH) . $extraData[$fieldVariable],
1474
+                                    api_get_path(WEB_UPLOAD_PATH).$extraData[$fieldVariable],
1475 1475
                                     $field_details['display_text'],
1476 1476
                                     ['width' => '300']
1477 1477
                                 );
@@ -1494,7 +1494,7 @@  discard block
 block discarded – undo
1494 1494
                         $allowed_picture_types = ['jpg', 'jpeg', 'png', 'gif'];
1495 1495
                         $form->addRule(
1496 1496
                             'extra_'.$field_details['variable'],
1497
-                            get_lang('OnlyImagesAllowed') . ' ('.implode(',', $allowed_picture_types).')',
1497
+                            get_lang('OnlyImagesAllowed').' ('.implode(',', $allowed_picture_types).')',
1498 1498
                             'filetype',
1499 1499
                             $allowed_picture_types
1500 1500
                         );
@@ -1536,10 +1536,10 @@  discard block
 block discarded – undo
1536 1536
                         if (is_array($extraData) &&
1537 1537
                             array_key_exists($fieldVariable, $extraData)
1538 1538
                         ) {
1539
-                            if (file_exists(api_get_path(SYS_UPLOAD_PATH) . $extraData[$fieldVariable])) {
1539
+                            if (file_exists(api_get_path(SYS_UPLOAD_PATH).$extraData[$fieldVariable])) {
1540 1540
                                 $fieldTexts[] = Display::url(
1541
-                                    api_get_path(WEB_UPLOAD_PATH) . $extraData[$fieldVariable],
1542
-                                    api_get_path(WEB_UPLOAD_PATH) . $extraData[$fieldVariable],
1541
+                                    api_get_path(WEB_UPLOAD_PATH).$extraData[$fieldVariable],
1542
+                                    api_get_path(WEB_UPLOAD_PATH).$extraData[$fieldVariable],
1543 1543
                                     array(
1544 1544
                                         'title' => $field_details['display_text'],
1545 1545
                                         'target' => '_blank'
@@ -1579,12 +1579,12 @@  discard block
 block discarded – undo
1579 1579
                             "extra_{$field_details['variable']}",
1580 1580
                             $field_details['display_text']
1581 1581
                         );
1582
-                        $form->applyFilter('extra_' . $field_details['variable'], 'stripslashes');
1582
+                        $form->applyFilter('extra_'.$field_details['variable'], 'stripslashes');
1583 1583
 
1584 1584
                         if (!$admin_permissions) {
1585 1585
                             if ($field_details['visible_to_self'] == 0) {
1586 1586
                                 $form->freeze(
1587
-                                    'extra_' . $field_details['variable']
1587
+                                    'extra_'.$field_details['variable']
1588 1588
                                 );
1589 1589
                             }
1590 1590
                         }
@@ -1595,13 +1595,13 @@  discard block
 block discarded – undo
1595 1595
                             $field_details['display_text']
1596 1596
                         );
1597 1597
                         $form->applyFilter(
1598
-                            'extra_' . $field_details['variable'],
1598
+                            'extra_'.$field_details['variable'],
1599 1599
                             'stripslashes'
1600 1600
                         );
1601 1601
                         if (!$admin_permissions) {
1602 1602
                             if ($field_details['visible_to_self'] == 0) {
1603 1603
                                 $form->freeze(
1604
-                                    'extra_' . $field_details['variable']
1604
+                                    'extra_'.$field_details['variable']
1605 1605
                                 );
1606 1606
                             }
1607 1607
                         }
@@ -1611,12 +1611,12 @@  discard block
 block discarded – undo
1611 1611
                             "extra_{$field_details['variable']}",
1612 1612
                             $field_details['display_text']
1613 1613
                         );
1614
-                        $form->applyFilter('extra_' . $field_details['variable'], 'stripslashes');
1614
+                        $form->applyFilter('extra_'.$field_details['variable'], 'stripslashes');
1615 1615
 
1616 1616
                         if (!$admin_permissions) {
1617 1617
                             if ($field_details['visible_to_self'] == 0) {
1618 1618
                                 $form->freeze(
1619
-                                    'extra_' . $field_details['variable']
1619
+                                    'extra_'.$field_details['variable']
1620 1620
                                 );
1621 1621
                             }
1622 1622
                         }
@@ -1627,13 +1627,13 @@  discard block
 block discarded – undo
1627 1627
                             $field_details['display_text']
1628 1628
                         );
1629 1629
                         $form->applyFilter(
1630
-                            'extra_' . $field_details['variable'],
1630
+                            'extra_'.$field_details['variable'],
1631 1631
                             'stripslashes'
1632 1632
                         );
1633 1633
                         if (!$admin_permissions) {
1634 1634
                             if ($field_details['visible_to_self'] == 0) {
1635 1635
                                 $form->freeze(
1636
-                                    'extra_' . $field_details['variable']
1636
+                                    'extra_'.$field_details['variable']
1637 1637
                                 );
1638 1638
                             }
1639 1639
                         }
@@ -1662,7 +1662,7 @@  discard block
 block discarded – undo
1662 1662
                             '<script>
1663 1663
                                 $(document).ready(function() {
1664 1664
 
1665
-                                    var address = "' . $dataValue . '";
1665
+                                    var address = "' . $dataValue.'";
1666 1666
                                     initializeGeo'.$field_details['variable'].'(address, false);
1667 1667
 
1668 1668
                                     $("#geolocalization_extra_'.$field_details['variable'].'").on("click", function() {
@@ -1694,7 +1694,7 @@  discard block
 block discarded – undo
1694 1694
                                         };
1695 1695
 
1696 1696
                                         var geoError = function(error) {
1697
-                                            alert("Geocode ' . get_lang('Error') . ': " + error);
1697
+                                            alert("Geocode ' . get_lang('Error').': " + error);
1698 1698
                                         };
1699 1699
 
1700 1700
                                         var geoOptions = {
@@ -1745,11 +1745,11 @@  discard block
 block discarded – undo
1745 1745
                                                         infowindow.open(map_'.$field_details['variable'].', marker);
1746 1746
                                                     });
1747 1747
                                                 } else {
1748
-                                                    alert("' . get_lang("NotFound") . '");
1748
+                                                    alert("' . get_lang("NotFound").'");
1749 1749
                                                 }
1750 1750
 
1751 1751
                                             } else {
1752
-                                                alert("Geocode ' . get_lang('Error') . ': " + status);
1752
+                                                alert("Geocode ' . get_lang('Error').': " + status);
1753 1753
                                             }
1754 1754
                                         });
1755 1755
                                     }
@@ -1812,8 +1812,8 @@  discard block
 block discarded – undo
1812 1812
                             '<script>
1813 1813
                                 $(document).ready(function() {
1814 1814
 
1815
-                                    var lat = "' . $lat . '";
1816
-                                    var lng = "' . $lng . '";
1815
+                                    var lat = "' . $lat.'";
1816
+                                    var lng = "' . $lng.'";
1817 1817
                                     var latLng = new google.maps.LatLng(lat, lng);
1818 1818
                                     initializeGeo'.$field_details['variable'].'(false, latLng);
1819 1819
 
@@ -1849,7 +1849,7 @@  discard block
 block discarded – undo
1849 1849
                                         };
1850 1850
 
1851 1851
                                         var geoError = function(error) {
1852
-                                            alert("Geocode ' . get_lang('Error') . ': " + error);
1852
+                                            alert("Geocode ' . get_lang('Error').': " + error);
1853 1853
                                         };
1854 1854
 
1855 1855
                                         var geoOptions = {
@@ -1900,11 +1900,11 @@  discard block
 block discarded – undo
1900 1900
                                                         infowindow.open(map_'.$field_details['variable'].', marker);
1901 1901
                                                     });
1902 1902
                                                 } else {
1903
-                                                    alert("' . get_lang("NotFound") . '");
1903
+                                                    alert("' . get_lang("NotFound").'");
1904 1904
                                                 }
1905 1905
 
1906 1906
                                             } else {
1907
-                                                alert("Geocode ' . get_lang('Error') . ': " + status);
1907
+                                                alert("Geocode ' . get_lang('Error').': " + status);
1908 1908
                                             }
1909 1909
                                         });
1910 1910
                                     }
@@ -2100,7 +2100,7 @@  discard block
 block discarded – undo
2100 2100
         $form->addElement('header', $header);
2101 2101
 
2102 2102
         if ($action == 'edit') {
2103
-            $translateUrl = api_get_path(WEB_CODE_PATH) . 'extrafield/translate.php?' . http_build_query([
2103
+            $translateUrl = api_get_path(WEB_CODE_PATH).'extrafield/translate.php?'.http_build_query([
2104 2104
                 'extra_field' => $id
2105 2105
             ]);
2106 2106
             $translateButton = Display::toolbarButton(get_lang('TranslateThisTerm'), $translateUrl, 'language', 'link');
@@ -2437,7 +2437,7 @@  discard block
 block discarded – undo
2437 2437
                 foreach ($extra_fields as $extra_info) {
2438 2438
                     $extra_field_info = $extra_info['extra_field_info'];
2439 2439
                     $inject_joins .= " INNER JOIN $this->table_field_values fv$counter
2440
-                                       ON (s." . $this->primaryKey . " = fv$counter." . $this->handler_id . ") ";
2440
+                                       ON (s.".$this->primaryKey." = fv$counter.".$this->handler_id.") ";
2441 2441
                     // Add options
2442 2442
                     if (isset($extra_field_info['field_type']) && in_array(
2443 2443
                             $extra_field_info['field_type'],
@@ -2450,7 +2450,7 @@  discard block
 block discarded – undo
2450 2450
                     ) {
2451 2451
                         $options['where'] = str_replace(
2452 2452
                             $extra_info['field'],
2453
-                            'fv' . $counter . '.field_id = ' . $extra_info['id'] . ' AND fvo' . $counter . '.option_value',
2453
+                            'fv'.$counter.'.field_id = '.$extra_info['id'].' AND fvo'.$counter.'.option_value',
2454 2454
                             $options['where']
2455 2455
                         );
2456 2456
                         $inject_joins .= "
@@ -2465,13 +2465,13 @@  discard block
 block discarded – undo
2465 2465
                     ) {
2466 2466
                         $options['where'] = str_replace(
2467 2467
                             $extra_info['field'],
2468
-                            'tag' . $counter . '.tag ',
2468
+                            'tag'.$counter.'.tag ',
2469 2469
                             $options['where']
2470 2470
                         );
2471 2471
 
2472 2472
                         $inject_joins .= "
2473 2473
                             INNER JOIN $this->table_field_rel_tag tag_rel$counter
2474
-                            ON (tag_rel$counter.field_id = ".$extra_info['id']." AND tag_rel$counter.item_id = s." . $this->primaryKey.")
2474
+                            ON (tag_rel$counter.field_id = ".$extra_info['id']." AND tag_rel$counter.item_id = s.".$this->primaryKey.")
2475 2475
                             INNER JOIN $this->table_field_tag tag$counter
2476 2476
                             ON (tag$counter.id =  tag_rel$counter.tag_id)
2477 2477
                         ";
@@ -2676,19 +2676,19 @@  discard block
 block discarded – undo
2676 2676
                         break;
2677 2677
                     }
2678 2678
 
2679
-                    if (!file_exists(api_get_path(SYS_UPLOAD_PATH) . $valueData['value'])) {
2679
+                    if (!file_exists(api_get_path(SYS_UPLOAD_PATH).$valueData['value'])) {
2680 2680
                         break;
2681 2681
                     }
2682 2682
 
2683 2683
                     $image = Display::img(
2684
-                        api_get_path(WEB_UPLOAD_PATH) . $valueData['value'],
2684
+                        api_get_path(WEB_UPLOAD_PATH).$valueData['value'],
2685 2685
                         $field['display_text'],
2686 2686
                         array('width' => '300')
2687 2687
                     );
2688 2688
 
2689 2689
                     $displayedValue = Display::url(
2690 2690
                         $image,
2691
-                        api_get_path(WEB_UPLOAD_PATH) . $valueData['value'],
2691
+                        api_get_path(WEB_UPLOAD_PATH).$valueData['value'],
2692 2692
                         array('target' => '_blank')
2693 2693
                     );
2694 2694
                     break;
@@ -2697,13 +2697,13 @@  discard block
 block discarded – undo
2697 2697
                         break;
2698 2698
                     }
2699 2699
 
2700
-                    if (!file_exists(api_get_path(SYS_UPLOAD_PATH) . $valueData['value'])) {
2700
+                    if (!file_exists(api_get_path(SYS_UPLOAD_PATH).$valueData['value'])) {
2701 2701
                         break;
2702 2702
                     }
2703 2703
 
2704 2704
                     $displayedValue = Display::url(
2705 2705
                         get_lang('Download'),
2706
-                        api_get_path(WEB_UPLOAD_PATH) . $valueData['value'],
2706
+                        api_get_path(WEB_UPLOAD_PATH).$valueData['value'],
2707 2707
                         array(
2708 2708
                             'title' => $field['display_text'],
2709 2709
                             'target' => '_blank'
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
         'changeable',
21 21
         'filter',
22 22
         'extra_field_type',
23
-         /* Enable this when field_loggeable is introduced as a table field (2.0)
23
+            /* Enable this when field_loggeable is introduced as a table field (2.0)
24 24
         'field_loggeable',
25 25
          */
26 26
         'created_at'
@@ -2041,7 +2041,7 @@  discard block
 block discarded – undo
2041 2041
                 'align' => 'left',
2042 2042
                 'sortable' => 'true',
2043 2043
             ),
2044
-             array(
2044
+                array(
2045 2045
                 'name' => 'visible_to_others',
2046 2046
                 'index' => 'visible_to_others',
2047 2047
                 'width' => '40',
Please login to merge, or discard this patch.
main/admin/skill_edit.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 if (!empty($jquery_ready_content)) {
84 84
     $htmlHeadXtra[] = '<script>
85 85
     $(document).ready(function(){
86
-        ' . $jquery_ready_content . '
86
+        ' . $jquery_ready_content.'
87 87
     });
88 88
     </script>';
89 89
 }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         );
113 113
     }
114 114
 
115
-    header('Location: '.api_get_path(WEB_CODE_PATH) . 'admin/skill_list.php');
115
+    header('Location: '.api_get_path(WEB_CODE_PATH).'admin/skill_list.php');
116 116
     exit;
117 117
 }
118 118
 
Please login to merge, or discard this patch.
main/admin/skill_create.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 if (!empty($jquery_ready_content)) {
84 84
     $htmlHeadXtra[] = '<script>
85 85
     $(document).ready(function(){
86
-        ' . $jquery_ready_content . '
86
+        ' . $jquery_ready_content.'
87 87
     });
88 88
     </script>';
89 89
 }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         );
113 113
     }
114 114
 
115
-    header('Location: '.api_get_path(WEB_CODE_PATH) . 'admin/skill_list.php');
115
+    header('Location: '.api_get_path(WEB_CODE_PATH).'admin/skill_list.php');
116 116
     exit;
117 117
 }
118 118
 
Please login to merge, or discard this patch.
main/admin/email_tester.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
         Display::return_message(get_lang('MailingTestSent'), 'warning')
50 50
     );
51 51
 
52
-    header('Location: ' . api_get_self());
52
+    header('Location: '.api_get_self());
53 53
     exit;
54 54
 }
55 55
 
Please login to merge, or discard this patch.
plugin/share_buttons/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 echo '
7 7
 <div class="well well-sm">
8 8
     <!-- AddThis Button BEGIN -->
9
-    <div class="addthis_toolbox addthis_default_style ' . $plugin_info['icon_class'] . '">
9
+    <div class="addthis_toolbox addthis_default_style ' . $plugin_info['icon_class'].'">
10 10
         <a class="addthis_button_preferred_1"></a>
11 11
         <a class="addthis_button_preferred_2"></a>
12 12
         <a class="addthis_button_preferred_3"></a>
Please login to merge, or discard this patch.
main/badge/assign.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         Display::return_message(get_lang('NoUser'), 'error')
34 34
     );
35 35
 
36
-    header('Location: ' . api_get_path(WEB_PATH));
36
+    header('Location: '.api_get_path(WEB_PATH));
37 37
     exit;
38 38
 }
39 39
 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 $htmlHeadXtra[] = '<script>
47 47
 $( document ).ready(function() {
48 48
     $("#skill").on("change", function() {
49
-        $(location).attr("href", "'. $url .'"+$(this).val());
49
+        $(location).attr("href", "'. $url.'"+$(this).val());
50 50
     });
51 51
 });
52 52
 </script>';
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
             Display::return_message(get_lang('SkillNotFound'), 'error')
130 130
         );
131 131
 
132
-        header('Location: ' . api_get_self() . '?' . http_build_query(['user' => $user->getId()]));
132
+        header('Location: '.api_get_self().'?'.http_build_query(['user' => $user->getId()]));
133 133
         exit;
134 134
     }
135 135
 
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
             )
142 142
         );
143 143
 
144
-        header('Location: ' . api_get_self() . '?' . http_build_query(['user' => $user->getId()]));
144
+        header('Location: '.api_get_self().'?'.http_build_query(['user' => $user->getId()]));
145 145
         exit;
146 146
     }
147 147
 
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
         )
166 166
     );
167 167
 
168
-    header('Location: ' . api_get_path(WEB_PATH) . "badge/{$skillUser->getId()}");
168
+    header('Location: '.api_get_path(WEB_PATH)."badge/{$skillUser->getId()}");
169 169
     exit;
170 170
 }
171 171
 
Please login to merge, or discard this patch.
main/auth/external_login/facebook.inc.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -11,10 +11,10 @@  discard block
 block discarded – undo
11 11
  * Please edit the facebook.conf.php file to adapt it to your fb application parameter
12 12
  */
13 13
 
14
-require_once dirname(__FILE__) . '/../../inc/global.inc.php';
15
-require_once dirname(__FILE__) . '/facebook.init.php';
14
+require_once dirname(__FILE__).'/../../inc/global.inc.php';
15
+require_once dirname(__FILE__).'/facebook.init.php';
16 16
 
17
-require_once dirname(__FILE__) . '/functions.inc.php';
17
+require_once dirname(__FILE__).'/functions.inc.php';
18 18
 
19 19
 /**
20 20
  * This function connect to facebook and retrieves the user info
@@ -33,19 +33,19 @@  discard block
 block discarded – undo
33 33
 
34 34
     try {
35 35
         $accessToken = $helper->getAccessToken();
36
-    } catch(Facebook\Exceptions\FacebookResponseException $e) {
36
+    } catch (Facebook\Exceptions\FacebookResponseException $e) {
37 37
         Display::addFlash(
38
-            Display::return_message('Facebook Graph returned an error: ' . $e->getMessage(), 'error')
38
+            Display::return_message('Facebook Graph returned an error: '.$e->getMessage(), 'error')
39 39
         );
40 40
 
41
-        header('Location: ' . api_get_path(WEB_PATH));
41
+        header('Location: '.api_get_path(WEB_PATH));
42 42
         exit;
43
-    } catch(Facebook\Exceptions\FacebookSDKException $e) {
43
+    } catch (Facebook\Exceptions\FacebookSDKException $e) {
44 44
         Display::addFlash(
45
-            Display::return_message('Facebook SDK returned an error: ' . $e->getMessage(), 'error')
45
+            Display::return_message('Facebook SDK returned an error: '.$e->getMessage(), 'error')
46 46
         );
47 47
 
48
-        header('Location: ' . api_get_path(WEB_PATH));
48
+        header('Location: '.api_get_path(WEB_PATH));
49 49
         exit;
50 50
     }
51 51
 
@@ -59,17 +59,17 @@  discard block
 block discarded – undo
59 59
         }
60 60
 
61 61
         $error = implode('<br>', [
62
-            'Error: ' . $helper->getError(),
63
-            'Error Code: ' . $helper->getErrorCode(),
64
-            'Error Reason: ' . $helper->getErrorReason(),
65
-            'Error Description: ' . $helper->getErrorDescription()
62
+            'Error: '.$helper->getError(),
63
+            'Error Code: '.$helper->getErrorCode(),
64
+            'Error Reason: '.$helper->getErrorReason(),
65
+            'Error Description: '.$helper->getErrorDescription()
66 66
         ]);
67 67
 
68 68
         Display::addFlash(
69 69
             Display::return_message($error, 'error', false)
70 70
         );
71 71
 
72
-        header('Location: ' . api_get_path(WEB_PATH));
72
+        header('Location: '.api_get_path(WEB_PATH));
73 73
         exit;
74 74
     }
75 75
 
@@ -83,29 +83,29 @@  discard block
 block discarded – undo
83 83
             $accessToken = $oAuth2Client->getLongLivedAccessToken($accessToken);
84 84
         } catch (Facebook\Exceptions\FacebookSDKException $e) {
85 85
             Display::addFlash(
86
-                Display::return_message('Error getting long-lived access token: ' . $e->getMessage(), 'error')
86
+                Display::return_message('Error getting long-lived access token: '.$e->getMessage(), 'error')
87 87
             );
88 88
 
89
-            header('Location: ' . api_get_path(WEB_PATH));
89
+            header('Location: '.api_get_path(WEB_PATH));
90 90
             exit;
91 91
         }
92 92
     }
93 93
 
94 94
     try {
95 95
         $response = $fb->get('/me?fields=id,first_name,last_name,locale,email', $accessToken->getValue());
96
-    } catch(Facebook\Exceptions\FacebookResponseException $e) {
96
+    } catch (Facebook\Exceptions\FacebookResponseException $e) {
97 97
         Display::addFlash(
98
-            Display::return_message('Graph returned an error: ' . $e->getMessage(), 'error')
98
+            Display::return_message('Graph returned an error: '.$e->getMessage(), 'error')
99 99
         );
100 100
 
101
-        header('Location: ' . api_get_path(WEB_PATH));
101
+        header('Location: '.api_get_path(WEB_PATH));
102 102
         exit;
103
-    } catch(Facebook\Exceptions\FacebookSDKException $e) {
103
+    } catch (Facebook\Exceptions\FacebookSDKException $e) {
104 104
         Display::addFlash(
105
-            Display::return_message('Facebook SDK returned an error: ' . $e->getMessage(), 'error')
105
+            Display::return_message('Facebook SDK returned an error: '.$e->getMessage(), 'error')
106 106
         );
107 107
 
108
-        header('Location: ' . api_get_path(WEB_PATH));
108
+        header('Location: '.api_get_path(WEB_PATH));
109 109
         exit;
110 110
     }
111 111
 
@@ -141,14 +141,14 @@  discard block
 block discarded – undo
141 141
                 Display::return_message(get_lang('UserNotRegistered'), 'error')
142 142
             );
143 143
 
144
-            header('Location: ' . api_get_path(WEB_PATH));
144
+            header('Location: '.api_get_path(WEB_PATH));
145 145
             exit;
146 146
         }
147 147
 
148 148
         $_user['user_id'] = $chamilo_uid;
149 149
         $_SESSION['_user'] = $_user;
150 150
 
151
-        header('Location: ' . api_get_path(WEB_PATH));
151
+        header('Location: '.api_get_path(WEB_PATH));
152 152
         exit();
153 153
     }
154 154
 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
     $_user['user_id'] = $chamilo_uid;
160 160
     $_SESSION['_user'] = $_user;
161 161
 
162
-    header('Location: ' . api_get_path(WEB_PATH));
162
+    header('Location: '.api_get_path(WEB_PATH));
163 163
     exit();
164 164
 }
165 165
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
     ]);
177 177
 
178 178
     $helper = $fb->getRedirectLoginHelper();
179
-    $loginUrl = $helper->getLoginUrl(api_get_path(WEB_PATH) . '?action=fbconnect', [
179
+    $loginUrl = $helper->getLoginUrl(api_get_path(WEB_PATH).'?action=fbconnect', [
180 180
         'email'
181 181
     ]);
182 182
 
Please login to merge, or discard this patch.