Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
ef4818356c | |||
85ed1def88 |
@ -17,6 +17,7 @@ use TheTempusProject\Bedrock\Functions\Input;
|
||||
use TheTempusProject\Bedrock\Classes\Config;
|
||||
use TheTempusProject\Bedrock\Functions\Check;
|
||||
use TheTempusProject\Canary\Bin\Canary as Debug;
|
||||
use TheTempusProject\Houdini\Classes\Components;
|
||||
|
||||
class Pagination extends Template {
|
||||
//The settings that will not change
|
||||
|
@ -21,6 +21,9 @@ class Session {
|
||||
* @return {bool}
|
||||
*/
|
||||
public static function exists( $name ) {
|
||||
if (session_status() === PHP_SESSION_NONE) {
|
||||
session_start();
|
||||
}
|
||||
if ( ! Check::sessionName( $name ) ) {
|
||||
return false;
|
||||
}
|
||||
@ -43,7 +46,7 @@ class Session {
|
||||
return false;
|
||||
}
|
||||
$sessionName = DEFAULT_SESSION_PREFIX . $name;
|
||||
if ( self::exists( $sessionName ) ) {
|
||||
if ( self::exists( $name ) ) {
|
||||
return $_SESSION[ $sessionName ];
|
||||
}
|
||||
Debug::info( "Session::get - Session not found: $sessionName" );
|
||||
@ -58,6 +61,9 @@ class Session {
|
||||
* @return {bool}
|
||||
*/
|
||||
public static function put( $name, $data ) {
|
||||
if (session_status() === PHP_SESSION_NONE) {
|
||||
session_start();
|
||||
}
|
||||
if ( ! Check::sessionName( $name ) ) {
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user