domci : commas should be followed by space

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@5281 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2019-05-23 14:55:18 +00:00
parent 17168aaaef
commit f423229f94
20 changed files with 159 additions and 167 deletions
+3 -3
View File
@@ -54,11 +54,11 @@ class authentication
/** The authentication servers configuration /** The authentication servers configuration
* array ("authXXXX" => array ( * array ("authXXXX" => array (
* array ("ldapserver"=>"ldaps://annuaire.grenoble.cnrs.fr", * array ("ldapserver" => "ldaps://server.domain.fr",
* "ldapport" => 636, * "ldapport" => 636,
* "ldaptimeout" => 5, * "ldaptimeout" => 5,
* "ldapauth"=>"uid=annuaire,ou=people,dc=grenoble,dc=cnrs,dc=fr", * "ldapauth" => "uid=XXX,dc=domain,dc=fr",
* "ldappwd"=>";authANNUAIRE2013", * "ldappwd" => "XXX",
* "ldapbase" => "", * "ldapbase" => "",
* "ldapfilter" => "(mail=%s)", * "ldapfilter" => "(mail=%s)",
* "ldapfield" => "mail", * "ldapfield" => "mail",
+17 -23
View File
@@ -169,8 +169,8 @@ class authzgroups
$object = "/$object"; $object = "/$object";
$rc = $this->allow ($module, $user, "$object"); $rc = $this->allow ($module, $user, "$object");
if ($this->debug) if ($this->debug)
trigger_error ("authzgroups : accessRight ('$module','$user','$object')". trigger_error ("authzgroups : accessRight ('$module', '$user', ".
"=$rc", E_USER_NOTICE); "'$object')=$rc", E_USER_NOTICE);
if ($rc !== "NO") if ($rc !== "NO")
return TRUE; return TRUE;
if ($user === "anonymous") if ($user === "anonymous")
@@ -204,8 +204,8 @@ class authzgroups
$object = "/$object"; $object = "/$object";
$rc = $this->allow ($module, $user, $object); $rc = $this->allow ($module, $user, $object);
if ($this->debug) if ($this->debug)
trigger_error ("authzgroups : accessWrite ('$module','$user','$object')". trigger_error ("authzgroups : accessWrite ('$module', '$user', ".
"=$rc", E_USER_NOTICE); "'$object')=$rc", E_USER_NOTICE);
if ($rc === "RW") if ($rc === "RW")
return TRUE; return TRUE;
if ($user === "anonymous") if ($user === "anonymous")
@@ -276,14 +276,11 @@ class authzgroups
"comment" => array ("varchar", "255")); "comment" => array ("varchar", "255"));
$this->dbObject->primary = "idobject"; $this->dbObject->primary = "idobject";
$this->dbObject->unique = array ("idobject", array ("object", "module")); $this->dbObject->unique = array ("idobject", array ("object", "module"));
$this->dbObject->titles = array ("idobject"=>dgettext ("domframework", $this->dbObject->titles = array (
"idobject"), "idobject" => dgettext ("domframework", "idobject"),
"module"=>dgettext ("domframework", "module" => dgettext ("domframework", "Module"),
"Module"), "object" => dgettext ("domframework", "Object"),
"object"=>dgettext ("domframework", "comment" => dgettext ("domframework", "Comment"));
"Object"),
"comment"=>dgettext ("domframework",
"Comment"));
$this->dbGroup = new dblayer ($dsn, $username, $password, $driver_options); $this->dbGroup = new dblayer ($dsn, $username, $password, $driver_options);
$this->dbGroup->debug = $this->debug; $this->dbGroup->debug = $this->debug;
@@ -296,14 +293,11 @@ class authzgroups
"comment" => array ("varchar", "255")); "comment" => array ("varchar", "255"));
$this->dbGroup->primary = "idgroup"; $this->dbGroup->primary = "idgroup";
$this->dbGroup->unique = array ("idgroup", array ("module", "group")); $this->dbGroup->unique = array ("idgroup", array ("module", "group"));
$this->dbGroup->titles = array ("idgroup"=>dgettext ("domframework", $this->dbGroup->titles = array (
"idgroup"), "idgroup" => dgettext ("domframework", "idgroup"),
"module"=>dgettext ("domframework", "module" => dgettext ("domframework", "Module"),
"Module"), "group" => dgettext ("domframework", "Group"),
"group"=>dgettext ("domframework", "comment" => dgettext ("domframework", "Comment"));
"Group"),
"comment"=>dgettext ("domframework",
"Comment"));
$this->dbGroupMember = new dblayer ($dsn, $username, $password, $this->dbGroupMember = new dblayer ($dsn, $username, $password,
$driver_options); $driver_options);
@@ -505,7 +499,8 @@ class authzgroups
$select[] = array ("module", $module); $select[] = array ("module", $module);
if ($object !== null) if ($object !== null)
$select[] = array ("object", $object); $select[] = array ("object", $object);
return $this->dbObject->read ($select, null, array(array("object","ASC"))); return $this->dbObject->read ($select, null,
array (array ("object", "ASC")));
} }
/** Return an array with all the available objects in the module, or only /** Return an array with all the available objects in the module, or only
@@ -743,8 +738,7 @@ class authzgroups
{ {
if ($this->dbGroupMember == null) if ($this->dbGroupMember == null)
throw new Exception (dgettext ("domframework", throw new Exception (dgettext ("domframework",
"DB for GroupMember is not connected"), "DB for GroupMember is not connected"), 500);
500);
$groups = $this->groupReadByID ($module, $idgroup); $groups = $this->groupReadByID ($module, $idgroup);
if (! isset ($groups[0]["idgroup"])) if (! isset ($groups[0]["idgroup"]))
throw new Exception (dgettext ("domframework", throw new Exception (dgettext ("domframework",
+4 -4
View File
@@ -191,8 +191,8 @@ class authzgroupsoo
$object = "/$object"; $object = "/$object";
$rc = $this->allow ($module, $user, "$object"); $rc = $this->allow ($module, $user, "$object");
if ($this->debug) if ($this->debug)
trigger_error ("authzgroups : accessRight ('$module','$user','$object')". trigger_error ("authzgroups : accessRight ('$module', '$user', ".
"=$rc", E_USER_NOTICE); "'$object')=$rc", E_USER_NOTICE);
if ($rc !== "NO") if ($rc !== "NO")
return TRUE; return TRUE;
if ($user === "anonymous") if ($user === "anonymous")
@@ -226,8 +226,8 @@ class authzgroupsoo
$object = "/$object"; $object = "/$object";
$rc = $this->allow ($module, $user, $object); $rc = $this->allow ($module, $user, $object);
if ($this->debug) if ($this->debug)
trigger_error ("authzgroups : accessWrite ('$module','$user','$object')". trigger_error ("authzgroups : accessWrite ('$module', '$user', ".
"=$rc", E_USER_NOTICE); "'$object')=$rc", E_USER_NOTICE);
if ($rc === "RW") if ($rc === "RW")
return TRUE; return TRUE;
if ($user === "anonymous") if ($user === "anonymous")
+1 -1
View File
@@ -638,7 +638,7 @@ class file
$this->checkPathRW ($tmpdirname); $this->checkPathRW ($tmpdirname);
if ($recursive === false) if ($recursive === false)
return @rmdir ($tmpdirname); return @rmdir ($tmpdirname);
$files = array_diff (scandir ($tmpdirname), array('.','..')); $files = array_diff (scandir ($tmpdirname), array(".", ".."));
foreach ($files as $file) foreach ($files as $file)
{ {
if (is_dir ("$tmpdirname/$file")) if (is_dir ("$tmpdirname/$file"))
+2 -4
View File
@@ -55,10 +55,8 @@ class outputhtml extends output
if (isset ($resView["title"])) if (isset ($resView["title"]))
$title = $resView["title"]; $title = $resView["title"];
if (! isset ($resView["content"])) if (! isset ($resView["content"]))
throw new \Exception (sprintf ( throw new \Exception (sprintf ( dgettext ("domframework",
dgettext ("domframework", "No data provided from view %s::%s"), $viewClass, $viewMethod),
"No data provided from view %s::%s"),
$viewClass,$viewMethod),
500); 500);
} }
} }
+1 -2
View File
@@ -262,8 +262,7 @@ class route
$this->error (new \Exception ("Redirect to myself", 400)); $this->error (new \Exception ("Redirect to myself", 400));
if (substr_count ($baseURL, "../") > 1+ substr_count ($destURL, "/")) if (substr_count ($baseURL, "../") > 1+ substr_count ($destURL, "/"))
$this->error (new \Exception ( $this->error (new \Exception (
"Can't redirect outside this site (Base $baseURL)", "Can't redirect outside this site (Base $baseURL)", 405));
405));
if ($this->debug) if ($this->debug)
{ {
+4 -3
View File
@@ -372,8 +372,8 @@ $content .= "</li>\n";
if (!isset ($extension) || $extension === null || $extension === "") if (!isset ($extension) || $extension === null || $extension === "")
$extension = reset ($this->extensionsAllowed); $extension = reset ($this->extensionsAllowed);
if (!in_array ($extension, $this->extensionsAllowed)) if (!in_array ($extension, $this->extensionsAllowed))
throw new \Exception (dgettext ("domframework","Extension not allowed"), throw new \Exception (dgettext ("domframework",
403); "Extension not allowed"), 403);
$search = rawurldecode ($search); $search = rawurldecode ($search);
$this->connect(); $this->connect();
$titles = $this->objectDB->titles (); $titles = $this->objectDB->titles ();
@@ -1791,7 +1791,8 @@ $content .= "</li>\n";
{ {
$this->objectDB->update ($id, $values); $this->objectDB->update ($id, $values);
$renderer = new renderer (); $renderer = new renderer ();
$renderer->flash ("SUCCESS", dgettext ("domframework","Update done")); $renderer->flash ("SUCCESS", dgettext ("domframework",
"Update done"));
$route->redirect ("/". $route->redirect ("/".
str_replace ("{chain}", $chain, $this->url_prefix), str_replace ("{chain}", $chain, $this->url_prefix),
""); "");