Completed
Push — 1.10.x ( 986d2b...f19030 )
by Angel Fernando Quiroz
69:29 queued 19:50
created
plugin/bbb/lib/bbb_api.php 1 patch
Braces   +28 added lines, -40 removed lines patch added patch discarded remove patch
@@ -73,10 +73,11 @@  discard block
 block discarded – undo
73 73
 			$data = curl_exec( $ch );
74 74
 			curl_close( $ch );
75 75
 
76
-			if($data)
77
-				return (new SimpleXMLElement($data));
78
-			else
79
-				return false;
76
+			if($data) {
77
+							return (new SimpleXMLElement($data));
78
+			} else {
79
+							return false;
80
+			}
80 81
 		}
81 82
 		return (simplexml_load_file($url));
82 83
 	}
@@ -85,11 +86,9 @@  discard block
 block discarded – undo
85 86
 		/* Process required params and throw errors if we don't get values */
86 87
 		if ((isset($param)) && ($param != '')) {
87 88
 			return $param;
88
-		}
89
-		elseif (!isset($param)) {
89
+		} elseif (!isset($param)) {
90 90
 			throw new Exception('Missing parameter.');
91
-		}
92
-		else {
91
+		} else {
93 92
 			throw new Exception(''.$param.' is required.');
94 93
 		}
95 94
 	}
@@ -99,8 +98,7 @@  discard block
 block discarded – undo
99 98
 		/* Don't know if we'll use this one, but let's build it in case. */
100 99
 		if ((isset($param)) && ($param != '')) {
101 100
 			return $param;
102
-		}
103
-		else {
101
+		} else {
104 102
 			$param = '';
105 103
 			return $param;
106 104
 		}
@@ -137,8 +135,9 @@  discard block
 block discarded – undo
137 135
 		'&duration='.urlencode($creationParams['duration']);
138 136
 		//'&meta_category='.urlencode($creationParams['meta_category']);
139 137
 		$welcomeMessage = $creationParams['welcomeMsg'];
140
-		if(trim($welcomeMessage))
141
-			$params .= '&welcome='.urlencode($welcomeMessage);
138
+		if(trim($welcomeMessage)) {
139
+					$params .= '&welcome='.urlencode($welcomeMessage);
140
+		}
142 141
 		// Return the complete URL:
143 142
 		return ( $creationUrl.$params.'&checksum='.sha1("create".$params.$this->_securitySalt) );
144 143
 	}
@@ -165,8 +164,8 @@  discard block
 block discarded – undo
165 164
 		$xml = $this->_processXmlResponse($this->getCreateMeetingURL($creationParams));
166 165
 
167 166
         if ($xml) {
168
-			if($xml->meetingID)
169
-				return array(
167
+			if($xml->meetingID) {
168
+							return array(
170 169
 					'returncode' => $xml->returncode,
171 170
 					'message' => $xml->message,
172 171
 					'messageKey' => $xml->messageKey,
@@ -176,14 +175,14 @@  discard block
 block discarded – undo
176 175
 					'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded,
177 176
 					'createTime' => $xml->createTime
178 177
 					);
179
-			else
180
-				return array(
178
+			} else {
179
+							return array(
181 180
 					'returncode' => $xml->returncode,
182 181
 					'message' => $xml->message,
183 182
 					'messageKey' => $xml->messageKey
184 183
 					);
185
-		}
186
-		else {
184
+			}
185
+		} else {
187 186
 			return null;
188 187
 		}
189 188
 	}
@@ -253,8 +252,7 @@  discard block
 block discarded – undo
253 252
 				'message' => $xml->message,
254 253
 				'messageKey' => $xml->messageKey
255 254
 				);
256
-		}
257
-		else {
255
+		} else {
258 256
 			return null;
259 257
 		}
260 258
 
@@ -288,8 +286,7 @@  discard block
 block discarded – undo
288 286
 				'returncode' => $xml->returncode,
289 287
 				'running' => $xml->running 	// -- Returns true/false.
290 288
 				);
