Cosmetics changes : remove ending lines spaces

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3012 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2016-08-31 07:20:24 +00:00
parent 94099866f6
commit a04d3a4f4a
35 changed files with 208 additions and 210 deletions

View File

@@ -74,29 +74,28 @@ class cachefile
public function cachedir ()
{
if (! isset ($this->directory) || $this->directory === "")
throw new Exception (dgettext("domframework",
throw new Exception (dgettext("domframework",
"No cache directory defined"), 500);
if (! file_exists ($this->directory))
{
// Need to create the cache dir
$parent = realpath (dirname ($this->directory));
if (! is_writeable (dirname ($this->directory)))
throw new Exception (sprintf (dgettext("domframework",
throw new Exception (sprintf (dgettext("domframework",
"Directory %s is not writable : can not create cache directory"),
$parent), 500);
if (!mkdir ($this->directory))
throw new Exception (sprintf (dgettext("domframework",
throw new Exception (sprintf (dgettext("domframework",
"Can not create cache directory %s"),
$this->directory), 500);
chmod ($this->directory, 0777);
}
if (! is_writable ($this->directory))
throw new Exception (sprintf (dgettext("domframework",
throw new Exception (sprintf (dgettext("domframework",
"Cache directory %s is not writable"),
$this->directory), 500);
if (! is_readable ($this->directory))
throw new Exception (sprintf (dgettext("domframework",
throw new Exception (sprintf (dgettext("domframework",
"Cache directory %s is not readable"),
$this->directory), 500);
if (!file_exists ($this->directory."/.htaccess"))
@@ -115,7 +114,7 @@ class cachefile
if ($this->nocache !== false)
return false;
if ($data === false)
throw new Exception (dgettext("domframework",
throw new Exception (dgettext("domframework",
"Can not store FALSE in cache"), 500);
try
{
@@ -159,11 +158,11 @@ class cachefile
if (!file_exists ($fileCache))
return false;
if (!is_readable ($fileCache))
throw new Exception (sprintf (dgettext("domframework",
throw new Exception (sprintf (dgettext("domframework",
"File cache %s is not readable"),
$fileCache), 500);
if (!is_writable ($fileCache))
throw new Exception (sprintf (dgettext("domframework",
throw new Exception (sprintf (dgettext("domframework",
"File cache %s is not writable"),
$fileCache), 500);
// Lock : waiting the reconstruction of the cache by another process