diff --git a/Makefile b/Makefile index 467a549faa..9b8abc72be 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,7 @@ pms: cp ranzhi/config/ext/xuanxuan.php buildxx/config/ext/ cp -r ranzhi/lib/phpaes buildxx/lib/ cp -r ranzhi/framework/xuanxuan.class.php buildxx/framework/ - cp -r ranzhi/db/xuanxuan.sql buildxx/db/ + cp -r ranzhi/db/*.sql buildxx/db/ cp -r ranzhi/app/sys/chat buildxx/module/ cp -r ranzhi/app/sys/common/ext/model/hook buildxx/module/common/ext/model/ cp -r ranzhi/app/sys/action buildxx/module/ @@ -67,10 +67,10 @@ pms: sed -i 's/&app=sys//' buildxx/module/chat/control.php sed -i 's/file->createdBy/file->addedBy/' buildxx/module/chat/control.php sed -i 's/file->createdDate/file->addedDate/' buildxx/module/chat/control.php - sed -i 's/im_/zt_im_/' buildxx/db/xuanxuan.sql - sed -i 's/sys_user/zt_user/' buildxx/db/xuanxuan.sql - sed -i 's/sys_file/zt_file/' buildxx/db/xuanxuan.sql - sed -i '/sys_entry/d' buildxx/db/xuanxuan.sql + sed -i 's/im_/zt_im_/' buildxx/db/*.sql + sed -i 's/sys_user/zt_user/' buildxx/db/*.sql + sed -i 's/sys_file/zt_file/' buildxx/db/*.sql + sed -i '/sys_entry/d' buildxx/db/*.sql zip -rqm -9 xuanxuan.zentao.$(VERSION).zip buildxx/* rm -rf buildxx/ unzip xuanxuan.zentao.*.zip -d zentaoxx diff --git a/module/bug/control.php b/module/bug/control.php index a508f85378..3cb4c63b8a 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -296,8 +296,8 @@ class bug extends control if(defined('RUN_MODE') && RUN_MODE == 'api') $this->send(array('status' => 'success', 'data' => $bugID)); - setcookie('bugModule', 0, 0, $this->config->webRoot); - $location = $this->createLink('bug', 'browse', "productID={$this->post->product}&branch=$branch"); + setcookie('bugModule', (int)$this->post->module, 0, $this->config->webRoot); + $location = $this->createLink('bug', 'browse', "productID={$this->post->product}&branch=$branch&browseType=unclosed¶m=0&orderBy=id_desc"); if($this->app->getViewType() == 'xhtml') $location = $this->createLink('bug', 'view', "bugID=$bugID"); $response['locate'] = $location; $this->send($response); diff --git a/module/story/control.php b/module/story/control.php index ddeb2daaad..5f98473209 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -124,10 +124,10 @@ class story extends control $response['locate'] = $this->createLink('project', 'story', "projectID=$projectID&orderBy=&browseType=byModule&moduleID=$moduleID"); if($projectID == 0) { - setcookie('storyModule', 0, 0, $this->config->webRoot); + setcookie('storyModule', (int)$moduleID, 0, $this->config->webRoot); $productID = $this->post->product ? $this->post->product : $productID; $branchID = $this->post->branch ? $this->post->branch : $branch; - $response['locate'] = $this->createLink('product', 'browse', "productID=$productID&branch=$branchID"); + $response['locate'] = $this->createLink('product', 'browse', "productID=$productID&branch=$branchID&browseType=unclosed¶m=0&orderBy=id_desc"); } if($this->app->getViewType() == 'xhtml') $response['locate'] = $this->createLink('story', 'view', "storyID=$storyID"); $this->send($response); diff --git a/module/task/control.php b/module/task/control.php index df0b622021..a366a6ee55 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -154,8 +154,8 @@ class task extends control } elseif($this->post->after == 'toTaskList') { - setcookie('moduleBrowseParam', 0, 0, $this->config->webRoot); - $taskLink = $this->createLink('project', 'task', "projectID=$projectID"); + setcookie('moduleBrowseParam', (int)$this->post->module, 0, $this->config->webRoot); + $taskLink = $this->createLink('project', 'task', "projectID=$projectID&status=unclosed¶m=0&orderBy=id_desc"); $response['locate'] = $taskLink; $this->send($response); } diff --git a/module/testcase/control.php b/module/testcase/control.php index c5b1fd99d9..ce98ec767a 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -246,8 +246,8 @@ class testcase extends control $this->send($response); } - setcookie('caseModule', 0, 0, $this->config->webRoot); - $response['locate'] = $this->createLink('testcase', 'browse', "productID={$this->post->product}&branch={$this->post->branch}"); + setcookie('caseModule', (int)$this->post->module, 0, $this->config->webRoot); + $response['locate'] = $this->createLink('testcase', 'browse', "productID={$this->post->product}&branch={$this->post->branch}&browseType=all¶m=0&orderBy=id_desc"); $this->send($response); } if(empty($this->products)) $this->locate($this->createLink('product', 'create')); diff --git a/module/upgrade/model.php b/module/upgrade/model.php index a0b9e13ddf..2377f1b0cc 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -250,6 +250,10 @@ class upgradeModel extends model case '10_5_1': $this->execSQL($this->getUpgradeFile('10.5.1')); case '10_6': + $xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan2.1.0.sql'; + $this->execSQL($xuanxuanSql); + $xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan2.2.0.sql'; + $this->execSQL($xuanxuanSql); $this->initXuanxuan(); } @@ -369,6 +373,9 @@ class upgradeModel extends model case '10_4': $confirmContent .= file_get_contents($this->getUpgradeFile('10.4')); case '10_5': case '10_5_1': $confirmContent .= file_get_contents($this->getUpgradeFile('10.5.1')); + case '10_6': + $confirmContent .= file_get_contents($this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan2.1.0.sql'); + $confirmContent .= file_get_contents($this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan2.2.0.sql'); } return str_replace('zt_', $this->config->db->prefix, $confirmContent); }