Completed
Push — 1.10.x ( 986d2b...f19030 )
by Angel Fernando Quiroz
69:29 queued 19:50
created
plugin/buycourses/src/process.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 $currentUserId = api_get_user_id();
13 13
 
14 14
 if (empty($currentUserId)) {
15
-    header('Location: ' . api_get_path(WEB_CODE_PATH) . 'auth/inscription.php');
15
+    header('Location: '.api_get_path(WEB_CODE_PATH).'auth/inscription.php');
16 16
     exit;
17 17
 }
18 18
 
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
 $buyingCourse = intval($_REQUEST['t']) === BuyCoursesPlugin::PRODUCT_TYPE_COURSE;
29 29
 $buyingSession = intval($_REQUEST['t']) === BuyCoursesPlugin::PRODUCT_TYPE_SESSION;
30
-$queryString = 'i=' . intval($_REQUEST['i']) . '&t=' . intval($_REQUEST['t']);
30
+$queryString = 'i='.intval($_REQUEST['i']).'&t='.intval($_REQUEST['t']);
31 31
 
32 32
 if ($buyingCourse) {
33 33
     $courseInfo = $plugin->getCourseInfo($_REQUEST['i']);
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         Display::addFlash(
49 49
             Display::return_message($plugin->get_lang('NeedToSelectPaymentType'), 'error', false)
50 50
         );
51
-        header('Location:' . api_get_self() . '?' . $queryString);
51
+        header('Location:'.api_get_self().'?'.$queryString);
52 52
         exit;
53 53
     }
54 54
     
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
     if ($saleId !== false) {
58 58
         $_SESSION['bc_sale_id'] = $saleId;
59
-        header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/process_confirm.php');  
59
+        header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/process_confirm.php');  
60 60
     }
61 61
 
62 62
     exit;
Please login to merge, or discard this patch.
plugin/buycourses/src/paypalfunctions.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -67,12 +67,12 @@  discard block
 block discarded – undo
67 67
 function CallShortcutExpressCheckout($paymentAmount, $currencyCodeType, $paymentType, $returnURL, $cancelURL, $extra)
68 68
 {
69 69
     // Construct the parameter string that describes the SetExpressCheckout API call in the shortcut implementation
70
-    $nvpstr = "&PAYMENTREQUEST_0_AMT=" . $paymentAmount;
71
-    $nvpstr .= "&PAYMENTREQUEST_0_ITEMAMT=" . $paymentAmount;
72
-    $nvpstr .= "&PAYMENTREQUEST_0_PAYMENTACTION=" . $paymentType;
73
-    $nvpstr .= "&RETURNURL=" . $returnURL;
74
-    $nvpstr .= "&CANCELURL=" . $cancelURL;
75
-    $nvpstr .= "&PAYMENTREQUEST_0_CURRENCYCODE=" . $currencyCodeType;
70
+    $nvpstr = "&PAYMENTREQUEST_0_AMT=".$paymentAmount;
71
+    $nvpstr .= "&PAYMENTREQUEST_0_ITEMAMT=".$paymentAmount;
72
+    $nvpstr .= "&PAYMENTREQUEST_0_PAYMENTACTION=".$paymentType;
73
+    $nvpstr .= "&RETURNURL=".$returnURL;
74
+    $nvpstr .= "&CANCELURL=".$cancelURL;
75
+    $nvpstr .= "&PAYMENTREQUEST_0_CURRENCYCODE=".$currencyCodeType;
76 76
     $nvpstr .= $extra;
77 77
 
78 78
     $_SESSION["currencyCodeType"] = $currencyCodeType;
@@ -116,20 +116,20 @@  discard block
 block discarded – undo
116 116
 )
