Completed
Push — master ( 73f386...565c08 )
by José
55:34 queued 26:04
created
plugin/openmeetings/lib/openmeetings.class.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -49,9 +49,9 @@  discard block
 block discarded – undo
49 49
         $om_user   = $plugin->get('user');
50 50
         $om_pass   = $plugin->get('pass');
51 51
         $accessUrl = api_get_access_url($_configuration['access_url']);
52
-        $this->externalType = substr($accessUrl['url'], strpos($accessUrl['url'], '://')+3, -1);
52
+        $this->externalType = substr($accessUrl['url'], strpos($accessUrl['url'], '://') + 3, -1);
53 53
         if (strcmp($this->externalType, 'localhost') == 0) {
54
-            $this->externalType = substr(api_get_path(WEB_PATH), strpos(api_get_path(WEB_PATH), '://')+3, -1);
54
+            $this->externalType = substr(api_get_path(WEB_PATH), strpos(api_get_path(WEB_PATH), '://') + 3, -1);
55 55
         }
56 56
         $this->externalType = 'chamilolms.'.$this->externalType;
57 57
         $this->table = \Database::get_main_table('plugin_openmeetings');
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
             // This fills the following attributes: status, name, comment, chamiloCourseId, chamiloSessionId
162 162
             $room = new Room();
163 163
             $room->loadRoomId($meetingData['room_id']);
164
-            $roomArray = (array)$room;
164
+            $roomArray = (array) $room;
165 165
             $roomArray['SID'] = $this->sessionId;
166 166
             $roomId = $this->gateway->updateRoomWithModeration($room);
167 167
             if ($roomId != $meetingData['room_id']) {
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
             $room->SID = $this->sessionId;
177 177
             $room->name = $this->roomName;
178 178
             //$room->roomtypes_id = $room->roomtypes_id;
179
-            $room->comment = urlencode(get_lang('Course').': ' . $params['meeting_name'] . ' - '.$_configuration['software_name']);
179
+            $room->comment = urlencode(get_lang('Course').': '.$params['meeting_name'].' - '.$_configuration['software_name']);
180 180
             //$room->numberOfPartizipants = $room->numberOfPartizipants;
181 181
             $room->ispublic = $room->getString('isPublic', 'false');
182 182
             //$room->appointment = $room->getString('appointment');
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
             $params['room_id'] = $roomId;
201 201
             $params['c_id'] = api_get_course_int_id();
202 202
             $params['session_id'] = api_get_session_id();
203
-            $params['record'] = ($room->allowRecording?1:0);
203
+            $params['record'] = ($room->allowRecording ? 1 : 0);
204 204
 
205 205
             $id = \Database::insert($this->table, $params);
206 206
 
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
         }
239 239
         $params = array('room_id' => $meetingData['room_id']);
240 240
         $returnVal = $this->setUserObjectAndGenerateRoomHashByURLAndRecFlag($params);
241
-        $iframe = $this->url . "/?" ."secureHash=" . $returnVal;
241
+        $iframe = $this->url."/?"."secureHash=".$returnVal;
242 242
         printf("<iframe src='%s' width='%s' height = '%s' />", $iframe, "100%", 640);
243 243
     }
244 244
 
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
         $userId = $_SESSION['_user']['user_id'];
347 347
         $systemType = 'Chamilo';
348 348
         $room_id = $params['room_id'];
349
-        $becomeModerator = ( $this->isTeacher() ? 1 : 0 );
349
+        $becomeModerator = ($this->isTeacher() ? 1 : 0);
350 350
         $allowRecording = 1; //Provisional
351 351
 
352 352
         $urlWsdl = $this->url."/services/UserService?wsdl";
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
                 error_log(__FILE__.'+'.__LINE__.' Meetings found: '.print_r($meetingDb, 1));
421 421
                 $remoteMeeting = array();
422 422
                 $meetingDb['created_at'] = api_get_local_time($meetingDb['created_at']);
423
-                $meetingDb['closed_at'] = (!empty($meetingDb['closed_at']) ? api_get_local_time($meetingDb['closed_at']):'');
423
+                $meetingDb['closed_at'] = (!empty($meetingDb['closed_at']) ? api_get_local_time($meetingDb['closed_at']) : '');
424 424
                 // Fixed value for now
425 425
                 $meetingDb['participantCount'] = 40;
426 426
                 $rec = $this->gateway->getFlvRecordingByRoomId($meetingDb['room_id']);
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
                         \Display::url('[.avi]', $link2, array('target' => '_blank'));
437 437
 
438 438
                 }
