forked from Wavyzz/dolibarr
Merge pull request #28897 from frederic34/knowledgerecord
fix knowledgerecord can't set mask
This commit is contained in:
@@ -77,10 +77,10 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
|
||||
|
||||
if ($action == 'updateMask') {
|
||||
$maskconst = GETPOST('maskconst', 'aZ09');
|
||||
$maskorder = GETPOST('maskorder', 'alpha');
|
||||
$maskdata = GETPOST('maskKnowledgeRecord', 'alpha');
|
||||
|
||||
if ($maskconst && preg_match('/_MASK$/', $maskconst)) {
|
||||
$res = dolibarr_set_const($db, $maskconst, $maskorder, 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, $maskconst, $maskdata, 'chaine', 0, '', $conf->entity);
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
@@ -404,11 +404,11 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
||||
print '</td>'."\n";
|
||||
|
||||
print '<td class="center">';
|
||||
$constforvar = 'KNOWLEDGEMANAGEMENT_'.strtoupper($myTmpObjectKey).'_ADDON';
|
||||
$constforvar = 'KNOWLEDGEMANAGEMENT_'.strtoupper($myTmpObjectArray['class']).'_ADDON';
|
||||
if (getDolGlobalString($constforvar) == $file) {
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
} else {
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&object='.strtolower($myTmpObjectKey).'&value='.urlencode($file).'">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&object='.strtolower($myTmpObjectArray['class']).'&value='.urlencode($file).'">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user