commit
c0395d2d5b
@ -248,7 +248,7 @@ if ($action == 'edit') {
|
||||
|
||||
$tmp = explode(':', $val['type']);
|
||||
print img_picto('', 'category', 'class="pictofixedwidth"');
|
||||
print $formother->select_categories($tmp[1], $conf->global->{$constname}, $constname, 0, $langs->trans('CustomersProspectsCategoriesShort'));
|
||||
print $formother->select_categories($tmp[1], $conf->global->{$constname}, $constname, 0, $langs->trans('CustomersProspectsCategoriesShort'));
|
||||
} else {
|
||||
print '<input name="'.$constname.'" class="flat '.(empty($val['css']) ? 'minwidth200' : $val['css']).'" value="'.$conf->global->{$constname}.'">';
|
||||
}
|
||||
|
||||
@ -2192,27 +2192,24 @@ if ($action == 'generatesitemaps') {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
$robotcontent = @file_get_contents($filerobot);
|
||||
$result = preg_replace('/<?php // BEGIN PHP[^?]END PHP ?>\n/ims', '', $robotcontent);
|
||||
if ($result)
|
||||
{
|
||||
if ($result) {
|
||||
$robotcontent = $result;
|
||||
}
|
||||
$robotsitemap = "Sitemap: ".$domainname."/".$xmlname;
|
||||
$result = strpos($robotcontent, 'Sitemap: ');
|
||||
if ($result)
|
||||
{
|
||||
if ($result) {
|
||||
$result = preg_replace("/Sitemap.*\n/", $robotsitemap, $robotcontent);
|
||||
$robotcontent = $result ? $result : $robotcontent;
|
||||
}else {
|
||||
} else {
|
||||
$robotcontent .= $robotsitemap."\n";
|
||||
}
|
||||
$result = dolSaveRobotFile($filerobot, $robotcontent);
|
||||
if (!$result)
|
||||
{
|
||||
if (!$result) {
|
||||
$error++;
|
||||
setEventMessages('Failed to write file '.$filerobot, null, 'errors');
|
||||
}
|
||||
@ -2229,7 +2226,7 @@ $formwebsite = new FormWebsite($db);
|
||||
$formother = new FormOther($db);
|
||||
|
||||
// Confirm generation of website sitemaps
|
||||
if ($action == 'confirmgeneratesitemaps'){
|
||||
if ($action == 'confirmgeneratesitemaps') {
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?website='.$website->ref, $langs->trans('ConfirmSitemapsCreation'), $langs->trans('ConfirmGenerateSitemaps', $object->ref), 'generatesitemaps', '', "yes", 1);
|
||||
$action = 'preview';
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user