@@ -115,8 +115,8 @@ discard block |
||
| 115 | 115 | $offsethour = round($obj->duration / 60); |
| 116 | 116 | // Creation of array of availabilties range |
| 117 | 117 | if ($datetocheckbooking >= $starttime && $datetocheckbooking <= $endtime) { |
| 118 | - for ($hour=$startHourstring; $hour < $endHourstring; $hour+= $offsethour) { |
|
| 119 | - for ($min=0; $min < 60; $min += $offsetmin) { |
|
| 118 | + for ($hour = $startHourstring; $hour < $endHourstring; $hour += $offsethour) { |
|
| 119 | + for ($min = 0; $min < 60; $min += $offsetmin) { |
|
| 120 | 120 | $hourstring = $hour; |
| 121 | 121 | $minstring = $min; |
| 122 | 122 | if ($hour < 10) { |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | $response["code"] = "SUCCESS"; |
| 136 | 136 | } else { |
| 137 | 137 | $response["code"] = "ERROR"; |
| 138 | - $error ++; |
|
| 138 | + $error++; |
|
| 139 | 139 | } |
| 140 | 140 | } |
| 141 | 141 | |
@@ -157,7 +157,7 @@ |
||
| 157 | 157 | |
| 158 | 158 | // Link to public page |
| 159 | 159 | print '<tr><td>Link</td>'; |
| 160 | - print '<td><a href="'. DOL_URL_ROOT.'/public/bookcal/index.php?id='.$object->id.'" target="_blank">Public page</a>'; |
|
| 160 | + print '<td><a href="'.DOL_URL_ROOT.'/public/bookcal/index.php?id='.$object->id.'" target="_blank">Public page</a>'; |
|
| 161 | 161 | print '</td></tr>'; |
| 162 | 162 | |
| 163 | 163 | print '</table>'; |
@@ -22,24 +22,24 @@ discard block |
||
| 22 | 22 | */ |
| 23 | 23 | |
| 24 | 24 | // Put here all includes required by your class file |
| 25 | -include_once DOL_DOCUMENT_ROOT .'/emailcollector/lib/emailcollector.lib.php'; |
|
| 26 | - |
|
| 27 | -require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; |
|
| 28 | -require_once DOL_DOCUMENT_ROOT .'/core/lib/files.lib.php'; |
|
| 29 | - |
|
| 30 | -require_once DOL_DOCUMENT_ROOT .'/comm/propal/class/propal.class.php'; // Customer Proposal |
|
| 31 | -require_once DOL_DOCUMENT_ROOT .'/commande/class/commande.class.php'; // Sale Order |
|
| 32 | -require_once DOL_DOCUMENT_ROOT .'/compta/facture/class/facture.class.php'; // Customer Invoice |
|
| 33 | -require_once DOL_DOCUMENT_ROOT .'/contact/class/contact.class.php'; // Contact / Address |
|
| 34 | -require_once DOL_DOCUMENT_ROOT .'/expedition/class/expedition.class.php'; // Shipping / Delivery |
|
| 35 | -require_once DOL_DOCUMENT_ROOT .'/fourn/class/fournisseur.commande.class.php'; // Purchase Order |
|
| 36 | -require_once DOL_DOCUMENT_ROOT .'/fourn/class/fournisseur.facture.class.php'; // Purchase Invoice |
|
| 37 | -require_once DOL_DOCUMENT_ROOT .'/projet/class/project.class.php'; // Project |
|
| 38 | -require_once DOL_DOCUMENT_ROOT .'/reception/class/reception.class.php'; // Reception |
|
| 39 | -require_once DOL_DOCUMENT_ROOT .'/recruitment/class/recruitmentcandidature.class.php'; // Recruiting |
|
| 40 | -require_once DOL_DOCUMENT_ROOT .'/societe/class/societe.class.php'; // Third-Party |
|
| 41 | -require_once DOL_DOCUMENT_ROOT .'/supplier_proposal/class/supplier_proposal.class.php'; // Supplier Proposal |
|
| 42 | -require_once DOL_DOCUMENT_ROOT .'/ticket/class/ticket.class.php'; // Ticket |
|
| 25 | +include_once DOL_DOCUMENT_ROOT.'/emailcollector/lib/emailcollector.lib.php'; |
|
| 26 | + |
|
| 27 | +require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; |
|
| 28 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; |
|
| 29 | + |
|
| 30 | +require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; // Customer Proposal |
|
| 31 | +require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; // Sale Order |
|
| 32 | +require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; // Customer Invoice |
|
| 33 | +require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; // Contact / Address |
|
| 34 | +require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; // Shipping / Delivery |
|
| 35 | +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; // Purchase Order |
|
| 36 | +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; // Purchase Invoice |
|
| 37 | +require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; // Project |
|
| 38 | +require_once DOL_DOCUMENT_ROOT.'/reception/class/reception.class.php'; // Reception |
|
| 39 | +require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentcandidature.class.php'; // Recruiting |
|
| 40 | +require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; // Third-Party |
|
| 41 | +require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; // Supplier Proposal |
|
| 42 | +require_once DOL_DOCUMENT_ROOT.'/ticket/class/ticket.class.php'; // Ticket |
|
| 43 | 43 | //require_once DOL_DOCUMENT_ROOT .'/expensereport/class/expensereport.class.php'; // Expense Report |
| 44 | 44 | //require_once DOL_DOCUMENT_ROOT .'/holiday/class/holiday.class.php'; // Holidays (leave request) |
| 45 | 45 | |
@@ -793,7 +793,7 @@ discard block |
||
| 793 | 793 | } elseif (empty($this->imap_encryption) || ($this->imap_encryption == 'ssl' && !empty($conf->global->IMAP_FORCE_NOSSL))) { |
| 794 | 794 | $flags .= ''; |
| 795 | 795 | } else { |
| 796 | - $flags .= '/' . $this->imap_encryption; |
|
| 796 | + $flags .= '/'.$this->imap_encryption; |
|
| 797 | 797 | } |
| 798 | 798 | |
| 799 | 799 | $flags .= '/novalidate-cert'; |
@@ -1145,7 +1145,7 @@ discard block |
||
| 1145 | 1145 | $keyforsupportedoauth2array = 'OAUTH_'.$keyforsupportedoauth2array.'_NAME'; |
| 1146 | 1146 | |
| 1147 | 1147 | $OAUTH_SERVICENAME = 'Unknown'; |
| 1148 | - if ( array_key_exists($keyforsupportedoauth2array, $supportedoauth2array) |
|
| 1148 | + if (array_key_exists($keyforsupportedoauth2array, $supportedoauth2array) |
|
| 1149 | 1149 | && array_key_exists('name', $supportedoauth2array[$keyforsupportedoauth2array]) |
| 1150 | 1150 | && !empty($supportedoauth2array[$keyforsupportedoauth2array]['name'])) { |
| 1151 | 1151 | $OAUTH_SERVICENAME = $supportedoauth2array[$keyforsupportedoauth2array]['name'].(!empty($keyforprovider) ? '-'.$keyforprovider : ''); |
@@ -1409,7 +1409,7 @@ discard block |
||
| 1409 | 1409 | } |
| 1410 | 1410 | |
| 1411 | 1411 | if ($rule['type'] == 'from') { |
| 1412 | - $tmprulevaluearray = explode('*', $rule['rulevalue']); // Search on abc*def means searching on 'abc' and on 'def' |
|
| 1412 | + $tmprulevaluearray = explode('*', $rule['rulevalue']); // Search on abc*def means searching on 'abc' and on 'def' |
|
| 1413 | 1413 | if (count($tmprulevaluearray) >= 2) { |
| 1414 | 1414 | foreach ($tmprulevaluearray as $tmprulevalue) { |
| 1415 | 1415 | $search .= ($search ? ' ' : '').$not.'FROM "'.str_replace('"', '', $tmprulevalue).'"'; |
@@ -1419,7 +1419,7 @@ discard block |
||
| 1419 | 1419 | } |
| 1420 | 1420 | } |
| 1421 | 1421 | if ($rule['type'] == 'to') { |
| 1422 | - $tmprulevaluearray = explode('*', $rule['rulevalue']); // Search on abc*def means searching on 'abc' and on 'def' |
|
| 1422 | + $tmprulevaluearray = explode('*', $rule['rulevalue']); // Search on abc*def means searching on 'abc' and on 'def' |
|
| 1423 | 1423 | if (count($tmprulevaluearray) >= 2) { |
| 1424 | 1424 | foreach ($tmprulevaluearray as $tmprulevalue) { |
| 1425 | 1425 | $search .= ($search ? ' ' : '').$not.'TO "'.str_replace('"', '', $tmprulevalue).'"'; |
@@ -1575,7 +1575,7 @@ discard block |
||
| 1575 | 1575 | } |
| 1576 | 1576 | } |
| 1577 | 1577 | |
| 1578 | - $arrayofemailtodelete = array(); // Track email to delete to make the deletion at end. |
|
| 1578 | + $arrayofemailtodelete = array(); // Track email to delete to make the deletion at end. |
|
| 1579 | 1579 | |
| 1580 | 1580 | // Loop on each email found |
| 1581 | 1581 | if (!$error && !empty($arrayofemail) && count($arrayofemail) > 0) { |
@@ -1645,8 +1645,8 @@ discard block |
||
| 1645 | 1645 | } else { |
| 1646 | 1646 | $operationslog .= " - ".dol_escape_htmltag((string) $imapemail); |
| 1647 | 1647 | } |
| 1648 | - $operationslog .= " - References: ".dol_escape_htmltag($headers['References']??'')." - Subject: ".dol_escape_htmltag($headers['Subject']); |
|
| 1649 | - dol_syslog("** Process email ".$iforemailloop." References: ".($headers['References']??'')." Subject: ".$headers['Subject']); |
|
| 1648 | + $operationslog .= " - References: ".dol_escape_htmltag($headers['References'] ?? '')." - Subject: ".dol_escape_htmltag($headers['Subject']); |
|
| 1649 | + dol_syslog("** Process email ".$iforemailloop." References: ".($headers['References'] ?? '')." Subject: ".$headers['Subject']); |
|
| 1650 | 1650 | |
| 1651 | 1651 | |
| 1652 | 1652 | $trackidfoundintorecipienttype = ''; |
@@ -1766,7 +1766,7 @@ discard block |
||
| 1766 | 1766 | $attachments = []; |
| 1767 | 1767 | } |
| 1768 | 1768 | } else { |
| 1769 | - $this->getmsg($connection, $imapemail); // This set global var $charset, $htmlmsg, $plainmsg, $attachments |
|
| 1769 | + $this->getmsg($connection, $imapemail); // This set global var $charset, $htmlmsg, $plainmsg, $attachments |
|
| 1770 | 1770 | } |
| 1771 | 1771 | //print $plainmsg; |
| 1772 | 1772 | //var_dump($plainmsg); exit; |
@@ -2203,7 +2203,7 @@ discard block |
||
| 2203 | 2203 | |
| 2204 | 2204 | // Make Operation |
| 2205 | 2205 | dol_syslog("Execute action ".$operation['type']." actionparam=".$operation['actionparam'].' thirdpartystatic->id='.$thirdpartystatic->id.' contactstatic->id='.$contactstatic->id.' projectstatic->id='.$projectstatic->id); |
| 2206 | - dol_syslog("Execute action fk_element_id=".$fk_element_id." fk_element_type=".$fk_element_type); // If a Dolibarr tracker id is found, we should now the id of object |
|
| 2206 | + dol_syslog("Execute action fk_element_id=".$fk_element_id." fk_element_type=".$fk_element_type); // If a Dolibarr tracker id is found, we should now the id of object |
|
| 2207 | 2207 | |
| 2208 | 2208 | $actioncode = 'EMAIL_IN'; |
| 2209 | 2209 | // If we scan the Sent box, we use the code for out email |
@@ -2383,7 +2383,7 @@ discard block |
||
| 2383 | 2383 | $thirdpartystatic->name_alias = $namealiastouseforthirdparty; |
| 2384 | 2384 | } |
| 2385 | 2385 | } else { |
| 2386 | - $thirdpartystatic->name_alias = (empty($replytostring) ? (empty($fromtext) ? '': $fromtext) : $replytostring); |
|
| 2386 | + $thirdpartystatic->name_alias = (empty($replytostring) ? (empty($fromtext) ? '' : $fromtext) : $replytostring); |
|
| 2387 | 2387 | } |
| 2388 | 2388 | $thirdpartystatic->email = (empty($emailtouseforthirdparty) ? (empty($replyto) ? (empty($from) ? '' : $from) : $replyto) : $emailtouseforthirdparty); |
| 2389 | 2389 | |
@@ -2434,11 +2434,11 @@ discard block |
||
| 2434 | 2434 | $result = $contactstatic->fetch(0, null, '', $from); |
| 2435 | 2435 | if ($result < 0) { |
| 2436 | 2436 | $errorforactions++; |
| 2437 | - $this->error = 'Error when getting contact with email ' . $from; |
|
| 2437 | + $this->error = 'Error when getting contact with email '.$from; |
|
| 2438 | 2438 | $this->errors[] = $this->error; |
| 2439 | 2439 | break; |
| 2440 | 2440 | } elseif ($result == 0) { |
| 2441 | - dol_syslog("Contact with email " . $from . " was not found. We try to create it."); |
|
| 2441 | + dol_syslog("Contact with email ".$from." was not found. We try to create it."); |
|
| 2442 | 2442 | $contactstatic = new Contact($this->db); |
| 2443 | 2443 | |
| 2444 | 2444 | // Create contact |
@@ -2453,28 +2453,28 @@ discard block |
||
| 2453 | 2453 | } else { |
| 2454 | 2454 | // Search country by name or code |
| 2455 | 2455 | if (!empty($contactstatic->country)) { |
| 2456 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php'; |
|
| 2456 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; |
|
| 2457 | 2457 | $result = getCountry('', 3, $this->db, '', 1, $contactstatic->country); |
| 2458 | 2458 | if ($result == 'NotDefined') { |
| 2459 | 2459 | $errorforactions++; |
| 2460 | - $this->error = "Error country not found by this name '" . $contactstatic->country . "'"; |
|
| 2460 | + $this->error = "Error country not found by this name '".$contactstatic->country."'"; |
|
| 2461 | 2461 | } elseif (!($result > 0)) { |
| 2462 | 2462 | $errorforactions++; |
| 2463 | - $this->error = "Error when search country by this name '" . $contactstatic->country . "'"; |
|
| 2463 | + $this->error = "Error when search country by this name '".$contactstatic->country."'"; |
|
| 2464 | 2464 | $this->errors[] = $this->db->lasterror(); |
| 2465 | 2465 | } else { |
| 2466 | 2466 | $contactstatic->country_id = $result; |
| 2467 | 2467 | $operationslog .= '<br>We set property country_id='.dol_escape_htmltag($result); |
| 2468 | 2468 | } |
| 2469 | 2469 | } elseif (!empty($contactstatic->country_code)) { |
| 2470 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php'; |
|
| 2470 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; |
|
| 2471 | 2471 | $result = getCountry($contactstatic->country_code, 3, $this->db); |
| 2472 | 2472 | if ($result == 'NotDefined') { |
| 2473 | 2473 | $errorforactions++; |
| 2474 | - $this->error = "Error country not found by this code '" . $contactstatic->country_code . "'"; |
|
| 2474 | + $this->error = "Error country not found by this code '".$contactstatic->country_code."'"; |
|
| 2475 | 2475 | } elseif (!($result > 0)) { |
| 2476 | 2476 | $errorforactions++; |
| 2477 | - $this->error = "Error when search country by this code '" . $contactstatic->country_code . "'"; |
|
| 2477 | + $this->error = "Error when search country by this code '".$contactstatic->country_code."'"; |
|
| 2478 | 2478 | $this->errors[] = $this->db->lasterror(); |
| 2479 | 2479 | } else { |
| 2480 | 2480 | $contactstatic->country_id = $result; |
@@ -2485,28 +2485,28 @@ discard block |
||
| 2485 | 2485 | if (!$errorforactions) { |
| 2486 | 2486 | // Search state by name or code (for country if defined) |
| 2487 | 2487 | if (!empty($contactstatic->state)) { |
| 2488 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/functions.lib.php'; |
|
| 2488 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; |
|
| 2489 | 2489 | $result = dol_getIdFromCode($this->db, $contactstatic->state, 'c_departements', 'nom', 'rowid'); |
| 2490 | 2490 | if (empty($result)) { |
| 2491 | 2491 | $errorforactions++; |
| 2492 | - $this->error = "Error state not found by this name '" . $contactstatic->state . "'"; |
|
| 2492 | + $this->error = "Error state not found by this name '".$contactstatic->state."'"; |
|
| 2493 | 2493 | } elseif (!($result > 0)) { |
| 2494 | 2494 | $errorforactions++; |
| 2495 | - $this->error = "Error when search state by this name '" . $contactstatic->state . "'"; |
|
| 2495 | + $this->error = "Error when search state by this name '".$contactstatic->state."'"; |
|
| 2496 | 2496 | $this->errors[] = $this->db->lasterror(); |
| 2497 | 2497 | } else { |
| 2498 | 2498 | $contactstatic->state_id = $result; |
| 2499 | 2499 | $operationslog .= '<br>We set property state_id='.dol_escape_htmltag($result); |
| 2500 | 2500 | } |
| 2501 | 2501 | } elseif (!empty($contactstatic->state_code)) { |
| 2502 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/functions.lib.php'; |
|
| 2502 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; |
|
| 2503 | 2503 | $result = dol_getIdFromCode($this->db, $contactstatic->state_code, 'c_departements', 'code_departement', 'rowid'); |
| 2504 | 2504 | if (empty($result)) { |
| 2505 | 2505 | $errorforactions++; |
| 2506 | - $this->error = "Error state not found by this code '" . $contactstatic->state_code . "'"; |
|
| 2506 | + $this->error = "Error state not found by this code '".$contactstatic->state_code."'"; |
|
| 2507 | 2507 | } elseif (!($result > 0)) { |
| 2508 | 2508 | $errorforactions++; |
| 2509 | - $this->error = "Error when search state by this code '" . $contactstatic->state_code . "'"; |
|
| 2509 | + $this->error = "Error when search state by this code '".$contactstatic->state_code."'"; |
|
| 2510 | 2510 | $this->errors[] = $this->db->lasterror(); |
| 2511 | 2511 | } else { |
| 2512 | 2512 | $contactstatic->state_id = $result; |
@@ -2569,8 +2569,8 @@ discard block |
||
| 2569 | 2569 | $actioncomm->label = $langs->trans("ActionAC_".$actioncode).' - '.$langs->trans("MailFrom").' '.$from; |
| 2570 | 2570 | $actioncomm->note_private = $descriptionfull; |
| 2571 | 2571 | $actioncomm->fk_project = $projectstatic->id; |
| 2572 | - $actioncomm->datep = $date; // date of email |
|
| 2573 | - $actioncomm->datef = $date; // date of email |
|
| 2572 | + $actioncomm->datep = $date; // date of email |
|
| 2573 | + $actioncomm->datef = $date; // date of email |
|
| 2574 | 2574 | $actioncomm->percentage = -1; // Not applicable |
| 2575 | 2575 | $actioncomm->socid = $thirdpartystatic->id; |
| 2576 | 2576 | $actioncomm->contact_id = $contactstatic->id; |
@@ -2742,7 +2742,7 @@ discard block |
||
| 2742 | 2742 | } |
| 2743 | 2743 | $hookmanager->initHooks(array('emailcolector')); |
| 2744 | 2744 | $parameters = array('arrayobject' => $arrayobject); |
| 2745 | - $reshook = $hookmanager->executeHooks('addmoduletoeamailcollectorjoinpiece', $parameters); // Note that $action and $object may have been modified by some hooks |
|
| 2745 | + $reshook = $hookmanager->executeHooks('addmoduletoeamailcollectorjoinpiece', $parameters); // Note that $action and $object may have been modified by some hooks |
|
| 2746 | 2746 | if ($reshook > 0) { |
| 2747 | 2747 | $arrayobject = $hookmanager->resArray; |
| 2748 | 2748 | } |
@@ -2751,10 +2751,10 @@ discard block |
||
| 2751 | 2751 | |
| 2752 | 2752 | foreach ($arrayobject as $key => $objectdesc) { |
| 2753 | 2753 | $sql = 'SELECT DISTINCT t.rowid '; |
| 2754 | - $sql .= ' FROM ' . MAIN_DB_PREFIX . $objectdesc['table'] . ' AS t'; |
|
| 2754 | + $sql .= ' FROM '.MAIN_DB_PREFIX.$objectdesc['table'].' AS t'; |
|
| 2755 | 2755 | $sql .= ' WHERE '; |
| 2756 | 2756 | foreach ($objectdesc['fields'] as $field) { |
| 2757 | - $sql .= "'" .$this->db->escape($subject) . "' LIKE CONCAT('%', t." . $field . ", '%') OR "; |
|
| 2757 | + $sql .= "'".$this->db->escape($subject)."' LIKE CONCAT('%', t.".$field.", '%') OR "; |
|
| 2758 | 2758 | } |
| 2759 | 2759 | $sql = substr($sql, 0, -4); |
| 2760 | 2760 | |
@@ -2774,8 +2774,8 @@ discard block |
||
| 2774 | 2774 | foreach ($ids as $val) { |
| 2775 | 2775 | $res = $objectmanaged->fetch($val); |
| 2776 | 2776 | if ($res) { |
| 2777 | - $path = ($objectmanaged->entity > 1 ? "/" . $objectmanaged->entity : ''); |
|
| 2778 | - $dirs[] = DOL_DATA_ROOT . $path . "/" . $elementpath . '/' . dol_sanitizeFileName($objectmanaged->ref) . '/'; |
|
| 2777 | + $path = ($objectmanaged->entity > 1 ? "/".$objectmanaged->entity : ''); |
|
| 2778 | + $dirs[] = DOL_DATA_ROOT.$path."/".$elementpath.'/'.dol_sanitizeFileName($objectmanaged->ref).'/'; |
|
| 2779 | 2779 | } else { |
| 2780 | 2780 | $this->errors[] = 'object not found'; |
| 2781 | 2781 | } |
@@ -2784,7 +2784,7 @@ discard block |
||
| 2784 | 2784 | foreach ($dirs as $target) { |
| 2785 | 2785 | $prefix = $this->actions[$this->id]['actionparam']; |
| 2786 | 2786 | foreach ($data as $filename => $content) { |
| 2787 | - $resr = saveAttachment($target, $prefix . '_' . $filename, $content); |
|
| 2787 | + $resr = saveAttachment($target, $prefix.'_'.$filename, $content); |
|
| 2788 | 2788 | if ($resr == -1) { |
| 2789 | 2789 | $this->errors[] = 'Doc not saved'; |
| 2790 | 2790 | } |
@@ -2831,7 +2831,7 @@ discard block |
||
| 2831 | 2831 | $percent_opp_status = dol_getIdFromCode($this->db, 'PROSP', 'c_lead_status', 'code', 'percent'); |
| 2832 | 2832 | |
| 2833 | 2833 | $projecttocreate->title = $subject; |
| 2834 | - $projecttocreate->date_start = $date; // date of email |
|
| 2834 | + $projecttocreate->date_start = $date; // date of email |
|
| 2835 | 2835 | $projecttocreate->date_end = ''; |
| 2836 | 2836 | $projecttocreate->opp_status = $id_opp_status; |
| 2837 | 2837 | $projecttocreate->opp_percent = $percent_opp_status; |
@@ -3091,7 +3091,7 @@ discard block |
||
| 3091 | 3091 | $candidaturetocreate->note_private = $descriptionfull; |
| 3092 | 3092 | $candidaturetocreate->entity = $conf->entity; |
| 3093 | 3093 | $candidaturetocreate->email_msgid = $msgid; |
| 3094 | - $candidaturetocreate->email_date = $date; // date of email |
|
| 3094 | + $candidaturetocreate->email_date = $date; // date of email |
|
| 3095 | 3095 | $candidaturetocreate->status = $candidaturetocreate::STATUS_DRAFT; |
| 3096 | 3096 | //$candidaturetocreate->fk_contact = $contactstatic->id; |
| 3097 | 3097 | |
@@ -3454,8 +3454,8 @@ discard block |
||
| 3454 | 3454 | * append increment number to the original filename |
| 3455 | 3455 | */ |
| 3456 | 3456 | while (file_exists($destdir.$file_name.".".$extension)) { |
| 3457 | - $file_name = $file_name_original . ' (' . $num . ')'; |
|
| 3458 | - $file_name_complete = $file_name . "." . $extension; |
|
| 3457 | + $file_name = $file_name_original.' ('.$num.')'; |
|
| 3458 | + $file_name_complete = $file_name.".".$extension; |
|
| 3459 | 3459 | $destination = $destdir.$file_name_complete; |
| 3460 | 3460 | $num++; |
| 3461 | 3461 | } |
@@ -3589,7 +3589,7 @@ discard block |
||
| 3589 | 3589 | */ |
| 3590 | 3590 | private function saveAttachment($destdir, $filename, $content) |
| 3591 | 3591 | { |
| 3592 | - require_once DOL_DOCUMENT_ROOT .'/core/lib/images.lib.php'; |
|
| 3592 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; |
|
| 3593 | 3593 | |
| 3594 | 3594 | $tmparraysize = getDefaultImageSizes(); |
| 3595 | 3595 | $maxwidthsmall = $tmparraysize['maxwidthsmall']; |