Completed
Push — feature/mail_improvements ( a73d6b...e57841 )
by Laurent
02:08
created
generateExpenseNote.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@
 block discarded – undo
168 168
 
169 169
         if ($result > 0) {
170 170
             dol_htmloutput_mesg("Notes de frais créées");
171
-        }else{
171
+        } else{
172 172
             dol_htmloutput_errors("Note de frais non créée");
173 173
         }
174 174
     } else {
Please login to merge, or discard this patch.
generateBilling.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -613,9 +613,12 @@
 block discarded – undo
613 613
 
614 614
         <?php if ($year >= $currentYear || !$t1->service || !$t2->service || !$t3->service || !$t4->service || !$t5->service || !$t6->service || !$t7->service) : ?>
615 615
             <a class="butActionRefused" href="#">Générer</a>
616
-        <?php else: ?>
616
+        <?php else {
617
+    : ?>
617 618
             <button class="butAction" type="submit">Générer</button>
618
-        <?php endif; ?>
619
+        <?php endif;
620
+}
621
+?>
619 622
 
620 623
     </form>
621 624
 
Please login to merge, or discard this patch.
core/triggers/interface_50001_modFlightLog_mailOnIncident.class.php 1 patch
Indentation   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -26,58 +26,58 @@  discard block
 block discarded – undo
26 26
  */
27 27
 class InterfaceMailOnIncident extends DolibarrTriggers
28 28
 {
29
-	/**
30
-	 * @var DoliDB Database handler
31
-	 */
32
-	protected $db;
33
-
34
-	/**
35
-	 * Constructor
36
-	 *
37
-	 * @param DoliDB $db Database handler
38
-	 */
39
-	public function __construct($db)
40
-	{
41
-		$this->db = $db;
42
-
43
-		$this->name = preg_replace('/^Interface/i', '', get_class($this));
44
-		$this->family = "Belgian balloon club";
45
-		$this->description = "Trigger that send an e-mail on flight incident.";
46
-		$this->version = '1.0';
47
-		$this->picto = 'flightlog@flightlog';
48
-	}
49
-
50
-	/**
51
-	 * Trigger name
52
-	 *
53
-	 * @return string Name of trigger file
54
-	 */
55
-	public function getName()
56
-	{
57
-		return $this->name;
58
-	}
59
-
60
-	/**
61
-	 * Trigger description
62
-	 *
63
-	 * @return string Description of trigger file
64
-	 */
65
-	public function getDesc()
66
-	{
67
-		return $this->description;
68
-	}
69
-
70
-
71
-	/**
72
-	 * @param string 		$action 	Event action code
73
-	 * @param Bbcvols 	    $object 	Object
74
-	 * @param User 			$user 		Object user
75
-	 * @param Translate 	$langs 		Object langs
76
-	 * @param Conf 			$conf 		Object conf
77
-	 * @return int              		<0 if KO, 0 if no triggered ran, >0 if OK
78
-	 */
79
-	public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf)
80
-	{
29
+    /**
30
+     * @var DoliDB Database handler
31
+     */
32
+    protected $db;
33
+
34
+    /**
35
+     * Constructor
36
+     *
37
+     * @param DoliDB $db Database handler
38
+     */
39
+    public function __construct($db)
40
+    {
41
+        $this->db = $db;
42
+
43
+        $this->name = preg_replace('/^Interface/i', '', get_class($this));
44
+        $this->family = "Belgian balloon club";
45
+        $this->description = "Trigger that send an e-mail on flight incident.";
46
+        $this->version = '1.0';
47
+        $this->picto = 'flightlog@flightlog';
48
+    }
49
+
50
+    /**
51
+     * Trigger name
52
+     *
53
+     * @return string Name of trigger file
54
+     */
55
+    public function getName()
56
+    {
57
+        return $this->name;
58
+    }
59
+
60
+    /**
61
+     * Trigger description
62
+     *
63
+     * @return string Description of trigger file
64
+     */
65
+    public function getDesc()
66
+    {
67
+        return $this->description;
68
+    }
69
+
70
+
71
+    /**
72
+     * @param string 		$action 	Event action code
73
+     * @param Bbcvols 	    $object 	Object
74
+     * @param User 			$user 		Object user
75
+     * @param Translate 	$langs 		Object langs
76
+     * @param Conf 			$conf 		Object conf
77
+     * @return int              		<0 if KO, 0 if no triggered ran, >0 if OK
78
+     */
79
+    public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf)
80
+    {
81 81
         if (empty($conf->flightlog->enabled) || empty($conf->workflow->enabled)){
82 82
             return 0;
83 83
         }
@@ -132,6 +132,6 @@  discard block
 block discarded – undo
132 132
             dol_syslog("Error while sending mail in flight log module : incident", LOG_ERR);
133 133
         }
134 134
 
135
-		return 0;
136
-	}
135
+        return 0;
136
+    }
137 137
 }
