Passed
Pull Request — master (#1923)
by Struan
50:21 queued 14:35
created
www/includes/easyparliament/comment.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
     public $body = '';
31 31
     public $posted = '';
32 32
     public $visible = false;
33
-    public $modflagged = null;	// Is a datetime when set.
34
-    public $firstname = '';	// Of the person who posted it.
33
+    public $modflagged = null; // Is a datetime when set.
34
+    public $firstname = ''; // Of the person who posted it.
35 35
     public $lastname = '';
36 36
     public $url = '';
37 37
 
@@ -70,12 +70,12 @@  discard block
 block discarded – undo
70 70
             if ($q) {
71 71
 
72 72
                 $this->comment_id 	= $comment_id;
73
-                $this->user_id		= $q['user_id'];
73
+                $this->user_id = $q['user_id'];
74 74
                 $this->epobject_id	= $q['epobject_id'];
75
-                $this->body			= $q['body'];
76
-                $this->posted		= $q['posted'];
77
-                $this->visible		= $q['visible'];
78
-                $this->modflagged	= $q['modflagged'];
75
+                $this->body = $q['body'];
76
+                $this->posted = $q['posted'];
77
+                $this->visible = $q['visible'];
78
+                $this->modflagged = $q['modflagged'];
79 79
 
80 80
                 // Sets the URL and username for this comment. Duh.
81 81
                 $this->_set_url();
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
         }
143 143
 
144 144
         if (!$THEUSER->is_able_to('addcomment')) {
145
-            $message = 	[
145
+            $message = [
146 146
                 'title' => 'Sorry',
147 147
                 'text' => 'You are not allowed to post annotations.',
148 148
             ];
@@ -203,12 +203,12 @@  discard block
 block discarded – undo
203 203
 
204 204
         if ($q->success()) {
205 205
             // Set the object varibales up.
206
-            $this->comment_id 	= $q->insert_id();
207
-            $this->user_id	  	= $THEUSER->user_id();
208
-            $this->epobject_id 	= $data['epobject_id'];
209
-            $this->body			= $data['body'];
210
-            $this->posted		= $posted;
211
-            $this->visible		= 1;
206
+            $this->comment_id = $q->insert_id();
207
+            $this->user_id = $THEUSER->user_id();
208
+            $this->epobject_id = $data['epobject_id'];
209
+            $this->body = $data['body'];
210
+            $this->posted = $posted;
211
+            $this->visible = 1;
212 212
 
213 213
             return $this->comment_id();
214 214
 
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 
220 220
 
221 221
     public function display($format = 'html', $template = 'comments') {
222
-        $data['comments'][0] =  [
222
+        $data['comments'][0] = [
223 223
             'comment_id'	=> $this->comment_id,
224 224
             'user_id'		=> $this->user_id,
225 225
             'epobject_id'	=> $this->epobject_id,
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
             $this->modflagged = $date;
268 268
             return true;
269 269
         } else {
270
-            $message =  [
270
+            $message = [
271 271
                 'title' => 'Sorry',
272 272
                 'text' => "We couldn't update the annotation's modflag.",
273 273
             ];
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
             if ($q->success()) {
290 290
                 return true;
291 291
             } else {
292
-                $message =  [
292
+                $message = [
293 293
                     'title' => 'Sorry',
294 294
                     'text' => "We were unable to delete the annotation.",
295 295
                 ];
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
             }
299 299
 
300 300
         } else {
301
-            $message =  [
301
+            $message = [
302 302
                 'title' => 'Sorry',
303 303
                 'text' => "You are not authorised to delete annotations.",
304 304
             ];
Please login to merge, or discard this patch.
www/docs/addcomment/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
             'posted' => date('Y-m-d H:i:s', time()),
67 67
             'modflagged' => null,
68 68
             'visible' => 1,
69
-            'preview' => true,	// Extra tag so we know this is just a preview.
69
+            'preview' => true, // Extra tag so we know this is just a preview.
70 70
         ];
71 71
 
72 72
         $COMMENTLIST = new COMMENTLIST();
Please login to merge, or discard this patch.