Index: trunk/phase3/maintenance/importImages.php |
— | — | @@ -254,7 +254,7 @@ |
255 | 255 | echo( $reason . "\n" ); |
256 | 256 | } |
257 | 257 | |
258 | | - echo <<<END |
| 258 | + echo <<<TEXT |
259 | 259 | Imports images and other media files into the wiki |
260 | 260 | USAGE: php importImages.php [options] <dir> |
261 | 261 | |
— | — | @@ -279,6 +279,6 @@ |
280 | 280 | --protect=<protect> Specify the protect value (autoconfirmed,sysop) |
281 | 281 | --unprotect Unprotects all uploaded images |
282 | 282 | |
283 | | -END; |
| 283 | +TEXT; |
284 | 284 | exit(1); |
285 | | -} |
\ No newline at end of file |
| 285 | +} |
Index: trunk/phase3/maintenance/importUseModWiki.php |
— | — | @@ -59,7 +59,7 @@ |
60 | 60 | global $wgRootDirectory; |
61 | 61 | |
62 | 62 | $gt = '>'; |
63 | | - echo <<<END |
| 63 | + echo <<<XML |
64 | 64 | <?xml version="1.0" encoding="UTF-8" ?$gt |
65 | 65 | <mediawiki xmlns="http://www.mediawiki.org/xml/export-0.1/" |
66 | 66 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
— | — | @@ -69,7 +69,7 @@ |
70 | 70 | xml:lang="en"> |
71 | 71 | <!-- generated by importUseModWiki.php --> |
72 | 72 | |
73 | | -END; |
| 73 | +XML; |
74 | 74 | $letters = array( |
75 | 75 | 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', |
76 | 76 | 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', |
— | — | @@ -79,10 +79,10 @@ |
80 | 80 | if( is_dir( $dir ) ) |
81 | 81 | importPageDirectory( $dir ); |
82 | 82 | } |
83 | | - echo <<<END |
| 83 | + echo <<<XML |
84 | 84 | </mediawiki> |
85 | 85 | |
86 | | -END; |
| 86 | +XML; |
87 | 87 | } |
88 | 88 | |
89 | 89 | function importPageDirectory( $dir, $prefix = "" ) |
— | — | @@ -227,11 +227,11 @@ |
228 | 228 | */ |
229 | 229 | $revisions = array( $page ); |
230 | 230 | } |
231 | | - $xml = <<<END |
| 231 | + $xml = <<<XML |
232 | 232 | <page> |
233 | 233 | <title>$newtitle</title> |
234 | 234 | |
235 | | -END; |
| 235 | +XML; |
236 | 236 | |
237 | 237 | # History |
238 | 238 | $revisions = array_merge( $revisions, fetchKeptPages( $title ) ); |
— | — | @@ -247,7 +247,7 @@ |
248 | 248 | $timestamp = xmlsafe( timestamp2ISO8601( $rev->ts ) ); |
249 | 249 | $comment = xmlsafe( recodeText( $rev->summary ) ); |
250 | 250 | |
251 | | - $xml .= <<<END |
| 251 | + $xml .= <<<XML |
252 | 252 | <revision> |
253 | 253 | <timestamp>$timestamp</timestamp> |
254 | 254 | <contributor><username>$username</username></contributor> |
— | — | @@ -256,7 +256,7 @@ |
257 | 257 | <text>$text</text> |
258 | 258 | </revision> |
259 | 259 | |
260 | | -END; |
| 260 | +XML; |
261 | 261 | } |
262 | 262 | $xml .= "</page>\n\n"; |
263 | 263 | return $xml; |
Index: trunk/phase3/maintenance/language/rebuildLanguage.php |
— | — | @@ -60,7 +60,7 @@ |
61 | 61 | |
62 | 62 | # Show help |
63 | 63 | if ( isset( $options['help'] ) ) { |
64 | | - echo <<<END |
| 64 | + echo <<<TEXT |
65 | 65 | Run this script to rewrite the messages array in the files languages/messages/MessagesXX.php. |
66 | 66 | Parameters: |
67 | 67 | * lang: Language code (default: the installation default language). You can also specify "all" to check all the languages. |
— | — | @@ -71,7 +71,7 @@ |
72 | 72 | * remove-unknown: Remove unknown messages. |
73 | 73 | * remove-duplicates: Remove duplicated messages based on a PHP source file. |
74 | 74 | |
75 | | -END; |
| 75 | +TEXT; |
76 | 76 | exit(1); |
77 | 77 | } |
78 | 78 | |
Index: trunk/phase3/maintenance/language/checkExtensions.php |
— | — | @@ -11,13 +11,13 @@ |
12 | 12 | require_once( 'checkLanguage.inc' ); |
13 | 13 | |
14 | 14 | if( !class_exists( 'MessageGroups' ) || !class_exists( 'PremadeMediawikiExtensionGroups' ) ) { |
15 | | - echo <<<END |
| 15 | + echo <<<TEXT |
16 | 16 | Please add the Translate extension to LocalSettings.php, and enable the extension groups: |
17 | 17 | require_once( 'extensions/Translate/Translate.php' ); |
18 | 18 | \$wgTranslateEC = array_keys( \$wgTranslateAC ); |
19 | 19 | If you still get this message, update Translate to its latest version. |
20 | 20 | |
21 | | -END; |
| 21 | +TEXT; |
22 | 22 | exit(-1); |
23 | 23 | } |
24 | 24 | |
Index: trunk/phase3/maintenance/language/checkDupeMessages.php |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | } |
29 | 29 | $runTest = true; |
30 | 30 | } else { |
31 | | - echo <<<END |
| 31 | + echo <<<TEXT |
32 | 32 | Run this script to print out the duplicates against a message array. |
33 | 33 | Parameters: |
34 | 34 | * lang: Language code to be checked. |
— | — | @@ -38,7 +38,7 @@ |
39 | 39 | * wiki: Wiki format, with * at beginning of each line |
40 | 40 | * php: Output text as PHP syntax in a array $dupeMessages |
41 | 41 | * raw: Raw output for duplicates |
42 | | -END; |
| 42 | +TEXT; |
43 | 43 | } |
44 | 44 | |
45 | 45 | // Check file exists |
Index: trunk/phase3/maintenance/language/transstat.php |
— | — | @@ -29,7 +29,7 @@ |
30 | 30 | |
31 | 31 | /** Print a usage message*/ |
32 | 32 | function showUsage() { |
33 | | - print <<<END |
| 33 | + print <<<TEXT |
34 | 34 | Usage: php transstat.php [--help] [--output=csv|text|wiki] |
35 | 35 | --help : this helpful message |
36 | 36 | --output : select an output engine one of: |
— | — | @@ -39,7 +39,7 @@ |
40 | 40 | * 'text' : Text with tabs. |
41 | 41 | Example: php maintenance/transstat.php --output=text |
42 | 42 | |
43 | | -END; |
| 43 | +TEXT; |
44 | 44 | exit(1); |
45 | 45 | } |
46 | 46 | |
Index: trunk/phase3/skins/Simple.php |
— | — | @@ -36,7 +36,7 @@ |
37 | 37 | if( $wgUser->getOption( 'highlightbroken' ) ) { |
38 | 38 | $s .= "a.new, #quickbar a.new { text-decoration: line-through; }\n"; |
39 | 39 | } else { |
40 | | - $s .= <<<END |
| 40 | + $s .= <<<CSS |
41 | 41 | a.new, #quickbar a.new, |
42 | 42 | a.stub, #quickbar a.stub { |
43 | 43 | color: inherit; |
— | — | @@ -52,7 +52,7 @@ |
53 | 53 | color: #772233; |
54 | 54 | text-decoration: $underline; |
55 | 55 | } |
56 | | -END; |
| 56 | +CSS; |
57 | 57 | } |
58 | 58 | if( $wgUser->getOption( 'justify' ) ) { |
59 | 59 | $s .= "#article, #bodyContent { text-align: justify; }\n"; |
Index: trunk/phase3/skins/common/edit.js |
— | — | @@ -46,7 +46,9 @@ |
47 | 47 | |
48 | 48 | // Don't generate buttons for browsers which don't fully |
49 | 49 | // support it. |
50 | | - var textbox = document.createElement('textarea'); // abstract, don't assume wpTextbox1 is always there |
| 50 | + var textbox = document.getElementById('wpTextbox1'); |
| 51 | + if (!textbox) { return false; } |
| 52 | + //var textbox = document.createElement('textarea'); // abstract, don't assume wpTextbox1 is always there |
51 | 53 | if (!(document.selection && document.selection.createRange) |
52 | 54 | && textbox.selectionStart === null) { |
53 | 55 | return false; |
Index: trunk/phase3/tests/SearchEngineTest.php |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | var $db, $search; |
9 | 9 | |
10 | 10 | function insertSearchData() { |
11 | | - $this->db->safeQuery( <<<END |
| 11 | + $this->db->safeQuery( <<<SQL |
12 | 12 | INSERT INTO ! (page_id,page_namespace,page_title,page_latest) |
13 | 13 | VALUES (1, 0, 'Main_Page', 1), |
14 | 14 | (2, 1, 'Main_Page', 2), |
— | — | @@ -19,9 +19,9 @@ |
20 | 20 | (8, 0, 'Thppt', 8), |
21 | 21 | (9, 0, 'Alan_Smithee', 9), |
22 | 22 | (10, 0, 'Pages', 10) |
23 | | -END |
| 23 | +SQL |
24 | 24 | , $this->db->tableName( 'page' ) ); |
25 | | - $this->db->safeQuery( <<<END |
| 25 | + $this->db->safeQuery( <<<SQL |
26 | 26 | INSERT INTO ! (rev_id,rev_page) |
27 | 27 | VALUES (1, 1), |
28 | 28 | (2, 2), |
— | — | @@ -33,9 +33,9 @@ |
34 | 34 | (8, 8), |
35 | 35 | (9, 9), |
36 | 36 | (10, 10) |
37 | | -END |
| 37 | +SQL |
38 | 38 | , $this->db->tableName( 'revision' ) ); |
39 | | - $this->db->safeQuery( <<<END |
| 39 | + $this->db->safeQuery( <<<SQL |
40 | 40 | INSERT INTO ! (old_id,old_text) |
41 | 41 | VALUES (1, 'This is a main page'), |
42 | 42 | (2, 'This is a talk page to the main page, see [[smithee]]'), |
— | — | @@ -47,9 +47,9 @@ |
48 | 48 | (8, 'Blah blah'), |
49 | 49 | (9, 'yum'), |
50 | 50 | (10,'are food') |
51 | | -END |
| 51 | +SQL |
52 | 52 | , $this->db->tableName( 'text' ) ); |
53 | | - $this->db->safeQuery( <<<END |
| 53 | + $this->db->safeQuery( <<<SQL |
54 | 54 | INSERT INTO ! (si_page,si_title,si_text) |
55 | 55 | VALUES (1, 'main page', 'this is a main page'), |
56 | 56 | (2, 'main page', 'this is a talk page to the main page, see smithee'), |
— | — | @@ -61,7 +61,7 @@ |
62 | 62 | (8, 'thppt', 'blah blah'), |
63 | 63 | (9, 'alan smithee', 'yum'), |
64 | 64 | (10, 'pages', 'are food') |
65 | | -END |
| 65 | +SQL |
66 | 66 | , $this->db->tableName( 'searchindex' ) ); |
67 | 67 | } |
68 | 68 | |
Index: trunk/phase3/includes/db/DatabasePostgres.php |
— | — | @@ -11,7 +11,7 @@ |
12 | 12 | static function fromText($db, $table, $field) { |
13 | 13 | global $wgDBmwschema; |
14 | 14 | |
15 | | - $q = <<<END |
| 15 | + $q = <<<SQL |
16 | 16 | SELECT |
17 | 17 | CASE WHEN typname = 'int2' THEN 'smallint' |
18 | 18 | WHEN typname = 'int4' THEN 'integer' |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | AND nspname=%s |
29 | 29 | AND relname=%s |
30 | 30 | AND attname=%s; |
31 | | -END; |
| 31 | +SQL; |
32 | 32 | $res = $db->query(sprintf($q, |
33 | 33 | $db->addQuotes($wgDBmwschema), |
34 | 34 | $db->addQuotes($table), |
— | — | @@ -1181,12 +1181,12 @@ |
1182 | 1182 | function triggerExists( $table, $trigger ) { |
1183 | 1183 | global $wgDBmwschema; |
1184 | 1184 | |
1185 | | - $q = <<<END |
| 1185 | + $q = <<<SQL |
1186 | 1186 | SELECT 1 FROM pg_class, pg_namespace, pg_trigger |
1187 | 1187 | WHERE relnamespace=pg_namespace.oid AND relkind='r' |
1188 | 1188 | AND tgrelid=pg_class.oid |
1189 | 1189 | AND nspname=%s AND relname=%s AND tgname=%s |
1190 | | -END; |
| 1190 | +SQL; |
1191 | 1191 | $res = $this->query(sprintf($q, |
1192 | 1192 | $this->addQuotes($wgDBmwschema), |
1193 | 1193 | $this->addQuotes($table), |
Index: trunk/phase3/includes/db/DatabaseIbm_db2.php |
— | — | @@ -29,13 +29,13 @@ |
30 | 30 | static function fromText($db, $table, $field) { |
31 | 31 | global $wgDBmwschema; |
32 | 32 | |
33 | | - $q = <<<END |
| 33 | + $q = <<<SQL |
34 | 34 | SELECT |
35 | 35 | lcase(coltype) AS typname, |
36 | 36 | nulls AS attnotnull, length AS attlen |
37 | 37 | FROM sysibm.syscolumns |
38 | 38 | WHERE tbcreator=%s AND tbname=%s AND name=%s; |
39 | | -END; |
| 39 | +SQL; |
40 | 40 | $res = $db->query(sprintf($q, |
41 | 41 | $db->addQuotes($wgDBmwschema), |
42 | 42 | $db->addQuotes($table), |
Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -1299,10 +1299,10 @@ |
1300 | 1300 | $toolbar = ''; |
1301 | 1301 | // @todo move this to a cleaner conditional instead of blanking a variable |
1302 | 1302 | } |
1303 | | - $wgOut->addHTML( <<<END |
| 1303 | + $wgOut->addHTML( <<<HTML |
1304 | 1304 | {$toolbar} |
1305 | 1305 | <form id="editform" name="editform" method="post" action="$action" enctype="multipart/form-data"> |
1306 | | -END |
| 1306 | +HTML |
1307 | 1307 | ); |
1308 | 1308 | |
1309 | 1309 | if ( is_callable( $formCallback ) ) { |
— | — | @@ -1372,7 +1372,7 @@ |
1373 | 1373 | $this->showTosSummary(); |
1374 | 1374 | $this->showEditTools(); |
1375 | 1375 | |
1376 | | - $wgOut->addHTML( <<<END |
| 1376 | + $wgOut->addHTML( <<<HTML |
1377 | 1377 | {$this->editFormTextAfterTools} |
1378 | 1378 | <div class='templatesUsed'> |
1379 | 1379 | {$formattedtemplates} |
— | — | @@ -1380,7 +1380,7 @@ |
1381 | 1381 | <div class='hiddencats'> |
1382 | 1382 | {$formattedhiddencats} |
1383 | 1383 | </div> |
1384 | | -END |
| 1384 | +HTML |
1385 | 1385 | ); |
1386 | 1386 | |
1387 | 1387 | if ( $this->isConflict ) |
Index: trunk/phase3/includes/specials/SpecialLockdb.php |
— | — | @@ -65,7 +65,7 @@ |
66 | 66 | $reason = htmlspecialchars( $this->reason ); |
67 | 67 | $token = htmlspecialchars( $wgUser->editToken() ); |
68 | 68 | |
69 | | - $wgOut->addHTML( <<<END |
| 69 | + $wgOut->addHTML( <<<HTML |
70 | 70 | <form id="lockdb" method="post" action="{$action}"> |
71 | 71 | {$elr}: |
72 | 72 | <textarea name="wpLockReason" rows="10" cols="60" wrap="virtual">{$reason}</textarea> |
— | — | @@ -85,7 +85,7 @@ |
86 | 86 | </table> |
87 | 87 | <input type="hidden" name="wpEditToken" value="{$token}" /> |
88 | 88 | </form> |
89 | | -END |
| 89 | +HTML |
90 | 90 | ); |
91 | 91 | |
92 | 92 | } |
Index: trunk/phase3/includes/specials/SpecialUnlockdb.php |
— | — | @@ -55,7 +55,7 @@ |
56 | 56 | $action = $titleObj->escapeLocalURL( "action=submit" ); |
57 | 57 | $token = htmlspecialchars( $wgUser->editToken() ); |
58 | 58 | |
59 | | - $wgOut->addHTML( <<<END |
| 59 | + $wgOut->addHTML( <<<HTML |
60 | 60 | |
61 | 61 | <form id="unlockdb" method="post" action="{$action}"> |
62 | 62 | <table border="0"> |
— | — | @@ -74,7 +74,7 @@ |
75 | 75 | </table> |
76 | 76 | <input type="hidden" name="wpEditToken" value="{$token}" /> |
77 | 77 | </form> |
78 | | -END |
| 78 | +HTML |
79 | 79 | ); |
80 | 80 | |
81 | 81 | } |
Index: trunk/phase3/includes/Skin.php |
— | — | @@ -547,7 +547,7 @@ |
548 | 548 | if( $wgUser->getOption( 'highlightbroken' ) ) { |
549 | 549 | $s .= "a.new, #quickbar a.new { color: #CC2200; }\n"; |
550 | 550 | } else { |
551 | | - $s .= <<<END |
| 551 | + $s .= <<<CSS |
552 | 552 | a.new, #quickbar a.new, |
553 | 553 | a.stub, #quickbar a.stub { |
554 | 554 | color: inherit; |
— | — | @@ -560,7 +560,7 @@ |
561 | 561 | content: "!"; |
562 | 562 | color: #772233; |
563 | 563 | } |
564 | | -END; |
| 564 | +CSS; |
565 | 565 | } |
566 | 566 | if( $wgUser->getOption( 'justify' ) ) { |
567 | 567 | $s .= "#article, #bodyContent, #mw_content { text-align: justify; }\n"; |