mintest
This commit is contained in:
parent
28284f8725
commit
c50ad689d3
|
@ -78,9 +78,9 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static function deepCheck(){
|
public static function deepCheck(){
|
||||||
/* [1] Si aucune authentification
|
/* [1] Si aucun token
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
if( self::auth() == 0 )
|
if( is_null($GLOBALS['TOKEN']) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@
|
||||||
/* (3) Compares content */
|
/* (3) Compares content */
|
||||||
$hashed = self::secure_hash($GLOBALS['TOKEN']);
|
$hashed = self::secure_hash($GLOBALS['TOKEN']);
|
||||||
|
|
||||||
if( strlen($hashed) !== 64 || $fc !== $hashed )
|
if( strlen($hashed) !== 64 || $hashed !== $fc )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* (4) Stores new content */
|
/* (4) Stores new content */
|
||||||
|
@ -169,7 +169,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static function auth(){
|
public static function auth(){
|
||||||
return is_null($GLOBALS['TOKEN']) ? 0 : 1;
|
return !is_array($GLOBALS['PERM']) ? 0 : count($GLOBALS['PERM']);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue