fix php8 warnings
This commit is contained in:
parent
6cf7a80ce3
commit
e71692e745
@ -63,7 +63,7 @@ $conditions = array(
|
||||
'NOTE_PRIVATE' => 1,
|
||||
'SOCIETE' => 1,
|
||||
'PRODUCTDESC' => (isModEnabled("product") || isModEnabled("service")),
|
||||
'DETAILS' => (isModEnabled('facture') || isModEnabled("propal") || isModEnabled('commande') || !empty($conf->supplier_proposal->enabled) || (isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice")),
|
||||
'DETAILS' => (isModEnabled('facture') || isModEnabled("propal") || isModEnabled('commande') || isModEnabled('supplier_proposal') || (isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice")),
|
||||
'USERSIGN' => 1,
|
||||
'MAILING' => !empty($conf->mailing->enabled),
|
||||
'MAIL' => (isModEnabled('facture') || isModEnabled("propal") || isModEnabled('commande')),
|
||||
|
||||
@ -209,7 +209,7 @@ if (isModEnabled("reception")) {
|
||||
if (!empty($conf->ficheinter->enabled)) {
|
||||
$elementList['fichinter_send'] = img_picto('', 'intervention', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToSendIntervention'));
|
||||
}
|
||||
if (!empty($conf->supplier_proposal->enabled)) {
|
||||
if (isModEnabled('supplier_proposal')) {
|
||||
$elementList['supplier_proposal_send'] = img_picto('', 'propal', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToSendSupplierRequestForQuotation'));
|
||||
}
|
||||
if ((isModEnabled("fournisseur") && !empty($user->rights->fournisseur->commande->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (isModEnabled("supplier_order") && !empty($user->rights->supplier_order->lire))) {
|
||||
@ -218,7 +218,7 @@ if ((isModEnabled("fournisseur") && !empty($user->rights->fournisseur->commande-
|
||||
if ((isModEnabled("fournisseur") && !empty($user->rights->fournisseur->facture->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (isModEnabled("supplier_invoice") && !empty($user->rights->supplier_invoice->lire))) {
|
||||
$elementList['invoice_supplier_send'] = img_picto('', 'bill', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToSendSupplierInvoice'));
|
||||
}
|
||||
if (!empty($conf->contrat->enabled) && !empty($user->rights->contrat->lire)) {
|
||||
if (isModEnabled('contrat') && !empty($user->rights->contrat->lire)) {
|
||||
$elementList['contract'] = img_picto('', 'contract', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToSendContract'));
|
||||
}
|
||||
if (!empty($conf->ticket->enabled) && !empty($user->rights->ticket->read)) {
|
||||
|
||||
@ -123,7 +123,7 @@ $workflowcodes = array(
|
||||
'WORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL'=>array(
|
||||
'family'=>'classify_supplier_proposal',
|
||||
'position'=>60,
|
||||
'enabled'=>(!empty($conf->supplier_proposal->enabled) && ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice"))),
|
||||
'enabled'=>(isModEnabled('supplier_proposal') && ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice"))),
|
||||
'picto'=>'supplier_proposal',
|
||||
'warning'=>''
|
||||
),
|
||||
|
||||
@ -1362,7 +1362,7 @@ if ($action == 'create') {
|
||||
$formactions->form_select_status_action('formaction', $percent, 1, 'complete', 0, 0, 'maxwidth200');
|
||||
print '</td></tr>';
|
||||
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
// Categories
|
||||
print '<tr><td>'.$langs->trans("Categories").'</td><td>';
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_ACTIONCOMM, '', 'parent', 64, 0, 1);
|
||||
@ -1870,7 +1870,7 @@ if ($id > 0) {
|
||||
print '</td></tr>';
|
||||
|
||||
// Tags-Categories
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
print '<tr><td>'.$langs->trans("Categories").'</td><td colspan="3">';
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_ACTIONCOMM, '', 'parent', 64, 0, 1);
|
||||
$c = new Categorie($db);
|
||||
@ -2285,7 +2285,7 @@ if ($id > 0) {
|
||||
}
|
||||
|
||||
// Categories
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
|
||||
print $form->showCategories($object->id, Categorie::TYPE_ACTIONCOMM, 1);
|
||||
print "</td></tr>";
|
||||
|
||||
@ -53,7 +53,7 @@ if (isModEnabled('commande')) {
|
||||
if (isModEnabled("expedition")) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php';
|
||||
}
|
||||
if (!empty($conf->contrat->enabled)) {
|
||||
if (isModEnabled('contrat')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||
}
|
||||
if (isModEnabled('adherent')) {
|
||||
@ -66,7 +66,7 @@ if (!empty($conf->ficheinter->enabled)) {
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('companies', 'banks'));
|
||||
|
||||
if (!empty($conf->contrat->enabled)) {
|
||||
if (isModEnabled('contrat')) {
|
||||
$langs->load("contracts");
|
||||
}
|
||||
if (isModEnabled('commande')) {
|
||||
@ -605,7 +605,7 @@ if ($object->id > 0) {
|
||||
}
|
||||
|
||||
// Categories
|
||||
if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) {
|
||||
if (isModEnabled('categorie') && !empty($user->rights->categorie->lire)) {
|
||||
$langs->load("categories");
|
||||
print '<tr><td>'.$langs->trans("CustomersCategoriesShort").'</td>';
|
||||
print '<td>';
|
||||
@ -1122,7 +1122,7 @@ if ($object->id > 0) {
|
||||
/*
|
||||
* Latest contracts
|
||||
*/
|
||||
if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) {
|
||||
if (isModEnabled('contrat') && $user->rights->contrat->lire) {
|
||||
$sql = "SELECT s.nom, s.rowid, c.rowid as id, c.ref as ref, c.statut as contract_status, c.datec as dc, c.date_contrat as dcon, c.ref_customer as refcus, c.ref_supplier as refsup, c.entity,";
|
||||
$sql .= " c.last_main_doc, c.model_pdf";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as c";
|
||||
|
||||
@ -93,7 +93,7 @@ $companystatic = new Societe($db);
|
||||
if (isModEnabled("propal")) {
|
||||
$propalstatic = new Propal($db);
|
||||
}
|
||||
if (!empty($conf->supplier_proposal->enabled)) {
|
||||
if (isModEnabled('supplier_proposal')) {
|
||||
$supplierproposalstatic = new SupplierProposal($db);
|
||||
}
|
||||
if (isModEnabled('commande')) {
|
||||
@ -226,7 +226,7 @@ if (isModEnabled("propal") && $user->rights->propal->lire) {
|
||||
* Draft supplier proposals
|
||||
*/
|
||||
|
||||
if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire) {
|
||||
if (isModEnabled('supplier_proposal') && $user->rights->supplier_proposal->lire) {
|
||||
$sql = "SELECT p.rowid, p.ref, p.total_ht, p.total_tva, p.total_ttc, p.fk_statut as status";
|
||||
$sql .= ", s.rowid as socid, s.nom as name, s.name_alias";
|
||||
$sql .= ", s.code_client, s.code_compta, s.client";
|
||||
@ -810,7 +810,7 @@ if (((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERM
|
||||
/*
|
||||
* Latest contracts
|
||||
*/
|
||||
if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire && 0) { // TODO A REFAIRE DEPUIS NOUVEAU CONTRAT
|
||||
if (isModEnabled('contrat') && $user->rights->contrat->lire && 0) { // TODO A REFAIRE DEPUIS NOUVEAU CONTRAT
|
||||
$staticcontrat = new Contrat($db);
|
||||
|
||||
$sql = "SELECT s.rowid as socid, s.nom as name, s.name_alias";
|
||||
|
||||
@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('mails', 'companies'));
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
$langs->load("categories");
|
||||
}
|
||||
|
||||
|
||||
@ -980,7 +980,7 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
if (($object->statut == 0 || $object->statut == 1 || $object->statut == 2) && $user->rights->mailing->creer) {
|
||||
if (!empty($conf->fckeditor->enabled) && !empty($conf->global->FCKEDITOR_ENABLE_MAILING)) {
|
||||
if (isModEnabled('fckeditor') && !empty($conf->global->FCKEDITOR_ENABLE_MAILING)) {
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=edit&token='.newToken().'&id='.$object->id.'">'.$langs->trans("EditWithEditor").'</a>';
|
||||
} else {
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=edit&token='.newToken().'&id='.$object->id.'">'.$langs->trans("EditWithTextEditor").'</a>';
|
||||
|
||||
@ -2850,7 +2850,7 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
// Create contract
|
||||
if (!empty($conf->contrat->enabled) && $object->statut == Propal::STATUS_SIGNED) {
|
||||
if (isModEnabled('contrat') && $object->statut == Propal::STATUS_SIGNED) {
|
||||
$langs->load("contracts");
|
||||
|
||||
if ($usercancreatecontract) {
|
||||
|
||||
@ -1057,7 +1057,7 @@ if ($resql) {
|
||||
$moreforfilter .= '</div>';
|
||||
}
|
||||
// If the user can view products
|
||||
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) {
|
||||
if (isModEnabled('categorie') && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$tmptitle = $langs->trans('IncludingProductWithTag');
|
||||
@ -1065,7 +1065,7 @@ if ($resql) {
|
||||
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmptitle, 0, 0, '', 0, 0, 0, 0, (empty($conf->dol_optimize_smallscreen) ? 'maxwidth300 widthcentpercentminusx' : 'maxwidth250 widthcentpercentminusx'), 1);
|
||||
$moreforfilter .= '</div>';
|
||||
}
|
||||
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
|
||||
if (isModEnabled('categorie') && $user->rights->categorie->lire) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$tmptitle = $langs->trans('CustomersProspectsCategoriesShort');
|
||||
|
||||
@ -2836,7 +2836,7 @@ if ($action == 'create' && $usercancreate) {
|
||||
}
|
||||
|
||||
// Create contract
|
||||
if (!empty($conf->contrat->enabled) && ($object->statut == Commande::STATUS_VALIDATED || $object->statut == Commande::STATUS_SHIPMENTONPROCESS || $object->statut == Commande::STATUS_CLOSED)) {
|
||||
if (isModEnabled('contrat') && ($object->statut == Commande::STATUS_VALIDATED || $object->statut == Commande::STATUS_SHIPMENTONPROCESS || $object->statut == Commande::STATUS_CLOSED)) {
|
||||
$langs->load("contracts");
|
||||
|
||||
if ($user->hasRight('contrat', 'creer')) {
|
||||
|
||||
@ -1343,7 +1343,7 @@ if ($resql) {
|
||||
$moreforfilter .= '</div>';
|
||||
}
|
||||
// If the user can view prospects other than his'
|
||||
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) {
|
||||
if (isModEnabled('categorie') && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$tmptitle = $langs->trans('IncludingProductWithTag');
|
||||
@ -1351,7 +1351,7 @@ if ($resql) {
|
||||
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmptitle, 0, 0, '', 0, 0, 0, 0, 'maxwidth300 widthcentpercentminusx', 1);
|
||||
$moreforfilter .= '</div>';
|
||||
}
|
||||
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
|
||||
if (isModEnabled('categorie') && $user->rights->categorie->lire) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$tmptitle = $langs->trans('CustomersProspectsCategoriesShort');
|
||||
|
||||
@ -5511,7 +5511,7 @@ if ($action == 'create') {
|
||||
|
||||
// Create contract
|
||||
if (!empty($conf->global->CONTRACT_CREATE_FROM_INVOICE)) {
|
||||
if (!empty($conf->contrat->enabled) && $object->statut == Facture::STATUS_VALIDATED) {
|
||||
if (isModEnabled('contrat') && $object->statut == Facture::STATUS_VALIDATED) {
|
||||
$langs->load("contracts");
|
||||
|
||||
if ($usercancreatecontract) {
|
||||
|
||||
@ -587,7 +587,7 @@ if (count($amount)) {
|
||||
|
||||
// Other stats
|
||||
print '<td class="center">';
|
||||
if (!empty($conf->supplier_proposal->enabled) && $key > 0) {
|
||||
if (isModEnabled('supplier_proposal') && $key > 0) {
|
||||
print ' <a href="'.DOL_URL_ROOT.'/comm/propal/stats/index.php?socid='.$key.'">'.img_picto($langs->trans("ProposalStats"), "stats").'</a> ';
|
||||
}
|
||||
if (((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order")) && $key > 0) {
|
||||
|
||||
@ -201,7 +201,7 @@ abstract class ActionsContactCardCommon
|
||||
$this->tpl['contact_element'][$i]['linked_element_value'] = $this->object->ref_propal ? $this->object->ref_propal : $langs->trans("NoContactForAnyProposal");
|
||||
$i++;
|
||||
}
|
||||
if (!empty($conf->contrat->enabled)) {
|
||||
if (isModEnabled('contrat')) {
|
||||
$this->tpl['contact_element'][$i]['linked_element_label'] = $langs->trans("ContactForContracts");
|
||||
$this->tpl['contact_element'][$i]['linked_element_value'] = $this->object->ref_contrat ? $this->object->ref_contrat : $langs->trans("NoContactForAnyContract");
|
||||
$i++;
|
||||
|
||||
@ -892,7 +892,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
}
|
||||
|
||||
// Categories
|
||||
if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) {
|
||||
if (isModEnabled('categorie') && !empty($user->rights->categorie->lire)) {
|
||||
print '<tr><td>'.$form->editfieldkey('Categories', 'contcats', '', $object, 0).'</td><td colspan="3">';
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_CONTACT, null, 'parent', null, null, 1);
|
||||
print img_picto('', 'category').$form->multiselectarray('contcats', $cate_arbo, GETPOST('contcats', 'array'), null, null, null, null, '90%');
|
||||
@ -1197,7 +1197,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
print '</td></tr>';
|
||||
|
||||
// Categories
|
||||
if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) {
|
||||
if (isModEnabled('categorie') && !empty($user->rights->categorie->lire)) {
|
||||
$arrayselected = array();
|
||||
print '<tr><td>'.$form->editfieldkey('Categories', 'contcats', '', $object, 0).'</td>';
|
||||
print '<td colspan="3">';
|
||||
@ -1237,7 +1237,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
if (!empty($conf->contrat->enabled)) {
|
||||
if (isModEnabled('contrat')) {
|
||||
print '<tr><td>'.$langs->trans("ContactForContracts").'</td><td colspan="3">';
|
||||
print $object->ref_contrat ? $object->ref_contrat : ('<span class="opacitymedium">'.$langs->trans("NoContactForAnyContract").'</span>');
|
||||
print '</td></tr>';
|
||||
@ -1471,7 +1471,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
|
||||
// Categories
|
||||
if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) {
|
||||
if (isModEnabled('categorie') && !empty($user->rights->categorie->lire)) {
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Categories").'</td>';
|
||||
print '<td colspan="3">';
|
||||
print $form->showCategories($object->id, Categorie::TYPE_CONTACT, 1);
|
||||
@ -1514,7 +1514,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
if (!empty($conf->contrat->enabled)) {
|
||||
if (isModEnabled('contrat')) {
|
||||
print '<tr><td>'.$langs->trans("ContactForContracts").'</td><td colspan="3">';
|
||||
print $object->ref_contrat ? $object->ref_contrat : $langs->trans("NoContactForAnyContract");
|
||||
print '</td></tr>';
|
||||
|
||||
@ -165,7 +165,7 @@ if ($object->thirdparty->client) {
|
||||
if (isModEnabled('facture') && $user->rights->facture->lire) {
|
||||
$elementTypeArray['invoice'] = $langs->transnoentitiesnoconv('Invoices');
|
||||
}
|
||||
if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) {
|
||||
if (isModEnabled('contrat') && $user->rights->contrat->lire) {
|
||||
$elementTypeArray['contract'] = $langs->transnoentitiesnoconv('Contracts');
|
||||
}
|
||||
}
|
||||
|
||||
@ -734,7 +734,7 @@ if ($search_firstlast_only) {
|
||||
}
|
||||
|
||||
$moreforfilter = '';
|
||||
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
|
||||
if (isModEnabled('categorie') && $user->rights->categorie->lire) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$tmptitle = $langs->trans('ContactCategoriesShort');
|
||||
|
||||
@ -239,7 +239,7 @@ print "</table></div><br>";
|
||||
|
||||
// Draft contracts
|
||||
|
||||
if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) {
|
||||
if (isModEnabled('contrat') && $user->rights->contrat->lire) {
|
||||
$sql = "SELECT c.rowid, c.ref,";
|
||||
$sql .= " s.nom as name, s.rowid as socid";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."contrat as c, ".MAIN_DB_PREFIX."societe as s";
|
||||
|
||||
@ -571,7 +571,7 @@ if ($user->rights->user->user->lire) {
|
||||
$moreforfilter .= '</div>';
|
||||
}
|
||||
// If the user can view categories of products
|
||||
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) {
|
||||
if (isModEnabled('categorie') && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$tmptitle = $langs->trans('IncludingProductWithTag');
|
||||
|
||||
@ -6902,7 +6902,7 @@ abstract class CommonObject
|
||||
} elseif (preg_match('/^html/', $type)) {
|
||||
if (!preg_match('/search_/', $keyprefix)) { // If keyprefix is search_ or search_options_, we must just use a simple text field
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor($keyprefix.$key.$keysuffix, $value, '', 200, 'dolibarr_notes', 'In', false, false, !empty($conf->fckeditor->enabled) && $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_5, '90%');
|
||||
$doleditor = new DolEditor($keyprefix.$key.$keysuffix, $value, '', 200, 'dolibarr_notes', 'In', false, false, isModEnabled('fckeditor') && $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_5, '90%');
|
||||
$out = $doleditor->Create(1, '', true, '', '', $moreparam, $morecss);
|
||||
} else {
|
||||
$out = '<input type="text" class="flat '.$morecss.' maxwidthonsmartphone" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" value="'.dol_escape_htmltag($value).'" '.($moreparam ? $moreparam : '').'>';
|
||||
|
||||
@ -152,7 +152,7 @@ class DolEditor
|
||||
$out .= htmlspecialchars($this->content);
|
||||
$out .= '</textarea>';
|
||||
|
||||
if ($this->tool == 'ckeditor' && !empty($conf->use_javascript_ajax) && !empty($conf->fckeditor->enabled)) {
|
||||
if ($this->tool == 'ckeditor' && !empty($conf->use_javascript_ajax) && isModEnabled('fckeditor')) {
|
||||
if (!defined('REQUIRE_CKEDITOR')) {
|
||||
define('REQUIRE_CKEDITOR', '1');
|
||||
}
|
||||
|
||||
@ -1098,7 +1098,7 @@ class ExtraFields
|
||||
} elseif ($type == 'html') {
|
||||
if (!preg_match('/search_/', $keyprefix)) { // If keyprefix is search_ or search_options_, we must just use a simple text field
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor($keyprefix.$key.$keysuffix, $value, '', 200, 'dolibarr_notes', 'In', false, false, !empty($conf->fckeditor->enabled) && $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_5, '90%');
|
||||
$doleditor = new DolEditor($keyprefix.$key.$keysuffix, $value, '', 200, 'dolibarr_notes', 'In', false, false, isModEnabled('fckeditor') && $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_5, '90%');
|
||||
$out = $doleditor->Create(1);
|
||||
} else {
|
||||
$out = '<input type="text" class="flat '.$morecss.' maxwidthonsmartphone" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" value="'.dol_escape_htmltag($value).'" '.($moreparam ? $moreparam : '').'>';
|
||||
|
||||
@ -529,7 +529,7 @@ class Form
|
||||
$savemethod = $tmp[4];
|
||||
}
|
||||
|
||||
if (!empty($conf->fckeditor->enabled)) {
|
||||
if (isModEnabled('fckeditor')) {
|
||||
$out .= '<input id="ckeditor_toolbar" value="'.$toolbar.'" type="hidden"/>'."\n";
|
||||
} else {
|
||||
$inputType = 'textarea';
|
||||
@ -8721,7 +8721,7 @@ class Form
|
||||
'label'=>'LinkToIntervention',
|
||||
'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref FROM ".$this->db->prefix()."societe as s, ".$this->db->prefix()."fichinter as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('intervention').')'),
|
||||
'supplier_proposal'=>array(
|
||||
'enabled'=>(!empty($conf->supplier_proposal->enabled) ? $conf->supplier_proposal->enabled : 0),
|
||||
'enabled'=>(isModEnabled('supplier_proposal') ? $conf->supplier_proposal->enabled : 0),
|
||||
'perms'=>1,
|
||||
'label'=>'LinkToSupplierProposal',
|
||||
'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, '' as ref_supplier, t.total_ht FROM ".$this->db->prefix()."societe as s, ".$this->db->prefix()."supplier_proposal as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('supplier_proposal').')'),
|
||||
|
||||
@ -1642,7 +1642,7 @@ class FormMail extends Form
|
||||
if (isModEnabled('commande')) {
|
||||
$tmparray['__SECUREKEYPAYMENT_ORDER__'] = 'SecureKeyPAYMENTUniquePerOrder';
|
||||
}
|
||||
if (!empty($conf->contrat->enabled)) {
|
||||
if (isModEnabled('contrat')) {
|
||||
$tmparray['__SECUREKEYPAYMENT_CONTRACTLINE__'] = 'SecureKeyPAYMENTUniquePerContractLine';
|
||||
}
|
||||
|
||||
@ -1659,7 +1659,7 @@ class FormMail extends Form
|
||||
if (isModEnabled('commande')) {
|
||||
$tmparray['__ONLINEPAYMENTLINK_ORDER__'] = 'OnlinePaymentLinkUniquePerOrder';
|
||||
}
|
||||
if (!empty($conf->contrat->enabled)) {
|
||||
if (isModEnabled('contrat')) {
|
||||
$tmparray['__ONLINEPAYMENTLINK_CONTRACTLINE__'] = 'OnlinePaymentLinkUniquePerContractLine';
|
||||
}
|
||||
}
|
||||
|
||||
@ -128,7 +128,7 @@ function societe_prepare_head(Societe $object)
|
||||
}
|
||||
}
|
||||
$supplier_module_enabled = 0;
|
||||
if ((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_proposal->enabled) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) {
|
||||
if ((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled('supplier_proposal') || isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) {
|
||||
$supplier_module_enabled = 1;
|
||||
}
|
||||
if ($supplier_module_enabled == 1 && $object->fournisseur && !empty($user->rights->fournisseur->lire)) {
|
||||
|
||||
@ -7405,7 +7405,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
||||
/*$substitutionarray['__PROJECT_NOTE_PUBLIC__'] = '__PROJECT_NOTE_PUBLIC__';
|
||||
$substitutionarray['__PROJECT_NOTE_PRIVATE__'] = '__PROJECT_NOTE_PRIVATE__';*/
|
||||
}
|
||||
if (!empty($conf->contrat->enabled) && (!is_object($object) || $object->element == 'contract')) {
|
||||
if (isModEnabled('contrat') && (!is_object($object) || $object->element == 'contract')) {
|
||||
$substitutionarray['__CONTRACT_HIGHEST_PLANNED_START_DATE__'] = 'Highest date planned for a service start';
|
||||
$substitutionarray['__CONTRACT_HIGHEST_PLANNED_START_DATETIME__'] = 'Highest date and hour planned for service start';
|
||||
$substitutionarray['__CONTRACT_LOWEST_EXPIRATION_DATE__'] = 'Lowest data for planned expiration of service';
|
||||
|
||||
@ -1605,7 +1605,7 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0,
|
||||
$libelleproduitservice = $prefix_prodserv.$ref_prodserv.$libelleproduitservice;
|
||||
|
||||
// Add an additional description for the category products
|
||||
if (!empty($conf->global->CATEGORY_ADD_DESC_INTO_DOC) && $idprod && !empty($conf->categorie->enabled)) {
|
||||
if (!empty($conf->global->CATEGORY_ADD_DESC_INTO_DOC) && $idprod && isModEnabled('categorie')) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
$categstatic = new Categorie($db);
|
||||
// recovering the list of all the categories linked to product
|
||||
|
||||
@ -398,7 +398,7 @@ function show_stats_for_company($product, $socid)
|
||||
print '</tr>';
|
||||
}
|
||||
// Supplier proposals
|
||||
if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire) {
|
||||
if (isModEnabled('supplier_proposal') && $user->rights->supplier_proposal->lire) {
|
||||
$nblines++;
|
||||
$ret = $product->load_stats_proposal_supplier($socid);
|
||||
if ($ret < 0) {
|
||||
@ -513,7 +513,7 @@ function show_stats_for_company($product, $socid)
|
||||
}
|
||||
|
||||
// Contracts
|
||||
if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) {
|
||||
if (isModEnabled('contrat') && $user->rights->contrat->lire) {
|
||||
$nblines++;
|
||||
$ret = $product->load_stats_contrat($socid);
|
||||
if ($ret < 0) {
|
||||
|
||||
@ -126,7 +126,7 @@ function project_prepare_head(Project $project, $moreparam = '')
|
||||
|
||||
if (((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice"))
|
||||
|| isModEnabled("propal") || isModEnabled('commande')
|
||||
|| isModEnabled('facture') || !empty($conf->contrat->enabled)
|
||||
|| isModEnabled('facture') || isModEnabled('contrat')
|
||||
|| !empty($conf->ficheinter->enabled) || isModEnabled('agenda') || isModEnabled('deplacement') || !empty($conf->stock->enabled)) {
|
||||
$nbElements = 0;
|
||||
// Enable caching of thirdrparty count Contacts
|
||||
@ -150,7 +150,7 @@ function project_prepare_head(Project $project, $moreparam = '')
|
||||
if (isModEnabled('facture')) {
|
||||
$nbElements += $project->getElementCount('invoice_predefined', 'facture_rec');
|
||||
}
|
||||
if (!empty($conf->supplier_proposal->enabled)) {
|
||||
if (isModEnabled('supplier_proposal')) {
|
||||
$nbElements += $project->getElementCount('proposal_supplier', 'supplier_proposal');
|
||||
}
|
||||
if (isModEnabled("supplier_order")) {
|
||||
@ -159,7 +159,7 @@ function project_prepare_head(Project $project, $moreparam = '')
|
||||
if (isModEnabled("supplier_invoice")) {
|
||||
$nbElements += $project->getElementCount('invoice_supplier', 'facture_fourn');
|
||||
}
|
||||
if (!empty($conf->contrat->enabled)) {
|
||||
if (isModEnabled('contrat')) {
|
||||
$nbElements += $project->getElementCount('contract', 'contrat');
|
||||
}
|
||||
if (!empty($conf->ficheinter->enabled)) {
|
||||
|
||||
@ -55,7 +55,7 @@ if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMO
|
||||
if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order")) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||
}
|
||||
if (!empty($conf->contrat->enabled)) {
|
||||
if (isModEnabled('contrat')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||
}
|
||||
if (!empty($conf->ficheinter->enabled)) {
|
||||
|
||||
@ -56,7 +56,7 @@ if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMO
|
||||
if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order")) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||
}
|
||||
if (!empty($conf->contrat->enabled)) {
|
||||
if (isModEnabled('contrat')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||
}
|
||||
if (!empty($conf->ficheinter->enabled)) {
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
|
||||
if (isModEnabled('categorie') && $user->rights->categorie->lire) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
}
|
||||
|
||||
@ -254,7 +254,7 @@ if (!empty($conf->global->MAIN_MULTILANGS)) {
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
|
||||
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
|
||||
if (isModEnabled('categorie') && $user->rights->categorie->lire) {
|
||||
// Customer Categories
|
||||
print '<tr><td>'.$langs->trans("CustomersCategoryShort");
|
||||
if (!empty($array_query['cust_categ'])) {
|
||||
@ -451,7 +451,7 @@ print '</td></tr></table>';
|
||||
print '</td><td>'."\n";
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
|
||||
if (isModEnabled('categorie') && $user->rights->categorie->lire) {
|
||||
// Customer Categories
|
||||
print '<tr><td>'.$langs->trans("ContactCategoriesShort");
|
||||
if (!empty($array_query['contact_categ'])) {
|
||||
|
||||
@ -94,17 +94,17 @@ if ($module == 'propal') {
|
||||
}
|
||||
//else dol_print_error('','Bad value '.$module.' for param module');
|
||||
|
||||
if (!empty($conf->fckeditor->enabled) && !empty($conf->global->FCKEDITOR_ENABLE_SOCIETE)) {
|
||||
if (isModEnabled('fckeditor') && !empty($conf->global->FCKEDITOR_ENABLE_SOCIETE)) {
|
||||
$typeofdata = 'ckeditor:dolibarr_notes:100%:200::1:12:95%:0'; // Rem: This var is for all notes, not only thirdparties note.
|
||||
} else {
|
||||
$typeofdata = 'textarea:12:95%';
|
||||
}
|
||||
if (!empty($conf->fckeditor->enabled) && !empty($conf->global->FCKEDITOR_ENABLE_NOTE_PUBLIC)) {
|
||||
if (isModEnabled('fckeditor') && !empty($conf->global->FCKEDITOR_ENABLE_NOTE_PUBLIC)) {
|
||||
$typeofdatapub = 'ckeditor:dolibarr_notes:100%:200::1:12:95%:0'; // Rem: This var is for all notes, not only thirdparties note.
|
||||
} else {
|
||||
$typeofdatapub = 'textarea:12:95%';
|
||||
}
|
||||
if (!empty($conf->fckeditor->enabled) && !empty($conf->global->FCKEDITOR_ENABLE_NOTE_PRIVATE)) {
|
||||
if (isModEnabled('fckeditor') && !empty($conf->global->FCKEDITOR_ENABLE_NOTE_PRIVATE)) {
|
||||
$typeofdatapriv = 'ckeditor:dolibarr_notes:100%:200::1:12:95%:0'; // Rem: This var is for all notes, not only thirdparties note.
|
||||
} else {
|
||||
$typeofdatapriv = 'textarea:12:95%';
|
||||
|
||||
@ -74,7 +74,7 @@ if (isModEnabled('facture')) {
|
||||
}
|
||||
print '<br>';
|
||||
}
|
||||
if (!empty($conf->contrat->enabled)) {
|
||||
if (isModEnabled('contrat')) {
|
||||
print '<div id="contractline"></div>';
|
||||
print img_picto('', 'globe').' <span class="opacitymedium">'.$langs->trans("ToOfferALinkForOnlinePaymentOnContractLine", $servicename).':</span><br>';
|
||||
print '<strong class="wordbreak">'.getOnlinePaymentUrl(1, 'contractline')."</strong><br>\n";
|
||||
|
||||
@ -222,7 +222,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
||||
}
|
||||
|
||||
// Secondly, we set to linked Proposal to "Billed" if WORKFLOW_INVOICE_CLASSIFY_BILLED_SUPPLIER_PROPOSAL is set.
|
||||
if (!empty($conf->supplier_proposal->enabled) && !empty($conf->global->WORKFLOW_INVOICE_CLASSIFY_BILLED_SUPPLIER_PROPOSAL)) {
|
||||
if (isModEnabled('supplier_proposal') && !empty($conf->global->WORKFLOW_INVOICE_CLASSIFY_BILLED_SUPPLIER_PROPOSAL)) {
|
||||
$object->fetchObjectLinked('', 'supplier_proposal', $object->id, $object->element);
|
||||
if (!empty($object->linkedObjects)) {
|
||||
$totalonlinkedelements = 0;
|
||||
|
||||
@ -319,7 +319,7 @@ if (!empty($conf->global->ECM_AUTO_TREE_ENABLED)) {
|
||||
if (isModEnabled("propal")) {
|
||||
$rowspan++; $sectionauto[] = array('position'=>30, 'level'=>1, 'module'=>'propal', 'test'=>$conf->propal->enabled, 'label'=>$langs->trans("Proposals"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Proposals")));
|
||||
}
|
||||
if (!empty($conf->contrat->enabled)) {
|
||||
if (isModEnabled('contrat')) {
|
||||
$rowspan++; $sectionauto[] = array('position'=>40, 'level'=>1, 'module'=>'contract', 'test'=>$conf->contrat->enabled, 'label'=>$langs->trans("Contracts"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Contracts")));
|
||||
}
|
||||
if (isModEnabled('commande')) {
|
||||
@ -328,7 +328,7 @@ if (!empty($conf->global->ECM_AUTO_TREE_ENABLED)) {
|
||||
if (isModEnabled('facture')) {
|
||||
$rowspan++; $sectionauto[] = array('position'=>60, 'level'=>1, 'module'=>'invoice', 'test'=>$conf->facture->enabled, 'label'=>$langs->trans("CustomersInvoices"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Invoices")));
|
||||
}
|
||||
if (!empty($conf->supplier_proposal->enabled)) {
|
||||
if (isModEnabled('supplier_proposal')) {
|
||||
$langs->load("supplier_proposal");
|
||||
$rowspan++; $sectionauto[] = array('position'=>70, 'level'=>1, 'module'=>'supplier_proposal', 'test'=>$conf->supplier_proposal->enabled, 'label'=>$langs->trans("SupplierProposals"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("SupplierProposals")));
|
||||
}
|
||||
|
||||
@ -122,7 +122,7 @@ if (isModEnabled("societe")) {
|
||||
if (isModEnabled("propal")) {
|
||||
$rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'propal', 'test'=>$conf->propal->enabled, 'label'=>$langs->trans("Proposals"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Proposals")));
|
||||
}
|
||||
if (!empty($conf->contrat->enabled)) {
|
||||
if (isModEnabled('contrat')) {
|
||||
$rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'contract', 'test'=>$conf->contrat->enabled, 'label'=>$langs->trans("Contracts"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Contracts")));
|
||||
}
|
||||
if (isModEnabled('commande')) {
|
||||
@ -131,7 +131,7 @@ if (isModEnabled('commande')) {
|
||||
if (isModEnabled('facture')) {
|
||||
$rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'invoice', 'test'=>$conf->facture->enabled, 'label'=>$langs->trans("CustomersInvoices"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Invoices")));
|
||||
}
|
||||
if (!empty($conf->supplier_proposal->enabled)) {
|
||||
if (isModEnabled('supplier_proposal')) {
|
||||
$langs->load("supplier_proposal"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'supplier_proposal', 'test'=>$conf->supplier_proposal->enabled, 'label'=>$langs->trans("SupplierProposals"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("SupplierProposals")));
|
||||
}
|
||||
if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order")) {
|
||||
|
||||
@ -577,7 +577,7 @@ if ($user->rights->user->user->lire) {
|
||||
$moreforfilter .= '</div>';
|
||||
}
|
||||
// If the user can view prospects other than his'
|
||||
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) {
|
||||
if (isModEnabled('categorie') && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$tmptitle = $langs->trans('IncludingProductWithTag');
|
||||
@ -588,7 +588,7 @@ if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($use
|
||||
|
||||
$moreforfilter .= '</div>';
|
||||
}
|
||||
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
|
||||
if (isModEnabled('categorie') && $user->rights->categorie->lire) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$tmptitle = $langs->trans('CustomersProspectsCategoriesShort');
|
||||
|
||||
@ -41,7 +41,7 @@ if (!empty($conf->project->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||
}
|
||||
if (!empty($conf->contrat->enabled)) {
|
||||
if (isModEnabled('contrat')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcontract.class.php';
|
||||
}
|
||||
@ -241,7 +241,7 @@ llxHeader('', $langs->trans("RepeatableIntervention"), $help_url);
|
||||
|
||||
$form = new Form($db);
|
||||
$companystatic = new Societe($db);
|
||||
if (!empty($conf->contrat->enabled)) {
|
||||
if (isModEnabled('contrat')) {
|
||||
$contratstatic = new Contrat($db);
|
||||
}
|
||||
if (!empty($conf->project->enabled)) {
|
||||
@ -275,7 +275,7 @@ if ($action == 'create') {
|
||||
if (!empty($conf->project->enabled) && $object->fk_project > 0) {
|
||||
$rowspan++;
|
||||
}
|
||||
if (!empty($conf->contrat->enabled) && $object->fk_contrat > 0) {
|
||||
if (isModEnabled('contrat') && $object->fk_contrat > 0) {
|
||||
$rowspan++;
|
||||
}
|
||||
|
||||
@ -328,7 +328,7 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
// Contrat
|
||||
if (!empty($conf->contrat->enabled)) {
|
||||
if (isModEnabled('contrat')) {
|
||||
$formcontract = new FormContract($db);
|
||||
print "<tr><td>".$langs->trans("Contract")."</td><td>";
|
||||
$contractid = GETPOST('contractid') ?GETPOST('contractid') : $object->fk_contract;
|
||||
@ -539,7 +539,7 @@ if ($action == 'create') {
|
||||
print '<tr><td>'.$langs->trans("Description").'</td><td colspan="3">'.nl2br($object->description)."</td></tr>";
|
||||
|
||||
// Contract
|
||||
if (!empty($conf->contrat->enabled)) {
|
||||
if (isModEnabled('contrat')) {
|
||||
$langs->load('contracts');
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
@ -800,7 +800,7 @@ if ($action == 'create') {
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("Ref", $_SERVER['PHP_SELF'], "f.titre", "", "", 'width="200px"', $sortfield, $sortorder, 'left ');
|
||||
print_liste_field_titre("Company", $_SERVER['PHP_SELF'], "s.nom", "", "", 'width="200px"', $sortfield, $sortorder, 'left ');
|
||||
if (!empty($conf->contrat->enabled)) {
|
||||
if (isModEnabled('contrat')) {
|
||||
print_liste_field_titre("Contract", $_SERVER['PHP_SELF'], "f.fk_contrat", "", "", 'width="100px"', $sortfield, $sortorder, 'left ');
|
||||
}
|
||||
if (!empty($conf->project->enabled)) {
|
||||
@ -834,7 +834,7 @@ if ($action == 'create') {
|
||||
print '<td>'.$langs->trans("None").'</td>';
|
||||
}
|
||||
|
||||
if (!empty($conf->contrat->enabled)) {
|
||||
if (isModEnabled('contrat')) {
|
||||
print '<td>';
|
||||
if ($objp->fk_contrat > 0) {
|
||||
$contratstatic->fetch($objp->fk_contrat);
|
||||
|
||||
@ -784,7 +784,7 @@ if (empty($reshook)) {
|
||||
|
||||
$form = new Form($db);
|
||||
$formfile = new FormFile($db);
|
||||
if (!empty($conf->contrat->enabled)) {
|
||||
if (isModEnabled('contrat')) {
|
||||
$formcontract = new FormContract($db);
|
||||
}
|
||||
if (!empty($conf->project->enabled)) {
|
||||
@ -1233,7 +1233,7 @@ if ($action == 'create') {
|
||||
print '</tr>';
|
||||
|
||||
// Contract
|
||||
if (!empty($conf->contrat->enabled)) {
|
||||
if (isModEnabled('contrat')) {
|
||||
$langs->load('contracts');
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
|
||||
@ -37,7 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
if (!empty($conf->project->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
}
|
||||
if (!empty($conf->contrat->enabled)) {
|
||||
if (isModEnabled('contrat')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ $langs->loadLangs(array('companies', 'bills', 'interventions'));
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$langs->load("projects");
|
||||
}
|
||||
if (!empty($conf->contrat->enabled)) {
|
||||
if (isModEnabled('contrat')) {
|
||||
$langs->load("contracts");
|
||||
}
|
||||
|
||||
@ -205,7 +205,7 @@ $companystatic = new Societe($db);
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$projetstatic = new Project($db);
|
||||
}
|
||||
if (!empty($conf->contrat->enabled)) {
|
||||
if (isModEnabled('contrat')) {
|
||||
$contratstatic = new Contrat($db);
|
||||
}
|
||||
|
||||
@ -237,7 +237,7 @@ $sql .= " s.nom as name, s.rowid as socid, s.client, s.fournisseur, s.email, s.s
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$sql .= ", pr.rowid as projet_id, pr.ref as projet_ref, pr.title as projet_title";
|
||||
}
|
||||
if (!empty($conf->contrat->enabled)) {
|
||||
if (isModEnabled('contrat')) {
|
||||
$sql .= ", c.rowid as contrat_id, c.ref as contrat_ref, c.ref_customer as contrat_ref_customer, c.ref_supplier as contrat_ref_supplier";
|
||||
}
|
||||
// Add fields from extrafields
|
||||
@ -254,7 +254,7 @@ $sql .= " FROM ".MAIN_DB_PREFIX."fichinter as f";
|
||||
if (!empty($conf->project->enabled)) {
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as pr on f.fk_projet = pr.rowid";
|
||||
}
|
||||
if (!empty($conf->contrat->enabled)) {
|
||||
if (isModEnabled('contrat')) {
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."contrat as c on f.fk_contrat = c.rowid";
|
||||
}
|
||||
if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
|
||||
|
||||
@ -39,7 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
if (isModEnabled('adherent')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||
}
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
}
|
||||
|
||||
@ -340,7 +340,7 @@ if ($object->id > 0) {
|
||||
}
|
||||
|
||||
// Categories
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
$langs->load("categories");
|
||||
print '<tr><td>'.$langs->trans("SuppliersCategoriesShort").'</td>';
|
||||
print '<td>';
|
||||
@ -387,7 +387,7 @@ if ($object->id > 0) {
|
||||
$boxstat .= '<table summary="'.dol_escape_htmltag($langs->trans("DolibarrStateBoard")).'" class="border boxtable boxtablenobottom boxtablenotop" width="100%">';
|
||||
$boxstat .= '<tr class="impair nohover"><td colspan="2" class="tdboxstats nohover">';
|
||||
|
||||
if (!empty($conf->supplier_proposal->enabled)) {
|
||||
if (isModEnabled('supplier_proposal')) {
|
||||
// Box proposals
|
||||
$tmp = $object->getOutstandingProposals('supplier');
|
||||
$outstandingOpened = $tmp['opened'];
|
||||
@ -842,7 +842,7 @@ if ($object->id > 0) {
|
||||
print dolGetButtonAction($langs->trans('ThirdPartyIsClosed'), $langs->trans('ThirdPartyIsClosed'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
|
||||
}
|
||||
|
||||
if (!empty($conf->supplier_proposal->enabled) && !empty($user->rights->supplier_proposal->creer)) {
|
||||
if (isModEnabled('supplier_proposal') && !empty($user->rights->supplier_proposal->creer)) {
|
||||
$langs->load("supplier_proposal");
|
||||
if ($object->status == 1) {
|
||||
print dolGetButtonAction('', $langs->trans('AddSupplierProposal'), 'default', DOL_URL_ROOT.'/supplier_proposal/card.php?action=create&socid='.$object->id, '');
|
||||
|
||||
@ -43,7 +43,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
if (!empty($conf->supplier_proposal->enabled)) {
|
||||
if (isModEnabled('supplier_proposal')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php';
|
||||
}
|
||||
if (isModEnabled("product")) {
|
||||
|
||||
@ -1227,7 +1227,7 @@ if ($resql) {
|
||||
$moreforfilter .= '</div>';
|
||||
}
|
||||
// If the user can view prospects other than his'
|
||||
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) {
|
||||
if (isModEnabled('categorie') && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$tmptitle = $langs->trans('IncludingProductWithTag');
|
||||
|
||||
@ -900,7 +900,7 @@ if ($resql) {
|
||||
$moreforfilter .= '</div>';
|
||||
}
|
||||
// If the user can view prospects other than his'
|
||||
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) {
|
||||
if (isModEnabled('categorie') && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$tmptitle = $langs->trans('IncludingProductWithTag');
|
||||
@ -909,7 +909,7 @@ if ($resql) {
|
||||
$moreforfilter .= '</div>';
|
||||
}
|
||||
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$tmptitle = $langs->trans('SuppliersCategoriesShort');
|
||||
|
||||
@ -189,7 +189,7 @@ if ($action == 'create') {
|
||||
// Common attributes
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php';
|
||||
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_KNOWLEDGEMANAGEMENT, '', 'parent', 64, 0, 1);
|
||||
|
||||
if (count($cate_arbo)) {
|
||||
@ -236,7 +236,7 @@ if (($id || $ref) && $action == 'edit') {
|
||||
// Common attributes
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_edit.tpl.php';
|
||||
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_KNOWLEDGEMANAGEMENT, '', 'parent', 64, 0, 1);
|
||||
|
||||
if (count($cate_arbo)) {
|
||||
|
||||
@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/knowledgemanagement/class/knowledgerecord.class.php';
|
||||
|
||||
// for other modules
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
}
|
||||
//dol_include_once('/othermodule/class/otherobject.class.php');
|
||||
@ -475,7 +475,7 @@ $moreforfilter.= '</div>';*/
|
||||
|
||||
// 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"');
|
||||
$categoriesKnowledgeArr = $form->select_all_categories(Categorie::TYPE_KNOWLEDGEMANAGEMENT, '', '', 64, 0, 1);
|
||||
|
||||
@ -2481,7 +2481,7 @@ function printDropdownQuickadd()
|
||||
"title" => "NewContractSubscription@contracts",
|
||||
"name" => "Contract@contracts",
|
||||
"picto" => "object_contract",
|
||||
"activation" => !empty($conf->contrat->enabled) && $user->hasRight("contrat", "write"), // vs hooking
|
||||
"activation" => isModEnabled('contrat') && $user->hasRight("contrat", "write"), // vs hooking
|
||||
"position" => 60,
|
||||
),
|
||||
array(
|
||||
@ -2489,7 +2489,7 @@ function printDropdownQuickadd()
|
||||
"title" => "SupplierProposalNew@supplier_proposal",
|
||||
"name" => "SupplierProposal@supplier_proposal",
|
||||
"picto" => "supplier_proposal",
|
||||
"activation" => !empty($conf->supplier_proposal->enabled) && $user->hasRight("supplier_invoice", "write"), // vs hooking
|
||||
"activation" => isModEnabled('supplier_proposal') && $user->hasRight("supplier_invoice", "write"), // vs hooking
|
||||
"position" => 70,
|
||||
),
|
||||
array(
|
||||
|
||||
@ -1615,7 +1615,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
print "</td></tr>";
|
||||
//}
|
||||
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
// Categories
|
||||
print '<tr><td>'.$langs->trans("Categories").'</td><td>';
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, '', 'parent', 64, 0, 1);
|
||||
|
||||
@ -179,7 +179,7 @@ if ($action == 'search') {
|
||||
}
|
||||
$sql .= natural_search($params, $key);
|
||||
}
|
||||
if (!empty($conf->categorie->enabled) && !empty($parent) && $parent != -1) {
|
||||
if (isModEnabled('categorie') && !empty($parent) && $parent != -1) {
|
||||
$sql .= " AND cp.fk_categorie ='".$db->escape($parent)."'";
|
||||
}
|
||||
$sql .= " ORDER BY p.ref ASC";
|
||||
@ -590,7 +590,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
print '<br>';
|
||||
|
||||
$rowspan = 1;
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
$rowspan++;
|
||||
}
|
||||
|
||||
@ -603,7 +603,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
print $langs->trans("KeywordFilter").': ';
|
||||
print '<input type="text" name="key" value="'.$key.'"> ';
|
||||
print '</div>';
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
print '<div class="inline-block">'.$langs->trans("CategoryFilter").': ';
|
||||
print $form->select_all_categories(Categorie::TYPE_PRODUCT, $parent, 'parent').' </div>';
|
||||
|
||||
@ -215,7 +215,7 @@ if ((isModEnabled("product") || isModEnabled("service")) && ($user->rights->prod
|
||||
}
|
||||
|
||||
|
||||
if (!empty($conf->categorie->enabled) && !empty($conf->global->CATEGORY_GRAPHSTATS_ON_PRODUCTS)) {
|
||||
if (isModEnabled('categorie') && !empty($conf->global->CATEGORY_GRAPHSTATS_ON_PRODUCTS)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
print '<br>';
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
|
||||
@ -27,7 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/inventory/class/inventory.class.php';
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
}
|
||||
|
||||
@ -464,7 +464,7 @@ $moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_
|
||||
$moreforfilter.= '</div>';*/
|
||||
|
||||
// Filter on categories
|
||||
if (!empty($conf->global->MAIN_SEARCH_CATEGORY_PRODUCT_ON_LISTS) && !empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
|
||||
if (!empty($conf->global->MAIN_SEARCH_CATEGORY_PRODUCT_ON_LISTS) && isModEnabled('categorie') && $user->rights->categorie->lire) {
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$tmptitle = $langs->transnoentities('ProductsCategoriesShort');
|
||||
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"');
|
||||
|
||||
@ -43,7 +43,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
}
|
||||
|
||||
@ -820,7 +820,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);
|
||||
|
||||
@ -328,7 +328,7 @@ if ($resql) {
|
||||
|
||||
// Filter on categories
|
||||
$moreforfilter = '';
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$moreforfilter .= img_picto($langs->trans('Categories'), 'category', 'class="pictofixedwidth"');
|
||||
$moreforfilter .= $htmlother->select_categories(Categorie::TYPE_PRODUCT, $search_categ, 'search_categ', 1);
|
||||
|
||||
@ -481,7 +481,7 @@ if ($search_categ > 0) {
|
||||
|
||||
// Filter on categories
|
||||
$moreforfilter = '';
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$moreforfilter .= img_picto($langs->trans('Categories'), 'category', 'class="pictofixedwidth"');
|
||||
$moreforfilter .= $htmlother->select_categories(Categorie::TYPE_PRODUCT, $search_categ, 'search_categ', 1);
|
||||
|
||||
@ -378,7 +378,7 @@ if ($action == 'create') {
|
||||
// Other attributes
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
|
||||
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
// Categories
|
||||
print '<tr><td>'.$langs->trans("Categories").'</td><td colspan="3">';
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_WAREHOUSE, '', 'parent', 64, 0, 1);
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
|
||||
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcategory.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
}
|
||||
@ -53,7 +53,7 @@ $search_ref = GETPOST("sref", "alpha") ?GETPOST("sref", "alpha") : GETPOST("sear
|
||||
$search_label = GETPOST("snom", "alpha") ?GETPOST("snom", "alpha") : GETPOST("search_label", "alpha");
|
||||
$search_status = GETPOST("search_status", "int");
|
||||
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
$search_category_list = GETPOST("search_category_".Categorie::TYPE_WAREHOUSE."_list", "array");
|
||||
}
|
||||
|
||||
@ -226,7 +226,7 @@ $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $obje
|
||||
$sql .= $hookmanager->resPrint;
|
||||
$sql = preg_replace('/,\s*$/', '', $sql);
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t";
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
$sql .= Categorie::getFilterJoinQuery(Categorie::TYPE_WAREHOUSE, "t.rowid");
|
||||
}
|
||||
if (!empty($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
|
||||
@ -242,7 +242,7 @@ if ($separatedPMP) {
|
||||
|
||||
$sql .= " WHERE t.entity IN (".getEntity('stock').")";
|
||||
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
$sql .= Categorie::getFilterSelectQuery(Categorie::TYPE_WAREHOUSE, "t.rowid", $search_category_list);
|
||||
}
|
||||
foreach ($search as $key => $val) {
|
||||
@ -419,7 +419,7 @@ if ($search_all) {
|
||||
|
||||
$moreforfilter = '';
|
||||
|
||||
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
|
||||
if (isModEnabled('categorie') && $user->rights->categorie->lire) {
|
||||
$formcategory = new FormCategory($db);
|
||||
$moreforfilter .= $formcategory->getFilterBox(Categorie::TYPE_WAREHOUSE, $search_category_list);
|
||||
}
|
||||
|
||||
@ -714,7 +714,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
// Categories
|
||||
print '<tr><td>'.$langs->trans("Categories").'</td><td colspan="3">';
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PROJECT, '', 'parent', 64, 0, 1);
|
||||
@ -1356,7 +1356,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
||||
$langs->load("bills");
|
||||
print dolGetButtonAction('', $langs->trans('CreateBill'), 'default', DOL_URL_ROOT.'/compta/facture/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid, '', 1, array('isDropDown' => true));
|
||||
}
|
||||
if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->creer) {
|
||||
if (isModEnabled('supplier_proposal') && $user->rights->supplier_proposal->creer) {
|
||||
$langs->load("supplier_proposal");
|
||||
print dolGetButtonAction('', $langs->trans('AddSupplierProposal'), 'default', DOL_URL_ROOT.'/supplier_proposal/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid, '', 1, array('isDropDown' => true));
|
||||
}
|
||||
@ -1372,7 +1372,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
||||
$langs->load("interventions");
|
||||
print dolGetButtonAction('', $langs->trans('AddIntervention'), 'default', DOL_URL_ROOT.'/fichinter/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid, '', 1, array('isDropDown' => true));
|
||||
}
|
||||
if (!empty($conf->contrat->enabled) && $user->rights->contrat->creer) {
|
||||
if (isModEnabled('contrat') && $user->rights->contrat->creer) {
|
||||
$langs->load("contracts");
|
||||
print dolGetButtonAction('', $langs->trans('AddContract'), 'default', DOL_URL_ROOT.'/contrat/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid, '', 1, array('isDropDown' => true));
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ if (isModEnabled('facture')) {
|
||||
if (isModEnabled('commande')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
}
|
||||
if (!empty($conf->supplier_proposal->enabled)) {
|
||||
if (isModEnabled('supplier_proposal')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php';
|
||||
}
|
||||
if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_invoice")) {
|
||||
@ -58,7 +58,7 @@ if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMO
|
||||
if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order")) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||
}
|
||||
if (!empty($conf->contrat->enabled)) {
|
||||
if (isModEnabled('contrat')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||
}
|
||||
if (!empty($conf->ficheinter->enabled)) {
|
||||
@ -95,7 +95,7 @@ if (isModEnabled("banque")) {
|
||||
if (!empty($conf->salaries->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php';
|
||||
}
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
}
|
||||
if (!empty($conf->mrp->enabled)) {
|
||||
|
||||
@ -35,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcategory.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
}
|
||||
@ -148,7 +148,7 @@ if ($search_status == '') {
|
||||
$search_status = -1; // -1 or 1
|
||||
}
|
||||
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
$search_category_array = GETPOST("search_category_".Categorie::TYPE_PROJECT."_list", "array");
|
||||
}
|
||||
|
||||
@ -413,7 +413,7 @@ $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $obje
|
||||
$sql .= preg_replace('/^,/', '', $hookmanager->resPrint);
|
||||
$sql = preg_replace('/,\s*$/', '', $sql);
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as p";
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
$sql .= Categorie::getFilterJoinQuery(Categorie::TYPE_PROJECT, "p.rowid");
|
||||
}
|
||||
if (!empty($extrafields->attributes[$object->table_element]['label']) &&is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
|
||||
@ -436,7 +436,7 @@ if ($search_project_contact > 0) {
|
||||
$sql .= ", ".MAIN_DB_PREFIX."element_contact as ecp_contact";
|
||||
}
|
||||
$sql .= " WHERE p.entity IN (".getEntity('project').')';
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
$sql .= Categorie::getFilterSelectQuery(Categorie::TYPE_PROJECT, "p.rowid", $search_category_array);
|
||||
}
|
||||
if (empty($user->rights->projet->all->lire)) {
|
||||
@ -859,7 +859,7 @@ if ($user->rights->user->user->lire) {
|
||||
}
|
||||
|
||||
// Filter on categories
|
||||
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
|
||||
if (isModEnabled('categorie') && $user->rights->categorie->lire) {
|
||||
$formcategory = new FormCategory($db);
|
||||
$moreforfilter .= $formcategory->getFilterBox(Categorie::TYPE_PROJECT, $search_category_array);
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
}
|
||||
|
||||
|
||||
@ -671,7 +671,7 @@ if ($search_all) {
|
||||
$moreforfilter = '';
|
||||
|
||||
// Filter on categories
|
||||
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
|
||||
if (isModEnabled('categorie') && $user->rights->categorie->lire) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$tmptitle = $langs->trans('ProjectCategories');
|
||||
|
||||
@ -542,7 +542,7 @@ if ($action == 'confirm_generateinvoice') {
|
||||
$arrayoftasks[$object->timespent_id]['totalvaluetodivideby3600'] = $object->timespent_duration * $object->timespent_thm;
|
||||
$arrayoftasks[$object->timespent_id]['note'] = $ftask->ref.' - '.$ftask->label.' - '.$username.($object->timespent_note ? ' - '.$object->timespent_note : ''); // TODO Add user name in note
|
||||
if (!empty($withdetail)) {
|
||||
if (!empty($conf->fckeditor->enabled) && !empty($conf->global->FCKEDITOR_ENABLE_DETAILS)) {
|
||||
if (isModEnabled('fckeditor') && !empty($conf->global->FCKEDITOR_ENABLE_DETAILS)) {
|
||||
$arrayoftasks[$object->timespent_id]['note'] .= "<br/>";
|
||||
} else {
|
||||
$arrayoftasks[$object->timespent_id]['note'] .= "\n";
|
||||
|
||||
@ -71,7 +71,7 @@ $langs->loadLangs(array("companies", "commercial", "bills", "banks", "users"));
|
||||
if (isModEnabled('adherent')) {
|
||||
$langs->load("members");
|
||||
}
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
$langs->load("categories");
|
||||
}
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
@ -1477,7 +1477,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
print '</td></tr>';
|
||||
|
||||
if ((isModEnabled("fournisseur") && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (isModEnabled("supplier_order") && !empty($user->rights->supplier_order->lire)) || (isModEnabled("supplier_invoice") && !empty($user->rights->supplier_invoice->lire))
|
||||
|| (!empty($conf->supplier_proposal->enabled) && !empty($user->rights->supplier_proposal->lire))) {
|
||||
|| (isModEnabled('supplier_proposal') && !empty($user->rights->supplier_proposal->lire))) {
|
||||
// Supplier
|
||||
print '<tr>';
|
||||
print '<td>'.$form->editfieldkey('Vendor', 'fournisseur', '', $object, 0, 'string', '', 1).'</td><td>';
|
||||
@ -1762,7 +1762,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
}
|
||||
|
||||
// Categories
|
||||
if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) {
|
||||
if (isModEnabled('categorie') && !empty($user->rights->categorie->lire)) {
|
||||
$langs->load('categories');
|
||||
|
||||
// Customer
|
||||
@ -2177,7 +2177,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
|
||||
// Supplier
|
||||
if (((isModEnabled("fournisseur") && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (isModEnabled("supplier_order") && !empty($user->rights->supplier_order->lire)) || (isModEnabled("supplier_invoice") && !empty($user->rights->supplier_invoice->lire)))
|
||||
|| (!empty($conf->supplier_proposal->enabled) && !empty($user->rights->supplier_proposal->lire))) {
|
||||
|| (isModEnabled('supplier_proposal') && !empty($user->rights->supplier_proposal->lire))) {
|
||||
print '<tr>';
|
||||
print '<td>'.$form->editfieldkey('Supplier', 'fournisseur', '', $object, 0, 'string', '', 1).'</td>';
|
||||
print '<td class="maxwidthonsmartphone">';
|
||||
@ -2463,7 +2463,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
}
|
||||
|
||||
// Categories
|
||||
if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) {
|
||||
if (isModEnabled('categorie') && !empty($user->rights->categorie->lire)) {
|
||||
// Customer
|
||||
print '<tr class="visibleifcustomer"><td>'.$form->editfieldkey('CustomersCategoriesShort', 'custcats', '', $object, 0).'</td>';
|
||||
print '<td colspan="3">';
|
||||
@ -2888,7 +2888,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
|
||||
// Tags / categories
|
||||
if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) {
|
||||
if (isModEnabled('categorie') && !empty($user->rights->categorie->lire)) {
|
||||
// Customer
|
||||
if ($object->prospect || $object->client || !empty($conf->global->THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT)) {
|
||||
print '<tr><td>'.$langs->trans("CustomersCategoriesShort").'</td>';
|
||||
|
||||
@ -176,7 +176,7 @@ if ($object->client) {
|
||||
if (isModEnabled('facture') && $user->rights->facture->lire) {
|
||||
$elementTypeArray['invoice'] = $langs->transnoentitiesnoconv('Invoices');
|
||||
}
|
||||
if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) {
|
||||
if (isModEnabled('contrat') && $user->rights->contrat->lire) {
|
||||
$elementTypeArray['contract'] = $langs->transnoentitiesnoconv('Contracts');
|
||||
}
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ if (isModEnabled('adherent')) {
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("companies", "commercial", "bills", "banks", "users"));
|
||||
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
$langs->load("categories");
|
||||
}
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
|
||||
@ -199,7 +199,7 @@ $thirdpartygraph .= '</table>';
|
||||
$thirdpartygraph .= '</div>';
|
||||
|
||||
$thirdpartycateggraph = '';
|
||||
if (!empty($conf->categorie->enabled) && !empty($conf->global->CATEGORY_GRAPHSTATS_ON_THIRDPARTIES)) {
|
||||
if (isModEnabled('categorie') && !empty($conf->global->CATEGORY_GRAPHSTATS_ON_THIRDPARTIES)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
$elementtype = 'societe';
|
||||
|
||||
|
||||
@ -979,7 +979,7 @@ if ($search_all) {
|
||||
// Filter on categories
|
||||
$moreforfilter = '';
|
||||
if (empty($type) || $type == 'c' || $type == 'p') {
|
||||
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
|
||||
if (isModEnabled('categorie') && $user->rights->categorie->lire) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$tmptitle = $langs->trans('Categories');
|
||||
@ -990,7 +990,7 @@ if (empty($type) || $type == 'c' || $type == 'p') {
|
||||
}
|
||||
|
||||
if (empty($type) || $type == 'f') {
|
||||
if (isModEnabled("fournisseur") && !empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
|
||||
if (isModEnabled("fournisseur") && isModEnabled('categorie') && $user->rights->categorie->lire) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$tmptitle = $langs->trans('Categories');
|
||||
|
||||
@ -797,7 +797,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
|
||||
if (isModEnabled('facture') && $user->rights->facture->lire) {
|
||||
$elementTypeArray['invoice'] = $langs->transnoentitiesnoconv('Invoices');
|
||||
}
|
||||
if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) {
|
||||
if (isModEnabled('contrat') && $user->rights->contrat->lire) {
|
||||
$elementTypeArray['contract'] = $langs->transnoentitiesnoconv('Contracts');
|
||||
}
|
||||
|
||||
|
||||
@ -162,7 +162,7 @@ if ($resql) {
|
||||
/*
|
||||
* Draft askprice
|
||||
*/
|
||||
if (!empty($conf->supplier_proposal->enabled)) {
|
||||
if (isModEnabled('supplier_proposal')) {
|
||||
$sql = "SELECT c.rowid, c.ref, s.nom as socname, s.rowid as socid, s.canvas, s.client";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."supplier_proposal as c";
|
||||
$sql .= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
@ -297,7 +297,7 @@ if ($resql) {
|
||||
/*
|
||||
* Opened askprice
|
||||
*/
|
||||
if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire) {
|
||||
if (isModEnabled('supplier_proposal') && $user->rights->supplier_proposal->lire) {
|
||||
$langs->load("supplier_proposal");
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
@ -644,7 +644,7 @@ if ($resql) {
|
||||
$moreforfilter .= '</div>';
|
||||
}
|
||||
// If the user can view products
|
||||
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) {
|
||||
if (isModEnabled('categorie') && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$tmptitle = $langs->trans('IncludingProductWithTag');
|
||||
|
||||
@ -54,7 +54,7 @@ if (!empty($conf->ldap->enabled)) {
|
||||
if (isModEnabled('adherent')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||
}
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
}
|
||||
if (!empty($conf->stock->enabled)) {
|
||||
@ -1171,7 +1171,7 @@ if ($action == 'create' || $action == 'adduserldap') {
|
||||
}
|
||||
|
||||
// Categories
|
||||
if (!empty($conf->categorie->enabled) && $user->hasRight("categorie", "read")) {
|
||||
if (isModEnabled('categorie') && $user->hasRight("categorie", "read")) {
|
||||
print '<tr><td>'.$form->editfieldkey('Categories', 'usercats', '', $object, 0).'</td><td>';
|
||||
$cate_arbo = $form->select_all_categories('user', null, 'parent', null, null, 1);
|
||||
print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('usercats', $cate_arbo, GETPOST('usercats', 'array'), 0, 0, 'maxwdith300 widthcentpercentminusx', 0, '90%');
|
||||
@ -1627,7 +1627,7 @@ if ($action == 'create' || $action == 'adduserldap') {
|
||||
}
|
||||
|
||||
// Categories
|
||||
if (!empty($conf->categorie->enabled) && $user->hasRight("categorie", "read")) {
|
||||
if (isModEnabled('categorie') && $user->hasRight("categorie", "read")) {
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Categories").'</td>';
|
||||
print '<td colspan="3">';
|
||||
print $form->showCategories($object->id, Categorie::TYPE_USER, 1);
|
||||
@ -2575,7 +2575,7 @@ if ($action == 'create' || $action == 'adduserldap') {
|
||||
print '</tr>';
|
||||
|
||||
// Categories
|
||||
if (!empty($conf->categorie->enabled) && $user->hasRight("categorie", "read")) {
|
||||
if (isModEnabled('categorie') && $user->hasRight("categorie", "read")) {
|
||||
print '<tr><td>'.$form->editfieldkey('Categories', 'usercats', '', $object, 0).'</td>';
|
||||
print '<td>';
|
||||
print img_picto('', 'category', 'class="pictofixedwidth"');
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
}
|
||||
|
||||
@ -658,7 +658,7 @@ $moreforfilter = '';
|
||||
$moreforfilter.= '</div>';*/
|
||||
|
||||
// Filter on categories
|
||||
if (!empty($conf->categorie->enabled) && $user->hasRight("categorie", "read")) {
|
||||
if (isModEnabled('categorie') && $user->hasRight("categorie", "read")) {
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$tmptitle = $langs->trans('Category');
|
||||
$moreforfilter .= img_picto($langs->trans("Category"), 'category', 'class="pictofixedwidth"').$formother->select_categories(Categorie::TYPE_USER, $search_categ, 'search_categ', 1, $tmptitle);
|
||||
|
||||
@ -198,7 +198,7 @@ if (isModEnabled('holiday') || isModEnabled('expensereport')) {
|
||||
if (isModEnabled("product") || isModEnabled("service")) {
|
||||
$tmparray['product/index.php?mainmenu=products&leftmenu='] = 'ProductsAndServicesArea';
|
||||
}
|
||||
if (isModEnabled("propal") || isModEnabled('commande') || !empty($conf->ficheinter->enabled) || !empty($conf->contrat->enabled)) {
|
||||
if (isModEnabled("propal") || isModEnabled('commande') || !empty($conf->ficheinter->enabled) || isModEnabled('contrat')) {
|
||||
$tmparray['comm/index.php?mainmenu=commercial&leftmenu='] = 'CommercialArea';
|
||||
}
|
||||
if (!empty($conf->comptabilite->enabled) || !empty($conf->accounting->enabled)) {
|
||||
|
||||
@ -107,7 +107,7 @@ $webservices = array(
|
||||
'invoice' => 'isModEnabled("facture")',
|
||||
'supplier_invoice' => 'isModEnabled("fournisseur")',
|
||||
'actioncomm' => 'isModEnabled('agenda')',
|
||||
'category' => '!empty($conf->categorie->enabled)',
|
||||
'category' => 'isModEnabled('categorie')',
|
||||
'project' => '!empty($conf->project->enabled)',
|
||||
'other' => ''
|
||||
);
|
||||
|
||||
@ -2767,7 +2767,7 @@ if (!GETPOST('hide_websitemenu')) {
|
||||
|
||||
print dolButtonToOpenUrlInDialogPopup('file_manager', $langs->transnoentitiesnoconv("MediaFiles"), '<span class="fa fa-image"></span>', '/website/index.php?action=file_manager&website='.urlencode($website->ref).'§ion_dir='.urlencode('image/'.$website->ref.'/'), $disabled);
|
||||
|
||||
if (!empty($conf->categorie->enabled)) {
|
||||
if (isModEnabled('categorie')) {
|
||||
//print '<a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=website&dol_hide_leftmenu=1&nosearch=1&type=website_page&website='.$website->ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("Categories")).'"><span class="fa fa-tags"></span></a>';
|
||||
print dolButtonToOpenUrlInDialogPopup('categories', $langs->transnoentitiesnoconv("Categories"), '<span class="fa fa-tags"></span>', '/categories/index.php?leftmenu=website&nosearch=1&type=website_page&website='.urlencode($website->ref), $disabled);
|
||||
}
|
||||
@ -3948,7 +3948,7 @@ if ($action == 'editmeta' || $action == 'createcontainer') { // Edit properties
|
||||
print '</td></tr>';
|
||||
|
||||
// Categories
|
||||
if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) {
|
||||
if (isModEnabled('categorie') && !empty($user->rights->categorie->lire)) {
|
||||
$langs->load('categories');
|
||||
|
||||
if (!GETPOSTISSET('categories')) {
|
||||
@ -4270,7 +4270,7 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction =
|
||||
print '</div>';
|
||||
|
||||
// Categories
|
||||
if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) {
|
||||
if (isModEnabled('categorie') && !empty($user->rights->categorie->lire)) {
|
||||
print '<div class="tagtr">';
|
||||
print '<div class="tagtd paddingrightonly marginrightonly opacitymedium tdoverflowmax100onsmartphone" style="padding-right: 10px !important">';
|
||||
print $langs->trans("Category");
|
||||
@ -4404,7 +4404,7 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction =
|
||||
|
||||
// Categories - Tags
|
||||
print '<td>';
|
||||
if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) {
|
||||
if (isModEnabled('categorie') && !empty($user->rights->categorie->lire)) {
|
||||
// Get current categories
|
||||
$existing = $c->containing($answerrecord->id, Categorie::TYPE_WEBSITE_PAGE, 'object');
|
||||
if (is_array($existing)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user