mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2024-10-01 01:26:10 -04:00
moving access to into Request class
This commit is contained in:
parent
d92755f030
commit
3bca559826
@ -176,8 +176,7 @@ class PrivateBin
|
|||||||
$this->_conf = new Configuration;
|
$this->_conf = new Configuration;
|
||||||
$this->_model = new Model($this->_conf);
|
$this->_model = new Model($this->_conf);
|
||||||
$this->_request = new Request;
|
$this->_request = new Request;
|
||||||
$this->_urlBase = array_key_exists('REQUEST_URI', $_SERVER) ?
|
$this->_urlBase = $this->_request->getRequestUri();
|
||||||
htmlspecialchars($_SERVER['REQUEST_URI']) : '/';
|
|
||||||
ServerSalt::setPath($this->_conf->getKey('dir', 'traffic'));
|
ServerSalt::setPath($this->_conf->getKey('dir', 'traffic'));
|
||||||
|
|
||||||
// set default language
|
// set default language
|
||||||
|
@ -141,7 +141,20 @@ class Request
|
|||||||
*/
|
*/
|
||||||
public function getParam($param, $default = '')
|
public function getParam($param, $default = '')
|
||||||
{
|
{
|
||||||
return array_key_exists($param, $this->_params) ? $this->_params[$param] : $default;
|
return array_key_exists($param, $this->_params) ?
|
||||||
|
$this->_params[$param] : $default;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get request URI
|
||||||
|
*
|
||||||
|
* @access public
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getRequestUri()
|
||||||
|
{
|
||||||
|
return array_key_exists('REQUEST_URI', $_SERVER) ?
|
||||||
|
htmlspecialchars($_SERVER['REQUEST_URI']) : '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user