Index: trunk/phase3/includes/RequestContext.php |
— | — | @@ -78,7 +78,7 @@ |
79 | 79 | * @return Title |
80 | 80 | */ |
81 | 81 | public function getTitle() { |
82 | | - if ( !isset($this->title) ) { |
| 82 | + if ( $this->title === null ) { |
83 | 83 | global $wgTitle; # fallback to $wg till we can improve this |
84 | 84 | $this->title = $wgTitle; |
85 | 85 | } |
— | — | @@ -98,7 +98,7 @@ |
99 | 99 | * @return OutputPage object |
100 | 100 | */ |
101 | 101 | public function getOutput() { |
102 | | - if ( !isset( $this->output ) ) { |
| 102 | + if ( $this->output === null ) { |
103 | 103 | $this->output = new OutputPage( $this ); |
104 | 104 | } |
105 | 105 | return $this->output; |
— | — | @@ -119,7 +119,7 @@ |
120 | 120 | * @return User |
121 | 121 | */ |
122 | 122 | public function getUser() { |
123 | | - if ( !isset($this->user) ) { |
| 123 | + if ( $this->user === null ) { |
124 | 124 | $this->user = User::newFromSession( $this->getRequest() ); |
125 | 125 | } |
126 | 126 | return $this->user; |
— | — | @@ -131,7 +131,7 @@ |
132 | 132 | * @return Language |
133 | 133 | */ |
134 | 134 | public function getLang() { |
135 | | - if ( !isset($this->lang) ) { |
| 135 | + if ( $this->lang === null ) { |
136 | 136 | global $wgLanguageCode, $wgContLang; |
137 | 137 | $code = $this->getRequest()->getVal( |
138 | 138 | 'uselang', |
— | — | @@ -164,7 +164,7 @@ |
165 | 165 | * @return Skin |
166 | 166 | */ |
167 | 167 | public function getSkin() { |
168 | | - if ( !isset($this->skin) ) { |
| 168 | + if ( $this->skin === null ) { |
169 | 169 | wfProfileIn( __METHOD__ . '-createskin' ); |
170 | 170 | |
171 | 171 | global $wgHiddenPrefs; |
— | — | @@ -195,7 +195,7 @@ |
196 | 196 | */ |
197 | 197 | public function msg() { |
198 | 198 | $args = func_get_args(); |
199 | | - return call_user_func_array( 'wfMessage', $args )->inLanguage( $this->getLang() ); |
| 199 | + return call_user_func_array( 'wfMessage', $args )->inLanguage( $this->getLang() )->title( $this->getTitle() ); |
200 | 200 | } |
201 | 201 | |
202 | 202 | /** Static methods **/ |
— | — | @@ -207,7 +207,7 @@ |
208 | 208 | */ |
209 | 209 | public static function getMain() { |
210 | 210 | static $instance = null; |
211 | | - if ( !isset($instance) ) { |
| 211 | + if ( $instance === null ) { |
212 | 212 | $instance = new self; |
213 | 213 | } |
214 | 214 | return $instance; |