r77834 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77833‎ | r77834 | r77835 >
Date:21:44, 5 December 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Follow up to r77832
Modified paths:
  • /trunk/extensions/DSMW/DSMW.i18n.php (modified) (history)
  • /trunk/extensions/DSMW/DSMW.php (modified) (history)
  • /trunk/extensions/DSMW/specialPage/DSMWAdmin.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DSMW/DSMW.php
@@ -86,7 +86,6 @@
8787 $wgAutoloadClasses['ApiPatchPush'] = "$wgDSMWIP/api/ApiPatchPush.php";
8888 $wgAutoloadClasses['utils'] = "$wgDSMWIP/files/utils.php";
8989 $wgAutoloadClasses['Math_BigInteger'] = "$wgDSMWIP/logootComponent/Math/BigInteger.php";
90 -$wgAutoloadClasses['DSMWDBHelpers'] = "$wgDSMWIP/db/DSMWDBHelpers.php";
9190
9291 //// / Register Jobs
9392 $wgJobClasses['DSMWUpdateJob'] = 'DSMWUpdateJob';
Index: trunk/extensions/DSMW/specialPage/DSMWAdmin.php
@@ -63,9 +63,9 @@
6464 $title = Title::makeTitle( NS_SPECIAL, 'DSMWAdmin' );
6565 $newjob = new DSMWUpdateJob( $title );
6666 $newjob->insert();
67 - $wgOut->addHTML( '<p><font color="red"><b>Articles update process started.</b></font></p>' );
 67+ $wgOut->addHTML( '<p><font color="red"><b>' . wfMsg( 'dsmw-special-admin-articleupstarted' ) . '</b></font></p>' );
6868 } else {
69 - $wgOut->addHTML( '<p><font color="red"><b>Articles update process is already running.</b></font></p>' );
 69+ $wgOut->addHTML( '<p><font color="red"><b>' . wfMsg( 'dsmw-special-admin-articleuprunning' ) . '</b></font></p>' );
7070 }
7171
7272 }
@@ -75,34 +75,14 @@
7676 $title1 = Title::makeTitle( NS_SPECIAL, 'DSMWAdmin' );
7777 $newjob1 = new DSMWPropertyTypeJob( $title1 );
7878 $newjob1->insert();
79 - $wgOut->addHTML( '<p><font color="red"><b>Properties type update process started.</b></font></p>' );
 79+ $wgOut->addHTML( '<p><font color="red"><b>' . wfMsg( 'dsmw-special-admin-typeupstarted' ) . '</b></font></p>' );
8080 } else {
81 - $wgOut->addHTML( '<p><font color="red"><b>Properties type update process is already running.</b></font></p>' );
 81+ $wgOut->addHTML( '<p><font color="red"><b>' . wfMsg( 'dsmw-special-admin-typeuprunning' ) . '</b></font></p>' );
8282 }
8383 }
84 - elseif ( $action == 'updatetables' ) {
8584
86 - $wgOut->disable(); // raw output
87 - ob_start();
88 - print "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\" dir=\"ltr\">\n<head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /><title>Setting up Storage for Distributed Semantic MediaWiki</title></head><body><p><pre>";
89 - header( "Content-type: text/html; charset=UTF-8" );
90 - $db =& wfGetDB( DB_MASTER );
91 - $result = DSMWDBHelpers::setup( $db );
92 - print '</pre></p>';
93 - if ( $result === true ) {
94 - print '<p><b>The database was set up successfully.</b></p>';
95 - }
96 - $returntitle = Title::makeTitle( NS_SPECIAL, 'DSMWAdmin' );
97 - print '<p> <a href="' . htmlspecialchars( $returntitle->getFullURL() ) . '">Special:DSMWAdmin</a></p>';
98 - print '</body></html>';
99 - ob_flush();
100 - flush();
101 - return;
 85+ $wgOut->setPagetitle( 'DSMW Settings' );
10286
103 - }
104 -
105 - $wgOut->setPagetitle( "DSMW Settings" );
106 -
10787 $wgOut->addHTML(
10888 Html::element(
10989 'p',
Index: trunk/extensions/DSMW/DSMW.i18n.php
@@ -28,6 +28,10 @@
2929 'dsmw-special-admin-uptext' => "For reasons of conflict management, DSMW works only with pages created after it's installation.
3030 Therefore you need to update pages created before it's installation in order to edit them.",
3131 'dsmw-special-admin-upbutton' => 'Update pages',
 32+ 'dsmw-special-admin-articleupstarted' => 'Articles update process started.',
 33+ 'dsmw-special-admin-articleuprunning' => 'Articles update process is already running.',
 34+ 'dsmw-special-admin-typeupstarted' => 'Properties update process started.',
 35+ 'dsmw-special-admin-typeuprunning' => 'Properties update process is already running.',
3236 );
3337
3438 /** German (Deutsch)

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r77832Added copy of the Html class so it can be used without breaking bc and cleane...jeroendedauw21:27, 5 December 2010

Status & tagging log