mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 17:58:41 +00:00
Fix issue bugs
This commit is contained in:
parent
f4b5dd5f01
commit
988a2467af
|
|
@ -35,13 +35,13 @@ use phpOMS\Datatypes\Enum;
|
||||||
abstract class LoginReturnType extends Enum
|
abstract class LoginReturnType extends Enum
|
||||||
{
|
{
|
||||||
/* public */ const OK = 0; /* Everything is ok and the user got authed */
|
/* public */ const OK = 0; /* Everything is ok and the user got authed */
|
||||||
/* public */ const FAILURE = 1; /* Authentication resulted in a unexpected failure */
|
/* public */ const FAILURE = -1; /* Authentication resulted in a unexpected failure */
|
||||||
/* public */ const WRONG_PASSWORD = 2; /* Authentication with wrong password */
|
/* public */ const WRONG_PASSWORD = -2; /* Authentication with wrong password */
|
||||||
/* public */ const WRONG_USERNAME = 3; /* Authentication with unknown user */
|
/* public */ const WRONG_USERNAME = -3; /* Authentication with unknown user */
|
||||||
/* public */ const WRONG_PERMISSION = 4; /* User doesn't have permission to authenticate */
|
/* public */ const WRONG_PERMISSION = -4; /* User doesn't have permission to authenticate */
|
||||||
/* public */ const NOT_ACTIVATED = 5; /* The user is not activated yet */
|
/* public */ const NOT_ACTIVATED = -5; /* The user is not activated yet */
|
||||||
/* public */ const WRONG_INPUT_EXCEEDED = 6; /* Too many wrong logins recently */
|
/* public */ const WRONG_INPUT_EXCEEDED = -6; /* Too many wrong logins recently */
|
||||||
/* public */ const TIMEOUTED = 7; /* User received a timeout and can not log in until a certain date */
|
/* public */ const TIMEOUTED = -7; /* User received a timeout and can not log in until a certain date */
|
||||||
/* public */ const BANNED = 8; /* User is banned */
|
/* public */ const BANNED = -8; /* User is banned */
|
||||||
/* public */ const INACTIVE = 9; /* User is inactive */
|
/* public */ const INACTIVE = -9; /* User is inactive */
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,6 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace phpOMS\Event;
|
namespace phpOMS\Event;
|
||||||
|
|
||||||
use phpOMS\Pattern\Mediator;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EventManager class.
|
* EventManager class.
|
||||||
*
|
*
|
||||||
|
|
@ -32,7 +30,7 @@ use phpOMS\Pattern\Mediator;
|
||||||
*
|
*
|
||||||
* @todo : make cachable + database storable -> can reload user defined listeners (persistent events)
|
* @todo : make cachable + database storable -> can reload user defined listeners (persistent events)
|
||||||
*/
|
*/
|
||||||
class EventManager implements Mediator
|
class EventManager
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Events.
|
* Events.
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,7 @@ class Head implements RenderableInterface
|
||||||
/**
|
/**
|
||||||
* Set page title.
|
* Set page title.
|
||||||
*
|
*
|
||||||
* @param string $type Asset type
|
* @param int $type Asset type
|
||||||
* @param string $uri Asset uri
|
* @param string $uri Asset uri
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
|
|
@ -156,7 +156,7 @@ class Head implements RenderableInterface
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
*/
|
*/
|
||||||
public function addAsset(string $type, string $uri) /* : void */
|
public function addAsset(int $type, string $uri) /* : void */
|
||||||
{
|
{
|
||||||
$this->assets[$uri] = $type;
|
$this->assets[$uri] = $type;
|
||||||
}
|
}
|
||||||
|
|
@ -308,7 +308,7 @@ class Head implements RenderableInterface
|
||||||
{
|
{
|
||||||
$asset = '';
|
$asset = '';
|
||||||
foreach ($this->assets as $uri => $type) {
|
foreach ($this->assets as $uri => $type) {
|
||||||
if ($type == AssetType::CSS) {
|
if ($type === AssetType::CSS) {
|
||||||
$asset .= '<link rel="stylesheet" type="text/css" href="' . $uri . '">';
|
$asset .= '<link rel="stylesheet" type="text/css" href="' . $uri . '">';
|
||||||
} elseif ($type === AssetType::JS) {
|
} elseif ($type === AssetType::JS) {
|
||||||
$asset .= '<script src="' . $uri . '"></script>';
|
$asset .= '<script src="' . $uri . '"></script>';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user