Completed
Push — master ( d540a7...a26975 )
by Florin
02:32
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.
event/main_listener.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -67,17 +67,17 @@  discard block
 block discarded – undo
67 67
 	{
68 68
 		$context = new RequestContext();
69 69
 		$context->fromRequest($this->symfony_request);
70
-		$baseUrl = generate_board_url(true) . $context->getBaseUrl();
70
+		$baseUrl = generate_board_url(true).$context->getBaseUrl();
71 71
 
72 72
 		$scriptName = $this->symfony_request->getScriptName();
73 73
 		$scriptName = substr($scriptName, -1, 1) == '/' ? '' : utf8_basename($scriptName);
74 74
 
75 75
 		if ($scriptName != '') {
76
-			$baseUrl = str_replace('/' . $scriptName, '', $baseUrl);
76
+			$baseUrl = str_replace('/'.$scriptName, '', $baseUrl);
77 77
 		}
78 78
 
79 79
 		$friends = $this->model->getFriends();
80
-		$friends_online = array_filter($friends, function ($friend) {
80
+		$friends_online = array_filter($friends, function($friend) {
81 81
 			return $friend['user_status'] != 0;
82 82
 		});
83 83
 		$this->template->assign_var('S_COUNT_FRIENDS', count($friends_online));
@@ -118,13 +118,13 @@  discard block
 block discarded – undo
118 118
 	{
119 119
 		$context = new RequestContext();
120 120
 		$context->fromRequest($this->symfony_request);
121
-		$baseUrl = generate_board_url(true) . $context->getBaseUrl();
121
+		$baseUrl = generate_board_url(true).$context->getBaseUrl();
122 122
 
123 123
 		$scriptName = $this->symfony_request->getScriptName();
124 124
 		$scriptName = substr($scriptName, -1, 1) == '/' ? '' : utf8_basename($scriptName);
125 125
 
126 126
 		if ($scriptName != '') {
127
-			$baseUrl = str_replace('/' . $scriptName, '', $baseUrl);
127
+			$baseUrl = str_replace('/'.$scriptName, '', $baseUrl);
128 128
 		}
129 129
 
130 130
 		$user_id = $event['member']['user_id'];
Please login to merge, or discard this patch.
libs/database.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
 	{
13 13
 		global $phpbb_root_path;
14 14
 
15
-		$database = $phpbb_root_path . 'store/messenger.db';
16
-		parent::__construct('sqlite:' . $database);
15
+		$database = $phpbb_root_path.'store/messenger.db';
16
+		parent::__construct('sqlite:'.$database);
17 17
 		parent::setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
18 18
 	}
19 19
 
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 		//ksort($data);
42 42
 
43 43
 		$fieldNames = implode('`, `', array_keys($data));
44
-		$fieldValues = ':' . implode(', :', array_keys($data));
44
+		$fieldValues = ':'.implode(', :', array_keys($data));
45 45
 
46 46
 		$sth = $this->prepare("INSERT INTO $table (`$fieldNames`) VALUES ($fieldValues)");
47 47
 
Please login to merge, or discard this patch.
libs/download.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 	 * @param string $phpbb_root_path phpBB root path
34 34
 	 */
35 35
 	public function __construct($phpbb_root_path) {
36
-		$this->directory = $phpbb_root_path . 'store/messenger/files';
36
+		$this->directory = $phpbb_root_path.'store/messenger/files';
37 37
 	}
38 38
 
39 39
 
@@ -43,10 +43,10 @@  discard block
 block discarded – undo
43 43
 	 * @throws InvalidArgumentException when the file not exist or is not readable
44 44
 	 */
45 45
 	public function setFile($filename) {
46
-		$file_full_path = $this->directory . '/'. $filename;
47
-		if(!is_file($file_full_path)) {
46
+		$file_full_path = $this->directory.'/'.$filename;
47
+		if (!is_file($file_full_path)) {
48 48
 			throw new InvalidArgumentException("File does not exist");
49
-		} else if(!is_readable($file_full_path)) {
49
+		} else if (!is_readable($file_full_path)) {
50 50
 			throw new InvalidArgumentException("File to download is not readable.");
51 51
 		}
52 52
 		$this->filename = $filename;
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	 * @param bool|true $forceDownload
81 81
 	 */
82 82
 	public function sendDownload($forceDownload = true) {
83
-		if(headers_sent()) {
83
+		if (headers_sent()) {
84 84
 			throw new \RuntimeException("Cannot send file to the browser, since the headers were already sent");
85 85
 		}
86 86
 		$mimeType = $this->getMimeType();
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 		header("Cache-Control: private", false);
96 96
 		header("Content-Type: application/octet-stream");
97 97
 
98
-		if($forceDownload) {
98
+		if ($forceDownload) {
99 99
 			header("Content-Disposition: attachment; filename=\"{$this->filename}\";");
100 100
 		} else {
101 101
 			header("Content-Disposition: filename=\"{$this->filename}\";");
Please login to merge, or discard this patch.