Minor tweaks, bypass minifier

This commit is contained in:
Timothy Warren 2016-12-29 13:56:30 -05:00
parent 0e42b583aa
commit b4e470704a
14 changed files with 411 additions and 411 deletions

View File

@ -40,12 +40,12 @@
*/
$autoload['libraries'] = [
'validation_callbacks',
'database',
'page',
'todo',
'session',
'form_validation',
'validation_callbacks'
];
@ -97,7 +97,7 @@ $autoload['config'] = array('sites');
|
| $autoload['language'] = array('lang1', 'lang2');
|
| NOTE: Do not include the "_lang" part of your file. For example
| NOTE: Do not include the "_lang" part of your file. For example
| "codeigniter_lang.php" would be referenced as array('codeigniter');
|
*/

View File

@ -3,15 +3,15 @@
* Groups configuration for default Minify implementation
* @package Minify
*/
$root = "//";
return array(
/*-----
Css
Css
-----*/
'css' => array(
$root. 'fonts/Puritan/stylesheet.css',
$root. 'css/todo.css',
@ -19,18 +19,18 @@ return array(
$root. 'js/CLEditor/jquery.cleditor.css',
$root. 'css/jquery-ui.min.css'
),
/*-----
Javascript
Javascript
-----*/
'js' => array(
$root. 'js/CLEditor/jquery.cleditor.js',
$root. 'js/CLEditor/jquery.cleditor.xhtml.js',
$root. 'js/todo.js',
),
'js_mobile' => array(
$root. 'js/todo.js',
),
);
);

View File

@ -9,7 +9,7 @@
*/
function check_session()
{
$CI =& get_instance();
$CI = get_instance();
if($CI->session->userdata('uid') == FALSE)
{

View File

@ -1,34 +1,34 @@
<?php
/**
* Add some convenience methods to form_validation library
*/
class MY_Form_validation extends CI_Form_validation {
/**
* Returns an array of errors for the current form
*
* @return array
*/
public function get_error_array()
{
return array_values($this->_error_array);
}
/**
* Clears out object data
*
* @return void
*/
public function reset()
{
foreach([
'_field_data',
'_error_array',
'_error_messages'
] as $var) {
$this->$var = array();
}
}
}
<?php
/**
* Add some convenience methods to form_validation library
*/
class MY_Form_validation extends CI_Form_validation {
/**
* Returns an array of errors for the current form
*
* @return array
*/
public function get_error_array()
{
return array_values($this->_error_array);
}
/**
* Clears out object data
*
* @return void
*/
public function reset()
{
foreach([
'_field_data',
'_error_array',
'_error_messages'
] as $var) {
$this->$var = array();
}
}
}
// End of libraries/MY_Form_validation.php

View File

@ -605,12 +605,19 @@ class Task_model extends CI_Model {
*/
public function update_task()
{
$due_timestamp = $this->input->post('due') . ' ' .
$this->input->post('due_hour') . ':' .
$this->input->post('due_minute');
$unix_due = strtotime($due_timestamp);
$title = $this->input->post('title');;
$desc = str_replace('<br>', '<br />', $this->input->post('desc'));
$category = $this->input->post('category');
$priority = $this->input->post('priority');
$status = $this->input->post('status');
$due = $this->input->post('due');
$due = $unix_due;
$uid = $this->user_id;
$task_id = $this->task_id;

View File

@ -69,7 +69,7 @@ class CIU_Loader extends CI_Loader {
// return a new instance of the object
if ( ! is_null($object_name))
{
$CI =& get_instance();
$CI = get_instance();
if ( ! isset($CI->$object_name))
{
return $this->_ci_init_class($class, config_item('ciu_subclass_prefix'), $params, $object_name);
@ -82,12 +82,12 @@ class CIU_Loader extends CI_Loader {
}
include_once($baseclass);
if (file_exists($subclass))
{
include_once($subclass);
}
include_once($ciu_subclass);
$this->_ci_loaded_files[] = $ciu_subclass;
@ -113,7 +113,7 @@ class CIU_Loader extends CI_Loader {
// return a new instance of the object
if ( ! is_null($object_name))
{
$CI =& get_instance();
$CI = get_instance();
if ( ! isset($CI->$object_name))
{
return $this->_ci_init_class($class, config_item('subclass_prefix'), $params, $object_name);
@ -152,7 +152,7 @@ class CIU_Loader extends CI_Loader {
// return a new instance of the object
if ( ! is_null($object_name))
{
$CI =& get_instance();
$CI = get_instance();
if ( ! isset($CI->$object_name))
{
return $this->_ci_init_class($class, '', $params, $object_name);
@ -281,7 +281,7 @@ class CIU_Loader extends CI_Loader {
// Save the class name and object name
$this->_ci_classes[$class] = $classvar;
// Instantiate the class
$CI =& get_instance();
$CI = get_instance();
if ($config !== NULL)
{
if ( ! defined('CIUnit_Version'))
@ -334,7 +334,7 @@ class CIU_Loader extends CI_Loader {
}
$output = $this->_ci_load(array('_ci_view' => $view, '_ci_vars' => $this->_ci_object_to_array($vars), '_ci_return' => TRUE));
$CI =& get_instance();
$CI = get_instance();
$CI->output->add_output($output);
}
@ -358,12 +358,12 @@ class CIU_Loader extends CI_Loader {
}
$ciu_helper = CIUPATH.'helpers/'.config_item('ciu_subclass_prefix').$helper.'.php';
if (file_exists($ciu_helper))
{
include_once($ciu_helper);
}
$ext_helper = APPPATH.'helpers/'.config_item('subclass_prefix').$helper.'.php';
// Is this a helper extension request?

View File

@ -9,7 +9,7 @@
/*
* CodeIgniter source modified for fooStack / CIUnit
*
*
* If you use MY_Output, change the paraent class.
*/
@ -64,7 +64,7 @@ class CIU_Output extends CI_Output {
function set_no_cache_headers()
{
//somehow $this can't be used as headers are not set in that case
$CI =& get_instance();
$CI = get_instance();
$CI->output->soft_set_header('Content-type: text/html; charset=utf-8');
$CI->output->soft_set_header('Cache-Control: no-cache');
log_message('debug', 'no cache headers set in output class');
@ -116,7 +116,7 @@ class CIU_Output extends CI_Output {
*/
function ob_flush_clean()
{
$CI =& get_instance();
$CI = get_instance();
if (ob_get_level() > $this->_ci_ob_level + 1)
{
ob_end_flush();
@ -152,7 +152,7 @@ class CIU_Output extends CI_Output {
// Grab the super object if we can.
if (class_exists('CI_Controller'))
{
$CI =& get_instance();
$CI = get_instance();
}
// --------------------------------------------------------------------

View File

@ -113,8 +113,8 @@
* Start the timer... tick tock tick tock...
* ------------------------------------------------------
*/
$BM =& load_class('Benchmark', 'core');
$GLOBALS['BM'] =& $BM;
$BM = load_class('Benchmark', 'core');
$GLOBALS['BM'] = $BM;
$BM->mark('total_execution_time_start');
$BM->mark('loading_time:_base_classes_start');
@ -124,8 +124,8 @@
* Instantiate the hooks class
* ------------------------------------------------------
*/
$EXT =& load_class('Hooks', 'core');
$GLOBALS['EXT'] =& $EXT;
$EXT = load_class('Hooks', 'core');
$GLOBALS['EXT'] = $EXT;
/*
* ------------------------------------------------------
@ -139,8 +139,8 @@
* Instantiate the config class
* ------------------------------------------------------
*/
$CFG =& load_class('Config', 'core');
$GLOBALS['CFG'] =& $CFG;
$CFG = load_class('Config', 'core');
$GLOBALS['CFG'] = $CFG;
// Do we have any manually set config items in the index.php file?
if (isset($assign_to_config))
@ -160,24 +160,24 @@
*
*/
$UNI =& load_class('Utf8', 'core');
$GLOBALS['UNI'] =& $UNI;
$UNI = load_class('Utf8', 'core');
$GLOBALS['UNI'] = $UNI;
/*
* ------------------------------------------------------
* Instantiate the URI class
* ------------------------------------------------------
*/
$URI =& load_class('URI', 'core');
$GLOBALS['URI'] =& $URI;
$URI = load_class('URI', 'core');
$GLOBALS['URI'] = $URI;
/*
* ------------------------------------------------------
* Instantiate the routing class and set the routing
* ------------------------------------------------------
*/
$RTR =& load_class('Router', 'core');
$GLOBALS['RTR'] =& $RTR;
$RTR = load_class('Router', 'core');
$GLOBALS['RTR'] = $RTR;
//$RTR->_set_routing();
// Set any routing overrides that may exist in the main index file
@ -191,8 +191,8 @@
* Instantiate the output class
* ------------------------------------------------------
*/
$OUT =& load_class('Output', 'core');
$GLOBALS['OUT'] =& $OUT;
$OUT = load_class('Output', 'core');
$GLOBALS['OUT'] = $OUT;
/*
* ------------------------------------------------------
@ -215,23 +215,23 @@
* Load the security class for xss and csrf support
* -----------------------------------------------------
*/
$SEC =& load_class('Security', 'core');
$GLOBALS['SEC'] =& $SEC;
$SEC = load_class('Security', 'core');
$GLOBALS['SEC'] = $SEC;
/*
* ------------------------------------------------------
* Load the Input class and sanitize globals
* ------------------------------------------------------
*/
$IN =& load_class('Input', 'core');
$GLOBALS['IN'] =& $IN;
$IN = load_class('Input', 'core');
$GLOBALS['IN'] = $IN;
/*
* ------------------------------------------------------
* Load the Language class
* ------------------------------------------------------
*/
$LANG =& load_class('Lang', 'core');
$LANG = load_class('Lang', 'core');
/*
* ------------------------------------------------------

View File

@ -41,7 +41,7 @@ class CIUnit {
public static $spyc;
public static $fixture;
/**
* If this class is suppose to be a Singleton shouldn't the constructor be private?
* Correct me if I am wrong but this doesn't prevent multiple instances of this class.
@ -69,16 +69,16 @@ class CIUnit {
viewvars();
return self::$controller;
}
// the current controller must be archieved before littered
$loader =& load_class('Loader', 'core');
$loader = load_class('Loader', 'core');
// reset all loaded data
$loader->reset();
//echo 'Var Dump of self::$controllers -- ';
//var_dump(self::$controllers);
/*
=========================================================
I don't understand this section of code.
@ -94,7 +94,7 @@ class CIUnit {
//'components' => $loader->_ci_components,
//'classes' => $loader->_ci_classes
}
===================================================
I don't understand why this code is clearing out
all the loaded components such as autoloaded models
@ -108,14 +108,14 @@ class CIUnit {
//reset saved queries
self::$controller->db->queries = array();
*/
//clean output / viewvars as well;
if (isset(self::$controller->output))
{
output();
viewvars();
}
//the requested controller was loaded before?
if (isset(self::$controllers[$controller_name]))
{
@ -143,7 +143,7 @@ class CIUnit {
include_once(APPPATH . 'controllers/' . $controller . EXT);
}
}
self::$current = $controller_name;
self::$controllers[$controller_name] = array(
'address' => new $controller_name(),
@ -151,12 +151,12 @@ class CIUnit {
);
self::$controller =& self::$controllers[$controller_name]['address'];
}
// var_dump(self::$controllers); die();
// var_dump(self::$controller); die();
//CI_Base::$instance = &self::$controller; //so get_instance() provides the correct controller
return self::$controller;
}

View File

@ -14,10 +14,10 @@
class CIUnit_TestCase extends PHPUnit_Framework_TestCase
{
// ------------------------------------------------------------------------
/**
* An associative array of table names. The order of the fixtures
* determines the loading and unloading sequence of the fixtures. This is
* determines the loading and unloading sequence of the fixtures. This is
* to help account for foreign key restraints in databases.
*
* For example:
@ -39,33 +39,33 @@ class CIUnit_TestCase extends PHPUnit_Framework_TestCase
* @var array
*/
protected $tables = array();
// ------------------------------------------------------------------------
/**
* The CodeIgniter Framework Instance
*
* @var object
*/
public $CI;
// ------------------------------------------------------------------------
/**
* Constructor
*
* @param string $name
* @param array $data
* @param string $dataName
* @param string $name
* @param array $data
* @param string $dataName
*/
public function __construct($name = NULL, array $data = array(), $dataName = '')
{
parent::__construct($name, $data, $dataName);
$this->CI =& get_instance();
$this->CI = get_instance();
log_message('debug', get_class($this).' CIUnit_TestCase initialized');
}
/**
* Set Up
*
@ -83,12 +83,12 @@ class CIUnit_TestCase extends PHPUnit_Framework_TestCase
$this->dbfixt($this->tables);
}
}
/**
* Tear Down
*
*
* This method will run after every test.
*
*
* @return void
*
* @author Eric Jones
@ -101,7 +101,7 @@ class CIUnit_TestCase extends PHPUnit_Framework_TestCase
$this->dbfixt_unload($this->tables);
}
}
/**
* loads a database fixture
* for each given fixture, we look up the yaml file and insert that into the corresponding table
@ -122,7 +122,7 @@ class CIUnit_TestCase extends PHPUnit_Framework_TestCase
$table_fixtures = func_get_args();
$this->load_fixt($table_fixtures);
}
/**
* This is to allow the Unit Tester to specifiy different fixutre files for
* a given table. An example would be the testing of two different senarios
@ -134,7 +134,7 @@ class CIUnit_TestCase extends PHPUnit_Framework_TestCase
{
$fixt_name = $fixt . '_fixt';
$table = is_int($table) ? $fixt : $table;
if (!empty($this->$fixt_name))
{
CIUnit::$fixture->load($table, $this->$fixt_name);
@ -143,12 +143,12 @@ class CIUnit_TestCase extends PHPUnit_Framework_TestCase
{
die("The fixture {$fixt_name} failed to load properly\n");
}
}
log_message('debug', 'Table fixtures "' . join('", "', $table_fixtures) . '" loaded');
}
/**
* DBFixt Unload
*
@ -180,7 +180,7 @@ class CIUnit_TestCase extends PHPUnit_Framework_TestCase
// of the database load. Right??
$table_fixtures = array_reverse($table_fixtures, true);
}
// Iterate over the array unloading the tables
foreach ($table_fixtures as $table => $fixture)
{
@ -206,7 +206,7 @@ class CIUnit_TestCase extends PHPUnit_Framework_TestCase
foreach ( $fixts as $fixt )
{
$fixt_name = $fixt . '_fixt';
if (file_exists(TESTSPATH . 'fixtures/' . $fixt . '_fixt.yml')) {
$this->$fixt_name = CIUnit::$spyc->loadFile(TESTSPATH . 'fixtures/' . $fixt . '_fixt.yml');
}

21
application/views/footer.php Executable file → Normal file
View File

@ -4,25 +4,12 @@
<footer class="footer">
Generated in <?= $this->benchmark->elapsed_time();?> seconds, <?= $q_num ?> quer<?= ($q_num == 1) ? "y": "ies" ?>
</footer>
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://static.timshomepage.net/piwik/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', 1]);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript';
g.defer=true; g.async=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="http://static.timshomepage.net/piwik/piwik.php?idsite=1" style="border:0" alt="" /></p></noscript>
<!-- End Piwik Code -->
<?php if($this->session->userdata('uid') == 1){$this->output->enable_profiler(TRUE);} ?>
<script src="/js/jquery.js"></script>
<script src="/js/jquery-ui.min.js"></script>
<?= $foot_js ?>
<script src="/js/CLEditor/jquery.cleditor.js"></script>
<script src="/js/CLEditor/jquery.cleditor.xhtml.js"></script>
<script src="/js/todo.js"></script>
<?php /*<?= $foot_js ?>*/ ?>
</body>
</html>

10
application/views/header.php Executable file → Normal file
View File

@ -1,9 +1,15 @@
<head>
<?= $meta ?>
<title><?= $title ?></title>
<link rel="icon" href="//todo.timshomepage.net/images/favicon.ico" type="image/x-icon" />
<?= $css ?>
<title><?= $title ?></title>
<link rel="stylesheet" href="/fonts/Puritan/stylesheet.css" />
<link rel="stylesheet" href="/css/todo.css" />
<link rel="stylesheet" href="/css/message.css" />
<link rel="stylesheet" href="/js/CLEditor/jquery.cleditor.css" />
<link rel="stylesheet" href="/css/jquery-ui.min.css" />
<?php /* <?= $css ?> */ ?>
<?= $head_js ?>
</head>
<body <?= (!empty($body_id)) ? " id=\"" . $body_id . "\"" : ""; ?>>

4
application/views/task/view.php Executable file → Normal file
View File

@ -10,9 +10,9 @@
<?php if($user_perms > PERM_CHECKLIST_ACCESS): ?>
<p id="editTask">
<?php if($user_perms == PERM_ADMIN_ACCESS){ ?>
<?php if($user_perms == PERM_ADMIN_ACCESS): ?>
<a href="#" id="delTask" onclick="if(confirm('Are you sure you want to delete this task')){window.location='<?= site_url('task/delete').'/'.$this->security->xss_clean($this->uri->segment('3')) ?>'}">Delete Task</a>
<?php } ?>
<?php endif ?>
<a id="editTaskIcon" href="<?= site_url('task/edit').'/'.$task ?>">Edit Task</a>
</p>

554
web/index.php Executable file → Normal file
View File

@ -1,278 +1,278 @@
<?php
/**
* CodeIgniter
*
* An open source application development framework for PHP 5.2.4 or newer
*
* NOTICE OF LICENSE
*
* Licensed under the Open Software License version 3.0
*
* This source file is subject to the Open Software License (OSL 3.0) that is
* bundled with this package in the files license.txt / license.rst. It is
* also available through the world wide web at this URL:
* http://opensource.org/licenses/OSL-3.0
* If you did not receive a copy of the license and are unable to obtain it
* through the world wide web, please send an email to
* licensing@ellislab.com so we can send you a copy immediately.
*
* @package CodeIgniter
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
* @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
* @link http://codeigniter.com
* @since Version 1.0
* @filesource
*/
/*
*---------------------------------------------------------------
* APPLICATION ENVIRONMENT
*---------------------------------------------------------------
*
* You can load different configurations depending on your
* current environment. Setting the environment also influences
* things like logging and error reporting.
*
* This can be set to anything, but default usage is:
*
* development
* testing
* production
*
* NOTE: If you change these, also change the error_reporting() code below
*/
define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development');
/*
*---------------------------------------------------------------
* ERROR REPORTING
*---------------------------------------------------------------
*
* Different environments will require different levels of error reporting.
* By default development will show errors but testing and live will hide them.
*/
switch (ENVIRONMENT)
{
case 'development':
error_reporting(-1);
ini_set('display_errors', 1);
break;
case 'testing':
case 'production':
error_reporting(-1);
ini_set('display_errors', 0);
break;
default:
header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
echo 'The application environment is not set correctly.';
exit(1); // EXIT_ERROR
}
/*
*---------------------------------------------------------------
* SYSTEM FOLDER NAME
*---------------------------------------------------------------
*
* This variable must contain the name of your "system" folder.
* Include the path if the folder is not in the same directory
* as this file.
*/
$system_path = '../system';
/*
*---------------------------------------------------------------
* APPLICATION FOLDER NAME
*---------------------------------------------------------------
*
* If you want this front controller to use a different "application"
* folder than the default one you can set its name here. The folder
* can also be renamed or relocated anywhere on your server. If
* you do, use a full server path. For more info please see the user guide:
* http://codeigniter.com/user_guide/general/managing_apps.html
*
* NO TRAILING SLASH!
*/
$application_folder = '../application';
/*
*---------------------------------------------------------------
* VIEW FOLDER NAME
*---------------------------------------------------------------
*
* If you want to move the view folder out of the application
* folder set the path to the folder here. The folder can be renamed
* and relocated anywhere on your server. If blank, it will default
* to the standard location inside your application folder. If you
* do move this, use the full server path to this folder.
*
* NO TRAILING SLASH!
*/
$view_folder = '';
/*
* --------------------------------------------------------------------
* DEFAULT CONTROLLER
* --------------------------------------------------------------------
*
* Normally you will set your default controller in the routes.php file.
* You can, however, force a custom routing by hard-coding a
* specific controller class/function here. For most applications, you
* WILL NOT set your routing here, but it's an option for those
* special instances where you might want to override the standard
* routing in a specific front controller that shares a common CI installation.
*
* IMPORTANT: If you set the routing here, NO OTHER controller will be
* callable. In essence, this preference limits your application to ONE
* specific controller. Leave the function name blank if you need
* to call functions dynamically via the URI.
*
* Un-comment the $routing array below to use this feature
*/
// The directory name, relative to the "controllers" folder. Leave blank
// if your controller is not in a sub-folder within the "controllers" folder
// $routing['directory'] = '';
// The controller class file name. Example: mycontroller
// $routing['controller'] = '';
// The controller function you wish to be called.
// $routing['function'] = '';
/*
* -------------------------------------------------------------------
* CUSTOM CONFIG VALUES
* -------------------------------------------------------------------
*
* The $assign_to_config array below will be passed dynamically to the
* config class when initialized. This allows you to set custom config
* items or override any default config values found in the config.php file.
* This can be handy as it permits you to share one application between
* multiple front controller files, with each file containing different
* config values.
*
* Un-comment the $assign_to_config array below to use this feature
*/
// $assign_to_config['name_of_config_item'] = 'value of config item';
// --------------------------------------------------------------------
// END OF USER CONFIGURABLE SETTINGS. DO NOT EDIT BELOW THIS LINE
// --------------------------------------------------------------------
/*
* ---------------------------------------------------------------
* Resolve the system path for increased reliability
* ---------------------------------------------------------------
*/
// Set the current directory correctly for CLI requests
if (defined('STDIN'))
{
chdir(dirname(__FILE__));
}
if (($_temp = realpath($system_path)) !== FALSE)
{
$system_path = $_temp.'/';
}
else
{
// Ensure there's a trailing slash
$system_path = rtrim($system_path, '/').'/';
}
// Is the system path correct?
if ( ! is_dir($system_path))
{
header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
echo 'Your system folder path does not appear to be set correctly. Please open the following file and correct this: '.pathinfo(__FILE__, PATHINFO_BASENAME);
exit(3); // EXIT_CONFIG
}
/*
* -------------------------------------------------------------------
* Now that we know the path, set the main path constants
* -------------------------------------------------------------------
*/
// The name of THIS file
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
// Path to the system folder
define('BASEPATH', str_replace('\\', '/', $system_path));
// Path to the front controller (this file)
define('FCPATH', str_replace(SELF, '', __FILE__));
// Name of the "system folder"
define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/'));
// The path to the "application" folder
if (is_dir($application_folder))
{
if (($_temp = realpath($application_folder)) !== FALSE)
{
$application_folder = $_temp;
}
define('APPPATH', $application_folder.DIRECTORY_SEPARATOR);
}
else
{
if ( ! is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR))
{
header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
echo 'Your application folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF;
exit(3); // EXIT_CONFIG
}
define('APPPATH', BASEPATH.$application_folder.DIRECTORY_SEPARATOR);
}
// The path to the "views" folder
if ( ! is_dir($view_folder))
{
if ( ! empty($view_folder) && is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR))
{
$view_folder = APPPATH.$view_folder;
}
elseif ( ! is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR))
{
header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
echo 'Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF;
exit(3); // EXIT_CONFIG
}
else
{
$view_folder = APPPATH.'views';
}
}
if (($_temp = realpath($view_folder)) !== FALSE)
{
$view_folder = $_temp.DIRECTORY_SEPARATOR;
}
else
{
$view_folder = rtrim($view_folder, '/\\').DIRECTORY_SEPARATOR;
}
define('VIEWPATH', $view_folder);
/*
* --------------------------------------------------------------------
* LOAD THE BOOTSTRAP FILE
* --------------------------------------------------------------------
*
* And away we go...
*/
require_once '../vendor/autoload.php';
require_once BASEPATH.'core/CodeIgniter.php';
/* End of file index.php */
<?php
/**
* CodeIgniter
*
* An open source application development framework for PHP 5.2.4 or newer
*
* NOTICE OF LICENSE
*
* Licensed under the Open Software License version 3.0
*
* This source file is subject to the Open Software License (OSL 3.0) that is
* bundled with this package in the files license.txt / license.rst. It is
* also available through the world wide web at this URL:
* http://opensource.org/licenses/OSL-3.0
* If you did not receive a copy of the license and are unable to obtain it
* through the world wide web, please send an email to
* licensing@ellislab.com so we can send you a copy immediately.
*
* @package CodeIgniter
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
* @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
* @link http://codeigniter.com
* @since Version 1.0
* @filesource
*/
/*
*---------------------------------------------------------------
* APPLICATION ENVIRONMENT
*---------------------------------------------------------------
*
* You can load different configurations depending on your
* current environment. Setting the environment also influences
* things like logging and error reporting.
*
* This can be set to anything, but default usage is:
*
* development
* testing
* production
*
* NOTE: If you change these, also change the error_reporting() code below
*/
define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development');
/*
*---------------------------------------------------------------
* ERROR REPORTING
*---------------------------------------------------------------
*
* Different environments will require different levels of error reporting.
* By default development will show errors but testing and live will hide them.
*/
switch (ENVIRONMENT)
{
case 'development':
error_reporting(-1);
ini_set('display_errors', 1);
break;
case 'testing':
case 'production':
error_reporting(-1);
ini_set('display_errors', 0);
break;
default:
header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
echo 'The application environment is not set correctly.';
exit(1); // EXIT_ERROR
}
/*
*---------------------------------------------------------------
* SYSTEM FOLDER NAME
*---------------------------------------------------------------
*
* This variable must contain the name of your "system" folder.
* Include the path if the folder is not in the same directory
* as this file.
*/
$system_path = '../system';
/*
*---------------------------------------------------------------
* APPLICATION FOLDER NAME
*---------------------------------------------------------------
*
* If you want this front controller to use a different "application"
* folder than the default one you can set its name here. The folder
* can also be renamed or relocated anywhere on your server. If
* you do, use a full server path. For more info please see the user guide:
* http://codeigniter.com/user_guide/general/managing_apps.html
*
* NO TRAILING SLASH!
*/
$application_folder = '../application';
/*
*---------------------------------------------------------------
* VIEW FOLDER NAME
*---------------------------------------------------------------
*
* If you want to move the view folder out of the application
* folder set the path to the folder here. The folder can be renamed
* and relocated anywhere on your server. If blank, it will default
* to the standard location inside your application folder. If you
* do move this, use the full server path to this folder.
*
* NO TRAILING SLASH!
*/
$view_folder = '';
/*
* --------------------------------------------------------------------
* DEFAULT CONTROLLER
* --------------------------------------------------------------------
*
* Normally you will set your default controller in the routes.php file.
* You can, however, force a custom routing by hard-coding a
* specific controller class/function here. For most applications, you
* WILL NOT set your routing here, but it's an option for those
* special instances where you might want to override the standard
* routing in a specific front controller that shares a common CI installation.
*
* IMPORTANT: If you set the routing here, NO OTHER controller will be
* callable. In essence, this preference limits your application to ONE
* specific controller. Leave the function name blank if you need
* to call functions dynamically via the URI.
*
* Un-comment the $routing array below to use this feature
*/
// The directory name, relative to the "controllers" folder. Leave blank
// if your controller is not in a sub-folder within the "controllers" folder
// $routing['directory'] = '';
// The controller class file name. Example: mycontroller
// $routing['controller'] = '';
// The controller function you wish to be called.
// $routing['function'] = '';
/*
* -------------------------------------------------------------------
* CUSTOM CONFIG VALUES
* -------------------------------------------------------------------
*
* The $assign_to_config array below will be passed dynamically to the
* config class when initialized. This allows you to set custom config
* items or override any default config values found in the config.php file.
* This can be handy as it permits you to share one application between
* multiple front controller files, with each file containing different
* config values.
*
* Un-comment the $assign_to_config array below to use this feature
*/
// $assign_to_config['name_of_config_item'] = 'value of config item';
// --------------------------------------------------------------------
// END OF USER CONFIGURABLE SETTINGS. DO NOT EDIT BELOW THIS LINE
// --------------------------------------------------------------------
/*
* ---------------------------------------------------------------
* Resolve the system path for increased reliability
* ---------------------------------------------------------------
*/
// Set the current directory correctly for CLI requests
if (defined('STDIN'))
{
chdir(dirname(__FILE__));
}
if (($_temp = realpath($system_path)) !== FALSE)
{
$system_path = $_temp.'/';
}
else
{
// Ensure there's a trailing slash
$system_path = rtrim($system_path, '/').'/';
}
// Is the system path correct?
if ( ! is_dir($system_path))
{
header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
echo 'Your system folder path does not appear to be set correctly. Please open the following file and correct this: '.pathinfo(__FILE__, PATHINFO_BASENAME);
exit(3); // EXIT_CONFIG
}
/*
* -------------------------------------------------------------------
* Now that we know the path, set the main path constants
* -------------------------------------------------------------------
*/
// The name of THIS file
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
// Path to the system folder
define('BASEPATH', str_replace('\\', '/', $system_path));
// Path to the front controller (this file)
define('FCPATH', str_replace(SELF, '', __FILE__));
// Name of the "system folder"
define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/'));
// The path to the "application" folder
if (is_dir($application_folder))
{
if (($_temp = realpath($application_folder)) !== FALSE)
{
$application_folder = $_temp;
}
define('APPPATH', $application_folder.DIRECTORY_SEPARATOR);
}
else
{
if ( ! is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR))
{
header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
echo 'Your application folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF;
exit(3); // EXIT_CONFIG
}
define('APPPATH', BASEPATH.$application_folder.DIRECTORY_SEPARATOR);
}
// The path to the "views" folder
if ( ! is_dir($view_folder))
{
if ( ! empty($view_folder) && is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR))
{
$view_folder = APPPATH.$view_folder;
}
elseif ( ! is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR))
{
header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
echo 'Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF;
exit(3); // EXIT_CONFIG
}
else
{
$view_folder = APPPATH.'views';
}
}
if (($_temp = realpath($view_folder)) !== FALSE)
{
$view_folder = $_temp.DIRECTORY_SEPARATOR;
}
else
{
$view_folder = rtrim($view_folder, '/\\').DIRECTORY_SEPARATOR;
}
define('VIEWPATH', $view_folder);
/*
* --------------------------------------------------------------------
* LOAD THE BOOTSTRAP FILE
* --------------------------------------------------------------------
*
* And away we go...
*/
require_once '../vendor/autoload.php';
require_once BASEPATH.'core/CodeIgniter.php';
/* End of file index.php */
/* Location: ./index.php */