Completed
Push — 1.11.x ( 3ca1af...7f27ad )
by José
93:15 queued 54:45
created
main/inc/lib/formvalidator/Element/receivers.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,9 +41,9 @@
 block discarded – undo
41 41
 	 */
42 42
 	function _createElements()
43 43
 	{
44
-		$this->_elements[] = new HTML_QuickForm_Radio('receivers', '', get_lang('Everybody'), '0', array ('onclick' => 'javascript:receivers_hide(\'receivers_to\')'));
44
+		$this->_elements[] = new HTML_QuickForm_Radio('receivers', '', get_lang('Everybody'), '0', array('onclick' => 'javascript:receivers_hide(\'receivers_to\')'));
45 45
 		$this->_elements[0]->setChecked(true);
46
-		$this->_elements[] = new HTML_QuickForm_Radio('receivers', '', get_lang('SelectGroupsUsers'), '1', array ('onclick' => 'javascript:receivers_show(\'receivers_to\')'));
46
+		$this->_elements[] = new HTML_QuickForm_Radio('receivers', '', get_lang('SelectGroupsUsers'), '1', array('onclick' => 'javascript:receivers_show(\'receivers_to\')'));
47 47
 		$this->_elements[] = new HTML_QuickForm_advmultiselect('to', '', $this->receivers);
48 48
 		$this->_elements[2]->setSelected($this->receivers_selected);
49 49
 	}
Please login to merge, or discard this patch.
main/inc/lib/formvalidator/Element/DateRangePicker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
         }
89 89
 
90 90
         $timePicker = 'true';
91
-        $timePickerValue =  $this->getAttribute('timePicker');
91
+        $timePickerValue = $this->getAttribute('timePicker');
92 92
         if (!empty($timePickerValue)) {
93 93
             $timePicker = $timePickerValue;
94 94
         }
Please login to merge, or discard this patch.
main/inc/lib/formvalidator/Element/DatePicker.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -44,12 +44,12 @@  discard block
 block discarded – undo
44 44
             $value = api_format_date($value, DATE_TIME_FORMAT_LONG_24H);
45 45
         }
46 46
 
47
-        return $this->getElementJS() . '
47
+        return $this->getElementJS().'
48 48
             <div class="input-group">
49 49
                 <span class="input-group-addon">
50
-                    <input ' . $this->_getAttrString($this->_attributes) . '>
50
+                    <input ' . $this->_getAttrString($this->_attributes).'>
51 51
                 </span>
52
-                <input class="form-control" type="text" readonly id="' . $id . '_alt" value="' . $value . '">
52
+                <input class="form-control" type="text" readonly id="' . $id.'_alt" value="'.$value.'">
53 53
             </div>
54 54
         ';
55 55
     }
@@ -79,14 +79,14 @@  discard block
 block discarded – undo
79 79
         $js .= "<script>
