';
@@ -1290,7 +1290,7 @@ else
$productstatic->ref=$objp->label;
print $productstatic->getNomUrl(0,'',16);
}
- if (! empty($conf->global->PRODUIT_DESC_IN_FORM) and $objp->description)
+ if (! empty($conf->global->PRODUIT_DESC_IN_FORM) and $objp->description)
print ' '.dol_nl2br($objp->description);
print '';
}
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index a075f99cd06..720da83ccfd 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1540,6 +1540,12 @@ Opened=Opened
Closed=Closed
AlwaysEditable=Can always be edited
MAIN_APPLICATION_TITLE=Force visible name of application
+NbMajMin=Minimum number of uppercase characters
+NbNumMin=Minimum number of numeric characters
+NbSpeMin=Minimum number of special characters
+NbSpeMin=Minimum number of special characters
+NbIteConsecutive=Maximum number of repeating same characters
+NoAmbiCaracAutoGeneration=Do not use ambiguous characters ("1","l","i","|","0","O") for automatic generation
Format=Format
TypePaymentDesc=0:Customer payment type, 1:Supplier payment type, 2:Both customers and suppliers payment type
diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php
index 48119a7f16f..fa506285cc8 100644
--- a/htdocs/opensurvey/class/opensurveysondage.class.php
+++ b/htdocs/opensurvey/class/opensurveysondage.class.php
@@ -392,6 +392,7 @@ class Opensurveysondage extends CommonObject
function fetch_lines()
{
$ret=array();
+
$sql = "SELECT id_users, nom as name, reponses FROM ".MAIN_DB_PREFIX."opensurvey_user_studs";
$sql.= " WHERE id_sondage = '".$this->db->escape($this->id_sondage)."'";
$resql=$this->db->query($sql);
@@ -441,7 +442,9 @@ class Opensurveysondage extends CommonObject
*
* @return Object[]
*/
- public function getComments() {
+ public function getComments()
+ {
+ $comments = array();
$sql = 'SELECT id_comment, usercomment, comment';
$sql.= ' FROM '.MAIN_DB_PREFIX.'opensurvey_comments';
@@ -449,13 +452,16 @@ class Opensurveysondage extends CommonObject
$sql.= " ORDER BY id_comment";
$resql = $this->db->query($sql);
- $num_rows=$this->db->num_rows($resql);
+ if ($resql)
+ {
+ $num_rows=$this->db->num_rows($resql);
- $comments = array();
-
- if ($num_rows > 0) {
- while ($obj = $this->db->fetch_object($resql)) {
- $comments[] = $obj;
+ if ($num_rows > 0)
+ {
+ while ($obj = $this->db->fetch_object($resql))
+ {
+ $comments[] = $obj;
+ }
}
}
@@ -469,8 +475,8 @@ class Opensurveysondage extends CommonObject
* @param string $comment_user Comment author
* @return boolean False in case of the query fails, true if it was successful
*/
- public function addComment($comment, $comment_user) {
-
+ public function addComment($comment, $comment_user)
+ {
$sql = "INSERT INTO ".MAIN_DB_PREFIX."opensurvey_comments (id_sondage, comment, usercomment)";
$sql.= " VALUES ('".$this->db->escape($this->id_sondage)."','".$this->db->escape($comment)."','".$this->db->escape($comment_user)."')";
$resql = $this->db->query($sql);
@@ -488,7 +494,8 @@ class Opensurveysondage extends CommonObject
* @param int $id_comment Id of the comment
* @return boolean False in case of the query fails, true if it was successful
*/
- public function deleteComment($id_comment) {
+ public function deleteComment($id_comment)
+ {
$sql = 'DELETE FROM '.MAIN_DB_PREFIX.'opensurvey_comments WHERE id_comment = '.$id_comment.' AND id_sondage = '.$this->id_sondage;
$resql = $this->db->query($sql);
@@ -504,8 +511,8 @@ class Opensurveysondage extends CommonObject
*
* @return void
*/
- private function cleanParameters() {
-
+ private function cleanParameters()
+ {
$this->id_sondage = trim($this->id_sondage);
$this->commentaires = trim($this->commentaires);
$this->mail_admin = trim($this->mail_admin);