r93545 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93544‎ | r93545 | r93546 >
Date:17:53, 30 July 2011
Author:zhenya
Status:ok
Tags:
Comment:
allows only admins to delete messages
Modified paths:
  • /trunk/extensions/SocialProfile/SocialProfile.php (modified) (history)
  • /trunk/extensions/SocialProfile/UserStatus/SpecialUserStatus.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SocialProfile/SocialProfile.php
@@ -101,7 +101,8 @@
102102
103103 // Should we enable UserStatus feature (currently is under development)
104104 $wgEnableUserStatus = false;
105 -
 105+// Permission to delete other Users' Status Messages
 106+$wgGroupPermissions['sysop']['delete-status-update'] = true;
106107 // Extension credits that show up on Special:Version
107108 $wgExtensionCredits['other'][] = array(
108109 'path' => __FILE__,
Index: trunk/extensions/SocialProfile/UserStatus/SpecialUserStatus.php
@@ -13,12 +13,13 @@
1414 }
1515
1616 public function execute( $params ) {
17 - global $wgOut;
18 -
19 - $output = "Enter username: <input type=\"text\" id=\"us-name-input\"> ";
20 - $output .= "<input type=\"button\" value=\"Find\" onclick=\"javascript:UserStatus.specialGetHistory();\">";
21 - $output .= "<div id=\"us-special\"> </div>";
22 - $wgOut->addHTML($output);
 17+ global $wgOut,$wgUser;
 18+ if ( $wgUser->isAllowed( 'delete-status-update' ) ) {
 19+ $output = "Enter username: <input type=\"text\" id=\"us-name-input\"> ";
 20+ $output .= "<input type=\"button\" value=\"Find\" onclick=\"javascript:UserStatus.specialGetHistory();\">";
 21+ $output .= "<div id=\"us-special\"> </div>";
 22+ $wgOut->addHTML($output);
 23+ }
2324 return;
2425 }
2526

Follow-up revisions

RevisionCommit summaryAuthorDate
r93549fu r93545: Add message for the new user rightraymond18:37, 30 July 2011

Status & tagging log