132 if ( !$this->perms->get_permissions('read') ) |
132 if ( !$this->perms->get_permissions('read') ) |
133 { |
133 { |
134 $this->err_access_denied(); |
134 $this->err_access_denied(); |
135 return false; |
135 return false; |
136 } |
136 } |
|
137 $pathskey = $paths->nslist[ $this->namespace ] . $this->page_id; |
|
138 $strict_no_headers = false; |
|
139 if ( isset($paths->pages[$pathskey]) ) |
|
140 { |
|
141 if ( $paths->pages[$pathskey]['special'] == 1 ) |
|
142 { |
|
143 $this->send_headers = false; |
|
144 $strict_no_headers = true; |
|
145 } |
|
146 } |
137 if ( $this->namespace == 'Special' || $this->namespace == 'Admin' ) |
147 if ( $this->namespace == 'Special' || $this->namespace == 'Admin' ) |
138 { |
148 { |
139 if ( !$this->page_exists ) |
149 if ( !$this->page_exists ) |
140 { |
150 { |
141 redirect( makeUrl(getConfig('main_page')), 'Can\'t find special page', 'The special or administration page you requested does not exist. You will now be transferred to the main page.', 2 ); |
151 redirect( makeUrl(getConfig('main_page')), 'Can\'t find special page', 'The special or administration page you requested does not exist. You will now be transferred to the main page.', 2 ); |
285 /** |
295 /** |
286 * Renders it all in one go, and echoes it out. This assumes that the text is in the DB. |
296 * Renders it all in one go, and echoes it out. This assumes that the text is in the DB. |
287 * @access private |
297 * @access private |
288 */ |
298 */ |
289 |
299 |
290 function render() |
300 function render($incl_inner_headers = true) |
291 { |
301 { |
292 $text = $this->fetch_text(); |
302 $text = $this->fetch_text(); |
293 |
303 |
294 $this->header(); |
304 $this->header(); |
295 // if ( $this->send_headers ) |
305 if ( $incl_inner_headers ) |
296 // { |
306 { |
297 display_page_headers(); |
307 display_page_headers(); |
298 // } |
308 } |
299 |
309 |
300 if ( $this->revision_id ) |
310 if ( $this->revision_id ) |
301 { |
311 { |
302 echo '<div class="info-box" style="margin-left: 0; margin-top: 5px;"><b>Notice:</b><br />The page you are viewing was archived on '.date('F d, Y \a\t h:i a', $this->revision_id).'.<br /><a href="'.makeUrlNS($this->namespace, $this->page_id).'" onclick="ajaxReset(); return false;">View current version</a> | <a href="'.makeUrlNS($this->namespace, $this->pageid, 'do=rollback&id='.$this->revision_id).'" onclick="ajaxRollback(\''.$this->revision_id.'\')">Restore this version</a></div><br />'; |
312 echo '<div class="info-box" style="margin-left: 0; margin-top: 5px;"><b>Notice:</b><br />The page you are viewing was archived on '.date('F d, Y \a\t h:i a', $this->revision_id).'.<br /><a href="'.makeUrlNS($this->namespace, $this->page_id).'" onclick="ajaxReset(); return false;">View current version</a> | <a href="'.makeUrlNS($this->namespace, $this->pageid, 'do=rollback&id='.$this->revision_id).'" onclick="ajaxRollback(\''.$this->revision_id.'\')">Restore this version</a></div><br />'; |
303 } |
313 } |
304 |
314 |
305 $text = '?>' . RenderMan::render($text); |
315 $text = '?>' . RenderMan::render($text); |
306 // echo('<pre>'.htmlspecialchars($text).'</pre>'); |
316 // echo('<pre>'.htmlspecialchars($text).'</pre>'); |
307 eval ( $text ); |
317 eval ( $text ); |
308 |
318 |
309 // if ( $this->send_headers ) |
319 if ( $incl_inner_headers ) |
310 // { |
320 { |
311 display_page_footers(); |
321 display_page_footers(); |
312 // } |
322 } |
313 |
323 |
314 $this->footer(); |
324 $this->footer(); |
315 } |
325 } |
316 |
326 |
317 /** |
327 /** |