291
-		}
292
-		else {
289
+		} else {
293 290
 			return null;
294 291
 		}
295 292
 
@@ -317,8 +314,7 @@  discard block
 block discarded – undo
317 314
 					'returncode' => $xml->returncode
318 315
 				);
319 316
 				return $result;
320
-			}
321
-			elseif ($xml->messageKey == 'noMeetings') {
317
+			} elseif ($xml->messageKey == 'noMeetings') {
322 318
 				/* No meetings on server, so return just this info: */
323 319
 				$result = array(
324 320
 					'returncode' => $xml->returncode,
@@ -326,8 +322,7 @@  discard block
 block discarded – undo
326 322
 					'message' => $xml->message
327 323
 				);
328 324
 				return $result;
329
-			}
330
-			else {
325
+			} else {
331 326
 				// In this case, we have success and meetings. First return general response:
332 327
 				$result = array(
333 328
 					'returncode' => $xml->returncode,
@@ -348,8 +343,7 @@  discard block
 block discarded – undo
348 343
 					}
349 344
 				return $result;
350 345
 			}
351
-		}
352
-		else {
346
+		} else {
353 347
 			return null;
354 348
 		}
355 349
 
@@ -388,8 +382,7 @@  discard block
 block discarded – undo
388 382
 					'message' => $xml->message
389 383
 				);
390 384
 				return $result;
391
-			}
392
-			else {
385
+			} else {
393 386
 				// In this case, we have success and meeting info:
394 387
 				$result = array(
395 388
 					'returncode' => $xml->returncode,
@@ -418,8 +411,7 @@  discard block
 block discarded – undo
418 411
 					}
419 412
 				return $result;
420 413
 			}
421
-		}
422
-		else {
414
+		} else {
423 415
 			return null;
424 416
 		}
425 417
 
@@ -463,8 +455,7 @@  discard block
 block discarded – undo
463 455
 					'message' => $xml->message
464 456
 				);
465 457
 				return $result;
466
-			}
467
-			else {
458
+			} else {
468 459
 				// In this case, we have success and recording info:
469 460
 				$result = array(
470 461
 					'returncode' => $xml->returncode,
@@ -495,8 +486,7 @@  discard block
 block discarded – undo
495 486
 					}
496 487
 				return $result;
497 488
 			}
498
-		}
499
-		else {
489
+		} else {
500 490
 			return null;
501 491
 		}
502 492
 	}
@@ -529,8 +519,7 @@  discard block
 block discarded – undo
529 519
 				'returncode' => $xml->returncode,
530 520
 				'published' => $xml->published 	// -- Returns true/false.
531 521
 				);
532
-		}
533
-		else {
522
+		} else {
534 523
 			return null;
535 524
 		}
536 525
 
@@ -562,8 +551,7 @@  discard block
 block discarded – undo
562 551
 				'returncode' => $xml->returncode,
563 552
 				'deleted' => $xml->deleted 	// -- Returns true/false.
564 553
 				);
565
-		}
566
-		else {
554
+		} else {
567 555
 			return null;
568 556
 		}
569 557
 
Please login to merge, or discard this patch.
plugin/dashboard/block_teacher/block_teacher.class.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -118,8 +118,11 @@  discard block
 block discarded – undo
118 118
 	 			$time_on_platform = api_time_to_hms(Tracking :: get_time_spent_on_the_platform($teacher_id));
119 119
 	 			$last_connection = Tracking :: get_last_connection_date($teacher_id);
120 120
 
121
-				if ($i%2 == 0) $class_tr = 'row_odd';
122
-			    else $class_tr = 'row_even';
121
+				if ($i%2 == 0) {
122
+				    $class_tr = 'row_odd';
123
+				} else {
124
+			        $class_tr = 'row_even';
125
+			    }
123 126
 
124 127
 				$teachers_table .= '
125 128
 									<tr class="'.$class_tr.'">
@@ -174,8 +177,11 @@  discard block
 block discarded – undo
174 177
 				$username	= $teacher['username'];
175 178
 	 			$time_on_platform = api_time_to_hms(Tracking :: get_time_spent_on_the_platform($teacher_id,true));
