diff --git a/codepot/etc/codepot.mysql b/codepot/etc/codepot.mysql index befeda3e..d74846a0 100644 --- a/codepot/etc/codepot.mysql +++ b/codepot/etc/codepot.mysql @@ -187,6 +187,11 @@ CREATE TABLE file_list ( md5sum CHAR(32) NOT NULL, description VARCHAR(255) NOT NULL, + createdon DATETIME NOT NULL, + updatedon DATETIME NOT NULL, + createdby VARCHAR(32) NOT NULL, + updatedby VARCHAR(32) NOT NULL, + INDEX file_list_id (projectid, name), UNIQUE KEY file_list_fileid (projectid, filename), UNIQUE KEY (encname), diff --git a/codepot/etc/codepot.oracle b/codepot/etc/codepot.oracle index 9b4a5c12..37c083d8 100644 --- a/codepot/etc/codepot.oracle +++ b/codepot/etc/codepot.oracle @@ -170,6 +170,10 @@ CREATE TABLE "cpot_file_list" ( "encname" VARCHAR(255) NOT NULL, "md5sum" CHAR(32) NOT NULL, "description" CLOB NOT NULL, + "createdon" TIMESTAMP NOT NULL, + "updatedon" TIMESTAMP NOT NULL, + "createdby" VARCHAR(32) NOT NULL, + "updatedby" VARCHAR(32) NOT NULL, UNIQUE ("projectid", "filename"), UNIQUE ("encname"), CONSTRAINT file_list_projectid FOREIGN KEY ("projectid","name") REFERENCES "cpot_file"("projectid","name") diff --git a/codepot/etc/codepot.pgsql b/codepot/etc/codepot.pgsql index 4a629774..866ba030 100644 --- a/codepot/etc/codepot.pgsql +++ b/codepot/etc/codepot.pgsql @@ -225,6 +225,11 @@ CREATE TABLE file_list ( md5sum CHAR(32) NOT NULL, description VARCHAR(255) NOT NULL, + createdon TIMESTAMP NOT NULL, + updatedon TIMESTAMP NOT NULL, + createdby VARCHAR(32) NOT NULL, + updatedby VARCHAR(32) NOT NULL, + UNIQUE (projectid, filename), UNIQUE (encname), diff --git a/codepot/src/codepot/helpers/codepot_helper.php b/codepot/src/codepot/helpers/codepot_helper.php index c05a0d86..7165593e 100644 --- a/codepot/src/codepot/helpers/codepot_helper.php +++ b/codepot/src/codepot/helpers/codepot_helper.php @@ -28,6 +28,50 @@ if ( ! function_exists('codepot_merge_path')) } } +if ( ! function_exists('codepot_nowtodbdate')) +{ + function codepot_nowtodbdate() + { + if (CODEPOT_DATABASE_STORE_GMT) + { + return gmstrftime('%Y-%m-%d %H:%M:%S'); + } + else + { + return gmstrftime('%Y-%m-%d %H:%M:%S'); + } + } +} + +if ( ! function_exists('codepot_unixtimetodbdate')) +{ + function codepot_unixtimetodbdate($unixtime) + { + if (CODEPOT_DATABASE_STORE_GMT) + { + return gmstrftime('%Y-%m-%d %H:%M:%S', $unixtime); + } + else + { + return gmstrftime('%Y-%m-%d %H:%M:%S', $unixtime); + } + } +} + +if ( ! function_exists('codepot_dbdatetodispdate')) +{ + function codepot_dbdatetodispdate($dbdate) + { + if (CODEPOT_DATABASE_STORE_GMT) + { + return strftime('%Y-%m-%d %H:%M:%S %z', strtotime($dbdate . ' +0000')); + } + else + { + return strftime('%Y-%m-%d %H:%M:%S %z', strtotime($dbdate)); + } + } +} if ( !function_exists ('codepot_json_encode')) { diff --git a/codepot/src/codepot/language/english/common_lang.php b/codepot/src/codepot/language/english/common_lang.php index 99b5efe0..1cc34f50 100644 --- a/codepot/src/codepot/language/english/common_lang.php +++ b/codepot/src/codepot/language/english/common_lang.php @@ -98,6 +98,7 @@ $lang['Site'] = 'Site'; $lang['Sites'] = 'Sites'; $lang['Size'] = 'Size'; $lang['Source'] = 'Source'; +$lang['State'] = 'State'; $lang['Status'] = 'Status'; $lang['Summary'] = 'Summary'; $lang['Success'] = 'Success'; diff --git a/codepot/src/codepot/language/indonesian/common_lang.php b/codepot/src/codepot/language/indonesian/common_lang.php index 6e586b10..e8f4fb7e 100644 --- a/codepot/src/codepot/language/indonesian/common_lang.php +++ b/codepot/src/codepot/language/indonesian/common_lang.php @@ -97,6 +97,7 @@ $lang['Site'] = 'Site'; $lang['Sites'] = 'Sites'; $lang['Size'] = 'Ukuran'; $lang['Source'] = 'Sumber'; +$lang['State'] = 'State'; $lang['Status'] = 'Status'; $lang['Success'] = 'Success'; $lang['Summary'] = 'Rangkuman'; diff --git a/codepot/src/codepot/language/korean/common_lang.php b/codepot/src/codepot/language/korean/common_lang.php index c33d886c..660324a0 100644 --- a/codepot/src/codepot/language/korean/common_lang.php +++ b/codepot/src/codepot/language/korean/common_lang.php @@ -97,6 +97,7 @@ $lang['Sign out'] = '로그아웃'; $lang['Site'] = '사이트'; $lang['Sites'] = '사이트'; $lang['Size'] = '크기'; +$lang['State'] = '현황'; $lang['Status'] = '상태'; $lang['Source'] = '소스'; $lang['Success'] = '성공'; diff --git a/codepot/src/codepot/models/codereviewmodel.php b/codepot/src/codepot/models/codereviewmodel.php index 66e6527e..929f4a65 100644 --- a/codepot/src/codepot/models/codereviewmodel.php +++ b/codepot/src/codepot/models/codereviewmodel.php @@ -59,8 +59,8 @@ class CodeReviewModel extends Model $this->db->set ('rev', $revision); $this->db->set ('sno', $newsno); $this->db->set ('comment', $comment); - $this->db->set ('createdon', date('Y-m-d H:i:s')); - $this->db->set ('updatedon', date('Y-m-d H:i:s')); + $this->db->set ('createdon', codepot_nowtodbdate()); + $this->db->set ('updatedon', codepot_nowtodbdate()); $this->db->set ('createdby', $userid); $this->db->set ('updatedby', $userid); $this->db->insert ('code_review'); @@ -70,7 +70,7 @@ class CodeReviewModel extends Model $this->db->trans_rollback (); return FALSE; } - /*$this->db->set ('createdon', date('Y-m-d H:i:s')); + /*$this->db->set ('createdon', codepot_nowtodbdate()); $this->db->set ('type', 'code_review'); $this->db->set ('action', 'insert'); $this->db->set ('projectid', $projectid); @@ -98,7 +98,7 @@ class CodeReviewModel extends Model $this->db->where ('sno', $sno); if ($strict) $this->db->where ('updatedby', $userid); $this->db->set ('comment', $comment); - $this->db->set ('updatedon', date('Y-m-d H:i:s')); + $this->db->set ('updatedon', codepot_nowtodbdate()); $this->db->set ('updatedby', $userid); $this->db->update ('code_review'); if ($this->db->trans_status() === FALSE) @@ -108,7 +108,7 @@ class CodeReviewModel extends Model return FALSE; } - /*$this->db->set ('createdon', date('Y-m-d H:i:s')); + /*$this->db->set ('createdon', codepot_nowtodbdate()); $this->db->set ('type', 'code_review'); $this->db->set ('action', 'insert'); $this->db->set ('projectid', $projectid); @@ -142,7 +142,7 @@ class CodeReviewModel extends Model return FALSE; } - /*$this->db->set ('createdon', date('Y-m-d H:i:s')); + /*$this->db->set ('createdon', codepot_nowtodbdate()); $this->db->set ('type', 'issue'); $this->db->set ('action', 'delete'); $this->db->set ('projectid', $projectid); diff --git a/codepot/src/codepot/models/filemodel.php b/codepot/src/codepot/models/filemodel.php index b27e2811..0bb6253a 100644 --- a/codepot/src/codepot/models/filemodel.php +++ b/codepot/src/codepot/models/filemodel.php @@ -41,7 +41,7 @@ class FileModel extends Model $this->db->where ('projectid', $project->id); $this->db->where ('name', $file->name); - $this->db->select ('filename,encname,md5sum,description'); + $this->db->select ('filename,encname,md5sum,description,createdon,createdby'); $query = $this->db->get('file_list'); if ($this->db->trans_status() === FALSE) { @@ -90,7 +90,7 @@ class FileModel extends Model { $this->db->where ('projectid', $project->id); $this->db->where ('name', $f->name); - $this->db->select ('filename,encname,md5sum,description'); + $this->db->select ('filename,encname,md5sum,description,createdon,createdby'); $query = $this->db->get('file_list'); if ($this->db->trans_status() === FALSE) { @@ -116,13 +116,13 @@ class FileModel extends Model $this->db->set ('tag', $file->tag); $this->db->set ('md5sum', $file->md5sum); $this->db->set ('description', $file->description); - $this->db->set ('createdon', date('Y-m-d H:i:s')); + $this->db->set ('createdon', codepot_nowtodbdate()); $this->db->set ('createdby', $userid); - $this->db->set ('updatedon', date('Y-m-d H:i:s')); + $this->db->set ('updatedon', codepot_nowtodbdate()); $this->db->set ('updatedby', $userid); $this->db->insert ('file'); - $this->db->set ('createdon', date('Y-m-d H:i:s')); + $this->db->set ('createdon', codepot_nowtodbdate()); $this->db->set ('type', 'file'); $this->db->set ('action', 'create'); $this->db->set ('projectid', $file->projectid); @@ -144,7 +144,7 @@ class FileModel extends Model $this->db->set ('name', $file->name); $this->db->set ('tag', $file->tag); $this->db->set ('description', $file->description); - $this->db->set ('updatedon', date('Y-m-d H:i:s')); + $this->db->set ('updatedon', codepot_nowtodbdate()); $this->db->set ('updatedby', $userid); $this->db->update ('file'); // file_list gets updated for the schema itself (reference/trigger) @@ -158,13 +158,13 @@ class FileModel extends Model $this->db->set ('f.name', $file->name); $this->db->set ('f.tag', $file->tag); $this->db->set ('f.description', $file->description); - $this->db->set ('f.updatedon', date('Y-m-d H:i:s')); + $this->db->set ('f.updatedon', codepot_nowtodbdate()); $this->db->set ('f.updatedby', $userid); $this->db->set ('fl.name', $file->name); $this->db->update ('file as f, file_list as fl'); */ - $this->db->set ('createdon', date('Y-m-d H:i:s')); + $this->db->set ('createdon', codepot_nowtodbdate()); $this->db->set ('type', 'file'); $this->db->set ('action', 'update'); $this->db->set ('projectid', $projectid); @@ -226,7 +226,7 @@ class FileModel extends Model return FALSE; } - $this->db->set ('createdon', date('Y-m-d H:i:s')); + $this->db->set ('createdon', codepot_nowtodbdate()); $this->db->set ('type', 'file'); $this->db->set ('action', 'delete'); $this->db->set ('projectid', $projectid); @@ -287,9 +287,9 @@ class FileModel extends Model $this->db->set ('name', $name); $this->db->set ('tag', $tag); $this->db->set ('description', $description); - $this->db->set ('createdon', date('Y-m-d H:i:s')); + $this->db->set ('createdon', codepot_nowtodbdate()); $this->db->set ('createdby', $userid); - $this->db->set ('updatedon', date('Y-m-d H:i:s')); + $this->db->set ('updatedon', codepot_nowtodbdate()); $this->db->set ('updatedby', $userid); $this->db->insert ('file'); if ($this->db->trans_status() === FALSE) @@ -335,9 +335,10 @@ class FileModel extends Model $this->db->set ('name', $name); $this->db->set ('filename', $f['name']); $this->db->set ('encname', $ud['file_name']); - $this->db->set ('md5sum', $md5sum); $this->db->set ('description', $f['desc']); + $this->db->set ('createdby', $userid); + $this->db->set ('createdon', codepot_nowtodbdate()); $this->db->insert ('file_list'); if ($this->db->trans_status() === FALSE) { @@ -348,7 +349,7 @@ class FileModel extends Model } } - $this->db->set ('createdon', date('Y-m-d H:i:s')); + $this->db->set ('createdon', codepot_nowtodbdate()); $this->db->set ('type', 'file'); $this->db->set ('action', 'create'); $this->db->set ('projectid', $projectid); @@ -417,9 +418,10 @@ class FileModel extends Model $this->db->set ('name', $name); $this->db->set ('filename', $f['name']); $this->db->set ('encname', $ud['file_name']); - $this->db->set ('md5sum', $md5sum); $this->db->set ('description', $f['desc']); + $this->db->set ('createdby', $userid); + $this->db->set ('createdon', codepot_nowtodbdate()); $this->db->insert ('file_list'); if ($this->db->trans_status() === FALSE) { @@ -430,7 +432,7 @@ class FileModel extends Model } } - $this->db->set ('createdon', date('Y-m-d H:i:s')); + $this->db->set ('createdon', codepot_nowtodbdate()); $this->db->set ('type', 'file'); $this->db->set ('action', 'update'); $this->db->set ('projectid', $projectid); @@ -510,6 +512,8 @@ class FileModel extends Model $this->db->where ('name', $name); $this->db->where ('filename', $f['name']); $this->db->set ('description', $f['desc']); + $this->db->set ('updatedby', $userid); + $this->db->set ('updatedon', codepot_nowtodbdate()); $this->db->update ('file_list'); if ($this->db->trans_status() === FALSE) { @@ -520,7 +524,7 @@ class FileModel extends Model } } - $this->db->set ('createdon', date('Y-m-d H:i:s')); + $this->db->set ('createdon', codepot_nowtodbdate()); $this->db->set ('type', 'file'); $this->db->set ('action', 'update'); $this->db->set ('projectid', $projectid); diff --git a/codepot/src/codepot/models/issuemodel.php b/codepot/src/codepot/models/issuemodel.php index cc157838..e3c5ab1c 100644 --- a/codepot/src/codepot/models/issuemodel.php +++ b/codepot/src/codepot/models/issuemodel.php @@ -206,8 +206,8 @@ class IssueModel extends Model $this->db->set ('status', $issue->status); $this->db->set ('owner', $issue->owner); $this->db->set ('priority', $issue->priority); - $this->db->set ('createdon', date('Y-m-d H:i:s')); - $this->db->set ('updatedon', date('Y-m-d H:i:s')); + $this->db->set ('createdon', codepot_nowtodbdate()); + $this->db->set ('updatedon', codepot_nowtodbdate()); $this->db->set ('createdby', $userid); $this->db->set ('updatedby', $userid); $this->db->insert ('issue'); @@ -220,11 +220,11 @@ class IssueModel extends Model $this->db->set ('owner', $issue->owner); $this->db->set ('comment', ''); $this->db->set ('priority', $issue->priority); - $this->db->set ('updatedon', date('Y-m-d H:i:s')); + $this->db->set ('updatedon', codepot_nowtodbdate()); $this->db->set ('updatedby', $userid); $this->db->insert ('issue_change'); - $this->db->set ('createdon', date('Y-m-d H:i:s')); + $this->db->set ('createdon', codepot_nowtodbdate()); $this->db->set ('type', 'issue'); $this->db->set ('action', 'create'); $this->db->set ('projectid', $issue->projectid); @@ -245,11 +245,11 @@ class IssueModel extends Model $this->db->where ('id', $issue->id); $this->db->set ('summary', $issue->summary); $this->db->set ('description', $issue->description); - $this->db->set ('updatedon', date('Y-m-d H:i:s')); + $this->db->set ('updatedon', codepot_nowtodbdate()); $this->db->set ('updatedby', $userid); $this->db->update ('issue'); - $this->db->set ('createdon', date('Y-m-d H:i:s')); + $this->db->set ('createdon', codepot_nowtodbdate()); $this->db->set ('type', 'issue'); $this->db->set ('action', 'update'); $this->db->set ('projectid', $issue->projectid); @@ -275,7 +275,7 @@ class IssueModel extends Model $this->db->set ('status', $issue->status); $this->db->set ('owner', $issue->owner); $this->db->set ('priority', $issue->priority); - $this->db->set ('updatedon', date('Y-m-d H:i:s')); + $this->db->set ('updatedon', codepot_nowtodbdate()); $this->db->set ('updatedby', $userid); $this->db->update ('issue'); @@ -287,11 +287,11 @@ class IssueModel extends Model $this->db->set ('owner', $issue->owner); $this->db->set ('priority', $issue->priority); $this->db->set ('comment', ''); - $this->db->set ('updatedon', date('Y-m-d H:i:s')); + $this->db->set ('updatedon', codepot_nowtodbdate()); $this->db->set ('updatedby', $userid); $this->db->update ('issue_change'); - $this->db->set ('createdon', date('Y-m-d H:i:s')); + $this->db->set ('createdon', codepot_nowtodbdate()); $this->db->set ('type', 'issue'); $this->db->set ('action', 'update'); $this->db->set ('projectid', $issue->projectid); @@ -330,7 +330,7 @@ class IssueModel extends Model $this->db->set ('owner', $change->owner); $this->db->set ('priority', $change->priority); $this->db->set ('comment', $change->comment); - $this->db->set ('updatedon', date('Y-m-d H:i:s')); + $this->db->set ('updatedon', codepot_nowtodbdate()); $this->db->set ('updatedby', $userid); $this->db->insert ('issue_change'); @@ -340,11 +340,11 @@ class IssueModel extends Model $this->db->set ('status', $change->status); $this->db->set ('owner', $change->owner); $this->db->set ('priority', $change->priority); - $this->db->set ('updatedon', date('Y-m-d H:i:s')); + $this->db->set ('updatedon', codepot_nowtodbdate()); $this->db->set ('updatedby', $userid); $this->db->update ('issue'); - $this->db->set ('createdon', date('Y-m-d H:i:s')); + $this->db->set ('createdon', codepot_nowtodbdate()); $this->db->set ('type', 'issue'); $this->db->set ('action', 'change'); $this->db->set ('projectid', $project->id); @@ -439,7 +439,7 @@ class IssueModel extends Model $this->db->where ('id', $issue->id); $this->db->delete ('issue'); - $this->db->set ('createdon', date('Y-m-d H:i:s')); + $this->db->set ('createdon', codepot_nowtodbdate()); $this->db->set ('type', 'issue'); $this->db->set ('action', 'delete'); $this->db->set ('projectid', $issue->projectid); @@ -484,8 +484,8 @@ class IssueModel extends Model $this->db->set ('status', $issue->status); $this->db->set ('owner', $issue->owner); $this->db->set ('priority', $issue->priority); - $this->db->set ('createdon', date('Y-m-d H:i:s')); - $this->db->set ('updatedon', date('Y-m-d H:i:s')); + $this->db->set ('createdon', codepot_nowtodbdate()); + $this->db->set ('updatedon', codepot_nowtodbdate()); $this->db->set ('createdby', $userid); $this->db->set ('updatedby', $userid); $this->db->insert ('issue'); @@ -504,7 +504,7 @@ class IssueModel extends Model $this->db->set ('owner', $issue->owner); $this->db->set ('comment', ''); $this->db->set ('priority', $issue->priority); - $this->db->set ('updatedon', date('Y-m-d H:i:s')); + $this->db->set ('updatedon', codepot_nowtodbdate()); $this->db->set ('updatedby', $userid); $this->db->insert ('issue_change'); if ($this->db->trans_status() === FALSE) @@ -562,7 +562,7 @@ class IssueModel extends Model } } - $this->db->set ('createdon', date('Y-m-d H:i:s')); + $this->db->set ('createdon', codepot_nowtodbdate()); $this->db->set ('type', 'issue'); $this->db->set ('action', 'create'); $this->db->set ('projectid', $issue->projectid); @@ -600,7 +600,7 @@ class IssueModel extends Model $this->db->where ('id', $issue->id); $this->db->set ('summary', $issue->summary); $this->db->set ('description', $issue->description); - $this->db->set ('updatedon', date('Y-m-d H:i:s')); + $this->db->set ('updatedon', codepot_nowtodbdate()); $this->db->set ('updatedby', $userid); $this->db->update ('issue'); if ($this->db->trans_status() === FALSE) @@ -610,7 +610,7 @@ class IssueModel extends Model return FALSE; } - $this->db->set ('createdon', date('Y-m-d H:i:s')); + $this->db->set ('createdon', codepot_nowtodbdate()); $this->db->set ('type', 'issue'); $this->db->set ('action', 'update'); $this->db->set ('projectid', $issue->projectid); @@ -679,7 +679,7 @@ class IssueModel extends Model return FALSE; } - $this->db->set ('createdon', date('Y-m-d H:i:s')); + $this->db->set ('createdon', codepot_nowtodbdate()); $this->db->set ('type', 'issue'); $this->db->set ('action', 'delete'); $this->db->set ('projectid', $projectid); @@ -781,7 +781,7 @@ class IssueModel extends Model } } - $this->db->set ('createdon', date('Y-m-d H:i:s')); + $this->db->set ('createdon', codepot_nowtodbdate()); $this->db->set ('type', 'issue'); $this->db->set ('action', 'update'); $this->db->set ('projectid', $projectid); @@ -871,7 +871,7 @@ class IssueModel extends Model } } - $this->db->set ('createdon', date('Y-m-d H:i:s')); + $this->db->set ('createdon', codepot_nowtodbdate()); $this->db->set ('type', 'issue'); $this->db->set ('action', 'update'); $this->db->set ('projectid', $projectid); diff --git a/codepot/src/codepot/models/logmodel.php b/codepot/src/codepot/models/logmodel.php index 524fcec3..5a89e522 100644 --- a/codepot/src/codepot/models/logmodel.php +++ b/codepot/src/codepot/models/logmodel.php @@ -159,7 +159,7 @@ class LogModel extends Model $this->db->set ('action', $log->action); $this->db->set ('projectid', $log->projectid); $this->db->set ('message', $log->message); - $this->db->set ('createdon', date('Y-m-d H:i:s')); + $this->db->set ('createdon', codepot_nowtodbdate()); $this->db->set ('userid', $log->userid); $this->db->insert ('log'); @@ -200,8 +200,7 @@ class LogModel extends Model $now = time(); $one_month_ago = $now - (24 * 60 * 60 * 30); - $this->db->where ('createdon <=', - date ("Y-m-d H:i:s", $one_month_ago)); + $this->db->where ('createdon <=', codepot_unixtimetodate($one_month_ago)); $this->db->delete ('log'); if ($this->db->trans_status() === FALSE) diff --git a/codepot/src/codepot/models/projectmodel.php b/codepot/src/codepot/models/projectmodel.php index b2cc69ee..1fe296c4 100644 --- a/codepot/src/codepot/models/projectmodel.php +++ b/codepot/src/codepot/models/projectmodel.php @@ -146,9 +146,9 @@ class ProjectModel extends Model $this->db->set ('description', $project->description); $this->db->set ('commitable', $project->commitable); $this->db->set ('public', $project->public); - $this->db->set ('createdon', date('Y-m-d H:i:s')); + $this->db->set ('createdon', codepot_nowtodbdate()); $this->db->set ('createdby', $userid); - $this->db->set ('updatedon', date('Y-m-d H:i:s')); + $this->db->set ('updatedon', codepot_nowtodbdate()); $this->db->set ('updatedby', $userid); $this->db->insert ('project'); @@ -173,7 +173,7 @@ class ProjectModel extends Model $this->db->insert ('project_membership'); } - $this->db->set ('createdon', date('Y-m-d H:i:s')); + $this->db->set ('createdon', codepot_nowtodbdate()); $this->db->set ('type', 'project'); $this->db->set ('action', 'create'); $this->db->set ('projectid', $project->id); @@ -262,7 +262,7 @@ class ProjectModel extends Model $this->db->set ('description', $project->description); $this->db->set ('commitable', $project->commitable); $this->db->set ('public', $project->public); - $this->db->set ('updatedon', date('Y-m-d H:i:s')); + $this->db->set ('updatedon', codepot_nowtodbdate()); $this->db->set ('updatedby', $userid); $this->db->update ('project'); @@ -288,7 +288,7 @@ class ProjectModel extends Model $this->db->insert ('project_membership'); } - $this->db->set ('createdon', date('Y-m-d H:i:s')); + $this->db->set ('createdon', codepot_nowtodbdate()); $this->db->set ('type', 'project'); $this->db->set ('action', 'update'); $this->db->set ('projectid', $project->id); @@ -356,7 +356,7 @@ class ProjectModel extends Model $this->db->where ('id', $project->id); $this->db->delete ('project'); - $this->db->set ('createdon', date('Y-m-d H:i:s')); + $this->db->set ('createdon', codepot_nowtodbdate()); $this->db->set ('type', 'project'); $this->db->set ('action', 'delete'); $this->db->set ('projectid', $project->id); diff --git a/codepot/src/codepot/models/sitemodel.php b/codepot/src/codepot/models/sitemodel.php index 967a7a17..e8ac88d8 100644 --- a/codepot/src/codepot/models/sitemodel.php +++ b/codepot/src/codepot/models/sitemodel.php @@ -67,9 +67,9 @@ class SiteModel extends Model $this->db->set ('name', $site->name); $this->db->set ('summary', $site->summary); $this->db->set ('text', $site->text); - $this->db->set ('createdon', date('Y-m-d H:i:s')); + $this->db->set ('createdon', codepot_nowtodbdate()); $this->db->set ('createdby', $userid); - $this->db->set ('updatedon', date('Y-m-d H:i:s')); + $this->db->set ('updatedon', codepot_nowtodbdate()); $this->db->set ('updatedby', $userid); $this->db->insert ('site'); @@ -93,7 +93,7 @@ class SiteModel extends Model $this->db->set ('name', $site->name); $this->db->set ('summary', $site->summary); $this->db->set ('text', $site->text); - $this->db->set ('updatedon', date('Y-m-d H:i:s')); + $this->db->set ('updatedon', codepot_nowtodbdate()); $this->db->set ('updatedby', $userid); $this->db->update ('site'); diff --git a/codepot/src/codepot/models/wikimodel.php b/codepot/src/codepot/models/wikimodel.php index 847e5e4d..ba367764 100644 --- a/codepot/src/codepot/models/wikimodel.php +++ b/codepot/src/codepot/models/wikimodel.php @@ -100,7 +100,7 @@ class WikiModel extends Model // TODO: check if userid can do this.. $this->db->trans_begin (); // manual transaction. not using trans_start(). - $now = date('Y-m-d H:i:s'); + $now = codepot_nowtodbdate(); $this->db->set ('projectid', $wiki->projectid); $this->db->set ('name', $wiki->name); @@ -167,7 +167,7 @@ class WikiModel extends Model // TODO: check if userid can do this.. $this->db->trans_begin (); // manual transaction. not using trans_start(). - $now = date('Y-m-d H:i:s'); + $now = codepot_nowtodbdate(); if (!is_null($new_wiki_name) && $wiki->name != $new_wiki_name) { @@ -293,7 +293,7 @@ class WikiModel extends Model $this->db->where ('name', $wiki->name); $this->db->delete ('wiki'); - $this->db->set ('createdon', date('Y-m-d H:i:s')); + $this->db->set ('createdon', codepot_nowtodbdate()); $this->db->set ('type', 'wiki'); $this->db->set ('action', 'delete'); $this->db->set ('projectid', $wiki->projectid); diff --git a/codepot/src/codepot/views/code_folder.php b/codepot/src/codepot/views/code_folder.php index c27f0577..941f6c2b 100644 --- a/codepot/src/codepot/views/code_folder.php +++ b/codepot/src/codepot/views/code_folder.php @@ -987,7 +987,7 @@ $this->load->view ( print htmlspecialchars($f['last_author']); print ''; print '
';
- print date('Y-m-d', $f['time_t']);
+ print strftime('%Y-%m-%d', $f['time_t']);
print '
';
- //print date('r', $f['time_t']);
- print date('Y-m-d', $f['time_t']);
+ print strftime('%Y-%m-%d', $f['time_t']);
print '
';
- //print date('r', strtotime($h['date']));
- print date('Y-m-d', strtotime($h['date']));
+ print strftime('%Y-%m-%d', strtotime($h['date']));
print '
+- lang->line('Created on')?> createdon); ?>
+ - lang->line('Created by')?> createdby); ?>
+ - lang->line('Last updated on')?> updatedon); ?>
+ - lang->line('Last updated by')?> updatedby); ?>
+
+-- lang->line('Created on')?> createdon ?>
- - lang->line('Created by')?> createdby ?>
- - lang->line('Last updated on')?> updatedon ?>
- - lang->line('Last updated by')?> updatedby ?>
-
--- lang->line('Created on')?> createdon?>
-- lang->line('Created by')?> createdby?>
-- lang->line('Last updated on')?> updatedon?>
-- lang->line('Last updated by')?> updatedby?>
+- lang->line('Created on')?> createdon);?>
+- lang->line('Created by')?> createdby);?>
+- lang->line('Last updated on')?> updatedon);?>
+- lang->line('Last updated by')?> updatedby);?>
--> diff --git a/codepot/src/codepot/views/issue_home.php b/codepot/src/codepot/views/issue_home.php index e6608ddc..efcef2e9 100644 --- a/codepot/src/codepot/views/issue_home.php +++ b/codepot/src/codepot/views/issue_home.php @@ -308,18 +308,19 @@ $this->load->view (+ type, $issue_type_array)? + $issue_type_array[$issue->type]: $issue->type; + + $status = array_key_exists($issue->status, $issue_status_array)? + $issue_status_array[$issue->status]: $issue->status; + + $priority = array_key_exists($issue->priority, $issue_priority_array)? + $issue_priority_array[$issue->priority]: $issue->priority; + + printf ('- ', $issue->type);
+ print $this->lang->line('Type');
+ print ': ';
+ print htmlspecialchars($type);
+ print '
';
+
+ printf ('- ', $issue->status);
+ print $this->lang->line('Status');
+ print ': ';
+ print htmlspecialchars($status);
+ print '
';
+
+ printf ('- ', $issue->priority);
+ print $this->lang->line('Priority');
+ print ': ';
+ print htmlspecialchars($priority);
+ print '
';
+
+ print '- ';
+ if ($issue->owner != '')
+ {
+ print $this->lang->line('Owner');
+ print ': ';
+ print htmlspecialchars($issue->owner);
+ print '
';
+ }
+ ?>
+
+