r92407 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92406‎ | r92407 | r92408 >
Date:19:29, 17 July 2011
Author:zhenya
Status:ok
Tags:
Comment:
some small changes in getStatus func
Modified paths:
  • /trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php (modified) (history)
  • /trunk/extensions/SocialProfile/UserStatus/UserStatus.css (modified) (history)
  • /trunk/extensions/SocialProfile/UserStatus/UserStatus.i18n.php (modified) (history)
  • /trunk/extensions/SocialProfile/UserStatus/UserStatus.js (modified) (history)

Diff [purge]

Index: trunk/extensions/SocialProfile/UserStatus/UserStatus.i18n.php
@@ -17,6 +17,8 @@
1818 'userstatus-cancel' => 'Cancel',
1919 'userstatus-history' => 'History',
2020 'userstatus-letters-left' => 'letters left',
 21+ 'userstatus-blocked' => 'You are blocked',
 22+ 'userstatus-readonly' => 'The database is locked',
2123 );
2224
2325 /** Message documentation (Message documentation)
@@ -169,6 +171,7 @@
170172 'userstatus-edit' => 'Редагувати',
171173 'userstatus-save' => 'Зберегти',
172174 'userstatus-cancel' => 'Відмінити',
173 - 'userstatus-history' => 'символів залишилось',
 175+ 'userstatus-history' => 'Історія',
 176+ 'userstatus-letters-left' => 'символів залишилось',
174177 );
175178
Index: trunk/extensions/SocialProfile/UserStatus/UserStatus.css
@@ -1,12 +1,10 @@
2 -#status-box
3 -{
 2+#status-box {
43 width : 400px;
54 padding: 0px;
65 margin: 0px;
76 }
87
9 -#status-box-top
10 -{
 8+#status-box-top {
119 overflow:visible;
1210 margin-left: 34px;
1311 width: 30px;
@@ -15,53 +13,45 @@
1614 background-image: url('../images/status-corner.png');
1715 }
1816
19 -#status-box-content
20 -{
 17+#status-box-content {
2118 background-color:orange;
2219 padding:10px;
2320 border-radius: 22px;
2421 /*height: 38px;*/
2522 }
2623
27 -#user-status-block
28 -{
 24+#user-status-block {
2925 text-align: center;
3026 color: white;
3127 }
3228
33 -#us-link
34 -{
 29+#us-link {
3530 color: white;
3631 font-size: 8pt;
3732 text-decoration: underline;
3833 }
3934
40 -#user-status-history
41 -{
 35+#user-status-history {
4236 background-color: orange;
4337 color: white;
4438 }
4539
46 -#user-status-history a
47 -{
 40+#user-status-history a {
4841 text-decoration: underline;
4942 color: white;
5043 }
5144
52 -#status-history-time
53 -{
 45+#status-history-time {
5446 font-size: 9px;
5547 }
5648
57 -#status-letter-count
58 -{
 49+#status-letter-count {
5950 float:right;
6051 margin-right: 20px;
6152 font-size: 8pt;
6253 }
6354
64 -#status-bar
65 -{
 55+#status-bar {
6656 margin-left: 20px;
6757 text-align: left;
6858 }
\ No newline at end of file
Index: trunk/extensions/SocialProfile/UserStatus/UserStatus.js
@@ -4,7 +4,7 @@
55
66 toShowMode: function( status, id ) {
77 document.getElementById( 'user-status-block' ).innerHTML = status;
8 - document.getElementById( 'user-status-block' ).innerHTML += '<br> <a id="us-link" href="javascript:UserStatus.toEditMode(\'' + status + '\',' + id + ');">Edit</a>';
 8+ document.getElementById( 'user-status-block' ).innerHTML += '<br> <a id="us-link" href="javascript:UserStatus.toEditMode(\'' + status + '\',' + id + ');">'+_US_EDIT+'</a>';
99 },
1010
1111 usLettersLeft: function() {
Index: trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php
@@ -1797,22 +1797,18 @@
17981798 // Only owners of the page can change statuses
17991799 if ( $wgUser->getId() == $userId ) {
18001800 if ( $wgUser->isBlocked() ) {
1801 - $us = 'You are blocked';
1802 - return false;
 1801+ return wfMsg('userstatus-blocked');
18031802 }
18041803
18051804 // Database operations require write mode
18061805 if ( wfReadOnly() ) {
1807 - $us = 'Database is in ReadOnly mode';
1808 - return;
 1806+ return wfMsg('userstatus-readonly');
18091807 }
18101808
1811 - $us = "<script>UserStatus.toShowMode('$buf','$userId');</script>";
 1809+ return "<script>UserStatus.toShowMode('$buf','$userId');</script>";
18121810 } else {
1813 - $us = $buf;
 1811+ return $buf;
18141812 }
1815 -
1816 - return $us;
18171813 }
18181814
18191815 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r92147*small fix in sql;...zhenya10:42, 14 July 2011
r92148checks userstatus for wfReadOnly and user->isBlockedzhenya10:47, 14 July 2011

Status & tagging log