From 9a6cba4ebbbd4f3fad1e08c99d70038b025914fa Mon Sep 17 00:00:00 2001
From: Benjamin Sonntag <benjamin@octopuce.fr>
Date: Thu, 14 Jan 2016 18:15:25 +0100
Subject: [PATCH] Fix cname error not sent to user interface. Fixes #25

---
 bureau/admin/dom_subedit.php                 | 1 +
 bureau/class/m_dom.php                       | 2 +-
 bureau/locales/fr_FR/LC_MESSAGES/messages.po | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/bureau/admin/dom_subedit.php b/bureau/admin/dom_subedit.php
index bb8c5df1..b6d33997 100644
--- a/bureau/admin/dom_subedit.php
+++ b/bureau/admin/dom_subedit.php
@@ -38,6 +38,7 @@ getFields($fields);
 
 $dom->lock();
 
+$r=true;
 if (!isset($noread) || !$noread) {
   if (!$r=$dom->get_sub_domain_all($sub_domain_id)) {
     $error=$err->errstr();
diff --git a/bureau/class/m_dom.php b/bureau/class/m_dom.php
index 712692cc..d282c509 100644
--- a/bureau/class/m_dom.php
+++ b/bureau/class/m_dom.php
@@ -1397,7 +1397,7 @@ class m_dom {
 
         if (!$this->check_type_value($type, $dest)) {
             //plutot verifier si la chaine d'erreur est vide avant de raise sinon sa veut dire que l(erruer est deja remonté
-            #$err->raise("dom",_("Invalid domain type selected, please check"));
+	  // error raised by check_type_value
             return false;
         }
 
diff --git a/bureau/locales/fr_FR/LC_MESSAGES/messages.po b/bureau/locales/fr_FR/LC_MESSAGES/messages.po
index a1f556dd..feb310a2 100644
--- a/bureau/locales/fr_FR/LC_MESSAGES/messages.po
+++ b/bureau/locales/fr_FR/LC_MESSAGES/messages.po
@@ -4640,7 +4640,7 @@ msgstr "Adresse IP invalide"
 msgid ""
 "The name you entered is incorrect or not fully qualified (shall end with a .)"
 msgstr ""
-"Le dossier que vous avez entré est incorrect ou non qualifié (doit terminé "
+"Le nom que vous avez entré est incorrect ou non qualifié (doit terminer "
 "par un .)"
 
 #: ../class/m_dom.php:1316