From c5fc589257af0234e49f38a04853311ea4ee7999 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Mon, 7 Dec 2009 08:51:52 +0000 Subject: [PATCH] Replaced all instances of <<addHTML( <<addHTML( << -END +HTML ); if ( is_callable( $formCallback ) ) { @@ -1372,7 +1372,7 @@ END $this->showTosSummary(); $this->showEditTools(); - $wgOut->addHTML( <<addHTML( <<editFormTextAfterTools}
{$formattedtemplates} @@ -1380,7 +1380,7 @@ END
{$formattedhiddencats}
-END +HTML ); if ( $this->isConflict ) diff --git a/includes/Skin.php b/includes/Skin.php index 4dc62df45f..2d428a17f2 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -547,7 +547,7 @@ class Skin extends Linker { if( $wgUser->getOption( 'highlightbroken' ) ) { $s .= "a.new, #quickbar a.new { color: #CC2200; }\n"; } else { - $s .= <<getOption( 'justify' ) ) { $s .= "#article, #bodyContent, #mw_content { text-align: justify; }\n"; diff --git a/includes/db/DatabaseIbm_db2.php b/includes/db/DatabaseIbm_db2.php index 5163f25d88..15d0b68a27 100644 --- a/includes/db/DatabaseIbm_db2.php +++ b/includes/db/DatabaseIbm_db2.php @@ -29,13 +29,13 @@ class IBM_DB2Field { static function fromText($db, $table, $field) { global $wgDBmwschema; - $q = <<query(sprintf($q, $db->addQuotes($wgDBmwschema), $db->addQuotes($table), diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php index 89aff3ccdb..d864570ac3 100644 --- a/includes/db/DatabasePostgres.php +++ b/includes/db/DatabasePostgres.php @@ -11,7 +11,7 @@ class PostgresField { static function fromText($db, $table, $field) { global $wgDBmwschema; - $q = <<query(sprintf($q, $db->addQuotes($wgDBmwschema), $db->addQuotes($table), @@ -1181,12 +1181,12 @@ class DatabasePostgres extends DatabaseBase { function triggerExists( $table, $trigger ) { global $wgDBmwschema; - $q = <<query(sprintf($q, $this->addQuotes($wgDBmwschema), $this->addQuotes($table), diff --git a/includes/specials/SpecialLockdb.php b/includes/specials/SpecialLockdb.php index 5859d5b2c4..a1d0dc8b6e 100644 --- a/includes/specials/SpecialLockdb.php +++ b/includes/specials/SpecialLockdb.php @@ -65,7 +65,7 @@ class DBLockForm { $reason = htmlspecialchars( $this->reason ); $token = htmlspecialchars( $wgUser->editToken() ); - $wgOut->addHTML( <<addHTML( << {$elr}: @@ -85,7 +85,7 @@ class DBLockForm { -END +HTML ); } diff --git a/includes/specials/SpecialUnlockdb.php b/includes/specials/SpecialUnlockdb.php index a3e8a0c4ff..73e0e68b17 100644 --- a/includes/specials/SpecialUnlockdb.php +++ b/includes/specials/SpecialUnlockdb.php @@ -55,7 +55,7 @@ class DBUnlockForm { $action = $titleObj->escapeLocalURL( "action=submit" ); $token = htmlspecialchars( $wgUser->editToken() ); - $wgOut->addHTML( <<addHTML( << @@ -74,7 +74,7 @@ class DBUnlockForm {
-END +HTML ); } diff --git a/maintenance/importImages.php b/maintenance/importImages.php index a85b8bd995..97be19a620 100644 --- a/maintenance/importImages.php +++ b/maintenance/importImages.php @@ -254,7 +254,7 @@ function showUsage( $reason = false ) { echo( $reason . "\n" ); } - echo << @@ -279,6 +279,6 @@ Options: --protect= Specify the protect value (autoconfirmed,sysop) --unprotect Unprotects all uploaded images -END; +TEXT; exit(1); -} \ No newline at end of file +} diff --git a/maintenance/importUseModWiki.php b/maintenance/importUseModWiki.php index 05a4c78c24..0d01414503 100644 --- a/maintenance/importUseModWiki.php +++ b/maintenance/importUseModWiki.php @@ -59,7 +59,7 @@ function importPages() global $wgRootDirectory; $gt = '>'; - echo << -END; +XML; $letters = array( 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', @@ -79,10 +79,10 @@ END; if( is_dir( $dir ) ) importPageDirectory( $dir ); } - echo << -END; +XML; } function importPageDirectory( $dir, $prefix = "" ) @@ -227,11 +227,11 @@ function importPage( $title ) */ $revisions = array( $page ); } - $xml = << $newtitle -END; +XML; # History $revisions = array_merge( $revisions, fetchKeptPages( $title ) ); @@ -247,7 +247,7 @@ END; $timestamp = xmlsafe( timestamp2ISO8601( $rev->ts ) ); $comment = xmlsafe( recodeText( $rev->summary ) ); - $xml .= << $timestamp $username @@ -256,7 +256,7 @@ END; $text -END; +XML; } $xml .= "\n\n"; return $xml; diff --git a/maintenance/language/checkDupeMessages.php b/maintenance/language/checkDupeMessages.php index 49171bff20..81eafccf8b 100644 --- a/maintenance/language/checkDupeMessages.php +++ b/maintenance/language/checkDupeMessages.php @@ -27,7 +27,7 @@ if ( isset( $options['lang'] ) && isset( $options['clang'] )) { } $runTest = true; } else { - echo <<getOption( 'highlightbroken' ) ) { $s .= "a.new, #quickbar a.new { text-decoration: line-through; }\n"; } else { - $s .= <<getOption( 'justify' ) ) { $s .= "#article, #bodyContent { text-align: justify; }\n"; diff --git a/skins/common/edit.js b/skins/common/edit.js index 17bf113785..d7c9bdd943 100644 --- a/skins/common/edit.js +++ b/skins/common/edit.js @@ -46,7 +46,9 @@ function mwSetupToolbar() { // 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; diff --git a/tests/SearchEngineTest.php b/tests/SearchEngineTest.php index 173260050c..4fc4b2fa9a 100644 --- a/tests/SearchEngineTest.php +++ b/tests/SearchEngineTest.php @@ -7,7 +7,7 @@ class SearchEngineTest extends MediaWiki_TestCase { var $db, $search; function insertSearchData() { - $this->db->safeQuery( <<db->safeQuery( <<db->tableName( 'page' ) ); - $this->db->safeQuery( <<db->safeQuery( <<db->tableName( 'revision' ) ); - $this->db->safeQuery( <<db->safeQuery( <<db->tableName( 'text' ) ); - $this->db->safeQuery( <<db->safeQuery( <<db->tableName( 'searchindex' ) ); } -- 2.20.1