* Modify api param and app error.

This commit is contained in:
caoyanyi
2022-08-25 10:08:36 +08:00
parent c84bcd5726
commit d764b13971
5 changed files with 12 additions and 9 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ class tabsEntry extends baseEntry
foreach($tabs as $menuKey)
{
if(!isset($this->lang->my->$menuKey)) continue;
if(!common::hasPriv('my', $menuKey)) continue;
if(!common::hasPriv('my', 'work')) continue;
$label = $this->lang->my->$menuKey;
if($menuKey == 'calendar') $label = $this->lang->my->calendarAction;
+3 -3
View File
@@ -254,7 +254,7 @@ class userEntry extends Entry
if(!common::hasPriv('my', 'todo')) break;
$control = $this->loadController('my', 'todo');
$control->todo($this->param('date', 'all'), '', 'all', 'date_desc', 0, 0, $this->param('limit', 5), 1);
$control->todo($this->param('date', 'before'), '', 'all', 'date_desc', 0, $this->param('limit', 5), 1);
$data = $this->getData();
if($data->status == 'success')
@@ -313,7 +313,7 @@ class userEntry extends Entry
{
$this->config->openMethods[] = 'my.risk';
$control = $this->loadController('my', 'risk');
$control->risk('createdBy', 0, 'id_desc', 0, $this->param('limit', 5), 1);
$control->risk('assignedTo', 0, 'id_desc', 0, $this->param('limit', 5), 1);
$data = $this->getData();
if($data->status == 'success')
@@ -331,7 +331,7 @@ class userEntry extends Entry
{
$this->config->openMethods[] = 'my.myMeeting';
$control = $this->loadController('my', 'myMeeting');
$control->myMeeting('all', '', 'id_desc', 0, $this->param('limit', 5), 1);
$control->myMeeting('futureMeeting', '', 'id_desc', 0, $this->param('limit', 5), 1);
$data = $this->getData();
if($data->status == 'success')
+1
View File
@@ -3752,6 +3752,7 @@ class execution extends control
$this->view->pager = $pager;
$this->view->orderBy = $orderBy;
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->projects = array('') + $this->project->getPairsByProgram();
$this->view->status = $status;
$this->view->from = $from;
$this->view->param = $param;
+5 -4
View File
@@ -155,10 +155,11 @@ class messageModel extends model
$moduleName = $objectType == 'case' ? 'testcase' : $objectType;
$moduleName = $objectType == 'kanbancard' ? 'kanban' : $objectType;
$space = common::checkNotCN() ? ' ' : '';
$data = $user->realname . $space . $this->lang->action->label->$actionType . $space . $this->lang->action->objectTypes[$objectType];
$dataID = $objectType == 'kanbancard' ? $object->kanban : $objectID;
$data .= ' ' . html::a($sysURL . helper::createLink($moduleName, 'view', "id=$dataID"), "[#{$objectID}::{$object->$field}]");
$space = common::checkNotCN() ? ' ' : '';
$data = $user->realname . $space . $this->lang->action->label->$actionType . $space . $this->lang->action->objectTypes[$objectType];
$dataID = $objectType == 'kanbancard' ? $object->kanban : $objectID;
$url = helper::createLink($moduleName, 'view', "id=$dataID");
$data .= ' ' . html::a((strpos($url, $sysURL) === 0 ? '' : $sysURL) . $url, "[#{$objectID}::{$object->$field}]");
if($isonlybody) $_GET['onlybody'] = 'yes';
+2 -1
View File
@@ -487,10 +487,11 @@ class webhookModel extends model
$tab = $meeting->project ? '#app=project' : '#app=my';
}
$sysUrl = common::getSysURL();
$viewLink = helper::createLink($objectType, 'view', "id=$objectID", 'html') . $tab;
if($oldOnlyBody) $_GET['onlybody'] = $oldOnlyBody;
return $viewLink;
return ltrim($viewLink, $sysUrl);
}
/**