Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F2358
raw.diff
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Authored By
•
bzimport
Nov 21 2014, 8:51 PM
2014-11-21 20:51:26 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
raw.diff
View Options
--- XXX 1970-01-01 01:00:00.000000000 +0100
+++ Raw.php 2005-10-08 17:14:39.000000000 +0200
@@ -0,0 +1,54 @@
+<?php
+
+# Minimal skin, applying only minimal additional code and styling.
+# Useful for dumps, PDAs, scripts and bots.
+
+if( !defined( 'MEDIAWIKI' ) )
+ die();
+
+class SkinRaw extends Skin {
+
+ function prelude( &$out ) {
+ global $wgDocType, $wgDTD, $wgContLanguageCode, $wgOutputEncoding, $wgMimeType;
+ global $wgUser, $wgContLang, $wgRequest, $wgUseTrackbacks, $wgTitle;
+
+ if( $wgMimeType == 'text/xml' || $wgMimeType == 'application/xhtml+xml' || $wgMimeType == 'application/xml' ) {
+ $ret = "<?xml version=\"1.0\" encoding=\"$wgOutputEncoding\" ?>\n";
+ } else {
+ $ret = '';
+ }
+
+ $ret .= "<!DOCTYPE html PUBLIC \"$wgDocType\"\n \"$wgDTD\">\n";
+
+ if ( '' == $out->getHTMLTitle() ) {
+ $out->setHTMLTitle( wfMsg( 'pagetitle', $out->getPageTitle() ));
+ }
+
+ $rtl = $wgContLang->isRTL() ? " dir='RTL'" : '';
+ $ret .= "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"$wgContLanguageCode\" lang=\"$wgContLanguageCode\" $rtl>\n";
+ $ret .= "<head>\n<title>" . htmlspecialchars( $out->getHTMLTitle() ) . "</title>\n";
+
+ $ret .= "<meta http-equiv='Content-type' content='$wgMimeType; charset={$wgOutputEncoding}'/>\n";
+
+ $ret .= "</head>\n";
+ return $ret;
+ }
+
+ function outputPage( &$out ) {
+ $out->out( $this->prelude($out) );
+
+ $out->out("\n<body>" );
+ $out->out("\n<div id='article'>" );
+ $out->out($this->pageTitle() );
+ $out->out($out->mBodytext . "\n" );
+ $out->out("\n</div>" );
+
+ $out->out( $this->otherLanguages() );
+
+ $out->out("\n</body>");
+
+ $out->out("</html>" );
+ }
+
+}
+?>
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1934
Default Alt Text
raw.diff (1 KB)
Attached To
Mode
T5651: PATCH: Minimal skin for use by PDAs, bots and dumps
Attached
Detach File
Event Timeline
Log In to Comment