Completed
Push — 1.11.x ( c5cfcc...1cf9be )
by José
46:45 queued 17:54
created
main/document/slideshow.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -249,12 +249,12 @@
 block discarded – undo
249 249
                         if ($imagetype == "gif") {
250 250
                             $transindex = imagecolortransparent($source_img);
251 251
                             $palletsize = imagecolorstotal($source_img);
252
-                             //GIF89a for transparent and anim (first clip), either GIF87a
252
+                                //GIF89a for transparent and anim (first clip), either GIF87a
253 253
                             if ($transindex >= 0 && $transindex < $palletsize) {
254
-                                 $transcol = imagecolorsforindex($source_img, $transindex);
255
-                                 $transindex = imagecolorallocatealpha($crop, $transcol['red'], $transcol['green'], $transcol['blue'], 127);
256
-                                 imagefill($crop, 0, 0, $transindex);
257
-                                 imagecolortransparent($crop, $transindex);
254
+                                    $transcol = imagecolorsforindex($source_img, $transindex);
255
+                                    $transindex = imagecolorallocatealpha($crop, $transcol['red'], $transcol['green'], $transcol['blue'], 127);
256
+                                    imagefill($crop, 0, 0, $transindex);
257
+                                    imagecolortransparent($crop, $transindex);
258 258
                             }
259 259
                         }
260 260
 
Please login to merge, or discard this patch.
main/exercise/hotspot.inc.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,10 +18,10 @@
 block discarded – undo
18 18
 $file = file(api_get_path(SYS_LANG_PATH).'english/hotspot.inc.php');
19 19
 
20 20
 foreach ($file as &$value) {
21
-	$variable = explode('=', $value, 2);
22
-	if (count($variable) > 1) {
23
-		$variable = substr(trim($variable[0]), 1);
24
-		$variable = '&'.$variable.'='.api_utf8_encode(get_lang($variable)).' ';
25
-		echo $variable;
26
-	}
21
+    $variable = explode('=', $value, 2);
22
+    if (count($variable) > 1) {
23
+        $variable = substr(trim($variable[0]), 1);
24
+        $variable = '&'.$variable.'='.api_utf8_encode(get_lang($variable)).' ';
25
+        echo $variable;
26
+    }
27 27
 }
Please login to merge, or discard this patch.
main/inc/lib/sortable_table.class.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -340,9 +340,9 @@  discard block
 block discarded – undo
340 340
     }
341 341
 
342 342
     /**
343
-    * This function shows the content of a table in a grid.
344
-    * Should not be use to edit information (edit/delete rows) only.
345
-    **/
343
+     * This function shows the content of a table in a grid.
344
+     * Should not be use to edit information (edit/delete rows) only.
345
+     **/
346 346
     public function display_grid()
