Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/easysoft/zentaopms
Browse files Browse the repository at this point in the history
  • Loading branch information
liugang committed Oct 30, 2017
2 parents 3076736 + 1b82933 commit 3dd4a31
Show file tree
Hide file tree
Showing 50 changed files with 688 additions and 132 deletions.
2 changes: 2 additions & 0 deletions config/filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
$filter->product->default->cookie['lastProduct'] = 'int';
$filter->product->default->cookie['preProductID'] = 'int';
$filter->product->index->cookie['preBranch'] = 'int';
$filter->product->export->cookie['checkedItem'] = 'reg::checked';

$filter->project->default->cookie['lastProject'] = 'int';
$filter->project->default->cookie['projectMode'] = 'code';
Expand All @@ -120,6 +121,7 @@
$filter->project->task->cookie['productBrowseParam'] = 'int';
$filter->project->task->cookie['projectTaskOrder'] = 'reg::orderBy';
$filter->project->task->cookie['windowWidth'] = 'int';
$filter->project->export->cookie['checkedItem'] = 'reg::checked';

$filter->qa->default->cookie['lastProduct'] = 'int';
$filter->qa->default->cookie['preBranch'] = 'int';
Expand Down
1 change: 1 addition & 0 deletions config/zentaopms.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
define('TABLE_WEBHOOK', '`' . $config->db->prefix . 'webhook`');
define('TABLE_WEBHOOKDATAS', '`' . $config->db->prefix . 'webhookdatas`');
define('TABLE_LOG', '`' . $config->db->prefix . 'log`');
define('TABLE_SCORE', '`' . $config->db->prefix . 'score`');
if(!defined('TABLE_LANG')) define('TABLE_LANG', '`' . $config->db->prefix . 'lang`');

$config->objectTables['product'] = TABLE_PRODUCT;
Expand Down
1 change: 1 addition & 0 deletions lib/base/pager/pager.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ function submitPage(mode, perPage)
vars = vars.replace('_recTotal_', recTotal)
vars = vars.replace('_recPerPage_', recPerPage)
vars = vars.replace('_pageID_', pageID);
$.get(createLink('score', 'ajax', "method=submitPage"));
location.href=createLink('$this->moduleName', '$this->methodName', vars);
}
</script>
Expand Down
2 changes: 2 additions & 0 deletions module/block/control.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ public function delete($id, $module = 'my', $type = 'delete')
$this->dao->delete()->from(TABLE_BLOCK)->where('`id`')->eq($id)->andWhere('account')->eq($this->app->user->account)->andWhere('module')->eq($module)->exec();
}
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->loadModel('score')->score('block', 'set');
$this->send(array('result' => 'success'));
}

Expand All @@ -157,6 +158,7 @@ public function sort($orders, $module = 'my')
}

if(dao::isError()) $this->send(array('result' => 'fail'));
$this->loadModel('score')->score('block', 'set');
$this->send(array('result' => 'success'));
}

Expand Down
1 change: 1 addition & 0 deletions module/block/model.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public function save($id, $source, $type, $module = 'my')

$data->params = helper::jsonEncode($data->params);
$this->dao->replace(TABLE_BLOCK)->data($data)->exec();
$this->loadModel('score')->score('block', 'set');
}

/**
Expand Down
11 changes: 7 additions & 4 deletions module/bug/model.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public function create()
$bugID = $this->dao->lastInsertID();
$this->file->updateObjectID($this->post->uid, $bugID, 'bug');
$this->file->saveUpload('bug', $bugID);
empty($bug->case) ? $this->loadModel('score')->score('bug', 'create', $bugID) : $this->loadModel('score')->score('bug', 'createFormCase', $bug->case);
return array('status' => 'created', 'id' => $bugID);
}
return false;
Expand Down Expand Up @@ -199,7 +200,7 @@ public function batchCreate($productID, $branch = 0)

$this->dao->insert(TABLE_BUG)->data($bug)->autoCheck()->batchCheck($this->config->bug->create->requiredFields, 'notempty')->exec();
$bugID = $this->dao->lastInsertID();

$this->loadModel('score')->score('bug', 'create', $bugID);
if(!empty($data->uploadImage[$i]) and !empty($file))
{
$file['objectType'] = 'bug';
Expand All @@ -223,7 +224,7 @@ public function batchCreate($productID, $branch = 0)
if(is_dir($realPath)) $classFile->removeDir($realPath);
unset($_SESSION['bugImagesFile']);
}

$this->loadModel('score')->score('ajax', 'batchCreate');
return $actions;
}

Expand Down Expand Up @@ -654,7 +655,7 @@ public function batchUpdate()
}
}
}

$this->loadModel('score')->score('ajax', 'batchEdit');
return $allChanges;
}

Expand Down Expand Up @@ -758,6 +759,7 @@ public function confirm($bugID)
->get();

$this->dao->update(TABLE_BUG)->data($bug)->where('id')->eq($bugID)->exec();
$this->loadModel('score')->score('bug', 'confirmBug', $oldBug);

if(!dao::isError()) return common::createChanges($oldBug, $bug);
}
Expand Down Expand Up @@ -846,7 +848,7 @@ public function resolve($bugID)
->checkIF($bug->resolution == 'fixed', 'resolvedBuild','notempty')
->where('id')->eq((int)$bugID)
->exec();

$this->loadModel('score')->score('bug', 'resolve', $oldBug);
/* Link bug to build and release. */
$this->linkBugToBuild($bugID, $bug->resolvedBuild);
}
Expand Down Expand Up @@ -1853,6 +1855,7 @@ public function saveUserBugTemplate()

$condition = "`type`='bug' and account='{$this->app->user->account}'";
$this->dao->insert(TABLE_USERTPL)->data($template)->batchCheck('title, content', 'notempty')->check('title', 'unique', $condition)->exec();
$this->loadModel('score')->score('bug', 'saveTplModal', $this->dao->lastInsertID());
}

/**
Expand Down
1 change: 1 addition & 0 deletions module/build/model.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ public function create($projectID)
$buildID = $this->dao->lastInsertID();
$this->file->updateObjectID($this->post->uid, $buildID, 'build');
$this->file->saveUpload('build', $buildID);
$this->loadModel('score')->score('build', 'create', $buildID);
return $buildID;
}
}
Expand Down
9 changes: 5 additions & 4 deletions module/common/lang/en.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,14 @@
$lang->my->menu->profile = array('link' => 'Profile|my|profile', 'alias' => 'editprofile');
$lang->my->menu->changePassword = 'Password|my|changepassword';
$lang->my->menu->manageContacts = 'Contact|my|managecontacts';
$lang->my->menu->score = array('link' => 'Score|score|browse', 'subModule' => 'score');

$lang->todo = new stdclass();
$lang->todo->menu = $lang->my->menu;

$lang->score = new stdclass();
$lang->score->menu = $lang->my->menu;

/* 产品视图设置。*/
$lang->product = new stdclass();
$lang->product->menu = new stdclass();
Expand Down Expand Up @@ -342,7 +346,6 @@
$lang->admin->menu->trashes = array('link' => 'Recycle|action|trash', 'subModule' => 'action');
$lang->admin->menu->dev = array('link' => 'Develop|dev|api', 'alias' => 'db', 'subModule' => 'dev,editor');
$lang->admin->menu->entry = array('link' => 'API|entry|browse', 'alias' => 'create,edit', 'subModule' => 'entry,webhook');
$lang->admin->menu->score = array('link' => 'Score|score|browse', 'subModule' => 'score');
$lang->admin->menu->sso = 'RangerTeam|admin|sso';

$lang->convert = new stdclass();
Expand All @@ -355,7 +358,6 @@
$lang->mail = new stdclass();
$lang->cron = new stdclass();
$lang->dev = new stdclass();
$lang->score = new stdclass();
$lang->entry = new stdclass();
$lang->webhook = new stdclass();
$lang->search = new stdclass();
Expand All @@ -370,7 +372,6 @@
$lang->editor->menu = $lang->admin->menu;
$lang->mail->menu = $lang->admin->menu;
$lang->dev->menu = $lang->admin->menu;
$lang->score->menu = $lang->admin->menu;
$lang->entry->menu = $lang->admin->menu;
$lang->webhook->menu = $lang->admin->menu;

Expand All @@ -395,6 +396,7 @@
$lang->menugroup->people = 'company';
$lang->menugroup->dept = 'company';
$lang->menugroup->todo = 'my';
$lang->menugroup->score = 'my';
$lang->menugroup->action = 'admin';
$lang->menugroup->backup = 'admin';
$lang->menugroup->cron = 'admin';
Expand All @@ -403,7 +405,6 @@
$lang->menugroup->editor = 'admin';
$lang->menugroup->mail = 'admin';
$lang->menugroup->dev = 'admin';
$lang->menugroup->score = 'admin';
$lang->menugroup->entry = 'admin';
$lang->menugroup->webhook = 'admin';

Expand Down
1 change: 1 addition & 0 deletions module/common/lang/menuOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
$lang->my->menuOrder[45] = 'dynamic';
$lang->my->menuOrder[50] = 'profile';
$lang->my->menuOrder[55] = 'changePassword';
$lang->my->menuOrder[60] = 'score';
$lang->todo->menuOrder = $lang->my->menuOrder;

