Index: trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php |
— | — | @@ -1793,9 +1793,20 @@ |
1794 | 1794 | } else { |
1795 | 1795 | $buf = $user_status_array['us_status']; |
1796 | 1796 | } |
| 1797 | + |
| 1798 | + // Only owners of the page can change statuses |
| 1799 | + if ( $wgUser->getId() == $userId ) { |
| 1800 | + if ( $wgUser->isBlocked() ) { |
| 1801 | + $us = 'You are blocked'; |
| 1802 | + return false; |
| 1803 | + } |
1797 | 1804 | |
1798 | | - // Only owners of the page can change statuses |
1799 | | - if ( $wgUser->getId() == $userId || $userId == 0 ) { |
| 1805 | + // Database operations require write mode |
| 1806 | + if ( wfReadOnly() ) { |
| 1807 | + $us = 'Database is in ReadOnly mode'; |
| 1808 | + return; |
| 1809 | + } |
| 1810 | + |
1800 | 1811 | $us = "<script>UserStatus.toShowMode('$buf','$userId');</script>"; |
1801 | 1812 | } else { |
1802 | 1813 | $us = $buf; |