347 347
     {
348 348
         $empty_table = false;
@@ -800,7 +800,7 @@  discard block
 block discarded – undo
800 800
                 //$param[$tablename.'_direction'] = $_GET[$tablename.'_direction'];
801 801
                 $my_get_direction = $_GET[$tablename.'_direction'];
802 802
                 if (!in_array($my_get_direction, array('ASC', 'DESC'))) {
803
-                     $param[$tablename.'_direction'] = 'ASC';
803
+                        $param[$tablename.'_direction'] = 'ASC';
804 804
                 } else {
805 805
                     $param[$tablename.'_direction'] = $my_get_direction;
806 806
                 }
@@ -929,7 +929,7 @@  discard block
 block discarded – undo
929 929
         if (is_array($row)) {
930 930
             foreach ($row as & $value) {
931 931
                 if (empty($value)) {
932
-                     $value = '-';
932
+                        $value = '-';
933 933
                 }
934 934
             }
935 935
         }
Please login to merge, or discard this patch.
main/cron/user_import/get_data_from_mail.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -20,16 +20,16 @@
 block discarded – undo
20 20
 $users = Database::get_main_table(TABLE_MAIN_USER);
21 21
 $string = '';
22 22
 foreach ($list as $mail) {
23
-  $mail = trim($mail);
24
-  $sql = "SELECT user_id, official_code, firstname, lastname, email FROM $users WHERE email = '$mail'\n";
25
-  $res = Database::query($sql);
26
-  if ($res === false) { die(mysql_error()); }
27
-  if (Database::num_rows($res) == 0) {
23
+    $mail = trim($mail);
24
+    $sql = "SELECT user_id, official_code, firstname, lastname, email FROM $users WHERE email = '$mail'\n";
25
+    $res = Database::query($sql);
26
+    if ($res === false) { die(mysql_error()); }
27
+    if (Database::num_rows($res) == 0) {
28 28
     $string .= 'No encontrado;'.$row['email'];
29
-  } else {
29
+    } else {
30 30
     $row = Database::fetch_assoc($res);
31
-   $string .= $row['user_id'].';'.$row['email'].';'.$row['firstname'].';'.$row['lastname'].';'.$row['official_code']."\r\n";
32
-  }
31
+    $string .= $row['user_id'].';'.$row['email'].';'.$row['firstname'].';'.$row['lastname'].';'.$row['official_code']."\r\n";
32
+    }
33 33
 }
34 34
 echo $string;
35 35
 file_put_contents('/tmp/list.txt', $string);
Please login to merge, or discard this patch.
main/inc/lib/internationalization.lib.php 1 patch
Indentation   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1743,7 +1743,6 @@  discard block
 block discarded – undo
1743 1743
 
1744 1744
 /**
1745 1745
  * Return true a date is valid
1746
-
1747 1746
  * @param string $date example: 2014-06-30 13:05:05
1748 1747
  * @param string $format example: "Y-m-d H:i:s"
1749 1748
  *
@@ -2016,15 +2015,15 @@  discard block
 block discarded – undo
2016 2015
 {
2017 2016
     if ($showTime) {
2018 2017
         if ($humanForm) {
2019
-           return $date->format('j M Y H:i:s');
2018
+            return $date->format('j M Y H:i:s');
2020 2019
         } else {
2021
-           return $date->format('Y-m-d H:i:s');
2020
+            return $date->format('Y-m-d H:i:s');
2022 2021
         }
2023 2022
     } else {
2024 2023
         if ($humanForm) {
2025
-           return $date->format('j M Y');
2024
+            return $date->format('j M Y');
2026 2025
         } else {
2027
-           return $date->format('Y-m-d');
2026
+            return $date->format('Y-m-d');
2028 2027
         }
2029 2028
     }
2030 2029
 }
Please login to merge, or discard this patch.
main/mySpace/user_edit.php 1 patch
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -109,23 +109,23 @@  discard block
 block discarded – undo
109 109
 $form->addGroup($html_results_enabled);
110 110
 // Validate form
111 111
 if ($form->validate()) {
112
-	$check = Security::check_token('post');
113
-	if ($check) {
114
-		$user = $form->exportValues();
115
-		$email = $userInfo['email'];
112
+    $check = Security::check_token('post');
113
+    if ($check) {
114
+        $user = $form->exportValues();
115
+        $email = $userInfo['email'];
116 116
         $username = $userInfo['username'];
117
-		$send_mail = intval($user['mail']['send_mail']);
117
+        $send_mail = intval($user['mail']['send_mail']);
118 118
         $auth_source = PLATFORM_AUTH_SOURCE;
119 119
 
120 120
         $resetPassword = $user['password']['password_auto'] == '1' ? 0 : 2;
121 121
 
122
-		if (count($extAuthSource) > 0 && $user['password']['password_auto'] == '2') {
123
-			//$auth_source = $user['password']['auth_source'];
124
-			//$password = 'PLACEHOLDER';
125
-		} else {
126
-			//$auth_source = PLATFORM_AUTH_SOURCE;
127
-			//$password = $user['password']['password_auto'] == '1' ? api_generate_password() : $user['password']['password'];
128
-		}
122
+        if (count($extAuthSource) > 0 && $user['password']['password_auto'] == '2') {
123
+            //$auth_source = $user['password']['auth_source'];
124
+            //$password = 'PLACEHOLDER';
125
+        } else {
126
+            //$auth_source = PLATFORM_AUTH_SOURCE;
127
+            //$password = $user['password']['password_auto'] == '1' ? api_generate_password() : $user['password']['password'];
128
+        }
129 129
 
130 130
         $auth_source = $userInfo['auth_source'];
131 131
         $password = $user['password']['password_auto'] == '1' ? api_generate_password() : $user['password']['password'];
@@ -153,18 +153,18 @@  discard block
 block discarded – undo
153 153
             $resetPassword
154 154
         );
155 155
 
156
-		if (!empty($email) && $send_mail) {
157
-			$emailsubject = '['.api_get_setting('siteName').'] '.get_lang('YourReg').' '.api_get_setting('siteName');
158
-			$portal_url = api_get_path(WEB_PATH);
159
-			if (api_is_multiple_url_enabled()) {
160
-				$access_url_id = api_get_current_access_url_id();
161
-				if ($access_url_id != -1) {
162
-					$url = api_get_access_url($access_url_id);
163
-					$portal_url = $url['url'];
164
-				}
165
-			}
166
-
167
-			$emailbody = get_lang('Dear')." ".stripslashes(api_get_person_name($userInfo['firstname'], $userInfo['lastname'])).",\n\n".
156
+        if (!empty($email) && $send_mail) {
157
+            $emailsubject = '['.api_get_setting('siteName').'] '.get_lang('YourReg').' '.api_get_setting('siteName');
158
+            $portal_url = api_get_path(WEB_PATH);
159
+            if (api_is_multiple_url_enabled()) {
160
+                $access_url_id = api_get_current_access_url_id();
161
+                if ($access_url_id != -1) {
162
+                    $url = api_get_access_url($access_url_id);
163
+                    $portal_url = $url['url'];
164
+                }
165
+            }
166
+
167
+            $emailbody = get_lang('Dear')." ".stripslashes(api_get_person_name($userInfo['firstname'], $userInfo['lastname'])).",\n\n".
168 168
                 get_lang('YouAreReg')." ".api_get_setting('siteName')." ".get_lang('WithTheFollowingSettings')."\n\n".
169 169
                 get_lang('Username')." : ".$username."\n".get_lang('Pass')." : ".stripslashes($password)."\n\n".
170 170
                 get_lang('Address')." ".api_get_setting('siteName')." ".
@@ -178,26 +178,26 @@  discard block
 block discarded – undo
178 178
                 get_lang('Email')." : ".api_get_setting('emailAdministrator');
179 179
             $emailbody = nl2br($emailbody);
180 180
 
181
-			api_mail_html(
181
+            api_mail_html(
182 182
                 api_get_person_name($userInfo['firstname'], $userInfo['lastname'], null, PERSON_NAME_EMAIL_ADDRESS),
183 183
                 $email,
184 184
                 $emailsubject,
185 185
                 $emailbody
186 186
             );
187
-		}
187
+        }
188 188
 
189
-		Security::clear_token();
189
+        Security::clear_token();
190 190
         $tok = Security::get_token();
191 191
         header('Location: '.$url.'&message=1');
192 192
         exit();
193
-	}
193
+    }
194 194
 } else {
195
-	if (isset($_POST['submit'])) {
196
-		Security::clear_token();
197
-	}
198
-	$token = Security::get_token();
199
-	$form->addElement('hidden', 'sec_token');
200
-	$form->setConstants(array('sec_token' => $token));
195
+    if (isset($_POST['submit'])) {
196
+        Security::clear_token();
197
+    }
198
+    $token = Security::get_token();
199
+    $form->addElement('hidden', 'sec_token');
200
+    $form->setConstants(array('sec_token' => $token));
201 201
 }
202 202
 
203 203
 $interbreadcrumb[] = array(
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 );
207 207
 
208 208
 if (isset($_REQUEST['message'])) {
209
-	Display::addFlash(Display::return_message(get_lang('Updated'), 'normal'));
209
+    Display::addFlash(Display::return_message(get_lang('Updated'), 'normal'));
210 210
 }
211 211
 
212 212
 Display::display_header($tool_name);
Please login to merge, or discard this patch.
main/admin/grade_models.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -112,8 +112,8 @@
 block discarded – undo
112 112
 //With this function we can add actions to the jgrid (edit, delete, etc)
113 113
 $action_links = 'function action_formatter(cellvalue, options, rowObject) {
114 114
      return \'<a href="?action=edit&id=\'+options.rowId+\'">'.Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>'.
115
-     '&nbsp;<a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES))."\'".')) return false;"  href="?sec_token='.$token.'&action=delete&id=\'+options.rowId+\'">'.Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'.
116
-     '\';
115
+        '&nbsp;<a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES))."\'".')) return false;"  href="?sec_token='.$token.'&action=delete&id=\'+options.rowId+\'">'.Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'.
116
+        '\';
117 117
 }';
118 118
 ?>
119 119
 <script>
Please login to merge, or discard this patch.
main/admin/add_sessions_to_usergroup.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
       <option value = "%">--</option>
200 200
       <?php
201 201
         echo Display :: get_alphabet_options();
202
-      ?>
202
+        ?>
203 203
      </select>
204 204
 <?php echo '<br />'; ?>
205 205
 </td>
@@ -210,31 +210,31 @@  discard block
 block discarded – undo
210 210
   <td align="center">
211 211
   <div id="content_source">
212 212
       <?php
213
-      if (!($add_type == 'multiple')) {
213
+        if (!($add_type == 'multiple')) {
214 214
         ?>
215 215
         <input type="text" id="user_to_add" onkeyup="xajax_search_users(this.value,'single')" />
216 216
         <div id="ajax_list_users_single"></div>
217 217
         <?php
218
-      } else {
219
-      ?>
218
+        } else {
219
+        ?>
220 220
       <div id="ajax_list_multiple">
221 221
         <?php echo Display::select('elements_not_in_name', $elements_not_in, '', array('style'=>'width:360px', 'multiple'=>'multiple', 'id'=>'elements_not_in', 'size'=>'15px'), false); ?>
222 222
       </div>
223 223
     <?php
224
-      }
225
-     ?>
224
+        }
225
+        ?>
226 226
   </div>
227 227
   </td>
228 228
   <td width="10%" valign="middle" align="center">
229 229
   <?php
230
-  if ($ajax_search) {
231
-  ?>
230
+    if ($ajax_search) {
231
+    ?>
232 232
     <button class="btn btn-default" type="button" onclick="remove_item(document.getElementById('elements_in'))" >
233 233
         <em class="fa fa-arrow-left"></em>
234 234
     </button>
235 235
   <?php
236
-  } else {
237
-  ?>
236
+    } else {
237
+    ?>
238 238
     <button class="btn btn-default" type="button" onclick="moveItem(document.getElementById('elements_not_in'), document.getElementById('elements_in'))" onclick="moveItem(document.getElementById('elements_not_in'), document.getElementById('elements_in'))">
239 239
         <em class="fa fa-arrow-right"></em>
240 240
     </button>
@@ -243,8 +243,8 @@  discard block
 block discarded – undo
243 243
         <em class="fa fa-arrow-left"></em>
244 244
     </button>
245 245
     <?php
246
-  }
247
-  ?>
246
+    }
247
+    ?>
248 248
     <br /><br /><br /><br /><br /><br />
249 249
   </td>
250 250
   <td align="center">
Please login to merge, or discard this patch.
main/gradebook/lib/fe/resulttable.class.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
         foreach ($data_array as $item) {
119 119
             $row = array();
120 120
             if ($this->iscourse == '1') {
121
-                 $row[] = $item['result_id'];
121
+                    $row[] = $item['result_id'];
122 122
             }
123 123
             if ($is_western_name_order) {
124 124
                 $row[] = $item['firstname'];
Please login to merge, or discard this patch.