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'] = [ $autoload['libraries'] = [
'validation_callbacks',
'database', 'database',
'page', 'page',
'todo', 'todo',
'session', 'session',
'form_validation', 'form_validation',
'validation_callbacks'
]; ];

View File

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

View File

@ -605,12 +605,19 @@ class Task_model extends CI_Model {
*/ */
public function update_task() 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');; $title = $this->input->post('title');;
$desc = str_replace('<br>', '<br />', $this->input->post('desc')); $desc = str_replace('<br>', '<br />', $this->input->post('desc'));
$category = $this->input->post('category'); $category = $this->input->post('category');
$priority = $this->input->post('priority'); $priority = $this->input->post('priority');
$status = $this->input->post('status'); $status = $this->input->post('status');
$due = $this->input->post('due'); $due = $unix_due;
$uid = $this->user_id; $uid = $this->user_id;
$task_id = $this->task_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 // return a new instance of the object
if ( ! is_null($object_name)) if ( ! is_null($object_name))
{ {
$CI =& get_instance(); $CI = get_instance();
if ( ! isset($CI->$object_name)) if ( ! isset($CI->$object_name))
{ {
return $this->_ci_init_class($class, config_item('ciu_subclass_prefix'), $params, $object_name); return $this->_ci_init_class($class, config_item('ciu_subclass_prefix'), $params, $object_name);
@ -113,7 +113,7 @@ class CIU_Loader extends CI_Loader {
// return a new instance of the object // return a new instance of the object
if ( ! is_null($object_name)) if ( ! is_null($object_name))
{ {
$CI =& get_instance(); $CI = get_instance();
if ( ! isset($CI->$object_name)) if ( ! isset($CI->$object_name))
{ {
return $this->_ci_init_class($class, config_item('subclass_prefix'), $params, $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 // return a new instance of the object
if ( ! is_null($object_name)) if ( ! is_null($object_name))
{ {
$CI =& get_instance(); $CI = get_instance();
if ( ! isset($CI->$object_name)) if ( ! isset($CI->$object_name))
{ {
return $this->_ci_init_class($class, '', $params, $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 // Save the class name and object name
$this->_ci_classes[$class] = $classvar; $this->_ci_classes[$class] = $classvar;
// Instantiate the class // Instantiate the class
$CI =& get_instance(); $CI = get_instance();
if ($config !== NULL) if ($config !== NULL)
{ {
if ( ! defined('CIUnit_Version')) 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)); $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); $CI->output->add_output($output);
} }

View File

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

View File

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

View File

@ -71,7 +71,7 @@ class CIUnit {
} }
// the current controller must be archieved before littered // the current controller must be archieved before littered
$loader =& load_class('Loader', 'core'); $loader = load_class('Loader', 'core');
// reset all loaded data // reset all loaded data
$loader->reset(); $loader->reset();

View File

@ -61,7 +61,7 @@ class CIUnit_TestCase extends PHPUnit_Framework_TestCase
public function __construct($name = NULL, array $data = array(), $dataName = '') public function __construct($name = NULL, array $data = array(), $dataName = '')
{ {
parent::__construct($name, $data, $dataName); parent::__construct($name, $data, $dataName);
$this->CI =& get_instance(); $this->CI = get_instance();
log_message('debug', get_class($this).' CIUnit_TestCase initialized'); log_message('debug', get_class($this).' CIUnit_TestCase initialized');
} }

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

@ -4,25 +4,12 @@
<footer class="footer"> <footer class="footer">
Generated in <?= $this->benchmark->elapsed_time();?> seconds, <?= $q_num ?> quer<?= ($q_num == 1) ? "y": "ies" ?> Generated in <?= $this->benchmark->elapsed_time();?> seconds, <?= $q_num ?> quer<?= ($q_num == 1) ? "y": "ies" ?>
</footer> </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);} ?> <?php if($this->session->userdata('uid') == 1){$this->output->enable_profiler(TRUE);} ?>
<script src="/js/jquery.js"></script> <script src="/js/jquery.js"></script>
<script src="/js/jquery-ui.min.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> </body>
</html> </html>

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

@ -1,9 +1,15 @@
<head> <head>
<?= $meta ?> <?= $meta ?>
<title><?= $title ?></title>
<link rel="icon" href="//todo.timshomepage.net/images/favicon.ico" type="image/x-icon" /> <link rel="icon" href="//todo.timshomepage.net/images/favicon.ico" type="image/x-icon" />
<?= $css ?> <link rel="stylesheet" href="/fonts/Puritan/stylesheet.css" />
<title><?= $title ?></title> <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_js ?>
</head> </head>
<body <?= (!empty($body_id)) ? " id=\"" . $body_id . "\"" : ""; ?>> <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): ?> <?php if($user_perms > PERM_CHECKLIST_ACCESS): ?>
<p id="editTask"> <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> <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> <a id="editTaskIcon" href="<?= site_url('task/edit').'/'.$task ?>">Edit Task</a>
</p> </p>

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