From a9f9abff91ac53aff4a4a5796bca834ea585e50c Mon Sep 17 00:00:00 2001 From: wangchunsheng Date: Wed, 30 Jan 2013 07:33:40 +0000 Subject: [PATCH] * fix the error of zentaoRoot when download notify package. --- module/misc/control.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/module/misc/control.php b/module/misc/control.php index 54033cc5da..45251b6b65 100644 --- a/module/misc/control.php +++ b/module/misc/control.php @@ -102,8 +102,12 @@ class misc extends control $files = $sourceZip->extract(PCLZIP_OPT_PATH, $notifyDir); if($files == 0) die("Error : ".$sourceZip->errorInfo(true)); - $currentUser = $this->app->user; - $loginInfo = json_encode(array('account' => $currentUser->account, 'password' => $currentUser->password, 'zentaoRoot' => 'http://' . $this->config->default->domain)); + $loginInfo = new stdclass(); + $loginInfo->account = $this->app->user->account; + $loginInfo->password = $this->app->user->password; + $loginInfo->zentaoRoot = common::getSysURL() . $this->config->webRoot; + $loginInfo = json_encode($loginInfo); + file_put_contents($loginFile, $loginInfo); unlink($packageFile);