Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/filefunc.inc.php
This commit is contained in:
commit
a746075dbe
@ -125,8 +125,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php';
|
||||
$link = new Link($db);
|
||||
$link->id = $linkid;
|
||||
$link->fetch();
|
||||
$link->fetch($linkid);
|
||||
$res = $link->delete($user);
|
||||
|
||||
$langs->load('link');
|
||||
@ -160,8 +159,7 @@ elseif ($action == 'confirm_updateline' && GETPOST('save', 'alpha') && GETPOST('
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php';
|
||||
$langs->load('link');
|
||||
$link = new Link($db);
|
||||
$link->id = GETPOST('linkid', 'int');
|
||||
$f = $link->fetch();
|
||||
$f = $link->fetch(GETPOST('linkid', 'int'));
|
||||
if ($f)
|
||||
{
|
||||
$link->url = GETPOST('link', 'alpha');
|
||||
@ -169,7 +167,7 @@ elseif ($action == 'confirm_updateline' && GETPOST('save', 'alpha') && GETPOST('
|
||||
{
|
||||
$link->url = 'http://' . $link->url;
|
||||
}
|
||||
$link->label = GETPOST('label', 'alpha');
|
||||
$link->label = GETPOST('label', 'alphanohtml');
|
||||
$res = $link->update($user);
|
||||
if (!$res)
|
||||
{
|
||||
|
||||
@ -1839,7 +1839,7 @@ class FormFile
|
||||
print $langs->trans('Link') . ': <input type="text" name="link" value="' . $link->url . '">';
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print $langs->trans('Label') . ': <input type="text" name="label" value="' . $link->label . '">';
|
||||
print $langs->trans('Label') . ': <input type="text" name="label" value="' . dol_escape_htmltag($link->label) . '">';
|
||||
print '</td>';
|
||||
print '<td class="center">' . dol_print_date(dol_now(), "dayhour", "tzuser") . '</td>';
|
||||
print '<td class="right"></td>';
|
||||
@ -1853,7 +1853,7 @@ class FormFile
|
||||
print '<td>';
|
||||
print img_picto('', 'object_globe').' ';
|
||||
print '<a data-ajax="false" href="' . $link->url . '" target="_blank">';
|
||||
print $link->label;
|
||||
print dol_escape_htmltag($link->label);
|
||||
print '</a>';
|
||||
print '</td>'."\n";
|
||||
print '<td class="right"></td>';
|
||||
|
||||
@ -149,6 +149,7 @@ if (empty($dolibarr_strict_mode)) $dolibarr_strict_mode=0; // For debug in php s
|
||||
// This test check if referrer ($_SERVER['HTTP_REFERER']) is same web site than Dolibarr ($_SERVER['HTTP_HOST'])
|
||||
// when we post forms (we allow GET to allow direct link to access a particular page).
|
||||
// Note about $_SERVER[HTTP_HOST/SERVER_NAME]: http://shiflett.org/blog/2006/mar/server-name-versus-http-host
|
||||
// See also option $conf->global->MAIN_SECURITY_CSRF_WITH_TOKEN for a stronger CSRF protection.
|
||||
if (! defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck))
|
||||
{
|
||||
if (! empty($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] != 'GET' && ! empty($_SERVER['HTTP_HOST']))
|
||||
|
||||
@ -329,12 +329,12 @@ if (empty($reshook)) {
|
||||
{
|
||||
$error = 0;
|
||||
|
||||
if (!$_POST["lastname"]) {
|
||||
if (! GETPOST("lastname", 'alpha')) {
|
||||
setEventMessages($langs->trans("NameNotDefined"), null, 'errors');
|
||||
$action = "edit"; // Go back to create page
|
||||
$error ++;
|
||||
}
|
||||
if (!$_POST["login"]) {
|
||||
if (! GETPOST("login", 'alpha')) {
|
||||
setEventMessages($langs->trans("LoginNotDefined"), null, 'errors');
|
||||
$action = "edit"; // Go back to create page
|
||||
$error ++;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user