Update gettext : add spaces

DomCi : remove line too longs on all the files


git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@5280 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2019-05-23 14:19:30 +00:00
parent a79b59685f
commit 17168aaaef
39 changed files with 588 additions and 565 deletions

View File

@@ -38,32 +38,32 @@ class dbjson
500);
$pos = strpos ($dsn, "://");
if ($pos === false)
throw new \Exception (dgettext("domframework",
throw new \Exception (dgettext ("domframework",
"No DSN provided to dbjson"), 500);
if (substr ($dsn, 0, $pos) !== "dbjson")
throw new \Exception (dgettext("domframework",
throw new \Exception (dgettext ("domframework",
"Invalid database type provided in dbjson"), 500);
$this->dbfile = substr ($dsn, $pos+3);
$directory = dirname ($this->dbfile);
if (! file_exists ($directory))
@mkdir ($directory, 0777, true);
if (! file_exists ($directory))
throw new \Exception (sprintf (dgettext("domframework",
throw new \Exception (sprintf (dgettext ("domframework",
"Directory '%s' doesn't exists"), $directory), 500);
if (! file_exists ($this->dbfile))
{
if (! is_readable ($directory))
throw new \Exception (sprintf (
dgettext("domframework",
dgettext ("domframework",
"Directory '%s' not writeable and dbfile '%s' not exists"),
$directory, $this->dbfile), 500);
touch ($this->dbfile);
}
if (! is_readable ($this->dbfile))
throw new \Exception(sprintf (dgettext("domframework",
throw new \Exception(sprintf (dgettext ("domframework",
"File '%s' not readable"), $this->dbfile), 500);
if (! is_writeable ($this->dbfile))
throw new \Exception(sprintf (dgettext("domframework",
throw new \Exception(sprintf (dgettext ("domframework",
"File '%s' not readable"), $this->dbfile), 500);
$this->dsn = $dsn;
$this->dbfile = $this->dbfile;