}
}
-
+/**
+ * Get the path to a specified script file, respecting file
+ * extensions; this is a wrapper around $wgScriptExtension etc.
+ *
+ * @param string $script Script filename, sans extension
+ * @return string
+ */
+function wfScript( $script = 'index' ) {
+ global $wgScriptPath, $wgScriptExtension;
+ return "{$wgScriptPath}/{$script}{$wgScriptExtension}";
+}
\ No newline at end of file
function initPrinter($isError) {
$isHtml = $this->getIsHtml();
$mime = $isHtml ? 'text/html' : $this->getMimeType();
+ $script = wfScript( 'api' );
// Some printers (ex. Feed) do their own header settings,
// in which case $mime will be set to null
<?php
- if (!$isError) {
+ if( !$isError ) {
?>
<br/>
<small>
-You are looking at the HTML representation of the <?=$this->mFormat?> format.<br/>
+You are looking at the HTML representation of the <?php echo( $this->mFormat ); ?> format.<br/>
HTML is good for debugging, but probably is not suitable for your application.<br/>
See <a href='http://www.mediawiki.org/wiki/API'>complete documentation</a>, or
-<a href='api.php'>API help</a> for more information.
+<a href='<?php echo( $script ); ?>'>API help</a> for more information.
</small>
<?php