- remove setCompany.

This commit is contained in:
xia0ta0
2013-09-03 13:58:34 +08:00
parent 26d9adbe4d
commit cf167a5c4f
3 changed files with 1 additions and 27 deletions
-25
View File
@@ -36,31 +36,6 @@ class commonModel extends model
header("Cache-control: private");
}
/**
* Set the commpany.
*
* First, search company by the http host. If not found, search by the default domain. Last, use the first as the default.
* After get the company, save it to session.
* @access public
* @return void
*/
public function setCompany()
{
$httpHost = $this->server->http_host;
if($this->session->company)
{
$this->app->company = $this->session->company;
}
else
{
$company = $this->loadModel('company')->getFirst();
if(!$company) $this->app->triggerError(sprintf($this->lang->error->companyNotFound, $httpHost), __FILE__, __LINE__, $exit = true);
$this->session->set('company', $company);
$this->app->company = $company;
}
}
/**
* Set the user info.
*