1 | <?php |
||
35 | class WebInstallerOutput { |
||
36 | |||
37 | /** |
||
38 | * The WebInstaller object this WebInstallerOutput is used by. |
||
39 | * |
||
40 | * @var WebInstaller |
||
41 | */ |
||
42 | public $parent; |
||
43 | |||
44 | /** |
||
45 | * Buffered contents that haven't been output yet |
||
46 | * @var string |
||
47 | */ |
||
48 | private $contents = ''; |
||
49 | |||
50 | /** |
||
51 | * Has the header (or short header) been output? |
||
52 | * @var bool |
||
53 | */ |
||
54 | private $headerDone = false; |
||
55 | |||
56 | /** |
||
57 | * @var string |
||
58 | */ |
||
59 | public $redirectTarget; |
||
60 | |||
61 | /** |
||
62 | * Does the current page need to allow being used as a frame? |
||
63 | * If not, X-Frame-Options will be output to forbid it. |
||
64 | * |
||
65 | * @var bool |
||
66 | */ |
||
67 | public $allowFrames = false; |
||
68 | |||
69 | /** |
||
70 | * Whether to use the limited header (used during CC license callbacks) |
||
71 | * @var bool |
||
72 | */ |
||
73 | private $useShortHeader = false; |
||
74 | |||
75 | /** |
||
76 | * @param WebInstaller $parent |
||
77 | */ |
||
78 | public function __construct( WebInstaller $parent ) { |
||
81 | |||
82 | /** |
||
83 | * @param string $html |
||
84 | */ |
||
85 | public function addHTML( $html ) { |
||
89 | |||
90 | /** |
||
91 | * @param string $text |
||
92 | */ |
||
93 | public function addWikiText( $text ) { |
||
96 | |||
97 | /** |
||
98 | * @param string $html |
||
99 | */ |
||
100 | public function addHTMLNoFlush( $html ) { |
||
103 | |||
104 | /** |
||
105 | * @param string $url |
||
106 | * |
||
107 | * @throws MWException |
||
108 | */ |
||
109 | public function redirect( $url ) { |
||
115 | |||
116 | public function output() { |
||
117 | $this->flush(); |
||
118 | |||
119 | if ( !$this->redirectTarget ) { |
||
120 | $this->outputFooter(); |
||
121 | } |
||
122 | } |
||
123 | |||
124 | /** |
||
125 | * Get the stylesheet of the MediaWiki skin. |
||
126 | * |
||
127 | * @return string |
||
128 | */ |
||
129 | public function getCSS() { |
||
183 | |||
184 | /** |
||
185 | * "<link>" to index.php?css=1 for the "<head>" |
||
186 | * |
||
187 | * @return string |
||
188 | */ |
||
189 | private function getCssUrl() { |
||
192 | |||
193 | public function useShortHeader( $use = true ) { |
||
196 | |||
197 | public function allowFrames( $allow = true ) { |
||
200 | |||
201 | public function flush() { |
||
211 | |||
212 | /** |
||
213 | * @return string |
||
214 | */ |
||
215 | public function getDir() { |
||
220 | |||
221 | /** |
||
222 | * @return string |
||
223 | */ |
||
224 | public function getLanguageCode() { |
||
229 | |||
230 | /** |
||
231 | * @return string[] |
||
232 | */ |
||
233 | public function getHeadAttribs() { |
||
239 | |||
240 | /** |
||
241 | * Get whether the header has been output |
||
242 | * |
||
243 | * @return bool |
||
244 | */ |
||
245 | public function headerDone() { |
||
248 | |||
249 | public function outputHeader() { |
||
250 | $this->headerDone = true; |
||
251 | $this->parent->request->response()->header( 'Content-Type: text/html; charset=utf-8' ); |
||
252 | |||
253 | if ( !$this->allowFrames ) { |
||
254 | $this->parent->request->response()->header( 'X-Frame-Options: DENY' ); |
||
255 | } |
||
256 | |||
257 | if ( $this->redirectTarget ) { |
||
258 | $this->parent->request->response()->header( 'Location: ' . $this->redirectTarget ); |
||
259 | |||
260 | return; |
||
261 | } |
||
262 | |||
263 | if ( $this->useShortHeader ) { |
||
264 | $this->outputShortHeader(); |
||
265 | |||
266 | return; |
||
267 | } |
||
268 | ?> |
||
269 | <?php echo Html::htmlHeader( $this->getHeadAttribs() ); ?> |
||
270 | |||
271 | <head> |
||
272 | <meta name="robots" content="noindex, nofollow" /> |
||
273 | <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> |
||
274 | <title><?php $this->outputTitle(); ?></title> |
||
275 | <?php echo $this->getCssUrl() . "\n"; ?> |
||
276 | <?php echo $this->getJQuery() . "\n"; ?> |
||
277 | <?php echo Html::linkedScript( 'config.js' ) . "\n"; ?> |
||
278 | </head> |
||
279 | |||
280 | <?php echo Html::openElement( 'body', [ 'class' => $this->getDir() ] ) . "\n"; ?> |
||
281 | <div id="mw-page-base"></div> |
||
282 | <div id="mw-head-base"></div> |
||
283 | <div id="content" class="mw-body"> |
||
284 | <div id="bodyContent" class="mw-body-content"> |
||
285 | |||
286 | <h1><?php $this->outputTitle(); ?></h1> |
||
287 | <?php |
||
288 | } |
||
289 | |||
290 | public function outputFooter() { |
||
319 | |||
320 | public function outputShortHeader() { |
||
335 | |||
336 | public function outputTitle() { |
||
340 | |||
341 | /** |
||
342 | * @return string |
||
343 | */ |
||
344 | public function getJQuery() { |
||
347 | |||
348 | } |
||
349 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()
can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.