Browse Source

Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 16.0

Laurent Destailleur 2 years ago
parent
commit
83fa687763
30 changed files with 47 additions and 51 deletions
  1. 2 2
      htdocs/accountancy/admin/accountmodel.php
  2. 2 2
      htdocs/accountancy/admin/categories_list.php
  3. 6 6
      htdocs/accountancy/admin/defaultaccounts.php
  4. 1 1
      htdocs/accountancy/admin/journals_list.php
  5. 4 4
      htdocs/accountancy/admin/productaccount.php
  6. 1 1
      htdocs/accountancy/bookkeeping/balance.php
  7. 1 1
      htdocs/accountancy/bookkeeping/card.php
  8. 1 1
      htdocs/accountancy/bookkeeping/list.php
  9. 1 1
      htdocs/accountancy/bookkeeping/listbyaccount.php
  10. 2 2
      htdocs/accountancy/class/accountingjournal.class.php
  11. 1 1
      htdocs/accountancy/closure/index.php
  12. 1 1
      htdocs/accountancy/customer/card.php
  13. 3 3
      htdocs/accountancy/customer/index.php
  14. 1 1
      htdocs/accountancy/customer/lines.php
  15. 1 1
      htdocs/accountancy/customer/list.php
  16. 1 1
      htdocs/accountancy/expensereport/card.php
  17. 1 1
      htdocs/accountancy/expensereport/index.php
  18. 1 1
      htdocs/accountancy/expensereport/lines.php
  19. 1 1
      htdocs/accountancy/expensereport/list.php
  20. 6 6
      htdocs/accountancy/index.php
  21. 1 1
      htdocs/accountancy/journal/bankjournal.php
  22. 1 1
      htdocs/accountancy/journal/expensereportsjournal.php
  23. 1 1
      htdocs/accountancy/journal/purchasesjournal.php
  24. 1 1
      htdocs/accountancy/journal/sellsjournal.php
  25. 1 1
      htdocs/accountancy/journal/variousjournal.php
  26. 1 1
      htdocs/accountancy/supplier/card.php
  27. 1 1
      htdocs/accountancy/supplier/lines.php
  28. 1 1
      htdocs/accountancy/supplier/list.php
  29. 1 1
      htdocs/fourn/class/fournisseur.product.class.php
  30. 0 4
      htdocs/fourn/commande/dispatch.php

+ 2 - 2
htdocs/accountancy/admin/accountmodel.php

