コード例 #1
0
ファイル: Request.php プロジェクト: maniaplanet/manialib
 protected function __construct()
 {
     if (array_key_exists(Session::NAME, $_GET)) {
         Session::$id = $_GET[Session::NAME];
         unset($_GET[Session::NAME]);
     }
     // This is a hack because of a bug on the master server
     // May it cause bugs ? IDK
     foreach ($_GET as $key => $value) {
         $this->params[str_replace('amp;', '', $key)] = $value;
     }
     if (get_magic_quotes_gpc()) {
         $this->params = array_map('stripslashes', $this->params);
     }
     $this->requestParams = $this->params;
     $config = Config::getInstance();
     $this->appURL = $config->getLinkCreationURL();
     $this->defaultController = $config->defaultController;
     $session = Session::getInstance();
     $this->referer = $session->get('referer');
     if ($this->referer) {
         $this->referer = rawurldecode($this->referer);
     }
 }