80 80
             $(function() {
81 81
                 $('#$id').hide().datepicker({
82
-                    defaultDate: '" . $this->getValue() . "',
82
+                    defaultDate: '".$this->getValue()."',
83 83
                     dateFormat: 'yy-mm-dd',
84 84
                     altField: '#{$id}_alt',
85
-                    altFormat: \"" . get_lang('DateFormatLongNoDayJS') . "\",
85
+                    altFormat: \"".get_lang('DateFormatLongNoDayJS')."\",
86 86
                     showOn: 'both',
87
-                    buttonImage: '" . Display::return_icon('attendance.png', null, [], ICON_SIZE_TINY, true, true) . "',
87
+                    buttonImage: '" . Display::return_icon('attendance.png', null, [], ICON_SIZE_TINY, true, true)."',
88 88
                     buttonImageOnly: true,
89
-                    buttonText: '" . get_lang('SelectDate') . "',
89
+                    buttonText: '" . get_lang('SelectDate')."',
90 90
                     changeMonth: true,
91 91
                     changeYear: true,
92 92
                     yearRange: 'c-60y:c+5y'
Please login to merge, or discard this patch.
main/inc/lib/formvalidator/Element/DateTimePicker.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -38,12 +38,12 @@  discard block
 block discarded – undo
38 38
             $value = api_format_date($value, DATE_TIME_FORMAT_LONG_24H);
39 39
         }
40 40
 
41
-        return $this->getElementJS() . '
41
+        return $this->getElementJS().'
42 42
             <div class="input-group">
43 43
                 <span class="input-group-addon">
44
-                    <input ' . $this->_getAttrString($this->_attributes) . '>
44
+                    <input ' . $this->_getAttrString($this->_attributes).'>
45 45
                 </span>
46
-                <input class="form-control" type="text" readonly id="' . $id . '_alt" value="' . $value . '">
46
+                <input class="form-control" type="text" readonly id="' . $id.'_alt" value="'.$value.'">
47 47
             </div>
48 48
         ';
49 49
     }
@@ -73,18 +73,18 @@  discard block
 block discarded – undo
73 73
         $js .= "<script>
74 74
             $(function() {
75 75
                 $('#$id').hide().datetimepicker({
76
-                    defaultDate: '" . $this->getValue() . "',
76
+                    defaultDate: '".$this->getValue()."',
77 77
                     dateFormat: 'yy-mm-dd',
78 78
                     timeFormat: 'HH:mm',
79 79
                     altField: '#{$id}_alt',
80
-                    altFormat: \"" . get_lang('DateFormatLongNoDayJS') . "\",
81
-                    altTimeFormat: \"" . get_lang('TimeFormatNoSecJS') . "\",
82
-                    altSeparator: \" " . get_lang('AtTime') . " \",
80
+                    altFormat: \"".get_lang('DateFormatLongNoDayJS')."\",
81
+                    altTimeFormat: \"" . get_lang('TimeFormatNoSecJS')."\",
82
+                    altSeparator: \" " . get_lang('AtTime')." \",
83 83
                     altFieldTimeOnly: false,
84 84
                     showOn: 'both',
85
-                    buttonImage: '" . Display::return_icon('attendance.png', null, [], ICON_SIZE_TINY, true, true) . "',
85
+                    buttonImage: '" . Display::return_icon('attendance.png', null, [], ICON_SIZE_TINY, true, true)."',
86 86
                     buttonImageOnly: true,
87
-                    buttonText: '" . get_lang('SelectDate') . "',
87
+                    buttonText: '" . get_lang('SelectDate')."',
88 88
                     changeMonth: true,
89 89
                     changeYear: true
90 90
                 });
Please login to merge, or discard this patch.
main/inc/lib/formvalidator/Rule/CompareDateTimeText.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
                 return true;
22 22
             }
23 23
         }
24
-		$result =  parent::validate(array($datetime1, $datetime2), $operator);
24
+		$result = parent::validate(array($datetime1, $datetime2), $operator);
25 25
         return $result;
26 26
     }
27 27
 }
Please login to merge, or discard this patch.
main/inc/lib/formvalidator/Rule/HTML.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
      */
17 17
     function validate($html, $mode = NO_HTML)
18 18
     {
19
-        $allowed_tags = self::get_allowed_tags ($mode, $fullpage);
19
+        $allowed_tags = self::get_allowed_tags($mode, $fullpage);
20 20
         $cleaned_html = kses($html, $allowed_tags);
21 21
         return $html == $cleaned_html;
22 22
     }
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         // Include the allowed tags.
34 34
         //include(dirname(__FILE__).'/allowed_tags.inc.php');
35 35
         global $allowed_tags_student, $allowed_tags_student_full_page, $allowed_tags_teacher, $allowed_tags_teacher_full_page;