Please login to merge, or discard this patch.
facture.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         $command = new CreateFlightBillCommand($flight->getId(), $modeReglement, $conditionReglement, $documentModel, $type, $publicNote, $privateNote,$bankAccount);
132 132
         $handler->handle($command);
133 133
         Header("Location: card.php?id=" . $flight->getId());
134
-    }catch (\Exception $e){
134
+    } catch (\Exception $e){
135 135
         dol_syslog($e->getMessage(),LOG_ERR);
136 136
         dol_htmloutput_mesg("Facture non créée", '', 'error');
137 137
     }
@@ -267,9 +267,12 @@  discard block
 block discarded – undo
267 267
 
268 268
         <?php if (!$flightProduct) : ?>
269 269
             <a class="butActionRefused" href="#">Générer</a>
270
-        <?php else: ?>
270
+        <?php else {
271
+    : ?>
271 272
             <button class="butAction" type="submit">Générer</button>
272
-        <?php endif; ?>
273
+        <?php endif;
274
+}
275
+?>
273 276
 
274 277
         <a class="butAction" href="<?php echo DOL_URL_ROOT . '/flightlog/card.php?id=' . $flight->id; ?>">Retour au
275 278
             vol</a>
Please login to merge, or discard this patch.
generateMonthlyBilling.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -239,9 +239,12 @@
 block discarded – undo
239 239
                     <?php echo $langs->trans('La periode demandée n\'est pas cloturée.') ?>
240 240
                 </p>
241 241
                 <a class="butActionRefused" href="#">Générer</a>
242
-            <?php else: ?>
242
+            <?php else {
243
+    : ?>
243 244
                 <button class="butAction" type="submit">Générer</button>
244
-            <?php endif; ?>
245
+            <?php endif;
246
+}
247
+?>
245 248
 
246 249
         </form>
247 250
     </section>
Please login to merge, or discard this patch.
tabs/project/instructions.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -211,8 +211,11 @@  discard block
 block discarded – undo
211 211
                         <?php if ($userWrite): ?>
212 212
                             <?php echo $formOther->select_percent($currentTask->progress,
213 213
                                 sprintf('progression[%s]', $currentTask->id, false, 10)); ?>
214
-                        <?php else: ?>
215
-                            <span><?php echo $currentTask->progress; ?> %</span>
214
+                        <?php else {
215
+    : ?>
216
+                            <span><?php echo $currentTask->progress;
217
+}
218
+?> %</span>
216 219
                         <?php endif; ?>
217 220
 
218 221
                     </td>
@@ -232,14 +235,17 @@  discard block
 block discarded – undo
232 235
                                     <?php echo !empty($flight->linkedObjectsIds) && in_array($currentTask->id,
233 236
                                         $flight->linkedObjectsIds[$currentTask->table_element]) ? 'checked' : '' ?>
234 237
                                 />
235
-                            <?php else: ?>
238
+                            <?php else {
239
+    : ?>
236 240
 
237 241
                                 <?php if (!empty($flight->linkedObjectsIds) && in_array($currentTask->id,
238 242
                                         $flight->linkedObjectsIds[$currentTask->table_element])): ?>
239 243
                                     <span class="fa fa-check"></span>
240 244
                                 <?php else: ?>
241 245
                                     <span class="fa fa-times"></span>
242
-                                <?php endif; ?>
246
+                                <?php endif;
247
+}
248
+?>
243 249
 
244 250
                             <?php endif; ?>
245 251
 
