Completed
Pull Request — master (#39)
by Florin
03:05
created
ext.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -33,10 +33,10 @@  discard block
 block discarded – undo
33 33
           );
34 34
         ");
35 35
 
36
-                $messengerDir = $phpbb_root_path . 'store/messenger';
36
+                $messengerDir = $phpbb_root_path.'store/messenger';
37 37
                 if (!is_dir($messengerDir)) {
38 38
                     mkdir($messengerDir, 0777);
39
-                    $filesDir = $messengerDir . '/files';
39
+                    $filesDir = $messengerDir.'/files';
40 40
                     if (!is_dir($filesDir)) {
41 41
                         mkdir($filesDir, 0777);
42 42
                     }
@@ -77,24 +77,24 @@  discard block
 block discarded – undo
77 77
     {
78 78
         global $phpbb_root_path;
79 79
 
80
-        $database = $phpbb_root_path . 'store/messenger.db';
80
+        $database = $phpbb_root_path.'store/messenger.db';
81 81
         if (is_file($database)) {
82 82
             unlink($database);
83 83
         }
84 84
 
85
-        $messengerDir = $phpbb_root_path . 'store/messenger';
85
+        $messengerDir = $phpbb_root_path.'store/messenger';
86 86
         if (is_dir($messengerDir)) {
87 87
             $objects = scandir($messengerDir);
88 88
             foreach ($objects as $object) {
89 89
                 if ($object != '.' && $object != '..') {
90
-                    if (filetype($messengerDir . "/" . $object) == "dir") {
91
-                        $dir = $messengerDir . "/" . $object;
90
+                    if (filetype($messengerDir."/".$object) == "dir") {
91
+                        $dir = $messengerDir."/".$object;
92 92
                         $subObjects = scandir($dir);
93
-                        if(count($subObjects) > 0) {
94
-                            foreach($subObjects as $subObject) {
95
-                                if($subObject != '.' && $subObject != '..') {
96
-                                    if(filetype($dir . '/' . $subObject) != 'dir') {
97
-                                        unlink($dir . '/' . $subObject);
93
+                        if (count($subObjects) > 0) {
94
+                            foreach ($subObjects as $subObject) {
95
+                                if ($subObject != '.' && $subObject != '..') {
96
+                                    if (filetype($dir.'/'.$subObject) != 'dir') {
97
+                                        unlink($dir.'/'.$subObject);
98 98
                                     }
99 99
                                 } else {
100 100
                                     continue;
@@ -102,9 +102,9 @@  discard block
 block discarded – undo
102 102
                             }
103 103
 
104 104
                         }
105
-                        rmdir($messengerDir . "/" . $object);
105
+                        rmdir($messengerDir."/".$object);
106 106
                     } else {
107
-                        unlink($messengerDir . "/" . $object);
107
+                        unlink($messengerDir."/".$object);
108 108
                     }
109 109
                 }
110 110
             }
Please login to merge, or discard this patch.
models/main_model.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
 
307 307
         $unsorted_messages = array_merge($sent, $inbox);
308 308
 
309
-        uasort($unsorted_messages, function ($a, $b) {
309
+        uasort($unsorted_messages, function($a, $b) {
310 310
             return ($a['sentAt'] > $b['sentAt']) ? -1 : 1;
311 311
         });
312 312
 
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
 	 */
347 347
 	protected function parseFile($file, $type) {
348 348
 		$item = array();
349
-		$item['id'] = 'f_' . $file['id'];
349
+		$item['id'] = 'f_'.$file['id'];
350 350
 		$item['sender_id'] = $file['sender_id'];
351 351
 		$item['sender_avatar'] = $this->user_loader->get_avatar($file['sender_id'], true, true);
352 352
 		$item['receiver_id'] = $file['receiver_id'];
Please login to merge, or discard this patch.
event/main_listener.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,13 +93,13 @@
 block discarded – undo
93 93
     {
94 94
         $context = new RequestContext();
95 95
         $context->fromRequest($this->symfony_request);
96
-        $baseUrl = generate_board_url(true) . $context->getBaseUrl();
96
+        $baseUrl = generate_board_url(true).$context->getBaseUrl();
97 97
 
98 98
         $scriptName = $this->symfony_request->getScriptName();
99 99
         $scriptName = substr($scriptName, -1, 1) == '/' ? '' : utf8_basename($scriptName);
100 100
 
101 101
         if ($scriptName != '') {
102
-            $baseUrl = str_replace('/' . $scriptName, '', $baseUrl);
102
+            $baseUrl = str_replace('/'.$scriptName, '', $baseUrl);
103 103
         }
104 104
 
105 105
         $user_id = $event['member']['user_id'];
Please login to merge, or discard this patch.