diff --git a/.travis.yml b/.travis.yml index 91bbbf5..cd44819 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,12 @@ language: php +sudo: false + php: - 5.4 - 5.5 - 5.6 + - 7.0 - hhvm install: diff --git a/application/config/config.php b/application/config/config.php index 1288876..43e4988 100755 --- a/application/config/config.php +++ b/application/config/config.php @@ -1,4 +1,4 @@ -load->library('calendar'); $this->load->model('task_model'); - + } /** @@ -40,17 +40,12 @@ class Calendar extends MY_Controller { } $_months = array( - 01 => 'January', 02 => 'February', - 03 => 'March', 04 => 'April', - 05 => 'May', 06 => 'June', - 07 => 'July', 08 => 'August', - 09 => 'September', 10 => 'October', - 11 => 'November', 12 => 'December', 1 => 'January', 2 => 'February', 3 => 'March', 4 => 'April', 5 => 'May', 6 => 'June', 7 => 'July', 8 => 'August', - 9 => 'September', + 9 => 'September', 10 => 'October', + 11 => 'November', 12 => 'December' ); $year = (isset($year)) ? $year : date('Y'); diff --git a/application/controllers/task.php b/application/controllers/task.php index 9e57f69..8027c1e 100755 --- a/application/controllers/task.php +++ b/application/controllers/task.php @@ -179,6 +179,7 @@ class Task extends MY_Controller { { $task_id = (int) $task_id; $data = $this->task_model->get_task_by_id($task_id); + $data['cat_list'] = $this->task_model->get_category_select($task_id); $data['pri_list'] = $this->task_model->get_priority_select($task_id); $data['stat_list'] = $this->task_model->get_status_select($task_id); diff --git a/application/libraries/Page.php b/application/libraries/Page.php index 8108f70..7a2b083 100755 --- a/application/libraries/Page.php +++ b/application/libraries/Page.php @@ -7,8 +7,8 @@ * build_header(), build_footer(), and _headers() methods. */ class Page { - - private static $meta, $head_js, $foot_js, $css, $title, + + private $meta, $head_js, $foot_js, $css, $title, $head_tags, $body_id; /** @@ -32,7 +32,7 @@ class Page { $this->body_id = ""; $this->CI =& get_instance(); } - + // -------------------------------------------------------------------------- /** @@ -48,7 +48,7 @@ class Page { { $this->CI->output->set_header("Cache-Control: must-revalidate, public"); $this->CI->output->set_header("Vary: Accept"); - + //Predefine charset and mime $charset = "UTF-8"; $mime = "text/html"; @@ -59,17 +59,17 @@ class Page { $this->CI->output->set_header("Content-Type: $mime;charset=$charset"); $this->CI->output->set_header("X-UA-Compatible: chrome=1"); $this->CI->output->set_output($doctype_string); - + return $this; } - + // -------------------------------------------------------------------------- /** * Set Meta * * Sets meta tags, with codeigniter native meta tag helper - * + * * @param array $meta * @return Page */ @@ -78,7 +78,7 @@ class Page { $this->meta .= T1.meta($meta).NL; return $this; } - + // -------------------------------------------------------------------------- /** @@ -94,7 +94,7 @@ class Page { $this->head_js .= $this->script_tag($file, FALSE); return $this; } - + // -------------------------------------------------------------------------- /** @@ -128,7 +128,7 @@ class Page { $this->foot_js .= $this->script_tag($file, FALSE); return $this; } - + // -------------------------------------------------------------------------- /** @@ -140,12 +140,12 @@ class Page { { $title = ($title == "") ? $this->CI->config->item('default_title') : $title; - + $this->title = $title; - + return $this; } - + // -------------------------------------------------------------------------- /** @@ -160,7 +160,7 @@ class Page { } // -------------------------------------------------------------------------- - + /** * Sets custom page header * @return $this @@ -199,10 +199,10 @@ class Page { //Output Header $this->CI->load->view('header', $data); - + return $this; } - + // -------------------------------------------------------------------------- /** @@ -233,9 +233,9 @@ class Page { $this->CI->load->view('footer', $data); } - + // -------------------------------------------------------------------------- - + /** * Script Tag * @@ -261,21 +261,21 @@ class Page { } // -------------------------------------------------------------------------- - + /** * Num Queries - * + * * Returns number of queries run on a page - * + * * @return int */ public function num_queries() { return (isset($this->CI->db)) ? count($this->CI->db->queries) : 0; } - + // -------------------------------------------------------------------------- - + /** * Set Message * diff --git a/application/logs/index.html b/application/logs/index.html deleted file mode 100755 index c942a79..0000000 --- a/application/logs/index.html +++ /dev/null @@ -1,10 +0,0 @@ - -
-Directory access is forbidden.
- - - \ No newline at end of file diff --git a/application/models/friend_model.php b/application/models/friend_model.php index 44c1ecf..c6c1056 100755 --- a/application/models/friend_model.php +++ b/application/models/friend_model.php @@ -5,16 +5,6 @@ */ class Friend_model extends CI_Model { - /** - * Constructor - */ - public function __construct() - { - parent::__construct(); - } - - // -------------------------------------------------------------------------- - /** * Get Friends * diff --git a/application/models/task_model.php b/application/models/task_model.php index 7878c50..d34efb5 100755 --- a/application/models/task_model.php +++ b/application/models/task_model.php @@ -186,14 +186,9 @@ class Task_model extends CI_Model { ->where('user_id', $uid) ->delete('item_comments'); - if($this->db->affected_rows() > 0) - { - return $this->db->affected_rows(); - } - else - { - return -1; - } + return ($this->db->affected_rows() > 0) + ? $this->db->affected_rows() + : -1; } // -------------------------------------------------------------------------- @@ -317,7 +312,7 @@ class Task_model extends CI_Model { $result_array[$i] = $row; // Overdue is set as false to cut down on visual noise. - // Since every task in the list is overdue, using the + // Since every task in the list is overdue, using the // visual style is redundant $result_array[$i]['overdue'] = FALSE; $i++; @@ -616,12 +611,12 @@ class Task_model extends CI_Model { */ public function update_task() { - $title = $this->title; - $desc = str_replace('