added new stdClass() in various places

This commit is contained in:
hyung-hwan 2015-12-28 13:48:40 +00:00
parent 37b86d5049
commit 7d6110b117
6 changed files with 22 additions and 8 deletions

View File

@ -56,6 +56,7 @@ class Issue extends Controller
if ($filter == '')
{
$search = new stdClass();
$search->type = '';
$search->status = '';
$search->priority = '';
@ -78,7 +79,6 @@ class Issue extends Controller
$this->load->library ('pagination');
if ($filter == '' && $offset == '')
{
$offset = 0;
@ -181,6 +181,7 @@ class Issue extends Controller
$change_post = $this->input->post('issue_change');
if ($change_post == 'change')
{
$change = new stdClass();
$change->type = $this->input->post('issue_change_type');
$change->status = $this->input->post('issue_change_status');
$change->owner = $this->input->post('issue_change_owner');
@ -317,6 +318,7 @@ class Issue extends Controller
if ($this->input->post('issue'))
{
$issue = new stdClass();
$issue->projectid = $this->input->post('issue_projectid');
$issue->id = $this->input->post('issue_id');
$issue->summary = $this->input->post('issue_summary');
@ -374,6 +376,7 @@ class Issue extends Controller
}
else
{
$issue = new stdClass();
$issue->projectid = $projectid;
$issue->id = $id;
$issue->summary = '';
@ -456,6 +459,7 @@ class Issue extends Controller
if($this->input->post('issue'))
{
$issue = new stdClass();
$issue->projectid = $this->input->post('issue_projectid');
$issue->id = $this->input->post('issue_id');
$data['issue_confirm'] = $this->input->post('issue_confirm');

View File

@ -197,6 +197,7 @@ class Project extends Controller
// recompose the project information from POST data.
unset ($project);
$project = new stdClass();
$project->id = $tmpid;
$project->name = $this->input->post('project_name');
$project->summary = $this->input->post('project_summary');
@ -259,6 +260,7 @@ class Project extends Controller
if ($login['id'] == '')
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$project = new stdClass();
$project->id = $projectid;
$project->name = '';
$project->summary = '';
@ -486,6 +488,7 @@ class Project extends Controller
if ($filter == '')
{
$search = new stdClass();
$search->id = '';
$search->name = '';
$search->summary = '';

View File

@ -77,6 +77,8 @@ class User extends Controller
}
$this->load->model ('ProjectModel', 'projects');
$user = new stdClass();
$user->id = $login['id'];
$myprojs = $this->projects->getMyProjects ($login['id']);
@ -199,6 +201,7 @@ class User extends Controller
}
}
//
// make sure that these field also exist in the database
// also change the sanity check in LoginModel/getUser()
@ -232,6 +235,7 @@ class User extends Controller
if ($settings === FALSE || $settings === NULL)
{
if ($settings === FALSE) $data['message'] = 'DATABASE ERROR';
$settings = new stdClass();
$settings->code_hide_line_num = ' ';
$settings->code_hide_metadata = ' ';
$settings->icon_name = '';

View File

@ -42,7 +42,8 @@ class LoginModel extends Model
if ($settings !== NULL)
{
$settings = @unserialize ($settings);
if ($settings === FALSE) $settings = NULL;
if ($settings === FALSE || $settings === NULL)
$settings = new stdObject();
// Sanity check on the session/cookie data
// See Controller/User->settings() for required fields.

View File

@ -35,11 +35,12 @@ $(function () {
<!---------------------------------------------------------------------------->
<?php
$user = new stdClass();
$user->id = $login['id'];
$this->load->view (
'projectbar',
array (
'projectbar',
array (
'banner' => NULL,
'page' => array (
@ -48,8 +49,8 @@ $this->load->view (
'user' => $user,
),
'ctxmenuitems' => array ()
)
'ctxmenuitems' => array ()
)
);
?>

View File

@ -27,6 +27,7 @@
<!---------------------------------------------------------------------------->
<?php
$user = new stdClass();
$user->id = $login['id'];
$this->load->view (