Compare commits
2 Commits
b6a849627c
...
57cc0b261a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57cc0b261a | ||
|
|
660bef00a2 |
@@ -33,9 +33,10 @@ class Authorization
|
|||||||
/** Return if the user right is NONE, READ, WRITE, EXECUTE
|
/** Return if the user right is NONE, READ, WRITE, EXECUTE
|
||||||
if the object doesn't exists, or is not readable, throw an exception
|
if the object doesn't exists, or is not readable, throw an exception
|
||||||
@param string $object The object path to examine
|
@param string $object The object path to examine
|
||||||
@return NONE, READ, WRITE, EXECUTE */
|
@return string NONE, READ, WRITE, EXECUTE */
|
||||||
public function validate($object)
|
public function validate($object)
|
||||||
{
|
{
|
||||||
|
return "NONE";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Add a new object, with owner and group, and mode bits
|
/** Add a new object, with owner and group, and mode bits
|
||||||
|
|||||||
@@ -1468,7 +1468,7 @@ class Authzgroups
|
|||||||
"Wanted group not found"
|
"Wanted group not found"
|
||||||
), 404);
|
), 404);
|
||||||
}
|
}
|
||||||
return $this->rightReadByGroupByID($module, $objects[0]["idgroup"]);
|
return $this->rightReadByGroupByID($module, $groups[0]["idgroup"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Return an array with all the available rights for a module and a group
|
/** Return an array with all the available rights for a module and a group
|
||||||
|
|||||||
@@ -1676,7 +1676,7 @@ class Authzgroupsoo
|
|||||||
"Wanted group not found"
|
"Wanted group not found"
|
||||||
), 404);
|
), 404);
|
||||||
}
|
}
|
||||||
return $this->rightReadByGroupByID($module, $objects[0]["idgroup"]);
|
return $this->rightReadByGroupByID($module, $groups[0]["idgroup"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Return an array with all the available rights for a module and a group
|
/** Return an array with all the available rights for a module and a group
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class Daemon
|
|||||||
*/
|
*/
|
||||||
public function start($name, $callable, $params = array())
|
public function start($name, $callable, $params = array())
|
||||||
{
|
{
|
||||||
$file = new file();
|
$file = new File();
|
||||||
if (! $file->is_writeable($this->runDir)) {
|
if (! $file->is_writeable($this->runDir)) {
|
||||||
throw new \Exception(sprintf(
|
throw new \Exception(sprintf(
|
||||||
"Run Directory '%s' is not writeable",
|
"Run Directory '%s' is not writeable",
|
||||||
@@ -73,7 +73,7 @@ class Daemon
|
|||||||
), 500);
|
), 500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$fork = new fork();
|
$fork = new Fork();
|
||||||
$pid = $fork->startDetachedChild($name, $callable, $params);
|
$pid = $fork->startDetachedChild($name, $callable, $params);
|
||||||
file_put_contents($this->runDir . "/$name.pid", $pid);
|
file_put_contents($this->runDir . "/$name.pid", $pid);
|
||||||
return $pid;
|
return $pid;
|
||||||
@@ -89,7 +89,7 @@ class Daemon
|
|||||||
*/
|
*/
|
||||||
public function stop($name, $maxWaitStop = 3, $maxWaitKill = 3)
|
public function stop($name, $maxWaitStop = 3, $maxWaitKill = 3)
|
||||||
{
|
{
|
||||||
$file = new file();
|
$file = new File();
|
||||||
if (! $file->is_writeable($this->runDir)) {
|
if (! $file->is_writeable($this->runDir)) {
|
||||||
throw new \Exception(sprintf(
|
throw new \Exception(sprintf(
|
||||||
"Run Directory '%s' is not writeable",
|
"Run Directory '%s' is not writeable",
|
||||||
@@ -149,7 +149,7 @@ class Daemon
|
|||||||
*/
|
*/
|
||||||
public function status($name)
|
public function status($name)
|
||||||
{
|
{
|
||||||
$file = new file();
|
$file = new File();
|
||||||
if (! $file->is_writeable($this->runDir)) {
|
if (! $file->is_writeable($this->runDir)) {
|
||||||
throw new \Exception(sprintf(
|
throw new \Exception(sprintf(
|
||||||
"Run Directory '%s' is not writeable",
|
"Run Directory '%s' is not writeable",
|
||||||
@@ -179,7 +179,7 @@ class Daemon
|
|||||||
*/
|
*/
|
||||||
public function reload($name)
|
public function reload($name)
|
||||||
{
|
{
|
||||||
$file = new file();
|
$file = new File();
|
||||||
if (! $file->is_writeable($this->runDir)) {
|
if (! $file->is_writeable($this->runDir)) {
|
||||||
throw new \Exception(sprintf(
|
throw new \Exception(sprintf(
|
||||||
"Run Directory '%s' is not writeable",
|
"Run Directory '%s' is not writeable",
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ class Getopts
|
|||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
! is_int($multiple) &&
|
! is_int($multiple) &&
|
||||||
\verify::staticIs_integer("$multiple") === false
|
Verify::staticIs_integer("$multiple") === false
|
||||||
) {
|
) {
|
||||||
throw new \Exception("Multiple option must be an integer", 500);
|
throw new \Exception("Multiple option must be an integer", 500);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ class GraphStyleLinePoints
|
|||||||
$this->pointShape = $this->allowedShapes[
|
$this->pointShape = $this->allowedShapes[
|
||||||
($number % count($this->allowedShapes))];
|
($number % count($this->allowedShapes))];
|
||||||
}
|
}
|
||||||
$palette = graphPalette::getPalette($this->palette);
|
$palette = GraphPalette::getPalette($this->palette);
|
||||||
if ($this->pointBgcolor === null) {
|
if ($this->pointBgcolor === null) {
|
||||||
$this->pointBgcolor = $palette[($number % count($palette))]["bgcolor"];
|
$this->pointBgcolor = $palette[($number % count($palette))]["bgcolor"];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ class Logger
|
|||||||
|
|
||||||
// Display the backtrace if it is needed
|
// Display the backtrace if it is needed
|
||||||
if ($this->backtraceDisplay) {
|
if ($this->backtraceDisplay) {
|
||||||
$e = new Exception();
|
$e = new \Exception();
|
||||||
$msg .= "\n" . ($e->getTraceAsString());
|
$msg .= "\n" . ($e->getTraceAsString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user