@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | // |
66 | 66 | function get_platform($user_agent) { |
67 | 67 | if (strstr($user_agent, 'Windows')) { |
68 | - if (strstr($user_agent, 'Win64')||strstr($user_agent, 'WOW64')) { |
|
68 | + if (strstr($user_agent, 'Win64') || strstr($user_agent, 'WOW64')) { |
|
69 | 69 | return 'windows_x86_64'; |
70 | 70 | } else { |
71 | 71 | return 'windows_intelx86'; |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | |
156 | 156 | function download_button_vbox($v, $project_id, $token, $user) { |
157 | 157 | // if no vbox version exists for platform, don't show vbox button |
158 | - if(!$v->vbox_filename) { |
|
158 | + if (!$v->vbox_filename) { |
|
159 | 159 | return; |
160 | 160 | } |
161 | 161 | return sprintf( |
@@ -459,7 +459,7 @@ discard block |
||
459 | 459 | handle_get_info(); |
460 | 460 | } else { |
461 | 461 | $dev = get_str("dev", true); |
462 | - $user_agent = get_str("user_agent", true); // for debugging |
|
462 | + $user_agent = get_str("user_agent", true); // for debugging |
|
463 | 463 | if (!$user_agent) { |
464 | 464 | $user_agent = $_SERVER['HTTP_USER_AGENT']; |
465 | 465 | } |
@@ -168,7 +168,7 @@ |
||
168 | 168 | $user->prefs = $prefs; |
169 | 169 | } |
170 | 170 | function privilege($specialbit) { |
171 | - return (substr($this->special_user, $specialbit, 1) == 1); |
|
171 | + return (substr($this->special_user, $specialbit, 1) == 1); |
|
172 | 172 | } |
173 | 173 | function update($clause) { |
174 | 174 | $db = BoincDb::get(); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $db = BoincDb::get(); |
29 | 29 | return $db->lookup('category', 'BoincCategory', $clause); |
30 | 30 | } |
31 | - static function enum($clause=null) { |
|
31 | + static function enum($clause = null) { |
|
32 | 32 | $db = BoincDb::get(); |
33 | 33 | return $db->enum('category', 'BoincCategory', $clause); |
34 | 34 | } |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $db = BoincDb::get(); |
82 | 82 | return $db->update($this, 'thread', $clause); |
83 | 83 | } |
84 | - static function enum($clause="") { |
|
84 | + static function enum($clause = "") { |
|
85 | 85 | $db = BoincDb::get(); |
86 | 86 | return $db->enum('thread', 'BoincThread', $clause); |
87 | 87 | } |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | $db = BoincDb::get(); |
148 | 148 | $ret = $db->insert('forum_preferences', $clause); |
149 | 149 | } |
150 | - static function lookup(&$user, $nocache=false) { |
|
150 | + static function lookup(&$user, $nocache = false) { |
|
151 | 151 | if (!$user) return; |
152 | 152 | if (isset($user->prefs)) return; |
153 | 153 | if (!$nocache && isset(self::$cache[$user->id])) { |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | $db = BoincDb::get(); |
180 | 180 | return $db->delete_aux('forum_preferences', "userid=$this->userid"); |
181 | 181 | } |
182 | - static function enum($clause=null) { |
|
182 | + static function enum($clause = null) { |
|
183 | 183 | $db = BoincDb::get(); |
184 | 184 | return $db->enum('forum_preferences', 'BoincForumPrefs', $clause); |
185 | 185 | } |
@@ -220,8 +220,8 @@ discard block |
||
220 | 220 | // |
221 | 221 | $fl = BoincForumLogging::lookup(0, 0); |
222 | 222 | if ($fl) { |
223 | - if ($fl->timestamp<time()-MAX_FORUM_LOGGING_TIME){ |
|
224 | - BoincForumLogging::delete_aux("timestamp<'".(time()-MAX_FORUM_LOGGING_TIME)."' and userid != 0"); |
|
223 | + if ($fl->timestamp < time() - MAX_FORUM_LOGGING_TIME) { |
|
224 | + BoincForumLogging::delete_aux("timestamp<'".(time() - MAX_FORUM_LOGGING_TIME)."' and userid != 0"); |
|
225 | 225 | BoincForumLogging::replace(0, 0, time()); |
226 | 226 | } |
227 | 227 | } else { |
@@ -335,10 +335,10 @@ discard block |
||
335 | 335 | } |
336 | 336 | } |
337 | 337 | |
338 | -define ('NOTIFY_FRIEND_REQ', 1); |
|
339 | -define ('NOTIFY_FRIEND_ACCEPT', 2); |
|
340 | -define ('NOTIFY_PM', 3); |
|
341 | -define ('NOTIFY_SUBSCRIBED_THREAD', 4); |
|
342 | -define ('NOTIFY_SUBSCRIBED_FORUM', 5); |
|
338 | +define('NOTIFY_FRIEND_REQ', 1); |
|
339 | +define('NOTIFY_FRIEND_ACCEPT', 2); |
|
340 | +define('NOTIFY_PM', 3); |
|
341 | +define('NOTIFY_SUBSCRIBED_THREAD', 4); |
|
342 | +define('NOTIFY_SUBSCRIBED_FORUM', 5); |
|
343 | 343 | |
344 | 344 | ?> |