@@ -40,7 +40,9 @@ |
||
40 | 40 | $titreform = 'SendMail'; |
41 | 41 | |
42 | 42 | $object->fetch_projet(); |
43 | - if (!isset($file)) $file = null; |
|
43 | + if (!isset($file)) { |
|
44 | + $file = null; |
|
45 | + } |
|
44 | 46 | $ref = dol_sanitizeFileName($object->ref); |
45 | 47 | if (!in_array($object->element, array('user', 'member'))) { |
46 | 48 | //$fileparams['fullname'] can be filled from the card |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | } |
60 | 60 | } |
61 | 61 | |
62 | - $file = isset($fileparams['fullname'])?$fileparams['fullname']:null; |
|
62 | + $file = isset($fileparams['fullname']) ? $fileparams['fullname'] : null; |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | // Define output language |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $fileparams = dol_most_recent_file($diroutput.'/'.$ref, preg_quote($ref, '/').'[^\-]+'); |
114 | 114 | } |
115 | 115 | |
116 | - $file = isset($fileparams['fullname'])?$fileparams['fullname']:null; |
|
116 | + $file = isset($fileparams['fullname']) ? $fileparams['fullname'] : null; |
|
117 | 117 | } |
118 | 118 | } |
119 | 119 | |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | $formmail->fromname = (!empty($conf->global->ORDER_SUPPLIER_EMAIL_SENDER_NAME) ? $conf->global->ORDER_SUPPLIER_EMAIL_SENDER_NAME : ''); |
160 | 160 | $formmail->fromtype = 'special'; |
161 | 161 | } |
162 | - if ($object->element === 'recruitmentcandidature' ) { |
|
162 | + if ($object->element === 'recruitmentcandidature') { |
|
163 | 163 | $formmail->frommail = (!empty($conf->global->RECRUITMENT_EMAIL_SENDER) ? $conf->global->RECRUITMENT_EMAIL_SENDER : $recruitermail); |
164 | 164 | $formmail->fromname = (!empty($conf->global->RECRUITMENT_EMAIL_SENDER_NAME) ? $conf->global->RECRUITMENT_EMAIL_SENDER_NAME : (!empty($recruitername) ? $recruitername : '')); |
165 | 165 | $formmail->fromtype = 'special'; |
@@ -271,10 +271,10 @@ discard block |
||
271 | 271 | |
272 | 272 | $substitutionarray['__CHECK_READ__'] = ""; |
273 | 273 | if (is_object($object) && is_object($object->thirdparty)) { |
274 | - $checkRead= '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php'; |
|
275 | - $checkRead.='?tag='.(!empty($object->thirdparty->tag)?urlencode($object->thirdparty->tag):""); |
|
276 | - $checkRead.='&securitykey='.(getDolGlobalString('MAILING_EMAIL_UNSUBSCRIBE_KEY') ? urlencode(getDolGlobalString('MAILING_EMAIL_UNSUBSCRIBE_KEY')) : ""); |
|
277 | - $checkRead.='" width="1" height="1" style="width:1px;height:1px" border="0"/>'; |
|
274 | + $checkRead = '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php'; |
|
275 | + $checkRead .= '?tag='.(!empty($object->thirdparty->tag) ?urlencode($object->thirdparty->tag) : ""); |
|
276 | + $checkRead .= '&securitykey='.(getDolGlobalString('MAILING_EMAIL_UNSUBSCRIBE_KEY') ? urlencode(getDolGlobalString('MAILING_EMAIL_UNSUBSCRIBE_KEY')) : ""); |
|
277 | + $checkRead .= '" width="1" height="1" style="width:1px;height:1px" border="0"/>'; |
|
278 | 278 | $substitutionarray['__CHECK_READ__'] = $checkRead; |
279 | 279 | } |
280 | 280 | $substitutionarray['__CONTACTCIVNAME__'] = ''; |
@@ -359,7 +359,7 @@ discard block |
||
359 | 359 | } |
360 | 360 | } |
361 | 361 | $contacttoshow .= $contactstatic->getFullName($outputlangs, 1); |
362 | - $contacttoshow .= " <".($contactstatic->email ? $contactstatic->email : $langs->transnoentitiesnoconv("NoEMail")) .">"; |
|
362 | + $contacttoshow .= " <".($contactstatic->email ? $contactstatic->email : $langs->transnoentitiesnoconv("NoEMail")).">"; |
|
363 | 363 | $liste[$contact['id']] = $contacttoshow; |
364 | 364 | } |
365 | 365 | } |
@@ -663,7 +663,9 @@ |
||
663 | 663 | print $object->getLibStatut(5); |
664 | 664 | } elseif ($key == 'fk_parent_line') { |
665 | 665 | $moparent = $object->getMoParent(); |
666 | - if (is_object($moparent)) print $moparent->getNomUrl(1); |
|
666 | + if (is_object($moparent)) { |
|
667 | + print $moparent->getNomUrl(1); |
|
668 | + } |
|
667 | 669 | } elseif ($key == 'rowid') { |
668 | 670 | print $object->showOutputField($val, $key, $object->id, ''); |
669 | 671 | } else { |
@@ -639,7 +639,7 @@ |
||
639 | 639 | $selected = 1; |
640 | 640 | } |
641 | 641 | } |
642 | - print $object->getKanbanView('', array('bom'=>($obj->fk_bom > 0 ? $bom : null), 'product'=>($obj->fk_product > 0 ? $product: null), 'selected' => $selected)); |
|
642 | + print $object->getKanbanView('', array('bom'=>($obj->fk_bom > 0 ? $bom : null), 'product'=>($obj->fk_product > 0 ? $product : null), 'selected' => $selected)); |
|
643 | 643 | if ($i == ($imaxinloop - 1)) { |
644 | 644 | print '</div>'; |
645 | 645 | print '</td></tr>'; |
@@ -132,7 +132,9 @@ |
||
132 | 132 | // Ref |
133 | 133 | if (!empty($stripeacc)) { |
134 | 134 | $connect = $stripeacc.'/'; |
135 | - } else $connect = null; |
|
135 | + } else { |
|
136 | + $connect = null; |
|
137 | + } |
|
136 | 138 | |
137 | 139 | $url = 'https://dashboard.stripe.com/'.$connect.'test/payouts/'.$payout->id; |
138 | 140 | if ($servicestatus) { |
@@ -426,7 +426,7 @@ |
||
426 | 426 | $linkback = '<a href="'.dol_buildpath('/recruitment/recruitmentcandidature_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; |
427 | 427 | |
428 | 428 | $morehtmlref = '<div class="refidno">'; |
429 | - $morehtmlref.= $object->getFullName('', 1); |
|
429 | + $morehtmlref .= $object->getFullName('', 1); |
|
430 | 430 | /* |
431 | 431 | // Ref customer |
432 | 432 | $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'cashcontrol'; // To manage different context of search |
42 | 42 | $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
43 | 43 | $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
44 | -$mode = GETPOST('mode', 'alpha'); // for mode view result |
|
44 | +$mode = GETPOST('mode', 'alpha'); // for mode view result |
|
45 | 45 | $id = GETPOST('id', 'int'); |
46 | 46 | |
47 | 47 | // Load variable for pagination |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | |
74 | 74 | // Default sort order (if not yet defined by previous GETPOST) |
75 | 75 | if (!$sortfield) { |
76 | - reset($object->fields); // Reset is required to avoid key() to return null. |
|
76 | + reset($object->fields); // Reset is required to avoid key() to return null. |
|
77 | 77 | $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. |
78 | 78 | } |
79 | 79 | if (!$sortorder) { |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | } |
247 | 247 | } else { |
248 | 248 | if (preg_match('/(_dtstart|_dtend)$/', $key) && $search[$key] != '') { |
249 | - $columnName=preg_replace('/(_dtstart|_dtend)$/', '', $key); |
|
249 | + $columnName = preg_replace('/(_dtstart|_dtend)$/', '', $key); |
|
250 | 250 | if (preg_match('/^(date|timestamp|datetime)/', $object->fields[$columnName]['type'])) { |
251 | 251 | if (preg_match('/_dtstart$/', $key)) { |
252 | 252 | $sql .= " AND t.".$db->escape($columnName)." >= '".$db->idate($search[$key])."'"; |
@@ -472,7 +472,7 @@ discard block |
||
472 | 472 | print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">'; |
473 | 473 | if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { |
474 | 474 | print $form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100'.($key == 'status' ? ' search_status onrightofpage' : ''), 1); |
475 | - } elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:')=== 0)) { |
|
475 | + } elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:') === 0)) { |
|
476 | 476 | print $object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] : ''), '', '', 'search_', 'maxwidth125', 1); |
477 | 477 | } elseif (!preg_match('/^(date|timestamp|datetime)/', $val['type'])) { |
478 | 478 | print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag(isset($search[$key]) ? $search[$key] : '').'">'; |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | { |
135 | 135 | // $type = "GIF" | "JPEG" |
136 | 136 | //$this->properties["PHOTO;MEDIATYPE=$type;ENCODING=BASE64"] = base64_encode($photo); |
137 | - $this->properties["PHOTO;MEDIATYPE=$type"] = $photo; // must be url of photo |
|
137 | + $this->properties["PHOTO;MEDIATYPE=$type"] = $photo; // must be url of photo |
|
138 | 138 | //$this->properties["PHOTO;TYPE=$type;ENCODING=BASE64"] = base64_encode($photo); // must be content of image |
139 | 139 | } |
140 | 140 | |
@@ -356,10 +356,10 @@ discard block |
||
356 | 356 | public function getVCard() |
357 | 357 | { |
358 | 358 | $text = "BEGIN:VCARD\r\n"; |
359 | - $text .= "VERSION:4.0\r\n"; // With V4, all encoding are UTF-8 |
|
359 | + $text .= "VERSION:4.0\r\n"; // With V4, all encoding are UTF-8 |
|
360 | 360 | //$text.= "VERSION:2.1\r\n"; |
361 | 361 | foreach ($this->properties as $key => $value) { |
362 | - $newkey = preg_replace('/-.*$/', '', $key); // remove suffix -twitter, -facebook, ... |
|
362 | + $newkey = preg_replace('/-.*$/', '', $key); // remove suffix -twitter, -facebook, ... |
|
363 | 363 | $text .= $newkey.":".$value."\r\n"; |
364 | 364 | } |
365 | 365 | $text .= "REV:".date("Ymd")."T".date("His")."Z\r\n"; |
@@ -165,7 +165,7 @@ |
||
165 | 165 | $db->rollback(); |
166 | 166 | } else { |
167 | 167 | $db->commit(); |
168 | - setEventMessages($langs->trans('AutomaticBindingDone', $nbbinddone, $notpossible), null, ($notpossible ? 'warnings' : 'mesgs')); |
|
168 | + setEventMessages($langs->trans('AutomaticBindingDone', $nbbinddone, $notpossible), null, ($notpossible ? 'warnings' : 'mesgs')); |
|
169 | 169 | if ($nbbindfailed) { |
170 | 170 | setEventMessages($langs->trans('DoManualBindingForFailedRecord', $nbbindfailed), null, 'warnings'); |
171 | 171 | } |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $title = $langs->trans("Search"); |
71 | 71 | |
72 | 72 | // URL http://mydolibarr/core/search_page?dol_use_jmobile=1 can be used for tests |
73 | -$head = '<!-- Quick access -->'."\n"; // This is used by DoliDroid to know page is a search page |
|
73 | +$head = '<!-- Quick access -->'."\n"; // This is used by DoliDroid to know page is a search page |
|
74 | 74 | $arrayofjs = array(); |
75 | 75 | $arrayofcss = array(); |
76 | 76 | top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss); |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | |
111 | 111 | $accesskey = ''; |
112 | 112 | if (empty($accesskeyalreadyassigned[$val['label'][0]])) { |
113 | - $accesskey = $val['label'][0]; // First char of string |
|
113 | + $accesskey = $val['label'][0]; // First char of string |
|
114 | 114 | $accesskeyalreadyassigned[$accesskey] = $accesskey; |
115 | 115 | } |
116 | 116 |
@@ -76,7 +76,7 @@ |
||
76 | 76 | */ |
77 | 77 | function decodeHttpBasicAuth($value) |
78 | 78 | { |
79 | - $encoded_basic_auth = substr($value, 6); // Remove the "Basic " string |
|
79 | + $encoded_basic_auth = substr($value, 6); // Remove the "Basic " string |
|
80 | 80 | $decoded_basic_auth = base64_decode($encoded_basic_auth); |
81 | 81 | $credentials_basic_auth = explode(':', $decoded_basic_auth); |
82 | 82 |