mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 17:02:34 +01:00
Fix token
This commit is contained in:
@@ -395,7 +395,7 @@ foreach ($arrayofmodules as $file => $modCodeTiers)
|
||||
} else {
|
||||
$disabled = (!empty($conf->multicompany->enabled) && (is_object($mc) && !empty($mc->sharings['referent']) && $mc->sharings['referent'] != $conf->entity) ? true : false);
|
||||
print '<td class="center">';
|
||||
if (!$disabled) print '<a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setcodeclient&token='.newToken().'&value='.$file.'">';
|
||||
if (!$disabled) print '<a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setcodeclient&token='.newToken().'&value='.urlencode($file).'">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
if (!$disabled) print '</a>';
|
||||
print '</td>';
|
||||
@@ -571,7 +571,7 @@ foreach ($dirsociete as $dirroot)
|
||||
print "<td class=\"center\">\n";
|
||||
//if ($conf->global->COMPANY_ADDON_PDF != "$name")
|
||||
//{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&token='.newToken().'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||
print '</a>';
|
||||
//}
|
||||
@@ -583,12 +583,12 @@ foreach ($dirsociete as $dirroot)
|
||||
} else {
|
||||
if (versioncompare($module->phpmin, versionphparray()) > 0)
|
||||
{
|
||||
print "<td class=\"center\">\n";
|
||||
print '<td class="center">'."\n";
|
||||
print img_picto(dol_escape_htmltag($langs->trans("ErrorModuleRequirePHPVersion", join('.', $module->phpmin))), 'switch_off');
|
||||
print "</td>";
|
||||
} else {
|
||||
print "<td class=\"center\">\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print '<td class="center">'."\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&token='.newToken().'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
}
|
||||
@@ -611,7 +611,7 @@ foreach ($dirsociete as $dirroot)
|
||||
print '<td class="center nowrap">';
|
||||
if ($module->type == 'pdf')
|
||||
{
|
||||
$linkspec = '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'bill').'</a>';
|
||||
$linkspec = '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&token='.newToken().'&module='.$name.'">'.img_object($langs->trans("Preview"), 'bill').'</a>';
|
||||
} else {
|
||||
$linkspec = img_object($langs->trans("PreviewNotAvailable"), 'generic');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user