Commit to update adminer
This commit is contained in:
parent
f5cae7ff57
commit
10376658b2
5 changed files with 266 additions and 241 deletions
|
@ -17,10 +17,6 @@ class Main {
|
|||
if(version_compare(phpversion(), '5.4.0', '<'))
|
||||
die('<h3>Upgrade your PHP Version to at least PHP 5.4!</h3>');
|
||||
|
||||
// Start session
|
||||
if(session_status() != PHP_SESSION_ACTIVE)
|
||||
session_start();
|
||||
|
||||
// Configuration Management and local configuration
|
||||
Configuration::init($config);
|
||||
|
||||
|
@ -30,6 +26,9 @@ class Main {
|
|||
// "Dynamic" Configuration
|
||||
Configuration::initDB();
|
||||
|
||||
// Create new session
|
||||
Session::init();
|
||||
|
||||
// Templating engine
|
||||
self::initTwig();
|
||||
|
||||
|
|
|
@ -7,6 +7,13 @@ namespace Sakura;
|
|||
|
||||
class Session {
|
||||
|
||||
|
||||
// Initiate new session
|
||||
public static function init() {
|
||||
|
||||
// Start PHP session
|
||||
if(session_status() != PHP_SESSION_ACTIVE)
|
||||
session_start();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
12
_sakura/components/Users.php
Normal file
12
_sakura/components/Users.php
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
/*
|
||||
* User Management
|
||||
*/
|
||||
|
||||
namespace Sakura;
|
||||
|
||||
class Users {
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -4,11 +4,14 @@
|
|||
* (c)Flashwave/Flashii Media 2013-2015 <http://flash.moe>
|
||||
*/
|
||||
|
||||
// Declare namespace
|
||||
namespace Sakura;
|
||||
|
||||
// Start output buffering
|
||||
ob_start();
|
||||
|
||||
|
||||
// Define Sakura version
|
||||
define('SAKURA_VERSION', '20150325');
|
||||
define('SAKURA_VERSION', '20150329');
|
||||
|
||||
// Define Sakura Path
|
||||
define('ROOT_DIRECTORY', str_replace('_sakura', '', dirname(__FILE__)));
|
||||
|
@ -25,6 +28,7 @@ require_once ROOT_DIRECTORY .'_sakura/components/Main.php';
|
|||
require_once ROOT_DIRECTORY .'_sakura/components/Hashing.php';
|
||||
require_once ROOT_DIRECTORY .'_sakura/components/Configuration.php';
|
||||
require_once ROOT_DIRECTORY .'_sakura/components/Sessions.php';
|
||||
require_once ROOT_DIRECTORY .'_sakura/components/Users.php';
|
||||
|
||||
// Generate path to database driver
|
||||
$_DBNGNPATH = ROOT_DIRECTORY .'_sakura/components/database/' . $fiiConf['db']['driver'] . '.php';
|
||||
|
@ -40,12 +44,12 @@ else
|
|||
set_error_handler(array('Sakura\Main', 'ErrorHandler'));
|
||||
|
||||
// Initialise Flashii Class
|
||||
Sakura\Main::init($fiiConf);
|
||||
Main::init($fiiConf);
|
||||
|
||||
// Set base page rendering data
|
||||
$renderData = array(
|
||||
'sakura' => [
|
||||
'version' => SAKURA_VERSION,
|
||||
'urls' => $fiiConf['urls']
|
||||
'urls' => Configuration::getLocalConfig('urls')
|
||||
]
|
||||
);
|
||||
|
|
File diff suppressed because one or more lines are too long
Reference in a new issue