Completed
Push — 1.11.x ( 0671aa...bbb558 )
by José
49:35 queued 25:52
created
plugin/buycourses/src/service_process.php 1 patch
Spacing   +15 added lines, -15 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
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         Display::addFlash(
70 70
             Display::return_message($plugin->get_lang('StoreNameAlreadyExist'), 'error', false)
71 71
         );
72
-        header('Location:' . api_get_self() . '?' . $queryString);
72
+        header('Location:'.api_get_self().'?'.$queryString);
73 73
         exit;
74 74
     }
75 75
     
@@ -107,15 +107,15 @@  discard block
 block discarded – undo
107 107
 
108 108
                 unset($_SESSION['bc_service_sale_id']);
109 109
 
110
-                header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/package_panel.php?id='.$serviceSale['id']);
110
+                header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/package_panel.php?id='.$serviceSale['id']);
111 111
                 exit;
112 112
             }
113 113
         }
114 114
         
115 115
         if ($wizard) {
116
-            header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_process_confirm.php?from=register');
116
+            header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_process_confirm.php?from=register');
117 117
         } else {
118
-            header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_process_confirm.php');
118
+            header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_process_confirm.php');
119 119
         }
120 120
     }
121 121
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 
137 137
 if ($typeUser) {
138 138
     $users = $em->getRepository('ChamiloUserBundle:User')->findAll();
139
-    $selectOptions[$userInfo['user_id']] = api_get_person_name($userInfo['firstname'], $userInfo['lastname']) . ' (' . get_lang('Myself') . ')';
139
+    $selectOptions[$userInfo['user_id']] = api_get_person_name($userInfo['firstname'], $userInfo['lastname']).' ('.get_lang('Myself').')';
140 140
     if (!empty($users)) {
141 141
         foreach ($users as $user) {
142 142
             if (intval($userInfo['user_id']) !== intval($user->getId())) {
@@ -167,11 +167,11 @@  discard block
 block discarded – undo
167 167
     $trial = intval($serviceInfo['allow_trial']);
168 168
 
169 169
     if ($trial) {
170
-        $trialTime = $serviceInfo['trial_period'] == 'Month' ? get_lang($serviceInfo['trial_period']) . '(es)' : get_lang($serviceInfo['trial_period']) . '(s)';
170
+        $trialTime = $serviceInfo['trial_period'] == 'Month' ? get_lang($serviceInfo['trial_period']).'(es)' : get_lang($serviceInfo['trial_period']).'(s)';
171 171
         $form->addHtml('
172 172
             <div class="form-group ">
173 173
                 <label for="qf_373cc5" class="col-sm-6">
174
-                    ' . sprintf($plugin->get_lang('EnableTrialSubscription'), $serviceInfo['trial_frequency'] . ' ' . $trialTime) . '
174
+                    ' . sprintf($plugin->get_lang('EnableTrialSubscription'), $serviceInfo['trial_frequency'].' '.$trialTime).'
175 175
                 </label>
176 176
                 <div class="col-sm-6">
177 177
                     <input cols-size="" name="enable_trial" value="1" id="qf_373cc5" type="checkbox"></div>
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
             </div>
180 180
             <div class="form-group ">
181 181
                 <div class="col-sm-12">
182
-                    <p class="help-block">' . sprintf($plugin->get_lang('EnableTrialSubscriptionHelpText'), $serviceInfo['trial_frequency'] . ' ' . $trialTime) . '</p>
182
+                    <p class="help-block">' . sprintf($plugin->get_lang('EnableTrialSubscriptionHelpText'), $serviceInfo['trial_frequency'].' '.$trialTime).'</p>
183 183
                 </div>
184 184
             </div>
185 185
         ');
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
     $form->addHtml('
191 191
         <div class="form-group">
192 192
             <div class="col-sm-2 pull-right">
193
-                <a id="code-checker" class="btn btn-xs btn-warning">' . $plugin->get_lang('Check') . '</a>
193
+                <a id="code-checker" class="btn btn-xs btn-warning">' . $plugin->get_lang('Check').'</a>
194 194
             </div>
195 195
             <div id="code-verificator-text" class="col-sm-4 pull-right">
196 196
             </div>
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
         </div>
201 201
         <div class="form-group">
202 202
             <div class="col-sm-12">
203
-                <p class="help-block">' . $plugin->get_lang('DiscountCodeInfoText') . '</p>
203
+                <p class="help-block">' . $plugin->get_lang('DiscountCodeInfoText').'</p>
204 204
             </div>
205 205
         </div>
206 206
     ');
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 
219 219
 $tpl = new Template($templateName);
220 220
 if (isset($_GET['from'])) {
221
-    if($_GET['from'] == 'register') {
221
+    if ($_GET['from'] == 'register') {
222 222
         $tpl->assign('wizard', true);
223 223
     }
224 224
 }
Please login to merge, or discard this patch.