176 179
 
177
-	 			if ($i%2 == 0) $class_tr = 'row_odd';
178
-	    		else $class_tr = 'row_even';
180
+	 			if ($i%2 == 0) {
181
+	 			    $class_tr = 'row_odd';
182
+	 			} else {
183
+	    		    $class_tr = 'row_even';
184
+	    		}
179 185
 	    		$teachers_table .= '<tr class="'.$class_tr.'">
180 186
 										<td>'.api_get_person_name($firstname,$lastname).' ('.$username.')</td>
181 187
 										<td align="right">'.$time_on_platform.'</td>
Please login to merge, or discard this patch.
plugin/dashboard/block_session/block_session.class.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -116,8 +116,11 @@
 block discarded – undo
116 116
 
117 117
 	 			$count_courses_in_session = count(Tracking::get_courses_list_from_session($session_id));
118 118
 
119
-				if ($i%2 == 0) $class_tr = 'row_odd';
120
-	    		else $class_tr = 'row_even';
119
+				if ($i%2 == 0) {
120
+				    $class_tr = 'row_odd';
121
+				} else {
122
+	    		    $class_tr = 'row_even';
123
+	    		}
121 124
 
122 125
 				$sessions_table .= '<tr class="'.$class_tr.'">
123 126
 										<td>'.$title.'</td>
Please login to merge, or discard this patch.
plugin/jcapture/action.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,12 @@
 block discarded – undo
5 5
  * @author Pavel Vlasov
6 6
  */
7 7
  
8
-if (!defined('DOKU_INC')) die();
9
-if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/');
8
+if (!defined('DOKU_INC')) {
9
+    die();
10
+}
11
+if (!defined('DOKU_PLUGIN')) {
12
+    define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/');
13
+}
10 14
 require_once (DOKU_PLUGIN . 'action.php');
11 15
  
12 16
 class action_plugin_jcapture extends DokuWiki_Action_Plugin {
Please login to merge, or discard this patch.
plugin/jcapture/applet.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,9 @@
 block discarded – undo
5 5
 	  parse_str($HTTP_RAW_POST_DATA, $_POST);
6 6
 	}
7 7
 	
8
-	if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../../');
8
+	if(!defined('DOKU_INC')) {
9
+	    define('DOKU_INC',dirname(__FILE__).'/../../../');
10
+	}
9 11
 	require_once(DOKU_INC.'inc/init.php');
10 12
 	require_once(DOKU_INC.'inc/common.php');
11 13
 	require_once(DOKU_INC.'inc/pageutils.php');
Please login to merge, or discard this patch.
plugin/ticket/src/ticket_details.php 1 patch
Braces   +7 added lines, -5 removed lines patch added patch discarded remove patch
@@ -209,13 +209,15 @@  discard block
 block discarded – undo
209 209
     $action = $_REQUEST['action'];
210 210
     switch ($action) {
211 211
         case 'assign':
212
-            if (api_is_platform_admin() && isset($_GET['ticket_id']))
213
-                TicketManager::assign_ticket_user($_GET['ticket_id'], $_POST['admins']);
212
+            if (api_is_platform_admin() && isset($_GET['ticket_id'])) {
213
+                            TicketManager::assign_ticket_user($_GET['ticket_id'], $_POST['admins']);
214
+            }
214 215
             $ticket['ticket']['assigned_last_user'] = $_POST['admins'];
215 216
             break;
216 217
         case 'unassign':
217
-            if (api_is_platform_admin() && isset($_GET['ticket_id']))
218
-                TicketManager::assign_ticket_user($_GET['ticket_id'], 0);
218
+            if (api_is_platform_admin() && isset($_GET['ticket_id'])) {
219
+                            TicketManager::assign_ticket_user($_GET['ticket_id'], 0);
220
+            }
219 221
             $ticket['ticket']['assigned_last_user'] = 0;
220 222
             break;
221 223
         default:
@@ -335,7 +337,7 @@  discard block
 block discarded – undo
335 337
             if ($isAdmin) {
336 338
                 $message['message'].='<br/><b>' . $plugin->get_lang('AttendedBy') . ': ' . $message['user_created'] . " - " . api_convert_and_format_date(api_get_local_time($message['sys_insert_datetime']), DATE_TIME_FORMAT_LONG, _api_get_timezone()) . "</b>";
337 339
             }
338
-        }else {
340
+        } else {
339 341
             $message['message'].='<b>' . get_lang('Sent') . ': ' . api_convert_and_format_date(api_get_local_time($message['sys_insert_datetime']), DATE_TIME_FORMAT_LONG, _api_get_timezone()) . "</b>";
340 342
         }
