http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93545
Revision: 93545 Author: zhenya Date: 2011-07-30 17:53:57 +0000 (Sat, 30 Jul 2011) Log Message: ----------- allows only admins to delete messages Modified Paths: -------------- trunk/extensions/SocialProfile/SocialProfile.php trunk/extensions/SocialProfile/UserStatus/SpecialUserStatus.php Modified: trunk/extensions/SocialProfile/SocialProfile.php =================================================================== --- trunk/extensions/SocialProfile/SocialProfile.php 2011-07-30 17:48:53 UTC (rev 93544) +++ trunk/extensions/SocialProfile/SocialProfile.php 2011-07-30 17:53:57 UTC (rev 93545) @@ -101,7 +101,8 @@ // Should we enable UserStatus feature (currently is under development) $wgEnableUserStatus = false; - +// Permission to delete other Users' Status Messages +$wgGroupPermissions['sysop']['delete-status-update'] = true; // Extension credits that show up on Special:Version $wgExtensionCredits['other'][] = array( 'path' => __FILE__, Modified: trunk/extensions/SocialProfile/UserStatus/SpecialUserStatus.php =================================================================== --- trunk/extensions/SocialProfile/UserStatus/SpecialUserStatus.php 2011-07-30 17:48:53 UTC (rev 93544) +++ trunk/extensions/SocialProfile/UserStatus/SpecialUserStatus.php 2011-07-30 17:53:57 UTC (rev 93545) @@ -13,12 +13,13 @@ } public function execute( $params ) { - global $wgOut; - - $output = "Enter username: <input type=\"text\" id=\"us-name-input\"> "; - $output .= "<input type=\"button\" value=\"Find\" onclick=\"javascript:UserStatus.specialGetHistory();\">"; - $output .= "<div id=\"us-special\"> </div>"; - $wgOut->addHTML($output); + global $wgOut,$wgUser; + if ( $wgUser->isAllowed( 'delete-status-update' ) ) { + $output = "Enter username: <input type=\"text\" id=\"us-name-input\"> "; + $output .= "<input type=\"button\" value=\"Find\" onclick=\"javascript:UserStatus.specialGetHistory();\">"; + $output .= "<div id=\"us-special\"> </div>"; + $wgOut->addHTML($output); + } return; } _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs