Fixes for installation in a path
This commit is contained in:
parent
ef1cbea4d4
commit
4bb6ca9711
@ -27,12 +27,23 @@
|
|||||||
| Base Url
|
| Base Url
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| This is the url path where the framework is located. Requires trailing
|
| This is the url path of the domain. Requires trailing
|
||||||
| slash.
|
| slash.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
define('BASE_URL', '//' . $_SERVER['HTTP_HOST'] . '/');
|
define('BASE_URL', '//' . $_SERVER['HTTP_HOST'] . '/');
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Base Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This is the url path where the framework is located. Requires trailing
|
||||||
|
| slash.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
define('BASE_PATH', 'meta/');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Url index file
|
| Url index file
|
||||||
@ -41,7 +52,7 @@ define('BASE_URL', '//' . $_SERVER['HTTP_HOST'] . '/');
|
|||||||
| This determines whether "index.php" is in generated urls
|
| This determines whether "index.php" is in generated urls
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
define('URL_INDEX_FILE', '');
|
define('URL_INDEX_FILE', BASE_PATH . 'index.php/');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@ -51,7 +62,7 @@ define('URL_INDEX_FILE', '');
|
|||||||
| This is the domain used for serving content, such as css, javascript.
|
| This is the domain used for serving content, such as css, javascript.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
define('CONTENT_DOMAIN', BASE_URL);
|
define('CONTENT_DOMAIN', BASE_URL . BASE_PATH);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@ -73,7 +84,7 @@ define('STATIC_LIB_PATH', CONTENT_DOMAIN.'assets/');
|
|||||||
| stylesheet minifier. This should not need to be changed.
|
| stylesheet minifier. This should not need to be changed.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
define('STYLE_PATH', STATIC_LIB_PATH . 'css.php/g/');
|
define('STYLE_PATH', STATIC_LIB_PATH . 'css.php?g=');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@ -84,7 +95,7 @@ define('STYLE_PATH', STATIC_LIB_PATH . 'css.php/g/');
|
|||||||
| javascript minifier. This should not need to be changed.
|
| javascript minifier. This should not need to be changed.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
define('SCRIPT_PATH', STATIC_LIB_PATH . 'js.php/g/');
|
define('SCRIPT_PATH', STATIC_LIB_PATH . 'js.php?g=');
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -25,6 +25,8 @@ class genre extends \miniMVC\Controller {
|
|||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
|
//$this->data_model->create_tables();
|
||||||
|
|
||||||
$data = array();
|
$data = array();
|
||||||
$data['genres'] = $this->data_model->get_genres();
|
$data['genres'] = $this->data_model->get_genres();
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@ $_.ext('center', function (sel){
|
|||||||
$_.event.live('#edit_form', 'submit', meta.update_item);
|
$_.event.live('#edit_form', 'submit', meta.update_item);
|
||||||
|
|
||||||
// WYSIWYG on section/data pages
|
// WYSIWYG on section/data pages
|
||||||
if (document.getElementsByTagName('textarea') != null)
|
if (document.getElementsByTagName('textarea').length > 0)
|
||||||
{
|
{
|
||||||
meta.initTINY('val');
|
meta.initTINY('val');
|
||||||
}
|
}
|
||||||
|
@ -286,6 +286,8 @@ function route()
|
|||||||
|
|
||||||
// get the incoming request URL path
|
// get the incoming request URL path
|
||||||
$path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
$path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
||||||
|
$path = str_replace(URL_INDEX_FILE, '', $path);
|
||||||
|
$path = str_replace(BASE_PATH, '', $path);
|
||||||
|
|
||||||
// get the route based on the path and server
|
// get the route based on the path and server
|
||||||
$route = $router->match($path, $_SERVER);
|
$route = $router->match($path, $_SERVER);
|
||||||
|
Loading…
Reference in New Issue
Block a user