From b4e470704ab8b605c2bf204fb3233b5cf27b71ec Mon Sep 17 00:00:00 2001 From: Timothy J Warren Date: Thu, 29 Dec 2016 13:56:30 -0500 Subject: [PATCH] Minor tweaks, bypass minifier --- application/config/autoload.php | 4 +- application/config/min_groupsConfig.php | 16 +- application/hooks/pre-controller.php | 2 +- application/libraries/MY_Form_validation.php | 66 +-- application/models/task_model.php | 9 +- .../third_party/CIUnit/core/CIU_Loader.php | 18 +- .../third_party/CIUnit/core/CIU_Output.php | 8 +- .../third_party/CIUnit/core/CodeIgniter.php | 38 +- .../third_party/CIUnit/libraries/CIUnit.php | 26 +- .../CIUnit/libraries/CIUnitTestCase.php | 46 +- application/views/footer.php | 21 +- application/views/header.php | 10 +- application/views/task/view.php | 4 +- web/index.php | 554 +++++++++--------- 14 files changed, 411 insertions(+), 411 deletions(-) mode change 100755 => 100644 application/views/footer.php mode change 100755 => 100644 application/views/header.php mode change 100755 => 100644 application/views/task/view.php mode change 100755 => 100644 web/index.php diff --git a/application/config/autoload.php b/application/config/autoload.php index 467aaa6..e794897 100755 --- a/application/config/autoload.php +++ b/application/config/autoload.php @@ -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'); | */ diff --git a/application/config/min_groupsConfig.php b/application/config/min_groupsConfig.php index 5d0b300..b76f7be 100755 --- a/application/config/min_groupsConfig.php +++ b/application/config/min_groupsConfig.php @@ -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', ), -); \ No newline at end of file +); diff --git a/application/hooks/pre-controller.php b/application/hooks/pre-controller.php index 79ee26e..3b4cdf9 100755 --- a/application/hooks/pre-controller.php +++ b/application/hooks/pre-controller.php @@ -9,7 +9,7 @@ */ function check_session() { - $CI =& get_instance(); + $CI = get_instance(); if($CI->session->userdata('uid') == FALSE) { diff --git a/application/libraries/MY_Form_validation.php b/application/libraries/MY_Form_validation.php index 74a8c5b..cf561a1 100644 --- a/application/libraries/MY_Form_validation.php +++ b/application/libraries/MY_Form_validation.php @@ -1,34 +1,34 @@ -_error_array); - } - - /** - * Clears out object data - * - * @return void - */ - public function reset() - { - foreach([ - '_field_data', - '_error_array', - '_error_messages' - ] as $var) { - $this->$var = array(); - } - } -} +_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 \ No newline at end of file diff --git a/application/models/task_model.php b/application/models/task_model.php index a7d2faf..97d2c71 100755 --- a/application/models/task_model.php +++ b/application/models/task_model.php @@ -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('
', '
', $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; diff --git a/application/third_party/CIUnit/core/CIU_Loader.php b/application/third_party/CIUnit/core/CIU_Loader.php index 453a9d6..68d8330 100755 --- a/application/third_party/CIUnit/core/CIU_Loader.php +++ b/application/third_party/CIUnit/core/CIU_Loader.php @@ -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? diff --git a/application/third_party/CIUnit/core/CIU_Output.php b/application/third_party/CIUnit/core/CIU_Output.php index 70d5ee6..822cbec 100755 --- a/application/third_party/CIUnit/core/CIU_Output.php +++ b/application/third_party/CIUnit/core/CIU_Output.php @@ -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(); } // -------------------------------------------------------------------- diff --git a/application/third_party/CIUnit/core/CodeIgniter.php b/application/third_party/CIUnit/core/CodeIgniter.php index e41ddee..3d6c964 100755 --- a/application/third_party/CIUnit/core/CodeIgniter.php +++ b/application/third_party/CIUnit/core/CodeIgniter.php @@ -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'); /* * ------------------------------------------------------ diff --git a/application/third_party/CIUnit/libraries/CIUnit.php b/application/third_party/CIUnit/libraries/CIUnit.php index 4e94bcd..a25c36a 100755 --- a/application/third_party/CIUnit/libraries/CIUnit.php +++ b/application/third_party/CIUnit/libraries/CIUnit.php @@ -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; } diff --git a/application/third_party/CIUnit/libraries/CIUnitTestCase.php b/application/third_party/CIUnit/libraries/CIUnitTestCase.php index ffad1c6..de73d9b 100755 --- a/application/third_party/CIUnit/libraries/CIUnitTestCase.php +++ b/application/third_party/CIUnit/libraries/CIUnitTestCase.php @@ -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'); } diff --git a/application/views/footer.php b/application/views/footer.php old mode 100755 new mode 100644 index 94c461d..39aa71c --- a/application/views/footer.php +++ b/application/views/footer.php @@ -4,25 +4,12 @@ - - - - session->userdata('uid') == 1){$this->output->enable_profiler(TRUE);} ?> - + + + +*/ ?> \ No newline at end of file diff --git a/application/views/header.php b/application/views/header.php old mode 100755 new mode 100644 index ef0f3c4..12d1816 --- a/application/views/header.php +++ b/application/views/header.php @@ -1,9 +1,15 @@ +<?= $title ?> - - <?= $title ?> + + + + + + */ ?> + > diff --git a/application/views/task/view.php b/application/views/task/view.php old mode 100755 new mode 100644 index f2264a9..ffa3880 --- a/application/views/task/view.php +++ b/application/views/task/view.php @@ -10,9 +10,9 @@ PERM_CHECKLIST_ACCESS): ?>

- + Delete Task - + Edit Task

diff --git a/web/index.php b/web/index.php old mode 100755 new mode 100644 index da86bd1..37cfe1f --- a/web/index.php +++ b/web/index.php @@ -1,278 +1,278 @@ -