diff --git a/codepot/src/codepot/controllers/project.php b/codepot/src/codepot/controllers/project.php index dde2efcf..d4fd34da 100644 --- a/codepot/src/codepot/controllers/project.php +++ b/codepot/src/codepot/controllers/project.php @@ -207,7 +207,9 @@ class Project extends CI_Controller $this->form_validation->set_rules ( 'project_description', 'description', 'required'); $this->form_validation->set_rules ( - 'project_commitable', 'commitable', 'alpha'); + 'project_webhooks', 'description', 'required'); + //$this->form_validation->set_rules ( + // 'project_commitable', 'commitable', 'alpha'); $this->form_validation->set_rules ( 'project_public', 'public', 'alpha'); $this->form_validation->set_rules ( @@ -230,6 +232,7 @@ class Project extends CI_Controller $project->name = $this->input->post('project_name'); $project->summary = $this->input->post('project_summary'); $project->description = $this->input->post('project_description'); + $project->webhooks = $this->input->post('project_webhooks'); $project->commitable = $this->input->post('project_commitable'); $project->public = $this->input->post('project_public'); $project->members = array_unique (preg_split ('/[[:space:],]+/', $this->input->post('project_members'))); @@ -291,6 +294,7 @@ class Project extends CI_Controller $project->name = ''; $project->summary = ''; $project->description = ''; + $project->wehhooks = ''; $project->commitable = 'Y'; $project->public = 'Y'; $project->members = array ($login['id']); @@ -571,7 +575,7 @@ class Project extends CI_Controller else { // get project entries staring from the offset. - $projects = $this->projects->getEntries ($login['id'], $offset, CODEPOT_MAX_PROJECTS_PER_PAGE, $search); + $projects = $this->projects->getEntries($login['id'], $offset, CODEPOT_MAX_PROJECTS_PER_PAGE, $search); if ($projects === FALSE) { $status = 'dberr'; @@ -581,7 +585,11 @@ class Project extends CI_Controller { $status = 'ok'; // exclude the description column - foreach ($projects as $p) unset ($p->description); + foreach ($projects as $p) + { + unset ($p->description); + unset ($p->webhooks); + } } } } diff --git a/codepot/src/codepot/models/projectmodel.php b/codepot/src/codepot/models/projectmodel.php index 61a50490..216be41c 100644 --- a/codepot/src/codepot/models/projectmodel.php +++ b/codepot/src/codepot/models/projectmodel.php @@ -146,6 +146,7 @@ class ProjectModel extends CI_Model $this->db->set ('name', $project->name); $this->db->set ('summary', $project->summary); $this->db->set ('description', $project->description); + $this->db->set ('webhooks', $project->webhooks); $this->db->set ('commitable', $project->commitable); $this->db->set ('public', $project->public); $this->db->set ('createdon', codepot_nowtodbdate()); @@ -217,6 +218,7 @@ class ProjectModel extends CI_Model $this->db->set ('name', $project->name); $this->db->set ('summary', $project->summary); $this->db->set ('description', $project->description); + $this->db->set ('webhooks', $project->webhooks); $this->db->set ('commitable', $project->commitable); $this->db->set ('public', $project->public); $this->db->set ('updatedon', codepot_nowtodbdate()); diff --git a/codepot/src/codepot/views/project_edit.php b/codepot/src/codepot/views/project_edit.php index a1c75712..8ce30a35 100644 --- a/codepot/src/codepot/views/project_edit.php +++ b/codepot/src/codepot/views/project_edit.php @@ -134,6 +134,23 @@ $this->load->view ( ?>
+j +
+ + +
+
+ 'project_webhooks', + 'value' => set_value ('project_webhooks', $project->webhooks), + 'id' => 'project_edit_webhooks', + 'rows' => 20, + 'cols' => 80 + ); + print form_textarea($xdata); + ?> +
lang->line('Commitable').': ', 'project_commitable')?>