@@ -67,17 +67,17 @@ discard block |
||
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 |
||
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']; |
@@ -12,8 +12,8 @@ discard block |
||
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 |
||
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 |
@@ -33,7 +33,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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}\";"); |