From 94e5a7d36b2e5753d37352bd9fb18be39a5aa5fc Mon Sep 17 00:00:00 2001 From: wangchunsheng Date: Fri, 1 Jul 2011 07:49:03 +0000 Subject: [PATCH] * fix the parse errors. --- module/convert/control.php | 1 - module/convert/converter/redmine.php | 2 +- module/convert/converter/redmine1.1.php | 40 ++++++++++++------------- module/convert/lang/zh-cn.php | 2 +- 4 files changed, 22 insertions(+), 23 deletions(-) diff --git a/module/convert/control.php b/module/convert/control.php index 2b3426a984..1148b296e6 100644 --- a/module/convert/control.php +++ b/module/convert/control.php @@ -168,7 +168,6 @@ class convert extends control public function setParam() { - if() if(!empty($_POST)) { foreach($this->post as $issueType => $aimType) diff --git a/module/convert/converter/redmine.php b/module/convert/converter/redmine.php index fdcd7610cb..d5a44ce51a 100644 --- a/module/convert/converter/redmine.php +++ b/module/convert/converter/redmine.php @@ -58,7 +58,7 @@ class redmineConvertModel extends convertModel */ public function setPath() { - $this->filePath = realpath($this->post->installPath) . $this->app->getPathFix() . 'redmine' . $this->app->getPathFix(); + $this->filePath = realpath($this->post->installPath) . $this->app->getPathFix() . 'files' . $this->app->getPathFix(); } /** diff --git a/module/convert/converter/redmine1.1.php b/module/convert/converter/redmine1.1.php index c57b8435ea..1880903d5b 100644 --- a/module/convert/converter/redmine1.1.php +++ b/module/convert/converter/redmine1.1.php @@ -53,22 +53,22 @@ class redmine11ConvertModel extends redmineConvertModel $this->dao->dbh($this->dbh); $this->loadModel('tree')->fixModulePath(); - $result['group'] = $convertGroupCount - $result['user'] = $convertUserCount - $result['product'] = $convertProductCount - $result['project'] = $convertProjectCount - $result['story'] = $convertStoryCount - $result['task'] = $convertTaskCount - $result['bug'] = $convertBugCount - $result['productPlan'] = $convertProductPlanCount - $result['team'] = $convertTeamCount - $result['release'] = $convertReleaseCount - $result['build'] = $convertBuildCount - $result['docLib'] = $convertDocLibCount - $result['doc'] = $convertDocCount - $result['file'] = $convertFileCount - return $result; - } + $result['group'] = $convertGroupCount; + $result['user'] = $convertUserCount ; + $result['product'] = $convertProductCount ; + $result['project'] = $convertProjectCount ; + $result['story'] = $convertStoryCount; + $result['task'] = $convertTaskCount ; + $result['bug'] = $convertBugCount ; + $result['productPlan'] = $convertProductPlanCount; + $result['team'] = $convertTeamCount; + $result['release'] = $convertReleaseCount; + $result['build'] = $convertBuildCount; + $result['docLib'] = $convertDocLibCount ; + $result['doc'] = $convertDocCount; + $result['file'] = $convertFileCount; + return $result; + } /** * Set table names. @@ -166,10 +166,10 @@ class redmine11ConvertModel extends redmineConvertModel { /* Get user list. */ $users = $this->dao->dbh($this->sourceDBH) - ->select("login AS account, firstname, lastname, email") + ->select("login AS account, firstname, lastname, mail") ->from(REDMINE_TABLE_USERS) ->where('type')->eq('User') - ->orderBy('userID ASC') + ->orderBy('id ASC') ->fetchAll('id', $autoCompany = false); /* Insert into zentao. */ @@ -677,7 +677,7 @@ class redmine11ConvertModel extends redmineConvertModel } elseif($file['objectType'] == 'Document') { - $file['objectType'] = 'doc' + $file['objectType'] = 'doc' ; $file['objectID'] = $this->map['docs'][$file['objectID']]; } elseif($file['objectType'] == 'WikiPage') @@ -701,7 +701,7 @@ class redmine11ConvertModel extends redmineConvertModel $file['objectID'] = $this->dao->lastInsertID(); } - $pathname = pathinfo($file['pathname']) + $pathname = pathinfo($file['pathname']); $file['extension'] = $pathname["extension"]; /* Insert into database. */ diff --git a/module/convert/lang/zh-cn.php b/module/convert/lang/zh-cn.php index c6b8ca5a10..bf59e6c565 100644 --- a/module/convert/lang/zh-cn.php +++ b/module/convert/lang/zh-cn.php @@ -35,7 +35,7 @@ $lang->convert->directionList['task'] = '任务'; $lang->convert->directionList['story'] = '需求'; $lang->convert->sourceList['BugFree'] = array('bugfree_1' => '1.x', 'bugfree_2' => '2.x'); -$lang->convert->sourceList['Redmine'] = array('Redmine_1_1' => '1.1'); +$lang->convert->sourceList['Redmine'] = array('Redmine_1.1' => '1.1'); $lang->convert->setting = '设置'; $lang->convert->checkConfig = '检查配置';