Update domframework to be gettext package compliant

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1661 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2014-08-06 13:16:43 +00:00
parent ab7f76d0bb
commit b8a3e1aa23
13 changed files with 223 additions and 111 deletions

View File

@@ -83,7 +83,8 @@ class form
}
else
{
throw new Exception (_("Unknown FORM method (GET or POST allowed)"));
throw new Exception (dgettext("domframework",
"Unknown FORM method (GET or POST allowed)"));
}
if (count ($values) !== 0)
@@ -414,7 +415,7 @@ die ("FORM/VERIFY : UNUSED and dirty\n");
}
else
{
$res .= _("No value provided");
$res .= dgettext("domframework", "No value provided");
}
$res .= " </div>\n"; // End controls
@@ -576,12 +577,15 @@ class csrf
if ($this->csrf === FALSE )
return TRUE;
if (! isset ($_SESSION["domframework"]["form"]["csrf"]))
throw new Exception (_("No previous CSRF token : abort"));
throw new Exception (dgettext("domframework",
"No previous CSRF token : abort"));
if ($_SESSION["domframework"]["form"]["csrf"] !== $tokenFromUser)
throw new Exception (_("Invalid CSRF token provided"));
throw new Exception (dgettext("domframework",
"Invalid CSRF token provided"));
if (($_SESSION["domframework"]["form"]["csrfStart"] + $this->csrfTimeout) <
microtime (TRUE))
throw new Exception (_("Obsolete CSRF token provided"));
throw new Exception (dgettext("domframework",
"Obsolete CSRF token provided"));
return TRUE;
}