Consistency improvements
This commit is contained in:
parent
d4d700efe6
commit
9da461d135
@ -41,6 +41,11 @@ define('SHOW_DEBUG_BACKTRACE', TRUE);
|
||||
| slash.
|
||||
|
|
||||
*/
|
||||
// Determine the default site url
|
||||
$ri = $_SERVER['REQUEST_URI'];
|
||||
$ind_pos = stripos($ri, "index.php");
|
||||
$default_path = ($ind_pos !== FALSE) ? substr($ri, 0, $ind_pos) : $ri;
|
||||
$default_baseurl = "//" . str_replace("//", "/", $_SERVER['HTTP_HOST']. $default_path);
|
||||
define('BASE_URL', $default_baseurl);
|
||||
|
||||
/*
|
||||
|
12
index.php
12
index.php
@ -42,17 +42,11 @@ define('MM_SYS_PATH', __DIR__.'/sys/');
|
||||
define('MM_APP_PATH', __DIR__.'/app/');
|
||||
define('MM_MOD_PATH', MM_APP_PATH.'modules/');
|
||||
|
||||
// Determine the default site url
|
||||
$ri = $_SERVER['REQUEST_URI'];
|
||||
$ind_pos = stripos($ri, "index.php");
|
||||
$default_path = ($ind_pos !== FALSE) ? substr($ri, 0, $ind_pos) : $ri;
|
||||
$default_baseurl = "//" . str_replace("//", "/", $_SERVER['HTTP_HOST']. $default_path);
|
||||
|
||||
// Require the basic configuratio file
|
||||
require(MM_APP_PATH.'config/config.php');
|
||||
// Require the basic configuration file
|
||||
require(MM_APP_PATH .'config/config.php');
|
||||
|
||||
// Require the most important files
|
||||
require(MM_SYS_PATH . "common.php");
|
||||
require(MM_SYS_PATH . 'common.php');
|
||||
|
||||
// And away we go!
|
||||
init();
|
||||
|
@ -119,4 +119,5 @@ class MM_Controller extends miniMVC {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// End of controller.php
|
@ -121,4 +121,5 @@ class DB extends Query_Builder {
|
||||
echo $buffer;
|
||||
}
|
||||
}
|
||||
|
||||
// End of db.php
|
@ -32,4 +32,5 @@ class MM_Model extends miniMVC {
|
||||
parent::__construct($args);
|
||||
}
|
||||
}
|
||||
|
||||
// End of model.php
|
@ -147,4 +147,5 @@ class MM_Output extends MM {
|
||||
$this->headers = [];
|
||||
}
|
||||
}
|
||||
|
||||
// End of Output.php
|
@ -537,4 +537,5 @@ class MM_Page extends MM_Output {
|
||||
return $string;
|
||||
}
|
||||
}
|
||||
|
||||
// End of page.php
|
@ -11,7 +11,7 @@
|
||||
* @license http://philsturgeon.co.uk/code/dbad-license
|
||||
*/
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// --------------------------------------------------------------------------
|
||||
// ! JSObject Trait
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
|
@ -62,7 +62,7 @@ class MM_Data_Store {
|
||||
{
|
||||
$file_string = json_encode($this->current, JSON_PRETTY_PRINT);
|
||||
|
||||
file_put_contents(MM_APP_PATH .'config/data_store.json', $file_string);
|
||||
file_put_contents(MM_APP_PATH . 'config/data_store.json', $file_string);
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
@ -147,4 +147,5 @@ class MM_Data_Store {
|
||||
return $this->current;
|
||||
}
|
||||
}
|
||||
|
||||
// End of data store.php
|
@ -10,12 +10,7 @@
|
||||
* @link https://github.com/timw4mail/miniMVC
|
||||
* @license http://philsturgeon.co.uk/code/dbad-license
|
||||
*/
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
/**
|
||||
* Define a session id to namespace sessions
|
||||
*/
|
||||
define(SESS_ID, 'MM_SESSION');
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
@ -49,8 +44,8 @@ class MM_Session {
|
||||
session_start();
|
||||
|
||||
// Save a reference to the session for later access
|
||||
$_SESSION[SESS_ID] = (isset($_SESSION[SESS_ID]) ?: [];
|
||||
$this->sess =& $_SESSION[SESS_ID];
|
||||
$_SESSION['MM_SESSION'] = (isset($_SESSION['MM_SESSION']) ?: [];
|
||||
$this->sess =& $_SESSION['MM_SESSION'];
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
@ -92,4 +87,5 @@ class MM_Session {
|
||||
sess_destroy();
|
||||
}
|
||||
}
|
||||
// End of php_session.php
|
||||
|
||||
// End of session.php
|
Loading…
Reference in New Issue
Block a user