* remove the myrouter.class.php.

This commit is contained in:
wangchunsheng
2010-01-21 08:05:48 +00:00
parent bc66fdc3d4
commit 7ccb3c2c1f
4 changed files with 17 additions and 61 deletions
+15 -13
View File
@@ -299,13 +299,16 @@ EOT;
{
if(isset($_SESSION['company']) and $_SESSION['company']->pms == $_SERVER['HTTP_HOST'])
{
$this->app->setSessionCompany($_SESSION['company']);
$this->app->company = $_SESSION['company'];
}
else
{
$company = $this->company->getByDomain();
if(!$company) $company = $this->company->getByDomain($this->config->default->domain);
if(!$company) $this->app->error(sprintf($this->lang->error->companyNotFound, $_SERVER['HTTP_HOST']), __FILE__, __LINE__, $exit = true);
$_SESSION['company'] = $company;
$this->app->company = $company;
}
$company = $this->company->getByDomain();
if(!$company) $company = $this->company->getByDomain($this->config->default->domain);
if(!$company) $this->app->error(sprintf($this->lang->error->companyNotFound, $_SERVER['HTTP_HOST']), __FILE__, __LINE__, $exit = true);
$_SESSION['company'] = $company;
$this->app->setSessionCompany($company);
}
/**
@@ -318,17 +321,16 @@ EOT;
{
if(isset($_SESSION['user']))
{
$this->app->setSessionUser($_SESSION['user']);
$this->app->user = $_SESSION['user'];
}
elseif($this->app->company->guest)
{
$user = new stdClass();
$user->account = 'guest';
$user->realname = 'guest';
$this->loadModel('user');
$user->rights = $this->user->authorize('guest');
$user = new stdClass();
$user->account = 'guest';
$user->realname = 'guest';
$user->rights = $this->loadModel('user')->authorize('guest');
$_SESSION['user'] = $user;
$this->app->setSessionUser($_SESSION['user']);
$this->app->user = $_SESSION['user'];
}
}
+1 -1
View File
@@ -280,7 +280,7 @@ class user extends control
{
$user->rights = $this->user->authorize($_POST['account']);
$_SESSION['user'] = $user;
$this->app->setSessionUser($user);
$this->app->user = $_SESSION['user'];
/* POST变量中设置了referer信息,且非user/login.html, 非user/deny.html,并且包含当前系统的域名。*/
if(isset($_POST['referer']) and