From: Alexandre Emsenhuber Date: Sat, 9 Jul 2011 19:38:58 +0000 (+0000) Subject: Added Request::setLang() and RequestContext::setSkin(); the latter will clone the... X-Git-Tag: 1.31.0-rc.0~28959 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/%7B%7B%20url_for%28%27vote%27%2C%20idvote=vote.voteid%29%20%7D%7D?a=commitdiff_plain;h=c2710a9635b88503637aa8d5c6c4211b3b1d3b1d;p=lhc%2Fweb%2Fwiklou.git Added Request::setLang() and RequestContext::setSkin(); the latter will clone the object and set the context on it. --- diff --git a/includes/RequestContext.php b/includes/RequestContext.php index 48cca17db1..f26847e452 100644 --- a/includes/RequestContext.php +++ b/includes/RequestContext.php @@ -125,6 +125,15 @@ class RequestContext { return $this->user; } + /** + * Set the Language object + * + * @param $l Language + */ + public function setLang( Language $l ) { + $this->lang = $l; + } + /** * Get the Language object * @@ -158,6 +167,16 @@ class RequestContext { return $this->lang; } + /** + * Set the Skin object + * + * @param $s Skin + */ + public function setSkin( Skin $s ) { + $this->skin = clone $s; + $this->skin->setContext( $this ); + } + /** * Get the Skin object *