$toolbar = '';
// @todo move this to a cleaner conditional instead of blanking a variable
}
- $wgOut->addHTML( <<<END
+ $wgOut->addHTML( <<<HTML
{$toolbar}
<form id="editform" name="editform" method="post" action="$action" enctype="multipart/form-data">
-END
+HTML
);
if ( is_callable( $formCallback ) ) {
$this->showTosSummary();
$this->showEditTools();
- $wgOut->addHTML( <<<END
+ $wgOut->addHTML( <<<HTML
{$this->editFormTextAfterTools}
<div class='templatesUsed'>
{$formattedtemplates}
<div class='hiddencats'>
{$formattedhiddencats}
</div>
-END
+HTML
);
if ( $this->isConflict )
if( $wgUser->getOption( 'highlightbroken' ) ) {
$s .= "a.new, #quickbar a.new { color: #CC2200; }\n";
} else {
- $s .= <<<END
+ $s .= <<<CSS
a.new, #quickbar a.new,
a.stub, #quickbar a.stub {
color: inherit;
content: "!";
color: #772233;
}
-END;
+CSS;
}
if( $wgUser->getOption( 'justify' ) ) {
$s .= "#article, #bodyContent, #mw_content { text-align: justify; }\n";
static function fromText($db, $table, $field) {
global $wgDBmwschema;
- $q = <<<END
+ $q = <<<SQL
SELECT
lcase(coltype) AS typname,
nulls AS attnotnull, length AS attlen
FROM sysibm.syscolumns
WHERE tbcreator=%s AND tbname=%s AND name=%s;
-END;
+SQL;
$res = $db->query(sprintf($q,
$db->addQuotes($wgDBmwschema),
$db->addQuotes($table),
static function fromText($db, $table, $field) {
global $wgDBmwschema;
- $q = <<<END
+ $q = <<<SQL
SELECT
CASE WHEN typname = 'int2' THEN 'smallint'
WHEN typname = 'int4' THEN 'integer'
AND nspname=%s
AND relname=%s
AND attname=%s;
-END;
+SQL;
$res = $db->query(sprintf($q,
$db->addQuotes($wgDBmwschema),
$db->addQuotes($table),
function triggerExists( $table, $trigger ) {
global $wgDBmwschema;
- $q = <<<END
+ $q = <<<SQL
SELECT 1 FROM pg_class, pg_namespace, pg_trigger
WHERE relnamespace=pg_namespace.oid AND relkind='r'
AND tgrelid=pg_class.oid
AND nspname=%s AND relname=%s AND tgname=%s
-END;
+SQL;
$res = $this->query(sprintf($q,
$this->addQuotes($wgDBmwschema),
$this->addQuotes($table),
$reason = htmlspecialchars( $this->reason );
$token = htmlspecialchars( $wgUser->editToken() );
- $wgOut->addHTML( <<<END
+ $wgOut->addHTML( <<<HTML
<form id="lockdb" method="post" action="{$action}">
{$elr}:
<textarea name="wpLockReason" rows="10" cols="60" wrap="virtual">{$reason}</textarea>
</table>
<input type="hidden" name="wpEditToken" value="{$token}" />
</form>
-END
+HTML
);
}
$action = $titleObj->escapeLocalURL( "action=submit" );
$token = htmlspecialchars( $wgUser->editToken() );
- $wgOut->addHTML( <<<END
+ $wgOut->addHTML( <<<HTML
<form id="unlockdb" method="post" action="{$action}">
<table border="0">
</table>
<input type="hidden" name="wpEditToken" value="{$token}" />
</form>
-END
+HTML
);
}
echo( $reason . "\n" );
}
- echo <<<END
+ echo <<<TEXT
Imports images and other media files into the wiki
USAGE: php importImages.php [options] <dir>
--protect=<protect> Specify the protect value (autoconfirmed,sysop)
--unprotect Unprotects all uploaded images
-END;
+TEXT;
exit(1);
-}
\ No newline at end of file
+}
global $wgRootDirectory;
$gt = '>';
- echo <<<END
+ echo <<<XML
<?xml version="1.0" encoding="UTF-8" ?$gt
<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.1/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xml:lang="en">
<!-- generated by importUseModWiki.php -->
-END;
+XML;
$letters = array(
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
if( is_dir( $dir ) )
importPageDirectory( $dir );
}
- echo <<<END
+ echo <<<XML
</mediawiki>
-END;
+XML;
}
function importPageDirectory( $dir, $prefix = "" )
*/
$revisions = array( $page );
}
- $xml = <<<END
+ $xml = <<<XML
<page>
<title>$newtitle</title>
-END;
+XML;
# History
$revisions = array_merge( $revisions, fetchKeptPages( $title ) );
$timestamp = xmlsafe( timestamp2ISO8601( $rev->ts ) );
$comment = xmlsafe( recodeText( $rev->summary ) );
- $xml .= <<<END
+ $xml .= <<<XML
<revision>
<timestamp>$timestamp</timestamp>
<contributor><username>$username</username></contributor>
<text>$text</text>
</revision>
-END;
+XML;
}
$xml .= "</page>\n\n";
return $xml;
}
$runTest = true;
} else {
- echo <<<END
+ echo <<<TEXT
Run this script to print out the duplicates against a message array.
Parameters:
* lang: Language code to be checked.
* wiki: Wiki format, with * at beginning of each line
* php: Output text as PHP syntax in a array $dupeMessages
* raw: Raw output for duplicates
-END;
+TEXT;
}
// Check file exists
require_once( 'checkLanguage.inc' );
if( !class_exists( 'MessageGroups' ) || !class_exists( 'PremadeMediawikiExtensionGroups' ) ) {
- echo <<<END
+ echo <<<TEXT
Please add the Translate extension to LocalSettings.php, and enable the extension groups:
require_once( 'extensions/Translate/Translate.php' );
\$wgTranslateEC = array_keys( \$wgTranslateAC );
If you still get this message, update Translate to its latest version.
-END;
+TEXT;
exit(-1);
}
# Show help
if ( isset( $options['help'] ) ) {
- echo <<<END
+ echo <<<TEXT
Run this script to rewrite the messages array in the files languages/messages/MessagesXX.php.
Parameters:
* lang: Language code (default: the installation default language). You can also specify "all" to check all the languages.
* remove-unknown: Remove unknown messages.
* remove-duplicates: Remove duplicated messages based on a PHP source file.
-END;
+TEXT;
exit(1);
}
/** Print a usage message*/
function showUsage() {
- print <<<END
+ print <<<TEXT
Usage: php transstat.php [--help] [--output=csv|text|wiki]
--help : this helpful message
--output : select an output engine one of:
* 'text' : Text with tabs.
Example: php maintenance/transstat.php --output=text
-END;
+TEXT;
exit(1);
}
if( $wgUser->getOption( 'highlightbroken' ) ) {
$s .= "a.new, #quickbar a.new { text-decoration: line-through; }\n";
} else {
- $s .= <<<END
+ $s .= <<<CSS
a.new, #quickbar a.new,
a.stub, #quickbar a.stub {
color: inherit;
color: #772233;
text-decoration: $underline;
}
-END;
+CSS;
}
if( $wgUser->getOption( 'justify' ) ) {
$s .= "#article, #bodyContent { text-align: justify; }\n";
// Don't generate buttons for browsers which don't fully
// support it.
- var textbox = document.createElement('textarea'); // abstract, don't assume wpTextbox1 is always there
+ var textbox = document.getElementById('wpTextbox1');
+ if (!textbox) { return false; }
+ //var textbox = document.createElement('textarea'); // abstract, don't assume wpTextbox1 is always there
if (!(document.selection && document.selection.createRange)
&& textbox.selectionStart === null) {
return false;
var $db, $search;
function insertSearchData() {
- $this->db->safeQuery( <<<END
+ $this->db->safeQuery( <<<SQL
INSERT INTO ! (page_id,page_namespace,page_title,page_latest)
VALUES (1, 0, 'Main_Page', 1),
(2, 1, 'Main_Page', 2),
(8, 0, 'Thppt', 8),
(9, 0, 'Alan_Smithee', 9),
(10, 0, 'Pages', 10)
-END
+SQL
, $this->db->tableName( 'page' ) );
- $this->db->safeQuery( <<<END
+ $this->db->safeQuery( <<<SQL
INSERT INTO ! (rev_id,rev_page)
VALUES (1, 1),
(2, 2),
(8, 8),
(9, 9),
(10, 10)
-END
+SQL
, $this->db->tableName( 'revision' ) );
- $this->db->safeQuery( <<<END
+ $this->db->safeQuery( <<<SQL
INSERT INTO ! (old_id,old_text)
VALUES (1, 'This is a main page'),
(2, 'This is a talk page to the main page, see [[smithee]]'),
(8, 'Blah blah'),
(9, 'yum'),
(10,'are food')
-END
+SQL
, $this->db->tableName( 'text' ) );
- $this->db->safeQuery( <<<END
+ $this->db->safeQuery( <<<SQL
INSERT INTO ! (si_page,si_title,si_text)
VALUES (1, 'main page', 'this is a main page'),
(2, 'main page', 'this is a talk page to the main page, see smithee'),
(8, 'thppt', 'blah blah'),
(9, 'alan smithee', 'yum'),
(10, 'pages', 'are food')
-END
+SQL
, $this->db->tableName( 'searchindex' ) );
}