439
-                $item['show_links']  = implode('<br />', $links);
439
+                $item['show_links'] = implode('<br />', $links);
440 440
 
441 441
                 // The following code is currently commented because the web service
442 442
                 // says this is not allowed by the SOAP user.
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
                 $remoteMeeting = $current_room;
487 487
                 */
488 488
 
489
-                if (empty( $remoteMeeting )) {
489
+                if (empty($remoteMeeting)) {
490 490
                 /*
491 491
                     error_log(__FILE__.'+'.__LINE__.' Empty remote Meeting for now');
492 492
                     if ($meetingDb['status'] == 1 && $this->isTeacher()) {
Please login to merge, or discard this patch.
plugin/kannelsms/vendor/kannelsms_api.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 * @version     1.3.0
10 10
 */
11 11
 
12
-if ( !class_exists('KannelException') ) {
12
+if (!class_exists('KannelException')) {
13 13
   require_once('exception.php');
14 14
 }
15 15
 
@@ -24,25 +24,25 @@  discard block
 block discarded – undo
24 24
   /*
25 25
   * Version of this class
26 26
   */
27
-  const VERSION           = '1.3.1';
27
+  const VERSION = '1.3.1';
28 28
 
29 29
   /**
30 30
   * All Kannel API calls start with BASE_URL
31 31
   * @author  Martin Steel
32 32
   */
33
-  const API_BASE_URL      = 'api.kannelsms.com/xml/';
33
+  const API_BASE_URL = 'api.kannelsms.com/xml/';
34 34
 
35 35
   /**
36 36
   * string to append to API_BASE_URL to check authentication
37 37
   * @author  Martin Steel
38 38
   */
39
-  const API_AUTH_METHOD   = 'authenticate';
39
+  const API_AUTH_METHOD = 'authenticate';
40 40
 
41 41
   /**
42 42
   * string to append to API_BASE_URL for sending SMS
43 43
   * @author  Martin Steel
44 44
   */
45
-  const API_SMS_METHOD    = 'sms';
45
+  const API_SMS_METHOD = 'sms';
46 46
 
47 47
   /**
48 48
   * string to append to API_BASE_URL for checking message credit
@@ -258,13 +258,13 @@  discard block
 block discarded – undo
258 258
     $err_no = null;
259 259
     $err_desc = null;
260 260
 
261
-    foreach($resp_doc->documentElement->childNodes AS $doc_child) {
262
-      switch(strtolower($doc_child->nodeName)) {
261
+    foreach ($resp_doc->documentElement->childNodes AS $doc_child) {
262
+      switch (strtolower($doc_child->nodeName)) {
263 263
         case 'sms_resp':
264 264
         $resp = array();
265 265
         $wrapper_id = null;
266
-        foreach($doc_child->childNodes AS $resp_node) {
267
-          switch(strtolower($resp_node->nodeName)) {
266
+        foreach ($doc_child->childNodes AS $resp_node) {
267
+          switch (strtolower($resp_node->nodeName)) {
268 268
             case 'messageid':
269 269
             $resp['id'] = $resp_node->nodeValue;
270 270
             break;
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
             break;
280 280
           }
281 281
         }
282
-        if( array_key_exists('error_code', $resp ) ) 
282
+        if (array_key_exists('error_code', $resp)) 
283 283
         {
284 284
           $resp['success'] = 0;
285 285
         } else {
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
       throw new KannelException($err_desc, $err_no);
416 416
     }
417 417
         
418
-    return array( 'symbol' => $symbol, 'balance' => $balance, 'code' => $code );
418
+    return array('symbol' => $symbol, 'balance' => $balance, 'code' => $code);
419 419
   }
420 420
 
421 421
   /**
@@ -480,14 +480,14 @@  discard block
 block discarded – undo
480 480
       $this->logXML("API $method Request XML", $data);
481 481
     }
482 482
     
483
-    if( isset( $this->ssl ) ) {
483
+    if (isset($this->ssl)) {
484 484
       $ssl = $this->ssl;
485 485
     } else {
486 486
       $ssl = $this->sslSupport();
487 487
     }
488 488
 
489 489
     $url = $ssl ? 'https://' : 'http://';
490
-    $url .= self::API_BASE_URL . $method;
490
+    $url .= self::API_BASE_URL.$method;
491 491
 
492 492
     $response = $this->xmlPost($url, $data);
493 493
 
@@ -509,12 +509,12 @@  discard block
 block discarded – undo
509 509
   * @author  Martin Steel
510 510
   */
511 511
   protected function xmlPost($url, $data) {
512
-    if(extension_loaded('curl')) {
512
+    if (extension_loaded('curl')) {
513 513
       $ch = curl_init($url);
514 514
       curl_setopt($ch, CURLOPT_POST, 1);
515 515
       curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
516 516
       curl_setopt($ch, CURLOPT_HTTPHEADER, Array("Content-Type: text/xml"));
517
-      curl_setopt($ch, CURLOPT_USERAGENT, 'Kannel PHP Wrapper/1.0' . self::VERSION);
517
+      curl_setopt($ch, CURLOPT_USERAGENT, 'Kannel PHP Wrapper/1.0'.self::VERSION);
518 518
       curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
519 519
       if (isset($this->proxy_host) && isset($this->proxy_port)) {
520 520
         curl_setopt($ch, CURLOPT_PROXY, $this->proxy_host);
@@ -525,9 +525,9 @@  discard block
 block discarded – undo
525 525
       $info = curl_getinfo($ch);
526 526
 
527 527
       if ($response === false || $info['http_code'] != 200) {
528
-        throw new \Exception('HTTP Error calling Kannel API - HTTP Status: ' . $info['http_code'] . ' - cURL Erorr: ' . curl_error($ch));
528
+        throw new \Exception('HTTP Error calling Kannel API - HTTP Status: '.$info['http_code'].' - cURL Erorr: '.curl_error($ch));
529 529
       } elseif (curl_errno($ch) > 0) {
530
-        throw new \Exception('HTTP Error calling Kannel API - cURL Error: ' . curl_error($ch));
530
+        throw new \Exception('HTTP Error calling Kannel API - cURL Error: '.curl_error($ch));
531 531
       }
532 532
 
533 533
       curl_close($ch);
@@ -536,31 +536,31 @@  discard block
 block discarded – undo
536 536
     } elseif (function_exists('stream_get_contents')) {
537 537
       // Enable error Track Errors
538 538
       $track = ini_get('track_errors');
539
-      ini_set('track_errors',true);
539
+      ini_set('track_errors', true);
540 540
 
541 541
       $params = array('http' => array(
542 542
       'method'  => 'POST',
543
-      'header'  => "Content-Type: text/xml\r\nUser-Agent: mediaburst PHP Wrapper/" . self::VERSION . "\r\n",
543
+      'header'  => "Content-Type: text/xml\r\nUser-Agent: mediaburst PHP Wrapper/".self::VERSION."\r\n",
544 544
       'content' => $data
545 545
       ));
546 546
 
547 547
       if (isset($this->proxy_host) && isset($this->proxy_port)) {
548
-        $params['http']['proxy'] = 'tcp://'.$this->proxy_host . ':' . $this->proxy_port;
548
+        $params['http']['proxy'] = 'tcp://'.$this->proxy_host.':'.$this->proxy_port;
549 549
         $params['http']['request_fulluri'] = True;
550 550
       }
551 551
 
552 552
       $ctx = stream_context_create($params);
553 553
       $fp = @fopen($url, 'rb', false, $ctx);
554 554
       if (!$fp) {
555
-        ini_set('track_errors',$track);
555
+        ini_set('track_errors', $track);
556 556
         throw new \Exception("HTTP Error calling Kannel API - fopen Error: $php_errormsg");
557 557
       }
558 558
       $response = @stream_get_contents($fp);
559 559
       if ($response === false) {
560
-        ini_set('track_errors',$track);
560
+        ini_set('track_errors', $track);
561 561
         throw new \Exception("HTTP Error calling Kannel API - stream Error: $php_errormsg");
562 562
       }
563
-      ini_set('track_errors',$track);
563
+      ini_set('track_errors', $track);
564 564
       return $response;
565 565
     } else {
566 566
       throw new \Exception("Kannel requires PHP5 with cURL or HTTP stream support");
@@ -624,7 +624,7 @@  discard block
 block discarded – undo
624 624
   * @author  Martin Steel
625 625
   */
626 626
   protected function is_assoc($array) {
627
-    return (bool)count(array_filter(array_keys($array), 'is_string'));
627
+    return (bool) count(array_filter(array_keys($array), 'is_string'));
628 628
   }
629 629
   
630 630
   /**
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
    * @todo Take an optional country code and check that the number starts with it
638 638
    */
639 639
   public static function is_valid_msisdn($val) {
640
-    return preg_match( '/^[1-9][0-9]{7,12}$/', $val );
640
+    return preg_match('/^[1-9][0-9]{7,12}$/', $val);
641 641
   }
642 642
 
643 643
 }
Please login to merge, or discard this patch.
plugin/kannelsms/lib/kannelsms.lib.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -75,14 +75,13 @@
 block discarded – undo
75 75
         $trimmedKey = trim(CONFIG_SECURITY_API_KEY);
76 76
         if (!empty($trimmedKey)) {
77 77
             $message = array(
78
-                "to" => array_key_exists("mobilePhoneNumber",$additionalParameters) ?
79
-                    $additionalParameters['mobilePhoneNumber'] :
80
-                    $this->getMobilePhoneNumberById($additionalParameters['userId']),
78
+                "to" => array_key_exists("mobilePhoneNumber", $additionalParameters) ?
79
+                    $additionalParameters['mobilePhoneNumber'] : $this->getMobilePhoneNumberById($additionalParameters['userId']),
81 80
                 "message" => $this->getSms($additionalParameters)
82 81
             );
83 82
 
84 83
             if (!empty($message['message'])) {
85
-                if(extension_loaded('curl')) {
84
+                if (extension_loaded('curl')) {
86 85
                     $url = $this->hostAddress.'?username='.
87 86
                         $this->username.'&password='.$this->password.'&from='.
88 87
                         $this->from.'&to='.$message['to'].'&msg='.urlencode($message['message']);
Please login to merge, or discard this patch.
plugin/rss/plugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,6 +9,6 @@
 block discarded – undo
9 9
  * @author Laurent Opprecht
10 10
  */
11 11
 
12
-require_once dirname(__FILE__) . '/lib/rss_plugin.class.php';
12
+require_once dirname(__FILE__).'/lib/rss_plugin.class.php';
13 13
 
14 14
 $plugin_info = RssPlugin::create()->get_info();
Please login to merge, or discard this patch.
plugin/courselegal/user_list.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /* For license terms, see /license.txt */
3
-require_once dirname(__FILE__) . '/config.php';
3
+require_once dirname(__FILE__).'/config.php';
4 4
 
5 5
 // Course legal
6 6
 $enabled = api_get_plugin_setting('courselegal', 'tool_enable');
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 $url = api_get_self().'?'.api_get_cidreq();
20 20
 
21 21
 $action = isset($_GET['action']) ? $_GET['action'] : null;
22
-switch($action) {
22
+switch ($action) {
23 23
     case 'resend':
24 24
         if (isset($_GET['user_id'])) {
25 25
             $legal->updateMailAgreementLink($_GET['user_id'], $courseId, $sessionId);
Please login to merge, or discard this patch.
plugin/courselegal/CourseLegalPlugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -421,7 +421,7 @@
 block discarded – undo
421 421
                 array('id = ? ' => $id)
422 422
             );
423 423
             if (!empty($legalData['filename'])) {
424
-                $fileToDelete = $coursePath . '/' . $legalData['filename'];
424
+                $fileToDelete = $coursePath.'/'.$legalData['filename'];
425 425
                 if (file_exists($fileToDelete)) {
426 426
                     unlink($fileToDelete);
427 427
                 }
Please login to merge, or discard this patch.
plugin/courselegal/install.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 /* For license terms, see /license.txt */
3 3
 
4
-require_once dirname(__FILE__) . '/config.php';
4
+require_once dirname(__FILE__).'/config.php';
5 5
 
6 6
 if (!api_is_platform_admin()) {
7 7
     die ('You must have admin permissions to install plugins');
Please login to merge, or discard this patch.
plugin/buycourses/src/expresscheckout.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,8 +40,8 @@
 block discarded – undo
40 40
     $ErrorSeverityCode = urldecode($resArray["L_SEVERITYCODE0"]);
41 41
 
42 42
     echo "SetExpressCheckout API call failed. ";
43
-    echo "Detailed Error Message: " . $ErrorLongMsg;
44
-    echo "Short Error Message: " . $ErrorShortMsg;
45
-    echo "Error Code: " . $ErrorCode;
46
-    echo "Error Severity Code: " . $ErrorSeverityCode;
43
+    echo "Detailed Error Message: ".$ErrorLongMsg;
44
+    echo "Short Error Message: ".$ErrorShortMsg;
45
+    echo "Error Code: ".$ErrorCode;
46
+    echo "Error Severity Code: ".$ErrorSeverityCode;
47 47
 }
Please login to merge, or discard this patch.
plugin/buycourses/src/success.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
         unset($_SESSION['bc_sale_id']);
59 59
 
60
-        header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/index.php');
60
+        header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/index.php');
61 61
         exit;
62 62
     }
63 63
 
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
     }
167 167
 
168 168
     unset($_SESSION['bc_sale_id']);
169
-    header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/course_catalog.php');
169
+    header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/course_catalog.php');
170 170
     exit;
171 171
 }
172 172
 
Please login to merge, or discard this patch.