341 343
 
Please login to merge, or discard this patch.
plugin/ticket/src/myticket.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -143,16 +143,19 @@
 block discarded – undo
143 143
     $action = $_GET['action'];
144 144
     switch ($action) {
145 145
         case 'assign':
146
-            if ($isAdmin && isset($_GET['ticket_id']))
147
-                TicketManager::assign_ticket_user($_GET['ticket_id'], $user_id);
146
+            if ($isAdmin && isset($_GET['ticket_id'])) {
147
+                            TicketManager::assign_ticket_user($_GET['ticket_id'], $user_id);
148
+            }
148 149
             break;
149 150
         case 'unassign':
150
-            if ($isAdmin && isset($_GET['ticket_id']))
151
-                TicketManager::assign_ticket_user($_GET['ticket_id'], 0);
151
+            if ($isAdmin && isset($_GET['ticket_id'])) {
152
+                            TicketManager::assign_ticket_user($_GET['ticket_id'], 0);
153
+            }
152 154
             break;
153 155
         case 'alert':
154
-            if (!$isAdmin && isset($_GET['ticket_id']))
155
-                TicketManager::send_alert($_GET['ticket_id'], $user_id);
156
+            if (!$isAdmin && isset($_GET['ticket_id'])) {
157
+                            TicketManager::send_alert($_GET['ticket_id'], $user_id);
158
+            }
156 159
             break;
157 160
         case 'export':
158 161
             $data = array(
Please login to merge, or discard this patch.
plugin/ticket/src/report.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -289,8 +289,9 @@
 block discarded – undo
289 289
 
290 290
     if ($start_date != '' || $end_date != '') {
291 291
         $sql .= " HAVING ";
292
-        if ($start_date != '')
293
-            $sql .= "  access_date >= '$start_date'   ";
292
+        if ($start_date != '') {
293
+                    $sql .= "  access_date >= '$start_date'   ";
294
+        }
294 295
         if ($end_date != '') {
295 296
             $sql = ($start_date == '') ? $sql : ($sql . " AND ");
296 297
             $sql .= "  access_date <= '$end_date'   ";
Please login to merge, or discard this patch.
plugin/search_course/lib/search_course_widget.class.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -123,8 +123,7 @@  discard block
 block discarded – undo
123 123
         if ($has_content)
124 124
         {
125 125
             echo '<div class="list">';
126
-        }
127
-        else
126
+        } else
128 127
         {
129 128
             echo '<div>';
130 129
         }
@@ -132,8 +131,7 @@  discard block
 block discarded – undo
132 131
         if (RegisterCourseWidget::factory()->run())
133 132
         {
134 133
             $result = true;
135
-        }
136
-        else
134
+        } else
137 135
         {
138 136
             $result = $this->action_display();
139 137
         }
@@ -337,8 +335,7 @@  discard block
 block discarded – undo
337 335
         if (api_is_anonymous())
338 336
         {
339 337
             $course_fiter = 'visibility = ' . COURSE_VISIBILITY_OPEN_WORLD;
340
-        }
341
-        else
338
+        } else
342 339
         {
343 340
             $course_fiter = 'visibility = ' . COURSE_VISIBILITY_OPEN_WORLD . ' OR ';
344 341
             $course_fiter .= 'visibility = ' . COURSE_VISIBILITY_OPEN_PLATFORM . ' OR ';
Please login to merge, or discard this patch.