@@ -39,7 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
-if (!empty($conf->accounting->enabled)) {
+if (isModEnabled('accounting')) {
 	require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
 }
 
@@ -126,7 +126,7 @@ $tabrowid[31] = "";
 
 // Condition to show dictionary in setup page
 $tabcond = array();
-$tabcond[31] = !empty($conf->accounting->enabled);
+$tabcond[31] = isModEnabled('accounting');
 
 // List of help for fields
 $tabhelp = array();

+ 2 - 2
htdocs/accountancy/admin/categories_list.php

@@ -111,7 +111,7 @@ $tabrowid[32] = "";
 
 // Condition to show dictionary in setup page
 $tabcond = array();
-$tabcond[32] = !empty($conf->accounting->enabled);
+$tabcond[32] = isModEnabled('accounting');
 
 // List of help for fields
 $tabhelp = array();
@@ -875,7 +875,7 @@ function fieldListAccountingCategories($fieldlist, $obj = '', $tabname = '', $co
 
 	$formadmin = new FormAdmin($db);
 	$formcompany = new FormCompany($db);
-	if (!empty($conf->accounting->enabled)) {
+	if (isModEnabled('accounting')) {
 		$formaccounting = new FormAccounting($db);
 	}
 

+ 6 - 6
htdocs/accountancy/admin/defaultaccounts.php

@@ -81,22 +81,22 @@ $list_account[] = '---Others---';
 $list_account[] = 'ACCOUNTING_VAT_BUY_ACCOUNT';
 $list_account[] = 'ACCOUNTING_VAT_SOLD_ACCOUNT';
 $list_account[] = 'ACCOUNTING_VAT_PAY_ACCOUNT';
-if (!empty($conf->banque->enabled)) {
+if (isModEnabled('banque')) {
 	$list_account[] = 'ACCOUNTING_ACCOUNT_TRANSFER_CASH';
 }
-if (!empty($conf->don->enabled)) {
+if (isModEnabled('don')) {
 	$list_account[] = 'DONATION_ACCOUNTINGACCOUNT';
 }
-if (!empty($conf->adherent->enabled)) {
+if (isModEnabled('adherent')) {
 	$list_account[] = 'ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT';
 }
-if (!empty($conf->loan->enabled)) {
+if (isModEnabled('loan')) {
 	$list_account[] = 'LOAN_ACCOUNTING_ACCOUNT_CAPITAL';
 	$list_account[] = 'LOAN_ACCOUNTING_ACCOUNT_INTEREST';
 	$list_account[] = 'LOAN_ACCOUNTING_ACCOUNT_INSURANCE';
 }
 $list_account[] = 'ACCOUNTING_ACCOUNT_SUSPENSE';
-if (!empty($conf->societe->enabled)) {
+if (isModEnabled('societe')) {
 	$list_account[] = '---Deposits---';
 }
 
@@ -266,7 +266,7 @@ print $formaccounting->select_account(getDolGlobalString('ACCOUNTING_ACCOUNT_CUS
 print '</td>';
 print '</tr>';
 
-if (!empty($conf->societe->enabled) && getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT') && getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT') != '-1') {
+if (isModEnabled('societe') && getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT') && getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT') != '-1') {
 	print '<tr class="oddeven">';
 	print '<td>' . img_picto('', 'bill', 'class="pictofixedwidth"') . $langs->trans("UseAuxiliaryAccountOnCustomerDeposit") . '</td>';
 	if (getDolGlobalInt('ACCOUNTING_ACCOUNT_CUSTOMER_USE_AUXILIARY_ON_DEPOSIT')) {

+ 1 - 1
htdocs/accountancy/admin/journals_list.php

@@ -123,7 +123,7 @@ $tabrowid[35] = "";
 
 // Condition to show dictionary in setup page
 $tabcond = array();
-$tabcond[35] = !empty($conf->accounting->enabled);
+$tabcond[35] = isModEnabled('accounting');
 
 // List of help for fields
 $tabhelp = array();

+ 4 - 4
htdocs/accountancy/admin/productaccount.php

@@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
 require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
 require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
-if (!empty($conf->categorie->enabled)) {
+if (isModEnabled('categorie')) {
 	require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
 }
 
@@ -42,7 +42,7 @@ if (!empty($conf->categorie->enabled)) {
 $langs->loadLangs(array("companies", "compta", "accountancy", "products"));
 
 // Security check
-if (empty($conf->accounting->enabled)) {
+if (!isModEnabled('accounting')) {
 	accessforbidden();
 }
 if (empty($user->rights->accounting->bind->write)) {
@@ -522,7 +522,7 @@ if ($resql) {
 
 	// Filter on categories
 	$moreforfilter = '';
-	if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
+	if (isModEnabled('categorie') && $user->rights->categorie->lire) {
 		$moreforfilter .= '<div class="divsearchfield">';
 		$moreforfilter .= img_picto($langs->trans('Categories'), 'category', 'class="pictofixedwidth"');
 		$categoriesProductArr = $form->select_all_categories(Categorie::TYPE_PRODUCT, '', '', 64, 0, 1);
@@ -533,7 +533,7 @@ if ($resql) {
 	}
 
 	//Show/hide child products. Hidden by default
-	if (!empty($conf->variants->enabled) && !empty($conf->global->PRODUIT_ATTRIBUTES_HIDECHILD)) {
+	if (isModEnabled('variants') && !empty($conf->global->PRODUIT_ATTRIBUTES_HIDECHILD)) {
 		$moreforfilter .= '<div class="divsearchfield">';
 		$moreforfilter .= '<input type="checkbox" id="search_show_childproducts" name="search_show_childproducts"'.($show_childproducts ? 'checked="checked"' : '').'>';
 		$moreforfilter .= ' <label for="search_show_childproducts">'.$langs->trans('ShowChildProducts').'</label>';

+ 1 - 1
htdocs/accountancy/bookkeeping/balance.php

@@ -143,7 +143,7 @@ if (!empty($search_ledger_code)) {
 	}
 }
 
-if (empty($conf->accounting->enabled)) {
+if (!isModEnabled('accounting')) {
 	accessforbidden();
 }
 if ($user->socid > 0) {

+ 1 - 1
htdocs/accountancy/bookkeeping/card.php

@@ -79,7 +79,7 @@ if (!empty($update)) {
 $object = new BookKeeping($db);
 
 // Security check
-if (empty($conf->accounting->enabled)) {
+if (!isModEnabled('accounting')) {
 	accessforbidden();
 }
 if ($user->socid > 0) {

+ 1 - 1
htdocs/accountancy/bookkeeping/list.php

@@ -214,7 +214,7 @@ if (empty($listofformat[$formatexportset])) {
 
 $error = 0;
 
-if (empty($conf->accounting->enabled)) {
+if (!isModEnabled('accounting')) {
 	accessforbidden();
 }
 if ($user->socid > 0) {

+ 1 - 1
htdocs/accountancy/bookkeeping/listbyaccount.php

@@ -187,7 +187,7 @@ if ($search_date_end && empty($search_date_endyear)) {
 	$search_date_endday = $tmparray['mday'];
 }
 
-if (empty($conf->accounting->enabled)) {
+if (!isModEnabled('accounting')) {
 	accessforbidden();
 }
 if ($user->socid > 0) {

+ 2 - 2
htdocs/accountancy/class/accountingjournal.class.php

@@ -429,7 +429,7 @@ class AccountingJournal extends CommonObject
 	{
 		global $conf, $langs;
 
-		if (empty($conf->asset->enabled)) {
+		if (!isModEnabled('asset')) {
 			return array();
 		}
 
@@ -867,7 +867,7 @@ class AccountingJournal extends CommonObject
 								}
 							}
 							//
-							//                          if (!$error_for_line && !empty($conf->asset->enabled) && $this->nature == 1 && $bookkeeping->fk_doc > 0) {
+							//                          if (!$error_for_line && isModEnabled('asset') && $this->nature == 1 && $bookkeeping->fk_doc > 0) {
 							//                              // Set last cumulative depreciation
 							//                              require_once DOL_DOCUMENT_ROOT . '/asset/class/asset.class.php';
 							//                              $asset = new Asset($this->db);

+ 1 - 1
htdocs/accountancy/closure/index.php

@@ -57,7 +57,7 @@ $search_date_end = dol_get_last_day($year_end, $month_end);
 $year_current = $year_start;
 
 // Security check
-if (empty($conf->accounting->enabled)) {
+if (!isModEnabled('accounting')) {
 	accessforbidden();
 }
 if ($user->socid > 0) {

+ 1 - 1
htdocs/accountancy/customer/card.php

@@ -38,7 +38,7 @@ $codeventil = GETPOST('codeventil', 'int');
 $id = GETPOST('id', 'int');
 
 // Security check
-if (empty($conf->accounting->enabled)) {
+if (!isModEnabled('accounting')) {
 	accessforbidden();
 }
 if ($user->socid > 0) {

+ 3 - 3
htdocs/accountancy/customer/index.php

@@ -40,7 +40,7 @@ $validatemonth = GETPOST('validatemonth', 'int');
 $validateyear = GETPOST('validateyear', 'int');
 
 // Security check
-if (empty($conf->accounting->enabled)) {
+if (!isModEnabled('accounting')) {
 	accessforbidden();
 }
 if ($user->socid > 0) {
@@ -77,7 +77,7 @@ $action = GETPOST('action', 'aZ09');
 $chartaccountcode = dol_getIdFromCode($db, $conf->global->CHARTOFACCOUNTS, 'accounting_system', 'rowid', 'pcg_version');
 
 // Security check
-if (empty($conf->accounting->enabled)) {
+if (!isModEnabled('accounting')) {
 	accessforbidden();
 }
 if ($user->socid > 0) {
@@ -622,7 +622,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) { // This part of code looks strange
 	print '</div>';
 
 
-	if (!empty($conf->margin->enabled)) {
+	if (isModEnabled('margin')) {
 		print "<br>\n";
 		print '<div class="div-table-responsive-no-min">';
 		print '<table class="noborder centpercent">';

+ 1 - 1
htdocs/accountancy/customer/lines.php

@@ -85,7 +85,7 @@ if (!$sortorder) {
 }
 
 // Security check
-if (empty($conf->accounting->enabled)) {
+if (!isModEnabled('accounting')) {
 	accessforbidden();
 }
 if ($user->socid > 0) {

+ 1 - 1
htdocs/accountancy/customer/list.php

@@ -104,7 +104,7 @@ $accountingAccount = new AccountingAccount($db);
 $chartaccountcode = dol_getIdFromCode($db, $conf->global->CHARTOFACCOUNTS, 'accounting_system', 'rowid', 'pcg_version');
 
 // Security check
-if (empty($conf->accounting->enabled)) {
+if (!isModEnabled('accounting')) {
 	accessforbidden();
 }
 if ($user->socid > 0) {

+ 1 - 1
htdocs/accountancy/expensereport/card.php

@@ -42,7 +42,7 @@ $codeventil = GETPOST('codeventil', 'int');
 $id = GETPOST('id', 'int');
 
 // Security check
-if (empty($conf->accounting->enabled)) {
+if (!isModEnabled('accounting')) {
 	accessforbidden();
 }
 if ($user->socid > 0) {

+ 1 - 1
htdocs/accountancy/expensereport/index.php

@@ -58,7 +58,7 @@ $year_current = $year_start;
 $action = GETPOST('action', 'aZ09');
 
 // Security check
-if (empty($conf->accounting->enabled)) {
+if (!isModEnabled('accounting')) {
 	accessforbidden();
 }
 if ($user->socid > 0) {

+ 1 - 1
htdocs/accountancy/expensereport/lines.php

@@ -79,7 +79,7 @@ if (!$sortorder) {
 }
 
 // Security check
-if (empty($conf->accounting->enabled)) {
+if (!isModEnabled('accounting')) {
 	accessforbidden();
 }
 if ($user->socid > 0) {

+ 1 - 1
htdocs/accountancy/expensereport/list.php

@@ -97,7 +97,7 @@ $accounting = new AccountingAccount($db);
 $chartaccountcode = dol_getIdFromCode($db, $conf->global->CHARTOFACCOUNTS, 'accounting_system', 'rowid', 'pcg_version');
 
 // Security check
-if (empty($conf->accounting->enabled)) {
+if (!isModEnabled('accounting')) {
 	accessforbidden();
 }
 if ($user->socid > 0) {

+ 6 - 6
htdocs/accountancy/index.php

@@ -39,14 +39,14 @@ if ($user->socid > 0) {
 	accessforbidden();
 }
 /*
-if (empty($conf->accounting->enabled)) {
+if (!isModEnabled('accounting')) {
 	accessforbidden();
 }
 if (empty($user->rights->accounting->mouvements->lire)) {
 	accessforbidden();
 }
 */
-if (empty($conf->comptabilite->enabled) && empty($conf->accounting->enabled) && empty($conf->asset->enabled) && empty($conf->intracommreport->enabled)) {
+if (!isModEnabled('comptabilite') && !isModEnabled('accounting') && !isModEnabled('asset') && !isModEnabled('intracommreport')) {
 	accessforbidden();
 }
 if (empty($user->rights->compta->resultat->lire) && empty($user->rights->accounting->comptarapport->lire) && empty($user->rights->accounting->mouvements->lire) && empty($user->rights->asset->read) && empty($user->rights->intracommreport->read)) {
@@ -86,7 +86,7 @@ if (!empty($conf->global->INVOICE_USE_SITUATION) && $conf->global->INVOICE_USE_S
 
 	print '<span class="opacitymedium">'.$langs->trans("SorryThisModuleIsNotCompatibleWithTheExperimentalFeatureOfSituationInvoices")."</span>\n";
 	print "<br>";
-} elseif (!empty($conf->accounting->enabled)) {
+} elseif (isModEnabled('accounting')) {
 	$step = 0;
 
 	$resultboxes = FormOther::getBoxesArea($user, "27"); // Load $resultboxes (selectboxlist + boxactivated + boxlista + boxlistb)
@@ -165,7 +165,7 @@ if (!empty($conf->global->INVOICE_USE_SITUATION) && $conf->global->INVOICE_USE_S
 		print $s;
 		print "<br>\n";
 
-		if (!empty($conf->tax->enabled)) {
+		if (isModEnabled('tax')) {
 			$textlink = '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=7&from=accountancy"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuTaxAccounts").'</strong></a>';
 			$step++;
 			$s = img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step, '{s}');
@@ -173,7 +173,7 @@ if (!empty($conf->global->INVOICE_USE_SITUATION) && $conf->global->INVOICE_USE_S
 			print $s;
 			print "<br>\n";
 		}
-		if (!empty($conf->expensereport->enabled)) {  // TODO Move this in the default account page because this is only one accounting account per purpose, not several.
+		if (isModEnabled('expensereport')) {  // TODO Move this in the default account page because this is only one accounting account per purpose, not several.
 			$step++;
 			$s = img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step, '{s}');
 			$s = str_replace('{s}', '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=17&from=accountancy"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuExpenseReportAccounts").'</strong></a>', $s);
@@ -212,7 +212,7 @@ if (!empty($conf->global->INVOICE_USE_SITUATION) && $conf->global->INVOICE_USE_S
 	print $s;
 	print "<br>\n";
 
-	if (!empty($conf->expensereport->enabled) || !empty($conf->deplacement->enabled)) {
+	if (isModEnabled('expensereport') || isModEnabled('deplacement')) {
 		$step++;
 		$s = img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv("ExpenseReports"), '{s}')."\n";
 		$s = str_replace('{s}', '<a href="'.DOL_URL_ROOT.'/accountancy/expensereport/index.php"><strong>'.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("ExpenseReportsVentilation").'</strong></a>', $s);

+ 1 - 1
htdocs/accountancy/journal/bankjournal.php

@@ -83,7 +83,7 @@ $now = dol_now();
 $action = GETPOST('action', 'aZ09');
 
 // Security check
-if (empty($conf->accounting->enabled)) {
+if (!isModEnabled('accounting')) {
 	accessforbidden();
 }
 if ($user->socid > 0) {

+ 1 - 1
htdocs/accountancy/journal/expensereportsjournal.php

@@ -58,7 +58,7 @@ if ($in_bookkeeping == '') {
 $now = dol_now();
 
 // Security check
-if (empty($conf->accounting->enabled)) {
+if (!isModEnabled('accounting')) {
 	accessforbidden();
 }
 if ($user->socid > 0) {

+ 1 - 1
htdocs/accountancy/journal/purchasesjournal.php

@@ -61,7 +61,7 @@ $hookmanager->initHooks(array('purchasesjournal'));
 $parameters = array();
 
 // Security check
-if (empty($conf->accounting->enabled)) {
+if (!isModEnabled('accounting')) {
 	accessforbidden();
 }
 if ($user->socid > 0) {

+ 1 - 1
htdocs/accountancy/journal/sellsjournal.php

@@ -63,7 +63,7 @@ $hookmanager->initHooks(array('sellsjournal'));
 $parameters = array();
 
 // Security check
-if (empty($conf->accounting->enabled)) {
+if (!isModEnabled('accounting')) {
 	accessforbidden();
 }
 if ($user->socid > 0) {

+ 1 - 1
htdocs/accountancy/journal/variousjournal.php

@@ -83,7 +83,7 @@ if (!is_array($journal_data)) {
 }
 
 // Security check
-if (empty($conf->accounting->enabled)) {
+if (!isModEnabled('accounting')) {
 	accessforbidden();
 }
 if ($user->socid > 0) {

+ 1 - 1
htdocs/accountancy/supplier/card.php

@@ -42,7 +42,7 @@ $codeventil = GETPOST('codeventil', 'int');
 $id = GETPOST('id', 'int');
 
 // Security check
-if (empty($conf->accounting->enabled)) {
+if (!isModEnabled('accounting')) {
 	accessforbidden();
 }
 if ($user->socid > 0) {

+ 1 - 1
htdocs/accountancy/supplier/lines.php

@@ -89,7 +89,7 @@ if (!$sortorder) {
 $formaccounting = new FormAccounting($db);
 
 // Security check
-if (empty($conf->accounting->enabled)) {
+if (!isModEnabled('accounting')) {
 	accessforbidden();
 }
 if ($user->socid > 0) {

+ 1 - 1
htdocs/accountancy/supplier/list.php

@@ -106,7 +106,7 @@ $accountingAccount = new AccountingAccount($db);
 $chartaccountcode = dol_getIdFromCode($db, $conf->global->CHARTOFACCOUNTS, 'accounting_system', 'rowid', 'pcg_version');
 
 // Security check
-if (empty($conf->accounting->enabled)) {
+if (!isModEnabled('accounting')) {
 	accessforbidden();
 }
 if ($user->socid > 0) {

+ 1 - 1
htdocs/fourn/class/fournisseur.product.class.php

@@ -808,7 +808,7 @@ class ProductFournisseur extends Product
 		$sql .= " ,pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code";
 		$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."product_fournisseur_price as pfp";
 		$sql .= " WHERE s.entity IN (".getEntity('societe').")";
-		$sql .= " AND pfp.entity = ".$conf->entity; // only current entity
+		$sql .= " AND pfp.entity IN (".getEntity('productsupplierprice').")";
 		$sql .= " AND pfp.fk_product = ".((int) $prodid);
 		$sql .= " AND pfp.fk_soc = s.rowid";
 		$sql .= " AND s.status = 1"; // only enabled society

+ 0 - 4
htdocs/fourn/commande/dispatch.php

@@ -1202,10 +1202,6 @@ if ($id > 0 || !empty($ref)) {
 			while ($i < $num) {
 				$objp = $db->fetch_object($resql);
 
-				$tmpproduct->id = $objp->fk_product;
-				$tmpproduct->ref = $objp->ref;
-				$tmpproduct->label = $objp->label;
-
 				if ($action == 'editline' && $lineid == $objp->dispatchlineid) {
 					print '<form name="editdispatchedlines" id="editdispatchedlines" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'#line_'.GETPOST('lineid', 'int').'" method="POST">
 					<input type="hidden" name="token" value="'.newToken().'">