r51036 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51035‎ | r51036 | r51037 >
Date:20:42, 26 May 2009
Author:yaron
Status:deferred
Tags:
Comment:
'importxml' permission renamed to 'datatransferimport', defaulted to on for sysops
Modified paths:
  • /trunk/extensions/DataTransfer/includes/DT_Settings.php (modified) (history)
  • /trunk/extensions/DataTransfer/specials/DT_ImportCSV.php (modified) (history)
  • /trunk/extensions/DataTransfer/specials/DT_ImportXML.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DataTransfer/specials/DT_ImportCSV.php
@@ -65,9 +65,9 @@
6666 global $wgUser, $wgOut, $wgRequest;
6767 $this->setHeaders();
6868
69 - if ( ! $wgUser->isAllowed('importxml') ) {
 69+ if ( ! $wgUser->isAllowed('datatransferimport') ) {
7070 global $wgOut;
71 - $wgOut->permissionRequired('importxml');
 71+ $wgOut->permissionRequired('datatransferimport');
7272 return;
7373 }
7474
Index: trunk/extensions/DataTransfer/specials/DT_ImportXML.php
@@ -23,9 +23,9 @@
2424 global $wgUser, $wgOut, $wgRequest;
2525 $this->setHeaders();
2626
27 - if ( ! $wgUser->isAllowed('importxml') ) {
 27+ if ( ! $wgUser->isAllowed('datatransferimport') ) {
2828 global $wgOut;
29 - $wgOut->permissionRequired('importxml');
 29+ $wgOut->permissionRequired('datatransferimport');
3030 return;
3131 }
3232
Index: trunk/extensions/DataTransfer/includes/DT_Settings.php
@@ -16,8 +16,11 @@
1717 $dtgIP = $IP . '/extensions/DataTransfer';
1818 ##
1919
20 -// PHP fails to find relative includes at some level of inclusion:
21 -//$pathfix = $IP . $dtgScriptPath;
 20+###
 21+# Permission to import files
 22+###
 23+$wgGroupPermissions['sysop']['datatransferimport'] = true;
 24+$wgAvailableRights[] = 'datatransferimport';
2225
2326 // load global functions
2427 require_once('DT_GlobalFunctions.php');

Follow-up revisions

RevisionCommit summaryAuthorDate
r51059Follow-up r51036: Add message for the new rightraymond13:45, 27 May 2009

Status & tagging log