Please login to merge, or discard this patch.
addFlight.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -262,7 +262,7 @@
 block discarded – undo
262 262
                 <td class="fieldrequired"><?php echo $langs->trans('Commande du vol')?></td>
263 263
                 <td class="js-order">
264 264
                     <?php
265
-                     echo $html->selectarray('order_id',$commande->liste_array(2),$_POST['order_id'], 1,0,0,'',0,0,0,'','minwidth200',1);
265
+                        echo $html->selectarray('order_id',$commande->liste_array(2),$_POST['order_id'], 1,0,0,'',0,0,0,'','minwidth200',1);
266 266
                     ?>
267 267
                 </td>
268 268
             </tr>
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
 
70 70
             $msg = '<div class="ok">L\'ajout du vol du : ' . $_POST["reday"] . '/' . $_POST["remonth"] . '/' . $_POST["reyear"] . ' s\'est correctement effectue ! </div>';
71 71
             Header("Location: card.php?id=" . $vol->id);
72
-        }catch (\Exception $e){
72
+        } catch (\Exception $e){
73 73
             $msg = '<div class="error">Erreur lors de l\'ajout du vol : ' . $vol->error . '! </div>';
74 74
         }
75 75
 
Please login to merge, or discard this patch.
addOrder.php 1 patch
Braces   +13 added lines, -6 removed lines patch added patch discarded remove patch
@@ -25,8 +25,10 @@  discard block
 block discarded – undo
25 25
 foreach ($dirsociete as $dirroot)
26 26
 {
27 27
     $res=dol_include_once($dirroot.$module.'.php');
28
-    if ($res) break;
29
-}
28
+    if ($res) {
29
+        break;
30
+    }
31
+    }
30 32
 $modCodeClient = new $module;
31 33
 // Load object modCodeFournisseur
32 34
 $module=(! empty($conf->global->SOCIETE_CODECLIENT_ADDON)?$conf->global->SOCIETE_CODECLIENT_ADDON:'mod_codeclient_leopard');
@@ -38,8 +40,10 @@  discard block
 block discarded – undo
38 40
 foreach ($dirsociete as $dirroot)
39 41
 {
40 42
     $res=dol_include_once($dirroot.$module.'.php');
41
-    if ($res) break;
42
-}
43
+    if ($res) {
44
+        break;
45
+    }
46
+    }
43 47
 $modCodeFournisseur = new $module;
44 48
 
45 49
 // Load translation files required by the page
@@ -302,8 +306,11 @@  discard block
 block discarded – undo
302 306
                             </script>
303 307
                             <a href="#" class="hideonsmartphone" onclick="javascript: CheckVAT(document.add.tva_intra.value);"><?php echo $langs->trans("VATIntraCheck"); ?></a>
304 308
                             <?php echo $html->textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1); ?>
305
-                        <?php else: ?>
306
-                            <a href="<?php echo $langs->transcountry("VATIntraCheckURL",$object->country_id); ?>" target="_blank"><?php echo img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help'); ?></a>
309
+                        <?php else {
310
+    : ?>
311
+                            <a href="<?php echo $langs->transcountry("VATIntraCheckURL",$object->country_id);
312
+}
313
+?>" target="_blank"><?php echo img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help'); ?></a>
307 314
                         <?php endif; ?>
308 315
                    <?php endif; ?>
309 316
                 </td>
Please login to merge, or discard this patch.
card_tab_financial.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@
 block discarded – undo
101 101
 if(!$object->isLinkedToOrder()){
102 102
     print '<tr><td class="fieldrequired">' . $langs->trans("Fieldcost") . '</td><td>' . $object->cost . " " . $langs->getCurrencySymbol($conf->currency) . '</td></tr>';
103 103
     print '<tr><td class="fieldrequired">' . $langs->trans("Fieldfk_receiver") . '</td><td>' . $receiver->getNomUrl(1) . '</td></tr>';
104
-}else{
104
+} else{
105 105
     print '<tr><td class="fieldrequired">' . $langs->trans("Order") . '</td><td>' . $object->getOrder()->getNomUrl(1). '</td></tr>';
106 106
 }
107 107
 print '</table>';
Please login to merge, or discard this patch.