Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/compta/bank/bankentries_list.php
	htdocs/opensurvey/card.php
	htdocs/opensurvey/index.php
	htdocs/opensurvey/results.php
This commit is contained in:
Laurent Destailleur 2021-03-18 12:24:34 +01:00
commit d2ef4b0506
6 changed files with 15 additions and 10 deletions

View File

@ -10,7 +10,6 @@
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -644,11 +643,12 @@ if ($search_description) {
}
$sql .= natural_search("b.label", $search_description_to_use); // Warning some text are just translation keys, not translated strings
}
if ($search_bid > 0) {
$sql .= " AND b.rowid=l.lineid AND l.fk_categ=".$search_bid;
$sql .= " AND b.rowid = l.lineid AND l.fk_categ = ".((int) $search_bid);
}
if (!empty($search_type)) {
$sql .= " AND b.fk_type = '".$db->escape($search_type)."' ";
$sql .= " AND b.fk_type = '".$db->escape($search_type)."'";
}
// Search criteria amount
if ($search_debit) {

View File

@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php";
// Security check
if (!$user->rights->opensurvey->read) {
if (empty($user->rights->opensurvey->read)) {
accessforbidden();
}

View File

@ -40,6 +40,11 @@ if ($result <= 0) {
dol_print_error('', 'Failed to get survey id '.$numsondage);
}
// Security check
if (empty($user->rights->opensurvey->read)) {
accessforbidden();
}
/*
* Actions

View File

@ -31,7 +31,6 @@
*/
function opensurvey_prepare_head(Opensurveysondage $object)
{
global $langs, $conf;
$h = 0;

View File

@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php";
$langs->load("opensurvey");
// Security check
if (!$user->rights->opensurvey->read) {
if (empty($user->rights->opensurvey->read)) {
accessforbidden();
}

View File

@ -29,13 +29,11 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php";
require_once DOL_DOCUMENT_ROOT."/opensurvey/class/opensurveysondage.class.php";
require_once DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php";
// Security check
if (!$user->rights->opensurvey->read) {
if (empty($user->rights->opensurvey->read)) {
accessforbidden();
}
// Init vars
$action = GETPOST('action', 'aZ09');
$numsondage = GETPOST("id");
@ -594,7 +592,10 @@ if (GETPOST('ajoutsujet')) {
}
if ($user->rights->opensurvey->write) {
print '<span class="opacitymedium">'.$langs->trans("PollAdminDesc", img_picto('', 'delete'), $langs->trans("Add")).'</span><br>';
print '<span class="opacitymedium">';
$s = $langs->trans("PollAdminDesc", '{s1}', $langs->trans("Add"));
print str_replace('{s1}', img_picto('', 'delete'), $s);
print '</span><br>';
}
$nbcolonnes = substr_count($object->sujet, ',') + 1;