Merge pull request #24409 from vdegrandpre/develop

Read of correct global variable
This commit is contained in:
Laurent Destailleur 2023-04-01 11:23:16 +02:00 committed by GitHub
commit 6d95218d59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -511,7 +511,7 @@ foreach ($dirmodels as $reldir) {
// Defaut
print '<td class="center">';
if (getDolGlobalString('MEMBER_ADDON_PDF') == $name) {
if (getDolGlobalString('MEMBER_ADDON_PDF_ODT') == $name) {
print img_picto($langs->trans("Default"), 'on');
} else {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scandir='.(!empty($module->scandir) ? $module->scandir : '').'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';

View File

@ -1936,14 +1936,14 @@ function getListOfModels($db, $type, $maxfilenamelength = 0)
$sql .= " ORDER BY description DESC";
dol_syslog('/core/lib/function2.lib.php::getListOfModels', LOG_DEBUG);
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$resql_models = $db->query($sql);
if ($resql_models) {
$num = $db->num_rows($resql_models);
$i = 0;
while ($i < $num) {
$found = 1;
$obj = $db->fetch_object($resql);
$obj = $db->fetch_object($resql_models);
// If this generation module needs to scan a directory, then description field is filled
// with the constant that contains list of directories to scan (COMPANY_ADDON_PDF_ODT_PATH, ...).