117 117
 {
118 118
     // Construct the parameter string that describes the SetExpressCheckout API call in the shortcut implementation
119
-    $nvpstr = "&PAYMENTREQUEST_0_AMT=" . $paymentAmount;
120
-    $nvpstr = $nvpstr . "&PAYMENTREQUEST_0_PAYMENTACTION=" . $paymentType;
121
-    $nvpstr = $nvpstr . "&RETURNURL=" . $returnURL;
122
-    $nvpstr = $nvpstr . "&CANCELURL=" . $cancelURL;
123
-    $nvpstr = $nvpstr . "&PAYMENTREQUEST_0_CURRENCYCODE=" . $currencyCodeType;
124
-    $nvpstr = $nvpstr . "&ADDROVERRIDE=1";
125
-    $nvpstr = $nvpstr . "&PAYMENTREQUEST_0_SHIPTONAME=" . $shipToName;
126
-    $nvpstr = $nvpstr . "&PAYMENTREQUEST_0_SHIPTOSTREET=" . $shipToStreet;
127
-    $nvpstr = $nvpstr . "&PAYMENTREQUEST_0_SHIPTOSTREET2=" . $shipToStreet2;
128
-    $nvpstr = $nvpstr . "&PAYMENTREQUEST_0_SHIPTOCITY=" . $shipToCity;
129
-    $nvpstr = $nvpstr . "&PAYMENTREQUEST_0_SHIPTOSTATE=" . $shipToState;
130
-    $nvpstr = $nvpstr . "&PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE=" . $shipToCountryCode;
131
-    $nvpstr = $nvpstr . "&PAYMENTREQUEST_0_SHIPTOZIP=" . $shipToZip;
132
-    $nvpstr = $nvpstr . "&PAYMENTREQUEST_0_SHIPTOPHONENUM=" . $phoneNum;
119
+    $nvpstr = "&PAYMENTREQUEST_0_AMT=".$paymentAmount;
120
+    $nvpstr = $nvpstr."&PAYMENTREQUEST_0_PAYMENTACTION=".$paymentType;
121
+    $nvpstr = $nvpstr."&RETURNURL=".$returnURL;
122
+    $nvpstr = $nvpstr."&CANCELURL=".$cancelURL;
123
+    $nvpstr = $nvpstr."&PAYMENTREQUEST_0_CURRENCYCODE=".$currencyCodeType;
124
+    $nvpstr = $nvpstr."&ADDROVERRIDE=1";
125
+    $nvpstr = $nvpstr."&PAYMENTREQUEST_0_SHIPTONAME=".$shipToName;
126
+    $nvpstr = $nvpstr."&PAYMENTREQUEST_0_SHIPTOSTREET=".$shipToStreet;
127
+    $nvpstr = $nvpstr."&PAYMENTREQUEST_0_SHIPTOSTREET2=".$shipToStreet2;
128
+    $nvpstr = $nvpstr."&PAYMENTREQUEST_0_SHIPTOCITY=".$shipToCity;
129
+    $nvpstr = $nvpstr."&PAYMENTREQUEST_0_SHIPTOSTATE=".$shipToState;
130
+    $nvpstr = $nvpstr."&PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE=".$shipToCountryCode;
131
+    $nvpstr = $nvpstr."&PAYMENTREQUEST_0_SHIPTOZIP=".$shipToZip;
132
+    $nvpstr = $nvpstr."&PAYMENTREQUEST_0_SHIPTOPHONENUM=".$phoneNum;
133 133
 
134 134
     $_SESSION["currencyCodeType"] = $currencyCodeType;
135 135
     $_SESSION["PaymentType"] = $paymentType;
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
      * Build a second API request to PayPal, using the token as the
173 173
      * ID to get the details on the payment authorization
174 174
      */
175
-    $nvpstr = "&TOKEN=" . $token;
175
+    $nvpstr = "&TOKEN=".$token;
176 176
 
177 177
     /**
178 178
      * Make the API call and store the results in an array.
@@ -213,9 +213,9 @@  discard block
 block discarded – undo
213 213
     $payerID = urlencode($_SESSION['payer_id']);
214 214
     $serverName = urlencode($_SERVER['SERVER_NAME']);
215 215
 
216
-    $nvpstr = '&TOKEN=' . $token . '&PAYERID=' . $payerID . '&PAYMENTREQUEST_0_PAYMENTACTION=' . $paymentType . '&PAYMENTREQUEST_0_AMT=' . $FinalPaymentAmt;
217
-    $nvpstr .= '&PAYMENTREQUEST_0_CURRENCYCODE=' . $currencyCodeType . '&IPADDRESS=' . $serverName;
218
-    $nvpstr = '&' . http_build_query([
216
+    $nvpstr = '&TOKEN='.$token.'&PAYERID='.$payerID.'&PAYMENTREQUEST_0_PAYMENTACTION='.$paymentType.'&PAYMENTREQUEST_0_AMT='.$FinalPaymentAmt;
217
+    $nvpstr .= '&PAYMENTREQUEST_0_CURRENCYCODE='.$currencyCodeType.'&IPADDRESS='.$serverName;
218
+    $nvpstr = '&'.http_build_query([
219 219
         'TOKEN' => $token,
220 220
         'PAYERID' => $payerID,
221 221
         'PAYMENTACTION' => $paymentType,
@@ -269,20 +269,20 @@  discard block
 block discarded – undo
269 269
                        $countryCode, $currencyCode)
270 270
 {
271 271
     //Construct the parameter string that describes DoDirectPayment
272
-    $nvpstr = "&AMT=" . $paymentAmount;
273
-    $nvpstr = $nvpstr . "&CURRENCYCODE=" . $currencyCode;
274
-    $nvpstr = $nvpstr . "&PAYMENTACTION=" . $paymentType;
275
-    $nvpstr = $nvpstr . "&CREDITCARDTYPE=" . $creditCardType;
276
-    $nvpstr = $nvpstr . "&ACCT=" . $creditCardNumber;
277
-    $nvpstr = $nvpstr . "&EXPDATE=" . $expDate;
278
-    $nvpstr = $nvpstr . "&CVV2=" . $cvv2;
279
-    $nvpstr = $nvpstr . "&FIRSTNAME=" . $firstName;
280
-    $nvpstr = $nvpstr . "&LASTNAME=" . $lastName;
281
-    $nvpstr = $nvpstr . "&STREET=" . $street;
282
-    $nvpstr = $nvpstr . "&CITY=" . $city;
283
-    $nvpstr = $nvpstr . "&STATE=" . $state;
284
-    $nvpstr = $nvpstr . "&COUNTRYCODE=" . $countryCode;
285
-    $nvpstr = $nvpstr . "&IPADDRESS=" . $_SERVER['REMOTE_ADDR'];
272
+    $nvpstr = "&AMT=".$paymentAmount;
273
+    $nvpstr = $nvpstr."&CURRENCYCODE=".$currencyCode;
274
+    $nvpstr = $nvpstr."&PAYMENTACTION=".$paymentType;
275
+    $nvpstr = $nvpstr."&CREDITCARDTYPE=".$creditCardType;
276
+    $nvpstr = $nvpstr."&ACCT=".$creditCardNumber;
277
+    $nvpstr = $nvpstr."&EXPDATE=".$expDate;
278
+    $nvpstr = $nvpstr."&CVV2=".$cvv2;
279
+    $nvpstr = $nvpstr."&FIRSTNAME=".$firstName;
280
+    $nvpstr = $nvpstr."&LASTNAME=".$lastName;
281
+    $nvpstr = $nvpstr."&STREET=".$street;
282
+    $nvpstr = $nvpstr."&CITY=".$city;
283
+    $nvpstr = $nvpstr."&STATE=".$state;
284
+    $nvpstr = $nvpstr."&COUNTRYCODE=".$countryCode;
285
+    $nvpstr = $nvpstr."&IPADDRESS=".$_SERVER['REMOTE_ADDR'];
286 286
 
287 287
     $resArray = hash_call("DoDirectPayment", $nvpstr);
288 288
 
@@ -345,13 +345,13 @@  discard block
 block discarded – undo
345 345
     //if USE_PROXY constant set to TRUE in Constants.php, then only proxy will be enabled.
346 346
     //Set proxy name to PROXY_HOST and port number to PROXY_PORT in constants.php
347 347
     if ($USE_PROXY) {
348
-        curl_setopt($ch, CURLOPT_PROXY, $PROXY_HOST . ":" . $PROXY_PORT);
348
+        curl_setopt($ch, CURLOPT_PROXY, $PROXY_HOST.":".$PROXY_PORT);
349 349
     }
350 350
 
351 351
     //NVPRequest for submitting to server
352
-    $nvpreq = "METHOD=" . urlencode($methodName) . "&VERSION=" . urlencode($version) .
353
-        "&PWD=" . urlencode($API_Password) . "&USER=" . urlencode($API_UserName) .
354
-        "&SIGNATURE=" . urlencode($API_Signature) . $nvpStr . "&BUTTONSOURCE=" . urlencode($sBNCode);
352
+    $nvpreq = "METHOD=".urlencode($methodName)."&VERSION=".urlencode($version).
353
+        "&PWD=".urlencode($API_Password)."&USER=".urlencode($API_UserName).
354
+        "&SIGNATURE=".urlencode($API_Signature).$nvpStr."&BUTTONSOURCE=".urlencode($sBNCode);
355 355
 
356 356
     //setting the nvpreq as POST FIELD to curl
357 357
     curl_setopt($ch, CURLOPT_POSTFIELDS, $nvpreq);
@@ -385,8 +385,8 @@  discard block
 block discarded – undo
385 385
 {
386 386
     global $PAYPAL_URL;
387 387
     // Redirect to paypal.com here
388
-    $payPalURL = $PAYPAL_URL . $token;
389
-    header("Location: " . $payPalURL);
388
+    $payPalURL = $PAYPAL_URL.$token;
389
+    header("Location: ".$payPalURL);
390 390
     exit;
391 391
 }
392 392
 
Please login to merge, or discard this patch.
plugin/buycourses/src/process_confirm.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
             $sale['price'],
46 46
             $currency['iso_code'],
47 47
             'paypal',
48
-            api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/success.php',
49
-            api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/error.php',
48
+            api_get_path(WEB_PLUGIN_PATH).'buycourses/src/success.php',
49
+            api_get_path(WEB_PLUGIN_PATH).'buycourses/src/error.php',
50 50
             $extra
51 51
         );
52 52
 
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
                 unset($_SESSION['bc_sale_id']);
94 94
 
95
-                header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/index.php');
95
+                header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/index.php');
96 96
                 exit;
97 97
             }
98 98
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
             );
130 130
 
131 131
             unset($_SESSION['bc_sale_id']);
132
-            header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/course_catalog.php');
132
+            header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/course_catalog.php');
133 133
             exit;
134 134
         }
135 135
 
Please login to merge, or discard this patch.
plugin/buycourses/src/sales_report.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
         api_not_allowed(true);
25 25
     }
26 26
 
27
-    $urlToRedirect = api_get_self() . '?';
27
+    $urlToRedirect = api_get_self().'?';
28 28
 
29 29
     switch ($_GET['action']) {
30 30
         case 'confirm':
@@ -93,10 +93,10 @@  discard block
 block discarded – undo
93 93
     get_lang('Filter'),
94 94
     [$plugin->get_lang('ByStatus'), $plugin->get_lang('ByUser')]
95 95
 );
96
-$form->addHtml('<div id="report-by-status" ' . ($selectedFilterType !== '0' ? 'style="display:none"' : '') . '>');
96
+$form->addHtml('<div id="report-by-status" '.($selectedFilterType !== '0' ? 'style="display:none"' : '').'>');
97 97
 $form->addSelect('status', $plugin->get_lang('OrderStatus'), $saleStatuses);
98 98
 $form->addHtml('</div>');
99
-$form->addHtml('<div id="report-by-user" ' . ($selectedFilterType !== '1' ? 'style="display:none"' : '') . '>');
99
+$form->addHtml('<div id="report-by-user" '.($selectedFilterType !== '1' ? 'style="display:none"' : '').'>');
100 100
 $form->addText('user', get_lang('UserName'), false);
101 101
 $form->addHtml('</div>');
102 102
 $form->addButtonFilter(get_lang('Search'));
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
     $toolbar .= Display::toolbarButton(
146 146
         $plugin->get_lang('PaypalPayoutCommissions'),
147
-        api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/paypal_payout.php',
147
+        api_get_path(WEB_PLUGIN_PATH).'buycourses/src/paypal_payout.php',
148 148
         'paypal',
149 149
         'primary',
150 150
         ['title' => $plugin->get_lang('PaypalPayoutCommissions')]
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 
159 159
     $toolbar .= Display::toolbarButton(
160 160
         $plugin->get_lang('PayoutReport'),
161
-        api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/payout_report.php',
161
+        api_get_path(WEB_PLUGIN_PATH).'buycourses/src/payout_report.php',
162 162
         'money',
163 163
         'info',
164 164
         ['title' => $plugin->get_lang('PayoutReport')]
Please login to merge, or discard this patch.
plugin/buycourses/config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1 1
 <?php
2 2
 /* For licensing terms, see /license.txt */
3 3
 
4
-require_once __DIR__ . '/../../main/inc/global.inc.php';
4
+require_once __DIR__.'/../../main/inc/global.inc.php';
Please login to merge, or discard this patch.
plugin/buycourses/install.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 /**
9 9
  * Initialization
10 10
  */
11
-require_once dirname(__FILE__) . '/config.php';
11
+require_once dirname(__FILE__).'/config.php';
12 12
 if (!api_is_platform_admin()) {
13 13
     die ('You must have admin permissions to install plugins');
14 14
 }
Please login to merge, or discard this patch.
plugin/ext_auth_chamilo_logout_button_behaviour/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
     api_get_setting('cas_activate') == 'true' &&
8 8
     $_user['auth_source'] == CAS_AUTH_SOURCE
9 9
 ) {
10
-    $_template['show_message']   = true;
10
+    $_template['show_message'] = true;
11 11
     // the link URL
12 12
     $link_url = "#";
13 13
     if (!empty($plugin_info['settings']['ext_auth_chamilo_logout_button_behaviour_eaclbb_form_link_url'])) {
Please login to merge, or discard this patch.
plugin/ext_auth_chamilo_logout_button_behaviour/plugin.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  */
11 11
 
12 12
 //the plugin title
13
-$plugin_info['title']      = 'Enable or disable logout button';
13
+$plugin_info['title'] = 'Enable or disable logout button';
14 14
 
15 15
 //the comments that go with the plugin
16 16
 $plugin_info['comment']     = "If you use some other authentication than local Chamilo authentication, you may have to disable the Chamilo logout button and give users information about your SSO logout.";
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
 $form->addElement("html", "<div class='normal-message'>Fill the text boxes below to overwrite the default values used in this plugin</div>");
24 24
 $form->addElement('text', 'eaclbb_form_link_url', 'Page to load when clicking on the logout button');
25 25
 $form->addElement('text', 'eaclbb_form_link_infobulle', 'Tooltip text for the logout button (displayed on mouseover)');
26
-$form->addElement('checkbox', 'eaclbb_form_link_image', "Display the logout button disabled (black and white)", "",  array('checked' => true));
27
-$form->addElement('checkbox', 'eaclbb_form_alert_onoff', "Display an alert when clicking on the logout button", "",  array('checked' => true));
26
+$form->addElement('checkbox', 'eaclbb_form_link_image', "Display the logout button disabled (black and white)", "", array('checked' => true));
27
+$form->addElement('checkbox', 'eaclbb_form_alert_onoff', "Display an alert when clicking on the logout button", "", array('checked' => true));
28 28
 $form->addElement('text', 'eaclbb_form_alert_text', "Text displayed in the alert box when clickng on the logout button (if checkbox above has been checked).");
29 29
 
30 30
 $form->addButtonSave(get_lang('Save'), 'submit_button');
@@ -44,4 +44,4 @@  discard block
 block discarded – undo
44 44
 $plugin_info['settings_form'] = $form;
45 45
 
46 46
 // Set the templates that are going to be used
47
-$plugin_info['templates']   = array('template.tpl');
47
+$plugin_info['templates'] = array('template.tpl');
Please login to merge, or discard this patch.
plugin/bbb/listing.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -65,22 +65,22 @@  discard block
 block discarded – undo
65 65
         case 'end':
66 66
             $bbb->endMeeting($_GET['id']);
67 67
             $message = Display::return_message(
68
-                get_lang('MeetingClosed') . '<br />' . get_lang(
68
+                get_lang('MeetingClosed').'<br />'.get_lang(
69 69
                     'MeetingClosedComment'
70 70
                 ),
71 71
                 'success',
72 72
                 false
73 73
             );
74 74
 
75
-            if (file_exists(__DIR__ . '/config.vm.php')) {
76
-                require __DIR__ . '/../../vendor/autoload.php';
75
+            if (file_exists(__DIR__.'/config.vm.php')) {
76
+                require __DIR__.'/../../vendor/autoload.php';
77 77
 
78
-                require __DIR__ . '/lib/vm/AbstractVM.php';
79
-                require __DIR__ . '/lib/vm/VMInterface.php';
80
-                require __DIR__ . '/lib/vm/DigitalOceanVM.php';
81
-                require __DIR__ . '/lib/VM.php';
78
+                require __DIR__.'/lib/vm/AbstractVM.php';
79
+                require __DIR__.'/lib/vm/VMInterface.php';
80
+                require __DIR__.'/lib/vm/DigitalOceanVM.php';
81
+                require __DIR__.'/lib/VM.php';
82 82
 
83
-                $config = require __DIR__ . '/config.vm.php';
83
+                $config = require __DIR__.'/config.vm.php';
84 84
 
85 85
                 $vm = new VM($config);
86 86
                 $vm->resizeToMinLimit();
@@ -122,4 +122,4 @@  discard block
 block discarded – undo
122 122
 $tpl->assign('message', $message);
123 123
 $listing_tpl = 'bbb/listing.tpl';
124 124
 $content = $tpl->fetch($listing_tpl);
125
-$tpl->assign('content', $content);$tpl->display_one_col_template();
125
+$tpl->assign('content', $content); $tpl->display_one_col_template();
Please login to merge, or discard this patch.