changed how to carry around project members
This commit is contained in:
parent
8cefbb0f69
commit
c31129a21a
@ -10,10 +10,12 @@ install-data-hook:
|
||||
$(INSTALL) -d "$(DESTDIR)@DEPOTDIR@/svnrepo"
|
||||
$(INSTALL) -d "$(DESTDIR)@DEPOTDIR@/files"
|
||||
$(INSTALL) -d "$(DESTDIR)@DEPOTDIR@/attachments"
|
||||
$(INSTALL) -d "$(DESTDIR)@DEPOTDIR@/usericons"
|
||||
$(INSTALL) -d "$(DESTDIR)@LOGDIR@"
|
||||
$(INSTALL) -d "$(DESTDIR)@CACHEDIR@"
|
||||
|
||||
uninstall-hook:
|
||||
$(RMDIR) "$(DESTDIR)@DEPOTDIR@/usericons"
|
||||
$(RMDIR) "$(DESTDIR)@DEPOTDIR@/attachments"
|
||||
$(RMDIR) "$(DESTDIR)@DEPOTDIR@/files"
|
||||
$(RMDIR) "$(DESTDIR)@DEPOTDIR@/svnrepo"
|
||||
|
@ -58,11 +58,13 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%attr(-,apache,apache) /var/lib/codepot/svnrepo
|
||||
%attr(-,apache,apache) /var/lib/codepot/files
|
||||
%attr(-,apache,apache) /var/lib/codepot/attachments
|
||||
%attr(-,apache,apache) /var/lib/codepot/usericons
|
||||
%attr(-,apache,apache) /var/log/codepot
|
||||
%attr(-,apache,apache) /var/cache/codepot
|
||||
%dir /var/lib/codepot/svnrepo
|
||||
%dir /var/lib/codepot/files
|
||||
%dir /var/lib/codepot/attachments
|
||||
%dir /var/lib/codepot/usericons
|
||||
%dir /var/log/codepot
|
||||
%dir /var/cache/codepot
|
||||
|
||||
|
@ -152,7 +152,8 @@ CREATE TABLE log (
|
||||
CREATE TABLE user_settings (
|
||||
userid VARCHAR(32) PRIMARY KEY,
|
||||
code_hide_line_num CHAR(1) NOT NULL,
|
||||
code_hide_details CHAR(1) NOT NULL
|
||||
code_hide_details CHAR(1) NOT NULL,
|
||||
icon_name VARCHAR(255) UNIQUE NULL
|
||||
) charset=utf8 engine=InnoDB;
|
||||
|
||||
CREATE TABLE user (
|
||||
|
@ -384,7 +384,7 @@ class File extends Controller
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['message'] = "Your input is not complete, Bro";
|
||||
$data['message'] = $this->lang->line('MSG_FORM_INPUT_INCOMPLETE');
|
||||
$data['file'] = $file;
|
||||
$this->load->view ($this->VIEW_EDIT, $data);
|
||||
}
|
||||
@ -511,7 +511,7 @@ class File extends Controller
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['message'] = "Your input is not complete, Bro.";
|
||||
$data['message'] = $this->lang->line('MSG_FORM_INPUT_INCOMPLETE');
|
||||
$data['file'] = $file;
|
||||
$this->load->view ($this->VIEW_DELETE, $data);
|
||||
}
|
||||
|
@ -345,7 +345,7 @@ class Issue extends Controller
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['message'] = "Your input is not complete, Bro";
|
||||
$data['message'] = $this->lang->line('MSG_FORM_INPUT_INCOMPLETE');
|
||||
$data['issue'] = $issue;
|
||||
$this->load->view ($this->VIEW_EDIT, $data);
|
||||
}
|
||||
@ -381,8 +381,7 @@ class Issue extends Controller
|
||||
$issue->type = $this->issuehelper->TYPE_DEFECT;
|
||||
$issue->status = $this->issuehelper->STATUS_NEW;
|
||||
$issue->priority = $this->issuehelper->PRIORITY_OTHER;
|
||||
$members = explode (',', $project->members);
|
||||
$issue->owner = (count($members) > 0)? $members[0]: '';
|
||||
$issue->owner = (count($project->members) > 0)? $project->members[0]: '';
|
||||
|
||||
$data['issue'] = $issue;
|
||||
$this->load->view ($this->VIEW_EDIT, $data);
|
||||
@ -474,7 +473,7 @@ class Issue extends Controller
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['message'] = "Your input is not complete, Bro.";
|
||||
$data['message'] = $this->lang->line('MSG_FORM_INPUT_INCOMPLETE');
|
||||
$data['issue'] = $issue;
|
||||
$this->load->view ($this->VIEW_DELETE, $data);
|
||||
}
|
||||
|
@ -199,7 +199,7 @@ class Project extends Controller
|
||||
$project->description = $this->input->post('project_description');
|
||||
$project->commitable = $this->input->post('project_commitable');
|
||||
$project->public = $this->input->post('project_public');
|
||||
$project->members = $this->input->post('project_members');
|
||||
$project->members = explode (',', $this->input->post('project_members'));
|
||||
|
||||
// validate the form
|
||||
if ($this->form_validation->run())
|
||||
@ -224,7 +224,7 @@ class Project extends Controller
|
||||
else
|
||||
{
|
||||
// if not, reload the edit view with an error message
|
||||
$data['message'] = 'Your input is not complete, Bro.';
|
||||
$data['message'] = $this->lang->line('MSG_FORM_INPUT_INCOMPLETE');
|
||||
$data['project'] = $project;
|
||||
$this->load->view ($this->VIEW_EDIT, $data);
|
||||
}
|
||||
@ -258,7 +258,7 @@ class Project extends Controller
|
||||
$project->description = '';
|
||||
$project->commitable = 'Y';
|
||||
$project->public = 'Y';
|
||||
$project->members = $login['id'];
|
||||
$project->members = array ($login['id']);
|
||||
|
||||
$this->_edit_project ($project, 'create', $login);
|
||||
}
|
||||
@ -348,7 +348,7 @@ class Project extends Controller
|
||||
{
|
||||
// the form validation failed.
|
||||
// reload the form with an error message.
|
||||
$data['message'] = "Your input is not complete, Bro.";
|
||||
$data['message'] = $this->lang->line('MSG_FORM_INPUT_INCOMPLETE');
|
||||
$data['project'] = $project;
|
||||
$this->load->view ($this->VIEW_DELETE, $data);
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ class Site extends Controller
|
||||
else
|
||||
{
|
||||
// if not, reload the edit view with an error message
|
||||
$data['message'] = 'Your input is not complete, Bro.';
|
||||
$data['message'] = $this->lang->line('MSG_FORM_INPUT_INCOMPLETE');
|
||||
$data['site'] = $site;
|
||||
$this->load->view ($this->VIEW_EDIT, $data);
|
||||
}
|
||||
@ -341,7 +341,7 @@ class Site extends Controller
|
||||
{
|
||||
// the form validation failed.
|
||||
// reload the form with an error message.
|
||||
$data['message'] = "Your input is not complete, Bro.";
|
||||
$data['message'] = $this->lang->line('MSG_FORM_INPUT_INCOMPLETE');
|
||||
$data['site'] = $site;
|
||||
$this->load->view ($this->VIEW_DELETE, $data);
|
||||
}
|
||||
|
@ -454,7 +454,7 @@ class Wiki extends Controller
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['message'] = "Your input is not complete, Bro";
|
||||
$data['message'] = $this->lang->line('MSG_FORM_INPUT_INCOMPLETE');
|
||||
$data['wiki'] = $wiki;
|
||||
$this->load->view ($this->VIEW_EDIT, $data);
|
||||
}
|
||||
@ -586,7 +586,7 @@ class Wiki extends Controller
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['message'] = "Your input is not complete, Bro.";
|
||||
$data['message'] = $this->lang->line('MSG_FORM_INPUT_INCOMPLETE');
|
||||
$data['wiki'] = $wiki;
|
||||
$this->load->view ($this->VIEW_DELETE, $data);
|
||||
}
|
||||
|
@ -104,4 +104,5 @@ $lang['MSG_NO_SUCH_PROJECT'] = 'No such project';
|
||||
$lang['MSG_SURE_TO_DELETE_THIS'] = "I'm sure to delete this";
|
||||
|
||||
$lang['MSG_PROJECT_MEMBERSHIP_REQUIRED'] = 'You have to be a member of the %s project to perform this task';
|
||||
$lang['MSG_FORM_INPUT_INCOMPLETE'] = 'Your input is incomplete';
|
||||
?>
|
||||
|
@ -92,10 +92,9 @@ $lang['MSG_LOG_UPDATE_BY'] = 'Diupdate oleh %s';
|
||||
|
||||
$lang['MSG_NO_DIFF'] = 'Tidak ada bedanya';
|
||||
$lang['MSG_NO_CODE_AVAIL'] = 'Tidak ada kode sumber tersedia';
|
||||
$lang['MSG_NO_FILES_AVAIL'] = 'Tidak ada file tersedia';
|
||||
$lang['MSG_NO_ISSUES_AVAIL'] = 'Tidak ada issue';
|
||||
$lang['MSG_NO_SUCH_FILE'] = 'No such file';
|
||||
$lang['MSG_NO_SUCH_ISSUE'] = 'No such issue';
|
||||
$lang['MSG_NO_SUCH_PROJECT'] = 'No such project';
|
||||
$lang['MSG_SURE_TO_DELETE_THIS'] = "Saya yakin untuk menghapus";
|
||||
|
||||
$lang['MSG_PROJECT_MEMBERSHIP_REQUIRED'] = 'You have to be a member of the %s project to perform this task';
|
||||
$lang['MSG_FORM_INPUT_INCOMPLETE'] = 'Your input is incomplete';
|
||||
?>
|
||||
|
@ -104,5 +104,6 @@ $lang['MSG_NO_SUCH_PROJECT'] = '프로젝트가 없습니다';
|
||||
$lang['MSG_SURE_TO_DELETE_THIS'] = '반드시 이것을 삭제하고 싶어요';
|
||||
|
||||
$lang['MSG_PROJECT_MEMBERSHIP_REQUIRED'] = '이 작업을 수행하려면 %s 프로젝트의 멤버가 되어야 합니다';
|
||||
$lang['MSG_FORM_INPUT_INCOMPLETE'] = '입력이 완전하지 않습니다';
|
||||
|
||||
?>
|
||||
|
@ -34,12 +34,16 @@ class ProjectModel extends Model
|
||||
$this->db->order_by ('priority', 'asc');
|
||||
$query2 = $this->db->get ('project_membership');
|
||||
|
||||
/*
|
||||
$members = '';
|
||||
foreach ($query2->result() as $a)
|
||||
{
|
||||
if ($members !== '') $members .= ',';
|
||||
$members .= $a->userid;
|
||||
}
|
||||
*/
|
||||
$members = array ();
|
||||
foreach ($query2->result() as $a) array_push ($members, $a->userid);
|
||||
$result[0]->members = $members;
|
||||
|
||||
$this->db->trans_complete ();
|
||||
@ -110,7 +114,8 @@ class ProjectModel extends Model
|
||||
$this->db->where ('projectid', $project->id);
|
||||
$this->db->delete ('project_membership');
|
||||
|
||||
$members = preg_split ('/[[:space:],]+/', $project->members);
|
||||
//$members = preg_split ('/[[:space:],]+/', $project->members);
|
||||
$members = $project->members;
|
||||
$member_count = count ($members);
|
||||
$members = array_unique ($members);
|
||||
$priority = 0;
|
||||
@ -219,7 +224,8 @@ class ProjectModel extends Model
|
||||
$this->db->where ('projectid', $project->id);
|
||||
$this->db->delete ('project_membership');
|
||||
|
||||
$members = preg_split ('/[[:space:],]+/', $project->members);
|
||||
//$members = preg_split ('/[[:space:],]+/', $project->members);
|
||||
$members = $project->members;
|
||||
$member_count = count ($members);
|
||||
$members = array_unique ($members);
|
||||
$priority = 0;
|
||||
|
@ -397,10 +397,9 @@ $this->load->view (
|
||||
?>
|
||||
|
||||
<?php
|
||||
$tmp = explode (',', $project->members);
|
||||
$owner_array = array ();
|
||||
$found = FALSE;
|
||||
foreach ($tmp as $t)
|
||||
foreach ($project->members as $t)
|
||||
{
|
||||
if ($issue->owner == $t) $found = TRUE;
|
||||
$owner_array[$t] = $t;
|
||||
|
@ -137,9 +137,18 @@ $this->load->view (
|
||||
</div>
|
||||
<div class='form_input_field'>
|
||||
<?php
|
||||
$members = $project->members;
|
||||
$member_count = count($members);
|
||||
$member_string = '';
|
||||
for ($i = 0; $i < $member_count; $i++)
|
||||
{
|
||||
if ($i >= 1) $member_string .= ',';
|
||||
$member_string .= $members[$i];
|
||||
}
|
||||
|
||||
$xdata = array (
|
||||
'name' => 'project_members',
|
||||
'value' => set_value ('project_members', $project->members),
|
||||
'value' => set_value ('project_members', $member_string),
|
||||
'id' => 'project_edit_mainarea_members',
|
||||
'rows' => 2,
|
||||
'cols' => 80
|
||||
|
@ -73,7 +73,7 @@ $this->load->view (
|
||||
<div class="boxtitle"><?=$this->lang->line('Members')?></div>
|
||||
<ul>
|
||||
<?php
|
||||
$members = preg_split ('/[[:space:],]+/', $project->members);
|
||||
$members = $project->members;
|
||||
$member_count = count($members);
|
||||
$members = array_unique ($members);
|
||||
$priority = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user