@@ -136,8 +136,8 @@ discard block |
||
136 | 136 | |
137 | 137 | |
138 | 138 | $sql = "UPDATE ".MAIN_DB_PREFIX."oauth_token"; |
139 | - $sql.= " SET service = '".$db->escape($oldprovider."-".$newlabel)."'"; |
|
140 | - $sql.= " WHERE service = '".$db->escape($oldprovider."-".$oldlabel)."'"; |
|
139 | + $sql .= " SET service = '".$db->escape($oldprovider."-".$newlabel)."'"; |
|
140 | + $sql .= " WHERE service = '".$db->escape($oldprovider."-".$oldlabel)."'"; |
|
141 | 141 | |
142 | 142 | |
143 | 143 | $resql = $db->query($sql); |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | $provider.'_NAME', |
301 | 301 | $provider.'_ID', |
302 | 302 | $provider.'_SECRET', |
303 | - $provider.'_URL', // For custom oauth links |
|
303 | + $provider.'_URL', // For custom oauth links |
|
304 | 304 | $provider.'_SCOPE' // For custom oauth links |
305 | 305 | ); |
306 | 306 | } |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | // $list is defined into oauth.lib.php to the list of supporter OAuth providers. |
320 | 320 | foreach ($listinsetup as $key) { |
321 | 321 | $supported = 0; |
322 | - $keyforsupportedoauth2array = $key[0]; // May be OAUTH_GOOGLE_NAME or OAUTH_GOOGLE_xxx_NAME |
|
322 | + $keyforsupportedoauth2array = $key[0]; // May be OAUTH_GOOGLE_NAME or OAUTH_GOOGLE_xxx_NAME |
|
323 | 323 | $keyforsupportedoauth2array = preg_replace('/^OAUTH_/', '', $keyforsupportedoauth2array); |
324 | 324 | $keyforsupportedoauth2array = preg_replace('/_NAME$/', '', $keyforsupportedoauth2array); |
325 | 325 | if (preg_match('/^.*-/', $keyforsupportedoauth2array)) { |
@@ -236,7 +236,7 @@ |
||
236 | 236 | print '<table class="noborder centpercent">'."\n"; |
237 | 237 | |
238 | 238 | print '<tr class="liste_titre">'; |
239 | - print "<td>".$langs->trans("SocialNetworks")." ".($i+1)."</td>"; |
|
239 | + print "<td>".$langs->trans("SocialNetworks")." ".($i + 1)."</td>"; |
|
240 | 240 | print '<td class="right">'; |
241 | 241 | print '<a class="viewfielda reposition marginleftonly marginrighttonly showInputBtn" href="'.$_SERVER["PHP_SELF"].'?action=editsocialnetwork&token='.newToken().'&key='.urlencode($key).'">'.img_edit().'</a>'; |
242 | 242 | print '<a class="deletefielda reposition marginleftonly right" href="'.$_SERVER["PHP_SELF"].'?action=deletesocialnetwork&token='.newToken().'&key='.urlencode($key).'">'.img_delete().'</a>'; |
@@ -166,13 +166,13 @@ discard block |
||
166 | 166 | if ($apiService instanceof OAuth\OAuth2\Service\AbstractService || $apiService instanceof OAuth\OAuth1\Service\AbstractService) { |
167 | 167 | // ServiceInterface does not provide refreshAccessToekn, AbstractService does |
168 | 168 | dol_syslog("oauthlogintokens.php: call refreshAccessToken to get the new access token"); |
169 | - $tokenobj = $apiService->refreshAccessToken($tokenobj); // This call refresh and store the new token (but does not include the refresh token) |
|
169 | + $tokenobj = $apiService->refreshAccessToken($tokenobj); // This call refresh and store the new token (but does not include the refresh token) |
|
170 | 170 | |
171 | 171 | dol_syslog("oauthlogintokens.php: call setRefreshToken"); |
172 | - $tokenobj->setRefreshToken($refreshtoken); // Restore the refresh token |
|
172 | + $tokenobj->setRefreshToken($refreshtoken); // Restore the refresh token |
|
173 | 173 | |
174 | 174 | dol_syslog("oauthlogintokens.php: call storeAccessToken to save the new access token + the old refresh token"); |
175 | - $storage->storeAccessToken($OAUTH_SERVICENAME, $tokenobj); // This save the new token including the refresh token |
|
175 | + $storage->storeAccessToken($OAUTH_SERVICENAME, $tokenobj); // This save the new token including the refresh token |
|
176 | 176 | |
177 | 177 | if ($expire) { |
178 | 178 | setEventMessages($langs->trans("OldTokenWasExpiredItHasBeenRefresh"), null, 'mesgs'); |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | $provider.'_NAME', |
232 | 232 | $provider.'_ID', |
233 | 233 | $provider.'_SECRET', |
234 | - $provider.'_URL', // For custom oauth links |
|
234 | + $provider.'_URL', // For custom oauth links |
|
235 | 235 | $provider.'_SCOPE' // For custom oauth links |
236 | 236 | ); |
237 | 237 | } |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | if (!empty($listinsetup)) { |
244 | 244 | foreach ($listinsetup as $key) { |
245 | 245 | $supported = 0; |
246 | - $keyforsupportedoauth2array = $key[0]; // May be OAUTH_GOOGLE_NAME or OAUTH_GOOGLE_xxx_NAME |
|
246 | + $keyforsupportedoauth2array = $key[0]; // May be OAUTH_GOOGLE_NAME or OAUTH_GOOGLE_xxx_NAME |
|
247 | 247 | $keyforsupportedoauth2array = preg_replace('/^OAUTH_/', '', $keyforsupportedoauth2array); |
248 | 248 | $keyforsupportedoauth2array = preg_replace('/_NAME$/', '', $keyforsupportedoauth2array); |
249 | 249 | if (preg_match('/^.*-/', $keyforsupportedoauth2array)) { |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | if (getDolGlobalString($key[4])) { |
264 | 264 | $shortscope = getDolGlobalString($key[4]); |
265 | 265 | } |
266 | - $state = $shortscope; // TODO USe a better state |
|
266 | + $state = $shortscope; // TODO USe a better state |
|
267 | 267 | |
268 | 268 | $urltorefresh = $_SERVER["PHP_SELF"].'?action=refreshtoken&token='.newToken(); |
269 | 269 |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | $permissionnote = $user->hasRight('contrat', 'creer'); // Used by the include of actions_setnotes.inc.php |
111 | 111 | $permissiondellink = $user->hasRight('contrat', 'creer'); // Used by the include of actions_dellink.inc.php |
112 | 112 | $permissiontodelete = ($user->hasRight('contrat', 'creer') && $object->statut == $object::STATUS_DRAFT) || $user->hasRight('contrat', 'supprimer'); |
113 | -$permissiontoadd = $user->hasRight('contrat', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
113 | +$permissiontoadd = $user->hasRight('contrat', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
114 | 114 | $permissiontoedit = $permissiontoadd; |
115 | 115 | $permissiontoactivate = $user->hasRight('contrat', 'activer'); |
116 | 116 | $error = 0; |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | |
156 | 156 | include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be 'include', not 'include_once' |
157 | 157 | |
158 | - include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be 'include', not 'include_once' |
|
158 | + include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be 'include', not 'include_once' |
|
159 | 159 | |
160 | 160 | if ($action == 'confirm_active' && $confirm == 'yes' && $permissiontoactivate) { |
161 | 161 | $date_start = ''; |
@@ -533,8 +533,8 @@ discard block |
||
533 | 533 | $result = $prodcustprice->fetchAll('', '', 0, 0, $filter); |
534 | 534 | if ($result) { |
535 | 535 | if (count($prodcustprice->lines) > 0) { |
536 | - $price_min = price($prodcustprice->lines[0]->price_min); |
|
537 | - $price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc); |
|
536 | + $price_min = price($prodcustprice->lines[0]->price_min); |
|
537 | + $price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc); |
|
538 | 538 | /*$tva_tx = $prodcustprice->lines[0]->tva_tx; |
539 | 539 | if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) { |
540 | 540 | $tva_tx .= ' ('.$prodcustprice->lines[0]->default_vat_code.')'; |
@@ -767,7 +767,7 @@ discard block |
||
767 | 767 | // update price_ht with discount |
768 | 768 | // TODO Use object->updateline instead objectline->update |
769 | 769 | |
770 | - $price_ht = price2num(GETPOST('elprice'), 'MU'); |
|
770 | + $price_ht = price2num(GETPOST('elprice'), 'MU'); |
|
771 | 771 | $remise_percent = price2num(GETPOST('elremise_percent'), '', 2); |
772 | 772 | if ($remise_percent > 0) { |
773 | 773 | $remise = round(((float) $price_ht * (float) $remise_percent / 100), 2); |
@@ -874,7 +874,7 @@ discard block |
||
874 | 874 | } elseif ($action == 'confirm_activate' && $confirm == 'yes' && $user->hasRight('contrat', 'creer')) { |
875 | 875 | $date_start = dol_mktime(12, 0, 0, GETPOST('d_startmonth'), GETPOST('d_startday'), GETPOST('d_startyear')); |
876 | 876 | $date_end = dol_mktime(12, 0, 0, GETPOST('d_endmonth'), GETPOST('d_endday'), GETPOST('d_endyear')); |
877 | - $comment = GETPOST('comment', 'alpha'); |
|
877 | + $comment = GETPOST('comment', 'alpha'); |
|
878 | 878 | $result = $object->activateAll($user, $date_start, 0, $comment, $date_end); |
879 | 879 | if ($result < 0) { |
880 | 880 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -1408,7 +1408,7 @@ discard block |
||
1408 | 1408 | $morehtmlref .= '<div class="refidno">'; |
1409 | 1409 | // Ref customer |
1410 | 1410 | $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->hasRight('contrat', 'creer'), 'string', '', 0, 1); |
1411 | - $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->hasRight('contrat', 'creer'), 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1, 'getFormatedCustomerRef'); |
|
1411 | + $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->hasRight('contrat', 'creer'), 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1, 'getFormatedCustomerRef'); |
|
1412 | 1412 | // Ref supplier |
1413 | 1413 | $morehtmlref .= '<br>'; |
1414 | 1414 | $morehtmlref .= $form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->hasRight('contrat', 'creer'), 'string', '', 0, 1); |
@@ -1502,7 +1502,7 @@ discard block |
||
1502 | 1502 | } |
1503 | 1503 | |
1504 | 1504 | |
1505 | - $arrayothercontracts = $object->getListOfContracts('others'); // array or -1 if technical error |
|
1505 | + $arrayothercontracts = $object->getListOfContracts('others'); // array or -1 if technical error |
|
1506 | 1506 | |
1507 | 1507 | /* |
1508 | 1508 | * Lines of contracts |
@@ -1740,7 +1740,7 @@ discard block |
||
1740 | 1740 | // Ligne carac |
1741 | 1741 | print '<tr class="oddeven">'; |
1742 | 1742 | print '<td>'; |
1743 | - $currentLineProductId=GETPOSTISSET('idprod')?GETPOST('idprod'):(!empty($object->lines[$cursorline - 1]->fk_product) ? $object->lines[$cursorline - 1]->fk_product : 0); |
|
1743 | + $currentLineProductId = GETPOSTISSET('idprod') ?GETPOST('idprod') : (!empty($object->lines[$cursorline - 1]->fk_product) ? $object->lines[$cursorline - 1]->fk_product : 0); |
|
1744 | 1744 | if ($objp->fk_product > 0) { |
1745 | 1745 | $canchangeproduct = 1; |
1746 | 1746 | |
@@ -1754,7 +1754,7 @@ discard block |
||
1754 | 1754 | print $objp->label ? ' - '.dol_trunc($objp->label, 32) : ''; |
1755 | 1755 | print '<input type="hidden" name="idprod" value="'.$currentLineProductId.'">'; |
1756 | 1756 | } else { |
1757 | - $senderissupplier = 0; // @TODO Option to allow purchased products ? |
|
1757 | + $senderissupplier = 0; // @TODO Option to allow purchased products ? |
|
1758 | 1758 | if (empty($senderissupplier)) { |
1759 | 1759 | print $form->select_produits($currentLineProductId, 'idprod', '', 0, 0, 1, 2, '', 0, array(), 0, 1, 0, 'minwidth250onall maxwidth500 widthcentpercentminusx'); |
1760 | 1760 | } else { |
@@ -1773,7 +1773,7 @@ discard block |
||
1773 | 1773 | if (getDolGlobalString('MAIN_INPUT_DESC_HEIGHT')) { |
1774 | 1774 | $nbrows = getDolGlobalString('MAIN_INPUT_DESC_HEIGHT'); |
1775 | 1775 | } |
1776 | - $doleditor = new DolEditor('product_desc', (GETPOSTISSET('product_desc')?GETPOST('product_desc'):$objp->description), '', 92, 'dolibarr_details', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_DETAILS'), $nbrows, '90%'); |
|
1776 | + $doleditor = new DolEditor('product_desc', (GETPOSTISSET('product_desc') ?GETPOST('product_desc') : $objp->description), '', 92, 'dolibarr_details', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_DETAILS'), $nbrows, '90%'); |
|
1777 | 1777 | $doleditor->Create(); |
1778 | 1778 | |
1779 | 1779 | print '</td>'; |
@@ -1784,7 +1784,7 @@ discard block |
||
1784 | 1784 | print '</td>'; |
1785 | 1785 | |
1786 | 1786 | // Price |
1787 | - print '<td class="right"><input class="width50" type="text" name="elprice" value="'.(GETPOSTISSET('elprice')?GETPOST('elprice'):price($objp->subprice)).'"></td>'; |
|
1787 | + print '<td class="right"><input class="width50" type="text" name="elprice" value="'.(GETPOSTISSET('elprice') ?GETPOST('elprice') : price($objp->subprice)).'"></td>'; |
|
1788 | 1788 | |
1789 | 1789 | // Price multicurrency |
1790 | 1790 | /*if (isModEnabled("multicurrency")) { |
@@ -1792,24 +1792,24 @@ discard block |
||
1792 | 1792 | }*/ |
1793 | 1793 | |
1794 | 1794 | // Quantity |
1795 | - print '<td class="center"><input size="2" type="text" name="elqty" value="'.(GETPOSTISSET('elqty')?GETPOST('elqty'):$objp->qty).'"></td>'; |
|
1795 | + print '<td class="center"><input size="2" type="text" name="elqty" value="'.(GETPOSTISSET('elqty') ?GETPOST('elqty') : $objp->qty).'"></td>'; |
|
1796 | 1796 | |
1797 | 1797 | // Unit |
1798 | 1798 | if (getDolGlobalInt('PRODUCT_USE_UNITS')) { |
1799 | 1799 | print '<td class="left">'; |
1800 | - print $form->selectUnits((GETPOSTISSET('unit')?GETPOST('unit'):$objp->fk_unit), "unit"); |
|
1800 | + print $form->selectUnits((GETPOSTISSET('unit') ?GETPOST('unit') : $objp->fk_unit), "unit"); |
|
1801 | 1801 | print '</td>'; |
1802 | 1802 | } |
1803 | 1803 | |
1804 | 1804 | // Discount |
1805 | - print '<td class="nowraponall right"><input size="1" type="text" name="elremise_percent" value="'.(GETPOSTISSET('elremise_percent')?GETPOST('elremise_percent'):$objp->remise_percent).'">%</td>'; |
|
1805 | + print '<td class="nowraponall right"><input size="1" type="text" name="elremise_percent" value="'.(GETPOSTISSET('elremise_percent') ?GETPOST('elremise_percent') : $objp->remise_percent).'">%</td>'; |
|
1806 | 1806 | |
1807 | 1807 | if (!empty($usemargins)) { |
1808 | 1808 | print '<td class="right">'; |
1809 | 1809 | if ($objp->fk_product) { |
1810 | 1810 | print '<select id="fournprice" name="fournprice"></select>'; |
1811 | 1811 | } |
1812 | - print '<input id="buying_price" type="text" class="width50" name="buying_price" value="'.price((GETPOSTISSET('buying_price')?GETPOST('buying_price'):$objp->pa_ht), 0, '', 0).'"></td>'; |
|
1812 | + print '<input id="buying_price" type="text" class="width50" name="buying_price" value="'.price((GETPOSTISSET('buying_price') ?GETPOST('buying_price') : $objp->pa_ht), 0, '', 0).'"></td>'; |
|
1813 | 1813 | } |
1814 | 1814 | print '<td class="center">'; |
1815 | 1815 | print '<input type="submit" class="button margintoponly marginbottomonly" name="save" value="'.$langs->trans("Modify").'">'; |
@@ -261,14 +261,14 @@ discard block |
||
261 | 261 | /** |
262 | 262 | * Status |
263 | 263 | */ |
264 | - const STATUS_NOT_READ = 0; // Draft. Not take into account yet. |
|
265 | - const STATUS_READ = 1; // Ticket was read. |
|
266 | - const STATUS_ASSIGNED = 2; // Ticket was just assigned to someone. Not in progress yet. |
|
267 | - const STATUS_IN_PROGRESS = 3; // In progress |
|
268 | - const STATUS_NEED_MORE_INFO = 5; // Waiting requester feedback |
|
269 | - const STATUS_WAITING = 7; // On hold |
|
270 | - const STATUS_CLOSED = 8; // Closed - Solved |
|
271 | - const STATUS_CANCELED = 9; // Closed - Not solved |
|
264 | + const STATUS_NOT_READ = 0; // Draft. Not take into account yet. |
|
265 | + const STATUS_READ = 1; // Ticket was read. |
|
266 | + const STATUS_ASSIGNED = 2; // Ticket was just assigned to someone. Not in progress yet. |
|
267 | + const STATUS_IN_PROGRESS = 3; // In progress |
|
268 | + const STATUS_NEED_MORE_INFO = 5; // Waiting requester feedback |
|
269 | + const STATUS_WAITING = 7; // On hold |
|
270 | + const STATUS_CLOSED = 8; // Closed - Solved |
|
271 | + const STATUS_CANCELED = 9; // Closed - Not solved |
|
272 | 272 | |
273 | 273 | |
274 | 274 | /** |
@@ -1597,9 +1597,9 @@ discard block |
||
1597 | 1597 | } |
1598 | 1598 | // show categories for this record only in ajax to not overload lists |
1599 | 1599 | if (isModEnabled('category') && !$nofetch) { |
1600 | - require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; |
|
1600 | + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; |
|
1601 | 1601 | $form = new Form($this->db); |
1602 | - $datas['categories'] = '<br>' . $form->showCategories($this->id, Categorie::TYPE_TICKET, 1); |
|
1602 | + $datas['categories'] = '<br>'.$form->showCategories($this->id, Categorie::TYPE_TICKET, 1); |
|
1603 | 1603 | } |
1604 | 1604 | |
1605 | 1605 | return $datas; |
@@ -1838,7 +1838,7 @@ discard block |
||
1838 | 1838 | // Insert entry into agenda with code 'TICKET_MSG' |
1839 | 1839 | include_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; |
1840 | 1840 | $actioncomm = new ActionComm($this->db); |
1841 | - $actioncomm->type_code = 'AC_OTH_AUTO'; // This is not an entry that must appears into manual calendar but only into CRM calendar |
|
1841 | + $actioncomm->type_code = 'AC_OTH_AUTO'; // This is not an entry that must appears into manual calendar but only into CRM calendar |
|
1842 | 1842 | $actioncomm->code = 'TICKET_MSG'; |
1843 | 1843 | if ($this->private) { |
1844 | 1844 | $actioncomm->code = 'TICKET_MSG_PRIVATE'; |
@@ -1852,7 +1852,7 @@ discard block |
||
1852 | 1852 | $actioncomm->socid = $this->socid; |
1853 | 1853 | $actioncomm->label = $this->subject; |
1854 | 1854 | $actioncomm->note_private = $this->message; |
1855 | - $actioncomm->userassigned = array($user->id => array('id' => $user->id,'transparency' => 0)); |
|
1855 | + $actioncomm->userassigned = array($user->id => array('id' => $user->id, 'transparency' => 0)); |
|
1856 | 1856 | $actioncomm->userownerid = $user->id; |
1857 | 1857 | $actioncomm->datep = $now; |
1858 | 1858 | $actioncomm->percentage = -1; // percentage is not relevant for punctual events |
@@ -1900,7 +1900,7 @@ discard block |
||
1900 | 1900 | if (dol_mkdir($destdir) >= 0) { |
1901 | 1901 | require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; |
1902 | 1902 | dol_move($filespath, $destfile); |
1903 | - if (in_array($actioncomm->code, array('TICKET_MSG', 'TICKET_MSG_SENTBYMAIL'))) { |
|
1903 | + if (in_array($actioncomm->code, array('TICKET_MSG', 'TICKET_MSG_SENTBYMAIL'))) { |
|
1904 | 1904 | $ecmfile = new EcmFiles($this->db); |
1905 | 1905 | $destdir = preg_replace('/^'.preg_quote(DOL_DATA_ROOT, '/').'/', '', $destdir); |
1906 | 1906 | $destdir = preg_replace('/[\\/]$/', '', $destdir); |
@@ -2427,7 +2427,7 @@ discard block |
||
2427 | 2427 | 'email' => $obj->email, |
2428 | 2428 | 'rowid' => $obj->rowid, |
2429 | 2429 | 'code' => $obj->code, |
2430 | - 'libelle' => $labelType, // deprecated, replaced with labeltype |
|
2430 | + 'libelle' => $labelType, // deprecated, replaced with labeltype |
|
2431 | 2431 | 'labeltype' => $labelType, |
2432 | 2432 | 'status' => $obj->statuslink, |
2433 | 2433 | 'statuscontact' => $obj->statuscontact, |
@@ -2512,7 +2512,7 @@ discard block |
||
2512 | 2512 | if (is_resource($handle)) { |
2513 | 2513 | while (($file = readdir($handle)) !== false) { |
2514 | 2514 | if (!utf8_check($file)) { |
2515 | - $file = mb_convert_encoding($file, 'UTF-8', 'ISO-8859-1'); // To be sure data is stored in UTF8 in memory |
|
2515 | + $file = mb_convert_encoding($file, 'UTF-8', 'ISO-8859-1'); // To be sure data is stored in UTF8 in memory |
|
2516 | 2516 | } |
2517 | 2517 | if (dol_is_file($dir.$file)) { |
2518 | 2518 | return true; |
@@ -2550,7 +2550,7 @@ discard block |
||
2550 | 2550 | $formmail->trackid = (is_null($forcetrackid) ? 'tic'.$this->id : ''); |
2551 | 2551 | $attachedfiles = $formmail->get_attached_files(); |
2552 | 2552 | |
2553 | - $filepath = $attachedfiles['paths']; // path is for example user->dir_temp.'/'.$user->id.'/'... |
|
2553 | + $filepath = $attachedfiles['paths']; // path is for example user->dir_temp.'/'.$user->id.'/'... |
|
2554 | 2554 | $filename = $attachedfiles['names']; |
2555 | 2555 | $mimetype = $attachedfiles['mimes']; |
2556 | 2556 | |
@@ -2940,7 +2940,7 @@ discard block |
||
2940 | 2940 | |
2941 | 2941 | // If public interface is not enable, use link to internal page into mail |
2942 | 2942 | $url_public_ticket = (getDolGlobalInt('TICKET_ENABLE_PUBLIC_INTERFACE') ? |
2943 | - (getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE') !== '' ? getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE') . '/view.php' : dol_buildpath('/public/ticket/view.php', 2)) : dol_buildpath('/ticket/card.php', 2)).'?track_id='.urlencode($object->track_id); |
|
2943 | + (getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE') !== '' ? getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE').'/view.php' : dol_buildpath('/public/ticket/view.php', 2)) : dol_buildpath('/ticket/card.php', 2)).'?track_id='.urlencode($object->track_id); |
|
2944 | 2944 | |
2945 | 2945 | $message .= '<br>'.$langs->trans('TicketNewEmailBodyInfosTrackUrlCustomer').' : <a href="'.$url_public_ticket.'">'.$object->track_id.'</a><br>'; |
2946 | 2946 | |
@@ -2977,7 +2977,7 @@ discard block |
||
2977 | 2977 | if ($result) { |
2978 | 2978 | // update last_msg_sent date (for last message sent to external users) |
2979 | 2979 | $this->date_last_msg_sent = dol_now(); |
2980 | - $this->update($user, 1); // disable trigger when updating date_last_msg_sent. sendTicketMessageByEmail already create an event in actioncomm table. |
|
2980 | + $this->update($user, 1); // disable trigger when updating date_last_msg_sent. sendTicketMessageByEmail already create an event in actioncomm table. |
|
2981 | 2981 | } |
2982 | 2982 | } |
2983 | 2983 | } |
@@ -136,7 +136,7 @@ |
||
136 | 136 | if ($data === null || !is_array($data)) { |
137 | 137 | throw new TokenResponseException('Unable to parse response.'); |
138 | 138 | } elseif (isset($data['error'])) { |
139 | - throw new TokenResponseException('Error in retrieving token: "' . $data['error'] . '"'); |
|
139 | + throw new TokenResponseException('Error in retrieving token: "'.$data['error'].'"'); |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | $token = new StdOAuth2Token(); |
@@ -124,11 +124,11 @@ |
||
124 | 124 | |
125 | 125 | // @CHANGE DOL_LDR Add log |
126 | 126 | if (function_exists('getDolGlobalString') && getDolGlobalString('OAUTH_DEBUG')) { |
127 | - file_put_contents(DOL_DATA_ROOT . "/dolibarr_oauth.log", $endpoint->getAbsoluteUri()."\n", FILE_APPEND); |
|
128 | - file_put_contents(DOL_DATA_ROOT . "/dolibarr_oauth.log", $requestBody."\n", FILE_APPEND); |
|
129 | - file_put_contents(DOL_DATA_ROOT . "/dolibarr_oauth.log", $method."\n", FILE_APPEND); |
|
130 | - file_put_contents(DOL_DATA_ROOT . "/dolibarr_oauth.log", var_export($extraHeaders, true)."\n", FILE_APPEND); |
|
131 | - @chmod(DOL_DATA_ROOT . "/dolibarr_oauth.log", octdec(empty($conf->global->MAIN_UMASK)?'0664':$conf->global->MAIN_UMASK)); |
|
127 | + file_put_contents(DOL_DATA_ROOT."/dolibarr_oauth.log", $endpoint->getAbsoluteUri()."\n", FILE_APPEND); |
|
128 | + file_put_contents(DOL_DATA_ROOT."/dolibarr_oauth.log", $requestBody."\n", FILE_APPEND); |
|
129 | + file_put_contents(DOL_DATA_ROOT."/dolibarr_oauth.log", $method."\n", FILE_APPEND); |
|
130 | + file_put_contents(DOL_DATA_ROOT."/dolibarr_oauth.log", var_export($extraHeaders, true)."\n", FILE_APPEND); |
|
131 | + @chmod(DOL_DATA_ROOT."/dolibarr_oauth.log", octdec(empty($conf->global->MAIN_UMASK) ? '0664' : $conf->global->MAIN_UMASK)); |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | $response = curl_exec($ch); |
@@ -62,11 +62,11 @@ discard block |
||
62 | 62 | |
63 | 63 | // @CHANGE DOL_LDR Add log |
64 | 64 | if (function_exists('getDolGlobalString') && getDolGlobalString('OAUTH_DEBUG')) { |
65 | - file_put_contents(DOL_DATA_ROOT . "/dolibarr_oauth.log", $endpoint->getAbsoluteUri()."\n", FILE_APPEND); |
|
66 | - file_put_contents(DOL_DATA_ROOT . "/dolibarr_oauth.log", $requestBody."\n", FILE_APPEND); |
|
67 | - file_put_contents(DOL_DATA_ROOT . "/dolibarr_oauth.log", $method."\n", FILE_APPEND); |
|
68 | - file_put_contents(DOL_DATA_ROOT . "/dolibarr_oauth.log", var_export($extraHeaders, true)."\n", FILE_APPEND); |
|
69 | - @chmod(DOL_DATA_ROOT . "/dolibarr_oauth.log", octdec(empty($conf->global->MAIN_UMASK)?'0664':$conf->global->MAIN_UMASK)); |
|
65 | + file_put_contents(DOL_DATA_ROOT."/dolibarr_oauth.log", $endpoint->getAbsoluteUri()."\n", FILE_APPEND); |
|
66 | + file_put_contents(DOL_DATA_ROOT."/dolibarr_oauth.log", $requestBody."\n", FILE_APPEND); |
|
67 | + file_put_contents(DOL_DATA_ROOT."/dolibarr_oauth.log", $method."\n", FILE_APPEND); |
|
68 | + file_put_contents(DOL_DATA_ROOT."/dolibarr_oauth.log", var_export($extraHeaders, true)."\n", FILE_APPEND); |
|
69 | + @chmod(DOL_DATA_ROOT."/dolibarr_oauth.log", octdec(empty($conf->global->MAIN_UMASK) ? '0664' : $conf->global->MAIN_UMASK)); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | $level = error_reporting(0); |
@@ -76,8 +76,8 @@ discard block |
||
76 | 76 | $lastError = error_get_last(); |
77 | 77 | if (is_null($lastError)) { |
78 | 78 | throw new TokenResponseException( |
79 | - 'Failed to request resource. HTTP Code: ' . |
|
80 | - ((isset($http_response_header[0]))?$http_response_header[0]:'No response') |
|
79 | + 'Failed to request resource. HTTP Code: '. |
|
80 | + ((isset($http_response_header[0])) ? $http_response_header[0] : 'No response') |
|
81 | 81 | ); |
82 | 82 | } |
83 | 83 | throw new TokenResponseException($lastError['message']); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $title = $langs->trans("Multicompanies"); |
86 | 86 | |
87 | 87 | // URL http://mydolibarr/core/multicompany_page?dol_use_jmobile=1 can be used for tests |
88 | -$head = '<!-- Multicompany selection -->'."\n"; // This is used by DoliDroid to know page is a multicompany selection page |
|
88 | +$head = '<!-- Multicompany selection -->'."\n"; // This is used by DoliDroid to know page is a multicompany selection page |
|
89 | 89 | $arrayofjs = array(); |
90 | 90 | $arrayofcss = array(); |
91 | 91 | top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss); |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $multicompanyList .= '<ul class="ullistonly left" style="list-style: none; padding: 0">'; |
121 | 121 | foreach ($listofentities as $entityid => $entitycursor) { |
122 | 122 | // Check if the user has the right to access the entity |
123 | - if (getDolGlobalInt('MULTICOMPANY_TRANSVERSE_MODE') && !empty($user->entity) && $mc->checkRight($user->id, $entityid) < 0) { |
|
123 | + if (getDolGlobalInt('MULTICOMPANY_TRANSVERSE_MODE') && !empty($user->entity) && $mc->checkRight($user->id, $entityid) < 0) { |
|
124 | 124 | continue; |
125 | 125 | } |
126 | 126 | $url = DOL_URL_ROOT.'/core/multicompany_page.php?action=switchentity&token='.newToken().'&entity='.((int) $entityid).($backtourl ? '&backtourl='.urlencode($backtourl) : ''); |