Doc block changes

This commit is contained in:
Timothy Warren 2014-08-18 11:22:13 -04:00
parent 1ecb26ec1f
commit 9446816131
3 changed files with 59 additions and 21 deletions

View File

@ -6,12 +6,44 @@
class MY_Controller extends CI_Controller { class MY_Controller extends CI_Controller {
/** /**
* Constructor * @var MY_Session
*/ */
public function __construct() public $session;
{
parent::__construct(); /**
} * @var CI_DB_query_builder
*/
public $db;
/**
* @var CI_Input
*/
public $input;
/**
* @var CI_Uri
*/
public $uri;
/**
* @var MY_Form_validation
*/
public $form_validation;
/**
* @var Validation_Callbacks
*/
public $validation_callbacks;
/**
* @var CI_Output
*/
public $output;
/**
* @var Page
*/
public $page;
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------

View File

@ -7,7 +7,12 @@
*/ */
class Todo { class Todo {
private $user, $pass, $CI, $uid; //For user registration private $user, $pass, $uid; //For user registration
/**
* @var MY_Controller
*/
protected $CI;
/** /**
* Constructor * Constructor

View File

@ -6,7 +6,7 @@
*/ */
class Task_model extends CI_Model { class Task_model extends CI_Model {
private $title, $description, $category, $priority, $due, $created, private $title, $description, $category, $priority, $due,
$status, $user_id, $task_id, $reminder, $reminder_time, $status, $user_id, $task_id, $reminder, $reminder_time,
$groups, $group_perms, $friends, $friend_perms, $share_type; $groups, $group_perms, $friends, $friend_perms, $share_type;
@ -110,7 +110,7 @@ class Task_model extends CI_Model {
* Get Checklist * Get Checklist
* *
* Returns Checklist for current task * Returns Checklist for current task
* @param int task_id * @param int $task_id
* @return array * @return array
*/ */
public function get_checklist($task_id) public function get_checklist($task_id)
@ -212,7 +212,7 @@ class Task_model extends CI_Model {
$res = $this->db->get(); $res = $this->db->get();
if($res->num_rows()==0) return; if($res->num_rows()==0) return NULL;
$result_array = array(); $result_array = array();
$i=1; $i=1;
@ -259,8 +259,7 @@ class Task_model extends CI_Model {
$res = $this->db->get(); $res = $this->db->get();
if($res->num_rows()==0) if($res->num_rows()==0) return NULL;
return;
$result_array = array(); $result_array = array();
$i=1; $i=1;
@ -309,7 +308,7 @@ class Task_model extends CI_Model {
$res = $this->db->get(); $res = $this->db->get();
if($res->num_rows()==0) if($res->num_rows()==0)
return; return NULL;
$result_array = array(); $result_array = array();
$i=1; $i=1;
@ -728,7 +727,7 @@ class Task_model extends CI_Model {
/** /**
* Get Task By Id * Get Task By Id
* *
* Retreives task from database by task id * Retrieves task from database by task id
* @param int $task_id * @param int $task_id
* @return array * @return array
*/ */
@ -923,7 +922,7 @@ class Task_model extends CI_Model {
* Get Category Select * Get Category Select
* *
* Returns category options for task status * Returns category options for task status
* @param int $id * @param int $task_id
* @return string * @return string
*/ */
public function get_category_select($task_id=0) public function get_category_select($task_id=0)
@ -1192,7 +1191,8 @@ class Task_model extends CI_Model {
* Updates a checklist * Updates a checklist
* *
* @param int $check_id * @param int $check_id
* @param bit $checked * @param int $checked
* @return int
*/ */
public function update_checklist($check_id, $checked) public function update_checklist($check_id, $checked)
{ {
@ -1393,7 +1393,7 @@ class Task_model extends CI_Model {
* Get Task Perms * Get Task Perms
* *
* Get the permissions of the current task * Get the permissions of the current task
* @param int $id * @param int $task_id
* @return array * @return array
*/ */
private function _get_task_perms($task_id) private function _get_task_perms($task_id)
@ -1513,12 +1513,12 @@ class Task_model extends CI_Model {
if($result_array['user_perms'] == PERM_NO_ACCESS) if($result_array['user_perms'] == PERM_NO_ACCESS)
{ {
show_error('You do not have permission to view this task.'); show_error('You do not have permission to view this task.');
return; return NULL;
} }
else if($result_array['user_perms'] < PERM_WRITE_ACCESS && $this->uri->segment('2') == "edit") else if($result_array['user_perms'] < PERM_WRITE_ACCESS && $this->uri->segment('2') == "edit")
{ {
show_error('You do not have permission to edit this task.'); show_error('You do not have permission to edit this task.');
return; return NULL;
} }
return $result_array; return $result_array;
@ -1563,3 +1563,4 @@ class Task_model extends CI_Model {
$this->todo->redirect_303(site_url('task/list')); $this->todo->redirect_303(site_url('task/list'));
} }
} }
// End of task_model.php