36
-        switch($mode)
36
+        switch ($mode)
37 37
         {
38 38
             case NO_HTML:
39 39
                 return array();
Please login to merge, or discard this patch.
main/inc/lib/formvalidator/Rule/MultipleRequired.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,11 +27,11 @@
 block discarded – undo
27 27
      */
28 28
     function validate($value, $options = null)
29 29
     {
30
-    	if(is_array($value))
30
+    	if (is_array($value))
31 31
     	{
32
-    		$value = implode(null,$value);
32
+    		$value = implode(null, $value);
33 33
     	}
34
-        if ((string)$value == '') {
34
+        if ((string) $value == '') {
35 35
             return false;
36 36
         }
37 37
         return true;
Please login to merge, or discard this patch.
main/inc/lib/chamilo_session.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
         }*/
110 110
         // If the session time has expired, refresh the starttime value,
111 111
         //  so we're starting to count down from a later time
112
-        if ( $session->has('starttime') && $session->is_expired()) {
112
+        if ($session->has('starttime') && $session->is_expired()) {
113 113
             $session->destroy();
114 114
         } else {
115 115
             //error_log('Time not expired, extend session for a bit more');
Please login to merge, or discard this patch.
main/inc/lib/events_email.class.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 
125 125
                 // If the mail only need to be send once (we know that thanks to the events.conf), we log it in the table
126 126
                 if ($event_config[$event_name]["sending_mail_once"]) {
127
-                    $sql = 'INSERT INTO ' . Database::get_main_table(TABLE_EVENT_SENT) . ' (user_from, user_to, event_type_name)
127
+                    $sql = 'INSERT INTO '.Database::get_main_table(TABLE_EVENT_SENT).' (user_from, user_to, event_type_name)
128 128
                             VALUES ('.$event_data["user_id"].', '.$id.' ,"'.Database::escape_string($event_name).'")
129 129
                     ';
130 130
                     Database::query($sql);
@@ -135,9 +135,9 @@  discard block
 block discarded – undo
135 135
         // Second, we send to people linked to the event
136 136
         // So, we get everyone
137 137
         $sql = 'SELECT u.user_id, u.language, u.email, u.firstname, u.lastname
138
-                FROM ' . Database::get_main_table(TABLE_EVENT_TYPE_REL_USER) . ' ue
138
+                FROM ' . Database::get_main_table(TABLE_EVENT_TYPE_REL_USER).' ue
139 139
                 INNER JOIN '.Database::get_main_table(TABLE_MAIN_USER).' u ON u.user_id = ue.user_id
140
-                WHERE event_type_name = "' . $event_name . '"';
140
+                WHERE event_type_name = "' . $event_name.'"';
141 141
         $result = Database::store_result(Database::query($sql), 'ASSOC');
142 142
         // for each of the linked users
143 143
         foreach ($result as $key => $value) {
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 
178 178
             // If the mail only need to be send once (we know that thanks to the events.conf, we log it in the table
179 179
             if ($event_config[$event_name]["sending_mail_once"]) {
180
-                $sql = 'INSERT INTO ' . Database::get_main_table(TABLE_EVENT_SENT) . '
180
+                $sql = 'INSERT INTO '.Database::get_main_table(TABLE_EVENT_SENT).'
181 181
                     (user_from, user_to, event_type_name)
182 182
                     VALUES ('.$event_data["user_id"].', '.$value["user_id"].' , "'.Database::escape_string($event_name).'");
183 183
                     ';
@@ -202,16 +202,16 @@  discard block
 block discarded – undo
202 202
         $current_language = api_get_interface_language();
203 203
 
204 204
         $sql = 'SELECT COUNT(*) as total
205
-                FROM ' . Database::get_main_table(TABLE_EVENT_EMAIL_TEMPLATE) . ' em
206
-                INNER JOIN ' . Database::get_main_table(TABLE_MAIN_LANGUAGE) . ' l
205
+                FROM ' . Database::get_main_table(TABLE_EVENT_EMAIL_TEMPLATE).' em
206
+                INNER JOIN ' . Database::get_main_table(TABLE_MAIN_LANGUAGE).' l
207 207
                 ON em.language_id = l.id
208 208
                 WHERE
209
-                    em.event_type_name = "' . $event_name . '" and
209
+                    em.event_type_name = "' . $event_name.'" and
210 210
                     l.dokeos_folder = "'.$current_language.'" and
211 211
                     em.activated = 1';
212 212
 
213 213
         $exists = Database::store_result(Database::query($sql), 'ASSOC');
214
-        if ($exists[0]["total"])  {
214
+        if ($exists[0]["total"]) {
215 215
             return true;
216 216
         } else {
217 217
             return false;
@@ -228,12 +228,12 @@  discard block
 block discarded – undo
228 228
     private static function getMessage($event_name, $language)
229 229
     {
230 230
         $sql = 'SELECT message, subject, l.dokeos_folder
231
-                FROM ' . Database::get_main_table(TABLE_EVENT_EMAIL_TEMPLATE) . ' em
232
-                INNER JOIN ' . Database::get_main_table(TABLE_MAIN_LANGUAGE) . ' l
231
+                FROM ' . Database::get_main_table(TABLE_EVENT_EMAIL_TEMPLATE).' em
232
+                INNER JOIN ' . Database::get_main_table(TABLE_MAIN_LANGUAGE).' l
233 233
                 ON em.language_id = l.id
234 234
                 WHERE
235
-                    em.event_type_name = "' . $event_name . '" AND
236
-                    (l.dokeos_folder = "' . $language . '" OR l.dokeos_folder = "english") AND
235
+                    em.event_type_name = "' . $event_name.'" AND
236
+                    (l.dokeos_folder = "' . $language.'" OR l.dokeos_folder = "english") AND
237 237
                     em.message <> ""
238 238
                 ';
239 239
         return Database::store_result(Database::query($sql), 'ASSOC');
@@ -274,8 +274,8 @@  discard block
 block discarded – undo
274 274
     private static function formatMessage(&$message, &$subject, $event_config, $event_name, &$event_data)
275 275
     {
276 276
         foreach ($event_config[$event_name]["available_keyvars"] as $key => $word) {
277
-            $message = str_replace('((' . $key . '))', $event_data[$word], $message);
278
-            $subject = str_replace('((' . $key . '))', $event_data[$word], $subject);
277
+            $message = str_replace('(('.$key.'))', $event_data[$word], $message);
278
+            $subject = str_replace('(('.$key.'))', $event_data[$word], $subject);
279 279
         }
280 280
     }
281 281
 }
Please login to merge, or discard this patch.