Completed
Push — master ( 6d87d2...a19b5d )
by Vitalii
49s queued 15s
created
html/inc/forum_db.inc 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 ?>
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.