Completed
Push — 1.11.x ( a57ddd...bba58e )
by José
25:59
created
plugin/buycourses/src/service_process.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 require_once '../config.php';
14 14
 
15 15
 if (!isset($_REQUEST['t'], $_REQUEST['i'])) {
16
-    header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_catalog.php');
16
+    header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_catalog.php');
17 17
 }
18 18
 
19 19
 $currentUserId = api_get_user_id();
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 $typeUser = intval($_REQUEST['t']) === BuyCoursesPlugin::SERVICE_TYPE_USER;
38 38
 $typeCourse = intval($_REQUEST['t']) === BuyCoursesPlugin::SERVICE_TYPE_COURSE;
39 39
 $typeSession = intval($_REQUEST['t']) === BuyCoursesPlugin::SERVICE_TYPE_SESSION;
40
-$queryString = 'i=' . intval($_REQUEST['i']) . '&t=' . intval($_REQUEST['t']).$additionalQueryString;
40
+$queryString = 'i='.intval($_REQUEST['i']).'&t='.intval($_REQUEST['t']).$additionalQueryString;
41 41
 
42 42
 $serviceInfo = $plugin->getServices(intval($_REQUEST['i']));
43 43
 $userInfo = api_get_user_info($currentUserId);
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         Display::addFlash(
52 52
             Display::return_message($plugin->get_lang('NeedToSelectPaymentType'), 'error', false)
53 53
         );
54
-        header('Location:' . api_get_self() . '?' . $queryString);
54
+        header('Location:'.api_get_self().'?'.$queryString);
55 55
         exit;
56 56
     }
57 57
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         Display::addFlash(
60 60
             Display::return_message($plugin->get_lang('AdditionalInfoRequired'), 'error', false)
61 61
         );
62
-        header('Location:' . api_get_self() . '?' . $queryString);
62
+        header('Location:'.api_get_self().'?'.$queryString);
63 63
         exit;
64 64
     }
65 65
     
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     if ($serviceSaleId !== false) {
69 69
         $_SESSION['bc_service_sale_id'] = $serviceSaleId;
70 70
 
71
-        header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_process_confirm.php');
71
+        header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_process_confirm.php');
72 72
     }
73 73
 
74 74
     exit;
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 
86 86
 if ($typeUser) {
87 87
     $users = $em->getRepository('ChamiloUserBundle:User')->findAll();
88
-    $selectOptions[$userInfo['user_id']] = api_get_person_name($userInfo['firstname'], $userInfo['lastname']) . ' (' . get_lang('Myself') . ')';
88
+    $selectOptions[$userInfo['user_id']] = api_get_person_name($userInfo['firstname'], $userInfo['lastname']).' ('.get_lang('Myself').')';
89 89
     if (!empty($users)) {
90 90
         foreach ($users as $user) {
91 91
             if (intval($userInfo['user_id']) !== intval($user->getId())) {
Please login to merge, or discard this patch.
plugin/buycourses/src/service_success.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
             Display::return_message($plugin->get_lang('OrderCancelled'), 'error', false)
52 52
         );
53 53
 
54
-        header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_catalog.php');
54
+        header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_catalog.php');
55 55
         exit;
56 56
     }
57 57
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             Display::return_message($erroMessage, 'error', false)
67 67
         );
68 68
         unset($_SESSION['wizard']);
69
-        header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_catalog.php');
69
+        header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_catalog.php');
70 70
         exit;
71 71
     }
72 72
 
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 
151 151
     unset($_SESSION['bc_service_sale_id']);
152 152
 
153
-    header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_catalog.php');
153
+    header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_catalog.php');
154 154
 
155 155
     exit;
156 156
 }
Please login to merge, or discard this patch.
plugin/buycourses/src/service_process_confirm.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
         // purchase-specific fields are ignored. This little condition handle this fact.
40 40
         $itemPrice = $serviceSale['price'];
41 41
 
42
-        $returnUrl = api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_success.php';
43
-        $cancelUrl = api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_error.php';
42
+        $returnUrl = api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_success.php';
43
+        $cancelUrl = api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_error.php';
44 44
 
45 45
         // The extra params for handle the hard job, this var is VERY IMPORTANT !!
46 46
         $extra = '';
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
             $plugin->cancelServiceSale(intval($serviceSale['id']));
74 74
 
75
-            header('Location: '. api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_catalog.php');
75
+            header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_catalog.php');
76 76
             exit;
77 77
         }
78 78
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
                 Display::addFlash(
111 111
                     Display::return_message($plugin->get_lang('OrderCancelled'), 'error', false)
112 112
                 );
113
-                header('Location: '. api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_catalog.php');
113
+                header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_catalog.php');
114 114
                 exit;
115 115
             }
116 116
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
             );
150 150
 
151 151
             unset($_SESSION['bc_service_sale_id']);
152
-            header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_catalog.php');
152
+            header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_catalog.php');
153 153
             exit;
154 154
         }
155 155
 
Please login to merge, or discard this patch.