Index: trunk/extensions/OnlineStatusBar/OnlineStatusBar.body.php |
— | — | @@ -29,9 +29,9 @@ |
30 | 30 | |
31 | 31 | /** |
32 | 32 | * Returns image |
33 | | - * @param $mode User |
34 | | - * @return string |
35 | | - */ |
| 33 | + * @param $mode User |
| 34 | + * @return string |
| 35 | + */ |
36 | 36 | public static function GetImageHtml( $mode ) { |
37 | 37 | global $wgExtensionAssetsPath, $wgOnlineStatusBarIcon, $wgOnlineStatusBarModes; |
38 | 38 | $icon = "$wgExtensionAssetsPath/OnlineStatusBar/{$wgOnlineStatusBarIcon[$mode]}"; |
— | — | @@ -40,29 +40,29 @@ |
41 | 41 | } |
42 | 42 | |
43 | 43 | /** |
44 | | - * @param $title Title |
45 | | - * @return user |
46 | | - */ |
| 44 | + * @param $title Title |
| 45 | + * @return user |
| 46 | + */ |
47 | 47 | public static function GetOwnerFromTitle ( $title ) |
48 | 48 | { |
49 | 49 | if ( $title === null ) { |
50 | 50 | return null; |
51 | 51 | } |
52 | 52 | $username = $title->getBaseText(); |
53 | | - $user_object = User::newFromName ( $username ); |
| 53 | + $user_object = User::newFromName ( $username ); |
54 | 54 | return $user_object; |
55 | 55 | } |
56 | 56 | |
57 | 57 | /** |
58 | | - * @return bool |
59 | | - */ |
| 58 | + * @return bool |
| 59 | + */ |
60 | 60 | public static function UpdateDb() { |
61 | 61 | global $wgUser, $wgOnlineStatusBarDefaultOnline; |
62 | 62 | if ( OnlineStatusBar::GetStatus( $wgUser->getName() ) != $wgOnlineStatusBarDefaultOnline ) { |
63 | 63 | $dbw = wfGetDB( DB_MASTER ); |
64 | 64 | $row = array( |
65 | 65 | 'username' => $wgUser->getName(), |
66 | | - 'timestamp' => $dbw->timestamp(), |
| 66 | + 'timestamp' => $dbw->timestamp(), |
67 | 67 | ); |
68 | 68 | $dbw->insert( 'online_status', $row, __METHOD__, 'DELAYED' ); |
69 | 69 | } |
— | — | @@ -70,8 +70,8 @@ |
71 | 71 | } |
72 | 72 | |
73 | 73 | /** |
74 | | - * @return bool |
75 | | - */ |
| 74 | + * @return bool |
| 75 | + */ |
76 | 76 | public static function UpdateStatus() { |
77 | 77 | global $wgUser, $wgOnlineStatusBarDefaultOffline; |
78 | 78 | if ( OnlineStatusBar::GetStatus( $wgUser->getName() ) == $wgOnlineStatusBarDefaultOffline ) { |
— | — | @@ -85,13 +85,12 @@ |
86 | 86 | array( 'username' => $wgUser->getID() ), |
87 | 87 | __METHOD__ |
88 | 88 | ); |
89 | | - |
90 | 89 | return false; |
91 | 90 | } |
92 | 91 | |
93 | 92 | /** |
94 | | - * @return int |
95 | | - */ |
| 93 | + * @return int |
| 94 | + */ |
96 | 95 | public static function DeleteOld() { |
97 | 96 | global $wgOnlineStatusBar_LogoutTime, $wgDBname; |
98 | 97 | $dbw = wfGetDB( DB_MASTER ); |
— | — | @@ -103,9 +102,9 @@ |
104 | 103 | |
105 | 104 | |
106 | 105 | /** |
107 | | - * @param $userName string |
108 | | - * @return bool |
109 | | - */ |
| 106 | + * @param $userName string |
| 107 | + * @return bool |
| 108 | + */ |
110 | 109 | public static function IsValid( $userName ) { |
111 | 110 | global $wgOnlineStatusBarDefaultIpUsers, $wgOnlineStatusBarDefaultEnabled; |
112 | 111 | // checks if anon |
— | — | @@ -118,13 +117,13 @@ |
119 | 118 | return false; |
120 | 119 | } |
121 | 120 | // do we track them |
122 | | - return $user->getOption( "OnlineStatusBar_active", $wgOnlineStatusBarDefaultEnabled ); |
| 121 | + return $user->getOption( "OnlineStatusBar_active", $wgOnlineStatusBarDefaultEnabled ); |
123 | 122 | } |
124 | 123 | |
125 | 124 | /** |
126 | | - * @param $userName string |
127 | | - * @return string |
128 | | - */ |
| 125 | + * @param $userName string |
| 126 | + * @return string |
| 127 | + */ |
129 | 128 | static function GetStatus( $userName ) { |
130 | 129 | global $wgOnlineStatusBarModes, $wgOnlineStatusBarDefaultOffline, $wgOnlineStatusBarDefaultIpUsers, $wgOnlineStatusBarDefaultOnline, $wgDBname; |
131 | 130 | $dbw = wfGetDB( DB_MASTER ); |
— | — | @@ -147,8 +146,8 @@ |
148 | 147 | |
149 | 148 | /** |
150 | 149 | * @param $userName string |
151 | | - * @return bool |
152 | | - */ |
| 150 | + * @return bool |
| 151 | + */ |
153 | 152 | static function DeleteStatus( $userName ) { |
154 | 153 | $dbw = wfGetDB( DB_MASTER ); |
155 | 154 | $dbw->delete( 'online_status', array( 'username' => $userName ), __METHOD__ ); // delete user |
Index: trunk/extensions/OnlineStatusBar/OnlineStatusBarHooks.php |
— | — | @@ -171,7 +171,7 @@ |
172 | 172 | } |
173 | 173 | $ret = OnlineStatusBar::GetStatus( $name ); |
174 | 174 | if ( $ret == "hidden" ) { |
175 | | - $ret = $wgOnlineStatusBarDefaultOffline; |
| 175 | + $ret = $wgOnlineStatusBarDefaultOffline; |
176 | 176 | } |
177 | 177 | } |
178 | 178 | return true; |