diff --git a/module/bug/control.php b/module/bug/control.php index b892a10177..9147f71cab 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -428,7 +428,7 @@ class bug extends control setcookie('bugModule', 0, 0, $this->config->webRoot, '', $this->config->cookieSecure, false); $location = $this->createLink('bug', 'browse', "productID={$this->post->product}&branch=$branch&browseType=byModule¶m={$this->post->module}&orderBy=id_desc"); } - if($this->app->getViewType() == 'xhtml') $location = $this->createLink('bug', 'view', "bugID=$bugID"); + if($this->app->getViewType() == 'xhtml') $location = $this->createLink('bug', 'view', "bugID=$bugID", 'html'); $response['locate'] = $location; return $this->send($response); } diff --git a/module/doc/control.php b/module/doc/control.php index 754875a3cb..1850e42ea5 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -309,7 +309,7 @@ class doc extends control if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $docID)); $objectID = zget($lib, $lib->type, ''); $params = "type={$lib->type}&objectID=$objectID&libID={$lib->id}&docID=" . $docResult['id']; - $link = isonlybody() ? 'parent' : $this->createLink('doc', 'objectLibs', $params); + $link = isonlybody() ? 'parent' : $this->createLink('doc', 'objectLibs', $params, 'html'); return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $link)); } diff --git a/module/story/control.php b/module/story/control.php index fdb6c9dd43..e1c9acad88 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -194,7 +194,7 @@ class story extends control $param = $execution->type == 'project' ? "projectID=$objectID&productID=$productID" : "executionID=$objectID&orderBy=id_desc&browseType=unclosed"; $response['locate'] = $this->createLink($moduleName, 'story', $param); } - if($this->app->getViewType() == 'xhtml') $response['locate'] = $this->createLink('story', 'view', "storyID=$storyID"); + if($this->app->getViewType() == 'xhtml') $response['locate'] = $this->createLink('story', 'view', "storyID=$storyID", 'html'); return $this->send($response); } diff --git a/module/task/control.php b/module/task/control.php index e053c6ac67..d7f6a99608 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -151,7 +151,7 @@ class task extends control /* Locate the browser. */ if($this->app->getViewType() == 'xhtml') { - $taskLink = $this->createLink('task', 'view', "taskID=$taskID"); + $taskLink = $this->createLink('task', 'view', "taskID=$taskID", 'html'); $response['locate'] = $taskLink; return $this->send($response); } diff --git a/module/todo/control.php b/module/todo/control.php index d8dcb8f1c3..4cfe437bfd 100644 --- a/module/todo/control.php +++ b/module/todo/control.php @@ -69,7 +69,7 @@ class todo extends control } if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $todoID)); - if($this->viewType == 'xhtml') die(js::locate($this->createLink('todo', 'view', "todoID=$todoID"), 'parent')); + if($this->viewType == 'xhtml') die(js::locate($this->createLink('todo', 'view', "todoID=$todoID", 'html'), 'parent')); if(isonlybody()) die(js::closeModal('parent.parent')); die(js::locate($this->createLink('my', 'todo', "type=all&userID=&status=all&orderBy=id_desc"), 'parent')); } diff --git a/xuanxuan/module/im/ext/model/class/xuanxuan.class.php b/xuanxuan/module/im/ext/model/class/xuanxuan.class.php index 954adcbcac..73d50b9ca1 100644 --- a/xuanxuan/module/im/ext/model/class/xuanxuan.class.php +++ b/xuanxuan/module/im/ext/model/class/xuanxuan.class.php @@ -25,17 +25,16 @@ class xuanxuanIm extends imModel $products = empty($products) ? array() : array_keys($products); $executions = empty($executions) ? array() : array_keys($executions); $libIdList = array_keys($this->loadModel('doc')->getLibs('all')); - $productID = isset($products[0]) ? $products[0] : 1; - $executionID = isset($executions[0]) ? $executions[0] : 1; + $productID = isset($products[0]) ? $products[0] : 0; + $executionID = isset($executions[0]) ? $executions[0] : 0; $libID = isset($libIdList[0]) ? $libIdList[0] : 1; $actions = new stdclass(); - if(common::hasPriv('bug', 'create') and !empty($products)) $actions->createBug = array('title' => $this->lang->im->createBug, 'url' => $baseURL . str_replace('/x.php', '/index.php', helper::createLink('bug', 'create', "product=$productID", 'xhtml')), 'height' => "600px", 'width' => "1200px"); - if(common::hasPriv('story', 'create') and !empty($products)) $actions->createStory = array('title' => $this->lang->im->createStory, 'url' => $baseURL . str_replace('/x.php', '/index.php', helper::createLink('story', 'create', "product=$productID", 'xhtml')), 'height' => "600px", 'width' => "1200px"); - if(common::hasPriv('task', 'create') and !empty($executions))$actions->createTask = array('title' => $this->lang->im->createTask, 'url' => $baseURL . str_replace('/x.php', '/index.php', helper::createLink('task', 'create', "execution=$executionID", 'xhtml')), 'height' => "600px", 'width' => "1200px"); - if(common::hasPriv('doc', 'create') and !empty($libIdList)) $actions->createDoc = array('title' => $this->lang->im->createDoc, 'url' => $baseURL . str_replace('/x.php', '/index.php', helper::createLink('doc', 'create', "objectType=&objectID=0&libID=0", 'xhtml')), 'height' => "600px", 'width' => "1200px"); - if(common::hasPriv('todo', 'create')) $actions->createTodo = array('title' => $this->lang->im->createTodo, 'url' => $baseURL . str_replace('/x.php', '/index.php', helper::createLink('todo', 'create', '', 'xhtml')), 'height' => "600px", 'width' => "1200px"); - + if(common::hasPriv('bug', 'create')) $actions->createBug = array('title' => $this->lang->im->createBug, 'url' => $baseURL . str_replace('/x.php', '/index.php', helper::createLink('bug', 'create', "product=$productID", 'xhtml')), 'height' => "600px", 'width' => "1200px"); + if(common::hasPriv('story', 'create')) $actions->createStory = array('title' => $this->lang->im->createStory, 'url' => $baseURL . str_replace('/x.php', '/index.php', helper::createLink('story', 'create', "product=$productID", 'xhtml')), 'height' => "600px", 'width' => "1200px"); + if(common::hasPriv('task', 'create')) $actions->createTask = array('title' => $this->lang->im->createTask, 'url' => $baseURL . str_replace('/x.php', '/index.php', helper::createLink('task', 'create', "execution=$executionID", 'xhtml')), 'height' => "600px", 'width' => "1200px"); + if(common::hasPriv('doc', 'create')) $actions->createDoc = array('title' => $this->lang->im->createDoc, 'url' => $baseURL . str_replace('/x.php', '/index.php', helper::createLink('doc', 'create', "objectType=&objectID=0&libID=0", 'xhtml')), 'height' => "600px", 'width' => "1200px"); + if(common::hasPriv('todo', 'create')) $actions->createTodo = array('title' => $this->lang->im->createTodo, 'url' => $baseURL . str_replace('/x.php', '/index.php', helper::createLink('todo', 'create', '', 'xhtml')), 'height' => "600px", 'width' => "1200px"); $urls = array(); foreach($this->config->im->cards as $moduleName => $methods) {