Fix webpage
This commit is contained in:
parent
f3114765a3
commit
a0078baeb6
@ -287,13 +287,16 @@ if ($action == 'addcontainer')
|
|||||||
// and $urltograbdirrootwithoutslash is https://www.dolimed.com
|
// and $urltograbdirrootwithoutslash is https://www.dolimed.com
|
||||||
|
|
||||||
// Check pageurl is not already used
|
// Check pageurl is not already used
|
||||||
$tmpwebsitepage = new WebsitePage($db);
|
if ($pageurl)
|
||||||
$result = $tmpwebsitepage->fetch(0, $object->id, $pageurl);
|
|
||||||
if ($result > 0)
|
|
||||||
{
|
{
|
||||||
setEventMessages($langs->trans("AliasPageAlreadyExists", $pageurl), null, 'errors');
|
$tmpwebsitepage = new WebsitePage($db);
|
||||||
$error++;
|
$result = $tmpwebsitepage->fetch(0, $object->id, $pageurl);
|
||||||
$action='createcontainer';
|
if ($result > 0)
|
||||||
|
{
|
||||||
|
setEventMessages($langs->trans("AliasPageAlreadyExists", $pageurl), null, 'errors');
|
||||||
|
$error++;
|
||||||
|
$action='createcontainer';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
@ -2003,7 +2006,7 @@ if ($action == 'editmeta' || $action == 'createcontainer')
|
|||||||
print '<tr><td class="titlefieldcreate fieldrequired">';
|
print '<tr><td class="titlefieldcreate fieldrequired">';
|
||||||
print $langs->trans('WEBSITE_PAGENAME');
|
print $langs->trans('WEBSITE_PAGENAME');
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print '<input type="text" class="flat maxwidth300" name="WEBSITE_PAGENAME" value="'.dol_escape_htmltag($pageurl).'">';
|
print '<input type="text" class="flat minwidth300" name="WEBSITE_PAGENAME" value="'.dol_escape_htmltag($pageurl).'">';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td class="fieldrequired">';
|
print '<tr><td class="fieldrequired">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user