/* product menu order. */
Expand Down
15 changes: 8 additions & 7 deletions module/common/lang/zh-cn.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,18 +167,22 @@
$lang->my->menu->index = '首页|my|index';
$lang->my->menu->todo = array('link' => '待办|my|todo|', 'subModule' => 'todo');
$lang->my->menu->task = array('link' => '任务|my|task|', 'subModule' => 'task');
$lang->my->menu->bug = array('link' => 'Bug|my|bug|', 'subModule' => 'bug');
$lang->my->menu->bug = array('link' => 'Bug|my|bug|', 'subModule' => 'bug');
$lang->my->menu->testtask = array('link' => '测试|my|testtask|', 'subModule' => 'testcase,testtask', 'alias' => 'testcase');
$lang->my->menu->story = array('link' => '需求|my|story|', 'subModule' => 'story');
$lang->my->menu->story = array('link' => '需求|my|story|', 'subModule' => 'story');
$lang->my->menu->myProject = "{$lang->projectCommon}|my|project|";
$lang->my->menu->dynamic = '动态|my|dynamic|';
$lang->my->menu->profile = array('link' => '档案|my|profile', 'alias' => 'editprofile');
$lang->my->menu->changePassword = '密码|my|changepassword';
$lang->my->menu->manageContacts = '联系人|my|managecontacts';
$lang->my->menu->score = array('link' => '积分|score|browse', 'subModule' => 'score');

$lang->todo = new stdclass();
$lang->todo = new stdclass();
$lang->todo->menu = $lang->my->menu;

$lang->score = new stdclass();
$lang->score->menu = $lang->my->menu;

/* 产品视图设置。*/
$lang->product = new stdclass();
$lang->product->menu = new stdclass();
Expand Down Expand Up @@ -342,7 +346,6 @@
$lang->admin->menu->trashes = array('link' => '回收站|action|trash', 'subModule' => 'action');
$lang->admin->menu->dev = array('link' => '二次开发|dev|api', 'alias' => 'db', 'subModule' => 'dev,editor');
$lang->admin->menu->entry = array('link' => '接口|entry|browse', 'alias' => 'create,edit', 'subModule' => 'entry,webhook');
$lang->admin->menu->score = array('link' => '积分|score|browse', 'subModule' => 'score');
$lang->admin->menu->sso = '然之集成|admin|sso';

$lang->convert = new stdclass();
Expand All @@ -358,7 +361,6 @@
$lang->entry = new stdclass();
$lang->webhook = new stdclass();
$lang->search = new stdclass();
$lang->score = new stdclass();

$lang->convert->menu = $lang->admin->menu;
$lang->upgrade->menu = $lang->admin->menu;
Expand All @@ -370,7 +372,6 @@
$lang->editor->menu = $lang->admin->menu;
$lang->mail->menu = $lang->admin->menu;
$lang->dev->menu = $lang->admin->menu;
$lang->score->menu = $lang->admin->menu;
$lang->entry->menu = $lang->admin->menu;
$lang->webhook->menu = $lang->admin->menu;

Expand All @@ -395,6 +396,7 @@
$lang->menugroup->people = 'company';
$lang->menugroup->dept = 'company';
$lang->menugroup->todo = 'my';
$lang->menugroup->score = 'my';
$lang->menugroup->action = 'admin';
$lang->menugroup->backup = 'admin';
$lang->menugroup->cron = 'admin';
Expand All @@ -403,7 +405,6 @@
$lang->menugroup->editor = 'admin';
$lang->menugroup->mail = 'admin';
$lang->menugroup->dev = 'admin';
$lang->menugroup->score = 'admin';
$lang->menugroup->entry = 'admin';
$lang->menugroup->webhook = 'admin';

Expand Down
9 changes: 5 additions & 4 deletions module/common/lang/zh-tw.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,14 @@
$lang->my->menu->profile = array('link' => '檔案|my|profile', 'alias' => 'editprofile');
$lang->my->menu->changePassword = '密碼|my|changepassword';
$lang->my->menu->manageContacts = '聯繫人|my|managecontacts';
$lang->my->menu->score = array('link' => '積分|score|browse', 'subModule' => 'score');

$lang->todo = new stdclass();
$lang->todo->menu = $lang->my->menu;

$lang->score = new stdclass();
$lang->scoret->menu = $lang->my->menu;

/* 產品視圖設置。*/
$lang->product = new stdclass();
$lang->product->menu = new stdclass();
Expand Down Expand Up @@ -341,7 +345,6 @@
$lang->admin->menu->cron = array('link' => '計劃任務|cron|index', 'subModule' => 'cron');
$lang->admin->menu->trashes = array('link' => '資源回收筒|action|trash', 'subModule' => 'action');
$lang->admin->menu->dev = array('link' => '二次開發|dev|api', 'alias' => 'db', 'subModule' => 'dev,editor');
$lang->admin->menu->score = array('link' => '積分|score|browse', 'subModule' => 'score');
$lang->admin->menu->sso = '然之整合|admin|sso';

$lang->convert = new stdclass();
Expand All @@ -355,7 +358,6 @@
$lang->cron = new stdclass();
$lang->dev = new stdclass();
$lang->search = new stdclass();
$lang->score = new stdclass();

$lang->convert->menu = $lang->admin->menu;
$lang->upgrade->menu = $lang->admin->menu;
Expand All @@ -367,7 +369,6 @@
$lang->editor->menu = $lang->admin->menu;
$lang->mail->menu = $lang->admin->menu;
$lang->dev->menu = $lang->admin->menu;
$lang->scoret->menu = $lang->admin->menu;

/* 菜單分組。*/
$lang->menugroup = new stdclass();
Expand All @@ -390,6 +391,7 @@
$lang->menugroup->people = 'company';
$lang->menugroup->dept = 'company';
$lang->menugroup->todo = 'my';
$lang->menugroup->score = 'my';
$lang->menugroup->action = 'admin';
$lang->menugroup->backup = 'admin';
$lang->menugroup->cron = 'admin';
Expand All @@ -398,7 +400,6 @@
$lang->menugroup->editor = 'admin';
$lang->menugroup->mail = 'admin';
$lang->menugroup->dev = 'admin';
$lang->menugroup->score = 'admin';

/* 錯誤提示信息。*/
$lang->error = new stdclass();
Expand Down
2 changes: 1 addition & 1 deletion module/common/model.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ public function isOpenMethod($module, $method)
if($module == 'tutorial') return true;
if($module == 'block') return true;
if($module == 'product' and $method == 'showerrornone') return true;
if($module == 'score' and $method == 'browse') return true;
}
return false;
}
Expand Down Expand Up @@ -1131,7 +1132,6 @@ public static function hasPriv($module, $method, $object = null)

/* Check is the super admin or not. */
if(!empty($app->user->admin)) return true;

/* If not super admin, check the rights. */
$rights = $app->user->rights['rights'];
$acls = $app->user->rights['acls'];
Expand Down
1 change: 1 addition & 0 deletions module/common/view/datatable.fix.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ function saveDatatableConfig(name, value, reload, global)
success:function(){if(reload) window.location.reload();},
url: '<?php echo $this->createLink('datatable', 'ajaxSave')?>'
});
$.get(createLink('score', 'ajax', "method=switchToDataTable"));
};
window.saveDatatableConfig = saveDatatableConfig;
});
Expand Down
35 changes: 18 additions & 17 deletions module/custom/lang/en.php
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
<?php
$lang->custom->common = 'Custom';
$lang->custom->index = 'Home';
$lang->custom->set = 'Customize';
$lang->custom->restore = 'Reset to Default';
$lang->custom->key = 'Key';
$lang->custom->value = 'Value';
$lang->custom->flow = 'Process';
$lang->custom->working = 'Working';
$lang->custom->select = 'Select Process';
$lang->custom->branch = 'Multi Branch';
$lang->custom->owner = 'Owner';
$lang->custom->module = 'Module';
$lang->custom->section = 'Section';
$lang->custom->lang = 'Language';
$lang->custom->setPublic = 'Set Public';
$lang->custom->required = 'Required';
$lang->custom->score = 'Score';
$lang->custom->common = 'Custom';
$lang->custom->index = 'Home';
$lang->custom->set = 'Customize';
$lang->custom->restore = 'Reset to Default';
$lang->custom->key = 'Key';
$lang->custom->value = 'Value';
$lang->custom->flow = 'Process';
$lang->custom->working = 'Working';
$lang->custom->select = 'Select Process';
$lang->custom->branch = 'Multi Branch';
$lang->custom->owner = 'Owner';
$lang->custom->module = 'Module';
$lang->custom->section = 'Section';
$lang->custom->lang = 'Language';
$lang->custom->setPublic = 'Set Public';
$lang->custom->required = 'Required';
$lang->custom->score = 'Score';
$lang->custom->scoreReset = 'Reset Score';

$lang->custom->object['story'] = 'Story';
$lang->custom->object['task'] = 'Task';
Expand Down
Loading

0 comments on commit 3dd4a31

Please sign in to comment.