@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | return $data; |
47 | 47 | } |
48 | 48 | |
49 | - $matches = []; |
|
49 | + $matches = [ ]; |
|
50 | 50 | $pattern = '/(?<Key>(?:MemTotal|MemFree|MemAvailable|SwapTotal|SwapFree)+):\s+(?<Value>\d+)\s+(?<Unit>\w{2})/'; |
51 | 51 | |
52 | 52 | $result = preg_match_all($pattern, $meminfo, $matches); |
@@ -54,9 +54,9 @@ discard block |
||
54 | 54 | return $data; |
55 | 55 | } |
56 | 56 | |
57 | - foreach ($matches['Key'] as $i => $key) { |
|
57 | + foreach ($matches[ 'Key' ] as $i => $key) { |
|
58 | 58 | // Value is always in KB: https://github.com/torvalds/linux/blob/c70672d8d316ebd46ea447effadfe57ab7a30a50/fs/proc/meminfo.c#L58-L60 |
59 | - $value = (int)((int)$matches['Value'][$i] / 1024); |
|
59 | + $value = (int) ((int) $matches[ 'Value' ][ $i ] / 1024); |
|
60 | 60 | |
61 | 61 | switch ($key) { |
62 | 62 | case 'MemTotal': |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | return $data; |
90 | 90 | } |
91 | 91 | |
92 | - $matches = []; |
|
92 | + $matches = [ ]; |
|
93 | 93 | |
94 | 94 | if (str_contains($cpuinfo, 'Raspberry Pi')) { |
95 | 95 | $pattern = '/Model\s+:\s(.+)/'; |
@@ -104,24 +104,24 @@ discard block |
||
104 | 104 | return $data; |
105 | 105 | } |
106 | 106 | |
107 | - $model = $matches[1][0]; |
|
107 | + $model = $matches[ 1 ][ 0 ]; |
|
108 | 108 | |
109 | 109 | $pattern = '/processor\s+:\s(.+)/'; |
110 | 110 | |
111 | 111 | preg_match_all($pattern, $cpuinfo, $matches); |
112 | - $cores = count($matches[1]); |
|
112 | + $cores = count($matches[ 1 ]); |
|
113 | 113 | |
114 | 114 | if ($cores === 1) { |
115 | - $data = $model . ' (1 core)'; |
|
115 | + $data = $model.' (1 core)'; |
|
116 | 116 | } else { |
117 | - $data = $model . ' (' . $cores . ' cores)'; |
|
117 | + $data = $model.' ('.$cores.' cores)'; |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | return $data; |
121 | 121 | } |
122 | 122 | |
123 | 123 | public function getTime(): string { |
124 | - return (string)shell_exec('date'); |
|
124 | + return (string) shell_exec('date'); |
|
125 | 125 | } |
126 | 126 | |
127 | 127 | public function getUptime(): int { |
@@ -133,35 +133,35 @@ discard block |
||
133 | 133 | return $data; |
134 | 134 | } |
135 | 135 | |
136 | - [$uptimeInSeconds,] = array_map('intval', explode(' ', $uptime)); |
|
136 | + [ $uptimeInSeconds, ] = array_map('intval', explode(' ', $uptime)); |
|
137 | 137 | |
138 | 138 | return $uptimeInSeconds; |
139 | 139 | } |
140 | 140 | |
141 | 141 | public function getNetworkInfo(): array { |
142 | - $result = []; |
|
143 | - $result['hostname'] = \gethostname(); |
|
142 | + $result = [ ]; |
|
143 | + $result[ 'hostname' ] = \gethostname(); |
|
144 | 144 | $dns = shell_exec('cat /etc/resolv.conf |grep -i \'^nameserver\'|head -n1|cut -d \' \' -f2'); |
145 | - $result['dns'] = $dns; |
|
145 | + $result[ 'dns' ] = $dns; |
|
146 | 146 | $gw = shell_exec('ip route | awk \'/default/ { print $3 }\''); |
147 | - $result['gateway'] = $gw; |
|
147 | + $result[ 'gateway' ] = $gw; |
|
148 | 148 | return $result; |
149 | 149 | } |
150 | 150 | |
151 | 151 | public function getNetworkInterfaces(): array { |
152 | - $data = []; |
|
152 | + $data = [ ]; |
|
153 | 153 | |
154 | 154 | foreach ($this->getNetInterfaces() as $interfaceName => $interface) { |
155 | - $netInterface = new NetInterface($interfaceName, $interface['up']); |
|
156 | - $data[] = $netInterface; |
|
155 | + $netInterface = new NetInterface($interfaceName, $interface[ 'up' ]); |
|
156 | + $data[ ] = $netInterface; |
|
157 | 157 | |
158 | - foreach ($interface['unicast'] as $unicast) { |
|
159 | - if (isset($unicast['family'])) { |
|
160 | - if ($unicast['family'] === self::AF_INET) { |
|
161 | - $netInterface->addIPv4($unicast['address']); |
|
158 | + foreach ($interface[ 'unicast' ] as $unicast) { |
|
159 | + if (isset($unicast[ 'family' ])) { |
|
160 | + if ($unicast[ 'family' ] === self::AF_INET) { |
|
161 | + $netInterface->addIPv4($unicast[ 'address' ]); |
|
162 | 162 | } |
163 | - if ($unicast['family'] === self::AF_INET6) { |
|
164 | - $netInterface->addIPv6($unicast['address']); |
|
163 | + if ($unicast[ 'family' ] === self::AF_INET6) { |
|
164 | + $netInterface->addIPv6($unicast[ 'address' ]); |
|
165 | 165 | } |
166 | 166 | } |
167 | 167 | } |
@@ -170,19 +170,19 @@ discard block |
||
170 | 170 | continue; |
171 | 171 | } |
172 | 172 | |
173 | - $interfacePath = '/sys/class/net/' . $interfaceName; |
|
173 | + $interfacePath = '/sys/class/net/'.$interfaceName; |
|
174 | 174 | |
175 | 175 | try { |
176 | - $netInterface->setMAC($this->readContent($interfacePath . '/address')); |
|
176 | + $netInterface->setMAC($this->readContent($interfacePath.'/address')); |
|
177 | 177 | |
178 | - $speed = (int)$this->readContent($interfacePath . '/speed'); |
|
178 | + $speed = (int) $this->readContent($interfacePath.'/speed'); |
|
179 | 179 | if ($speed >= 1000) { |
180 | - $netInterface->setSpeed($speed / 1000 . ' Gbps'); |
|
180 | + $netInterface->setSpeed($speed / 1000.' Gbps'); |
|
181 | 181 | } else { |
182 | - $netInterface->setSpeed($speed . ' Mbps'); |
|
182 | + $netInterface->setSpeed($speed.' Mbps'); |
|
183 | 183 | } |
184 | 184 | |
185 | - $netInterface->setDuplex($this->readContent($interfacePath . '/duplex')); |
|
185 | + $netInterface->setDuplex($this->readContent($interfacePath.'/duplex')); |
|
186 | 186 | } catch (RuntimeException $e) { |
187 | 187 | // unable to read interface data |
188 | 188 | } |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | } |
193 | 193 | |
194 | 194 | public function getDiskInfo(): array { |
195 | - $data = []; |
|
195 | + $data = [ ]; |
|
196 | 196 | |
197 | 197 | try { |
198 | 198 | $disks = $this->executeCommand('df -TPk'); |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | return $data; |
201 | 201 | } |
202 | 202 | |
203 | - $matches = []; |
|
203 | + $matches = [ ]; |
|
204 | 204 | $pattern = '/^(?<Filesystem>[\S]+)\s*(?<Type>[\S]+)\s*(?<Blocks>\d+)\s*(?<Used>\d+)\s*(?<Available>\d+)\s*(?<Capacity>\d+%)\s*(?<Mounted>[\w\/-]+)$/m'; |
205 | 205 | |
206 | 206 | $result = preg_match_all($pattern, $disks, $matches); |
@@ -208,29 +208,29 @@ discard block |
||
208 | 208 | return $data; |
209 | 209 | } |
210 | 210 | |
211 | - foreach ($matches['Filesystem'] as $i => $filesystem) { |
|
212 | - if (in_array($matches['Type'][$i], ['tmpfs', 'devtmpfs', 'squashfs', 'overlay'], false)) { |
|
211 | + foreach ($matches[ 'Filesystem' ] as $i => $filesystem) { |
|
212 | + if (in_array($matches[ 'Type' ][ $i ], [ 'tmpfs', 'devtmpfs', 'squashfs', 'overlay' ], false)) { |
|
213 | 213 | continue; |
214 | - } elseif (in_array($matches['Mounted'][$i], ['/etc/hostname', '/etc/hosts'], false)) { |
|
214 | + } elseif (in_array($matches[ 'Mounted' ][ $i ], [ '/etc/hostname', '/etc/hosts' ], false)) { |
|
215 | 215 | continue; |
216 | 216 | } |
217 | 217 | |
218 | 218 | $disk = new Disk(); |
219 | 219 | $disk->setDevice($filesystem); |
220 | - $disk->setFs($matches['Type'][$i]); |
|
221 | - $disk->setUsed((int)((int)$matches['Used'][$i] / 1024)); |
|
222 | - $disk->setAvailable((int)((int)$matches['Available'][$i] / 1024)); |
|
223 | - $disk->setPercent($matches['Capacity'][$i]); |
|
224 | - $disk->setMount($matches['Mounted'][$i]); |
|
220 | + $disk->setFs($matches[ 'Type' ][ $i ]); |
|
221 | + $disk->setUsed((int) ((int) $matches[ 'Used' ][ $i ] / 1024)); |
|
222 | + $disk->setAvailable((int) ((int) $matches[ 'Available' ][ $i ] / 1024)); |
|
223 | + $disk->setPercent($matches[ 'Capacity' ][ $i ]); |
|
224 | + $disk->setMount($matches[ 'Mounted' ][ $i ]); |
|
225 | 225 | |
226 | - $data[] = $disk; |
|
226 | + $data[ ] = $disk; |
|
227 | 227 | } |
228 | 228 | |
229 | 229 | return $data; |
230 | 230 | } |
231 | 231 | |
232 | 232 | public function getThermalZones(): array { |
233 | - $data = []; |
|
233 | + $data = [ ]; |
|
234 | 234 | |
235 | 235 | $zones = glob('/sys/class/thermal/thermal_zone*'); |
236 | 236 | if ($zones === false) { |
@@ -239,9 +239,9 @@ discard block |
||
239 | 239 | |
240 | 240 | foreach ($zones as $zone) { |
241 | 241 | try { |
242 | - $type = $this->readContent($zone . '/type'); |
|
243 | - $temp = (float)((int)($this->readContent($zone . '/temp')) / 1000); |
|
244 | - $data[] = new ThermalZone(md5($zone), $type, $temp); |
|
242 | + $type = $this->readContent($zone.'/type'); |
|
243 | + $temp = (float) ((int) ($this->readContent($zone.'/temp')) / 1000); |
|
244 | + $data[ ] = new ThermalZone(md5($zone), $type, $temp); |
|
245 | 245 | } catch (RuntimeException) { |
246 | 246 | // unable to read thermal zone |
247 | 247 | } |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | protected function readContent(string $filename): string { |
257 | 257 | $data = @file_get_contents($filename); |
258 | 258 | if ($data === false || $data === '') { |
259 | - throw new RuntimeException('Unable to read: "' . $filename . '"'); |
|
259 | + throw new RuntimeException('Unable to read: "'.$filename.'"'); |
|
260 | 260 | } |
261 | 261 | return trim($data); |
262 | 262 | } |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | protected function executeCommand(string $command): string { |
265 | 265 | $output = @shell_exec(escapeshellcmd($command)); |
266 | 266 | if ($output === false || $output === null || $output === '') { |
267 | - throw new RuntimeException('No output for command: "' . $command . '"'); |
|
267 | + throw new RuntimeException('No output for command: "'.$command.'"'); |
|
268 | 268 | } |
269 | 269 | return $output; |
270 | 270 | } |
@@ -35,27 +35,27 @@ discard block |
||
35 | 35 | style('serverinfo', 'style'); |
36 | 36 | |
37 | 37 | function FormatMegabytes(int $byte): string { |
38 | - $unim = ['MB', 'GB', 'TB', 'PB', 'EB']; |
|
38 | + $unim = [ 'MB', 'GB', 'TB', 'PB', 'EB' ]; |
|
39 | 39 | $count = 0; |
40 | 40 | while ($byte >= 1024) { |
41 | 41 | $count++; |
42 | 42 | $byte /= 1024; |
43 | 43 | } |
44 | - return number_format($byte, 2, '.', '.') . ' ' . $unim[$count]; |
|
44 | + return number_format($byte, 2, '.', '.').' '.$unim[ $count ]; |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | /** @var array $_ */ |
48 | 48 | |
49 | 49 | /** @var Memory $memory */ |
50 | -$memory = $_['memory']; |
|
50 | +$memory = $_[ 'memory' ]; |
|
51 | 51 | /** @var Disk[] $disks */ |
52 | -$disks = $_['diskinfo']; |
|
52 | +$disks = $_[ 'diskinfo' ]; |
|
53 | 53 | /** @var NetInterface[] $interfaces */ |
54 | -$interfaces = $_['networkinterfaces']; |
|
54 | +$interfaces = $_[ 'networkinterfaces' ]; |
|
55 | 55 | /** @var ThermalZone[] $thermalZones */ |
56 | -$thermalZones = $_['thermalzones']; |
|
56 | +$thermalZones = $_[ 'thermalzones' ]; |
|
57 | 57 | /** @var bool $phpinfo */ |
58 | -$phpinfo = $_['phpinfo']; |
|
58 | +$phpinfo = $_[ 'phpinfo' ]; |
|
59 | 59 | |
60 | 60 | ?> |
61 | 61 | |
@@ -67,12 +67,12 @@ discard block |
||
67 | 67 | <div class="col col-6 col-l-12"> |
68 | 68 | <h2> |
69 | 69 | <img class="infoicon" src="<?php p(image_path('core', 'actions/screen.svg')); ?>"> |
70 | - <?php p($_['hostname']); ?> |
|
70 | + <?php p($_[ 'hostname' ]); ?> |
|
71 | 71 | </h2> |
72 | - <p><?php p($l->t('Operating System:')); ?> <strong id="numFilesStorage"><?php p($_['osname']); ?></strong></p> |
|
72 | + <p><?php p($l->t('Operating System:')); ?> <strong id="numFilesStorage"><?php p($_[ 'osname' ]); ?></strong></p> |
|
73 | 73 | <p><?php p($l->t('CPU:')); ?> |
74 | - <?php if ($_['cpu'] !== 'Unknown Processor'): ?> |
|
75 | - <strong id="numFilesStorage"><?php p($_['cpu']) ?></strong></p> |
|
74 | + <?php if ($_[ 'cpu' ] !== 'Unknown Processor'): ?> |
|
75 | + <strong id="numFilesStorage"><?php p($_[ 'cpu' ]) ?></strong></p> |
|
76 | 76 | <?php else: ?> |
77 | 77 | <strong id="numFilesStorage"><?php p($l->t('Unknown Processor')) ?></strong></p> |
78 | 78 | <?php endif; ?> |
@@ -174,10 +174,10 @@ discard block |
||
174 | 174 | <?php endforeach; ?> |
175 | 175 | </div> |
176 | 176 | |
177 | - <p><?php p($l->t('Files:')); ?> <strong id="numFilesStorage"><?php p($_['storage']['num_files']); ?></strong></p> |
|
178 | - <p><?php p($l->t('Storages:')); ?> <strong id="numFilesStorages"><?php p($_['storage']['num_storages']); ?></strong></p> |
|
179 | - <?php if ($_['system']['freespace'] !== null): ?> |
|
180 | - <p><?php p($l->t('Free Space:')); ?> <strong id="systemDiskFreeSpace"><?php p($_['system']['freespace']); ?></strong></p> |
|
177 | + <p><?php p($l->t('Files:')); ?> <strong id="numFilesStorage"><?php p($_[ 'storage' ][ 'num_files' ]); ?></strong></p> |
|
178 | + <p><?php p($l->t('Storages:')); ?> <strong id="numFilesStorages"><?php p($_[ 'storage' ][ 'num_storages' ]); ?></strong></p> |
|
179 | + <?php if ($_[ 'system' ][ 'freespace' ] !== null): ?> |
|
180 | + <p><?php p($l->t('Free Space:')); ?> <strong id="systemDiskFreeSpace"><?php p($_[ 'system' ][ 'freespace' ]); ?></strong></p> |
|
181 | 181 | <?php endif; ?> |
182 | 182 | </div> |
183 | 183 | |
@@ -193,15 +193,15 @@ discard block |
||
193 | 193 | |
194 | 194 | <div class="col col-12"> |
195 | 195 | <?php p($l->t('Hostname:')); ?> |
196 | - <span class="info"><?php p($_['networkinfo']['hostname']); ?></span> |
|
196 | + <span class="info"><?php p($_[ 'networkinfo' ][ 'hostname' ]); ?></span> |
|
197 | 197 | </div> |
198 | 198 | <div class="col col-12"> |
199 | 199 | <?php p($l->t('DNS:')); ?> |
200 | - <span class="info"><?php p($_['networkinfo']['dns']); ?></span> |
|
200 | + <span class="info"><?php p($_[ 'networkinfo' ][ 'dns' ]); ?></span> |
|
201 | 201 | </div> |
202 | 202 | <div class="col col-12"> |
203 | 203 | <?php p($l->t('Gateway:')); ?> |
204 | - <span class="info"><?php p($_['networkinfo']['gateway']); ?></span> |
|
204 | + <span class="info"><?php p($_[ 'networkinfo' ][ 'gateway' ]); ?></span> |
|
205 | 205 | </div> |
206 | 206 | <div class="col col-12"> |
207 | 207 | <div class="row"> |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | <?php p($l->t('Status:')); ?> |
215 | 215 | <span class="info"><?= $interface->isUp() ? 'up' : 'down'; ?></span><br> |
216 | 216 | <?php p($l->t('Speed:')); ?> |
217 | - <span class="info"><?php p($interface->getSpeed()) ?> (<?php p($l->t('Duplex:') . ' ' . $interface->getDuplex()) ?>)</span><br> |
|
217 | + <span class="info"><?php p($interface->getSpeed()) ?> (<?php p($l->t('Duplex:').' '.$interface->getDuplex()) ?>)</span><br> |
|
218 | 218 | <?php if (!empty($interface->getMAC())): ?> |
219 | 219 | <?php p($l->t('MAC:')); ?> |
220 | 220 | <span class="info"><?php p($interface->getMAC()) ?></span><br> |
@@ -249,24 +249,24 @@ discard block |
||
249 | 249 | <div class="col col-4 col-l-6 col-m-12"> |
250 | 250 | <div class="infobox"> |
251 | 251 | <div class="interface-wrapper"> |
252 | - <?php if ($_['storage']['num_users'] > 0) : ?> |
|
252 | + <?php if ($_[ 'storage' ][ 'num_users' ] > 0) : ?> |
|
253 | 253 | <?php p($l->t('Total users:')); ?> |
254 | - <span class="info"><?php p($_['storage']['num_users']); ?></span><br> |
|
254 | + <span class="info"><?php p($_[ 'storage' ][ 'num_users' ]); ?></span><br> |
|
255 | 255 | <?php endif; ?> |
256 | 256 | |
257 | - <?php if ($_['activeUsers']['last24hours'] > 0) : ?> |
|
257 | + <?php if ($_[ 'activeUsers' ][ 'last24hours' ] > 0) : ?> |
|
258 | 258 | <?php p($l->t('24 hours:')); ?> |
259 | - <span class="info"><?php p($_['activeUsers']['last24hours']) ?></span><br> |
|
259 | + <span class="info"><?php p($_[ 'activeUsers' ][ 'last24hours' ]) ?></span><br> |
|
260 | 260 | <?php endif; ?> |
261 | 261 | |
262 | - <?php if ($_['activeUsers']['last1hour'] > 0) : ?> |
|
262 | + <?php if ($_[ 'activeUsers' ][ 'last1hour' ] > 0) : ?> |
|
263 | 263 | <?php p($l->t('1 hour:')); ?> |
264 | - <span class="info"><?php p($_['activeUsers']['last1hour']) ?></span><br> |
|
264 | + <span class="info"><?php p($_[ 'activeUsers' ][ 'last1hour' ]) ?></span><br> |
|
265 | 265 | <?php endif; ?> |
266 | 266 | |
267 | - <?php if ($_['activeUsers']['last5minutes'] > 0) : ?> |
|
267 | + <?php if ($_[ 'activeUsers' ][ 'last5minutes' ] > 0) : ?> |
|
268 | 268 | <?php p($l->t('5 mins:')); ?> |
269 | - <span class="info"><?php p($_['activeUsers']['last5minutes']) ?></span><br> |
|
269 | + <span class="info"><?php p($_[ 'activeUsers' ][ 'last5minutes' ]) ?></span><br> |
|
270 | 270 | <?php endif; ?> |
271 | 271 | </div> |
272 | 272 | </div> |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | </div> |
278 | 278 | |
279 | 279 | <!-- SHARES--> |
280 | - <?php if ($_['shares']['num_shares'] > 0) : ?> |
|
280 | + <?php if ($_[ 'shares' ][ 'num_shares' ] > 0) : ?> |
|
281 | 281 | <div class="section network-infos"> |
282 | 282 | <div class="row"> |
283 | 283 | <div class="col col-12"> |
@@ -292,39 +292,39 @@ discard block |
||
292 | 292 | <div class="col col-4 col-l-6 col-m-12"> |
293 | 293 | <div class="infobox"> |
294 | 294 | <div class="interface-wrapper"> |
295 | - <?php if ($_['shares']['num_shares_user'] > 0) : ?> |
|
295 | + <?php if ($_[ 'shares' ][ 'num_shares_user' ] > 0) : ?> |
|
296 | 296 | <?php p($l->t('Users:')); ?> |
297 | - <span class="info"><?php p($_['shares']['num_shares_user']); ?></span><br> |
|
297 | + <span class="info"><?php p($_[ 'shares' ][ 'num_shares_user' ]); ?></span><br> |
|
298 | 298 | <?php endif; ?> |
299 | 299 | |
300 | - <?php if ($_['shares']['num_shares_groups'] > 0) : ?> |
|
300 | + <?php if ($_[ 'shares' ][ 'num_shares_groups' ] > 0) : ?> |
|
301 | 301 | <?php p($l->t('Groups:')); ?> |
302 | - <span class="info"><?php p($_['shares']['num_shares_groups']); ?></span><br> |
|
302 | + <span class="info"><?php p($_[ 'shares' ][ 'num_shares_groups' ]); ?></span><br> |
|
303 | 303 | <?php endif; ?> |
304 | 304 | |
305 | - <?php if ($_['shares']['num_shares_link'] > 0) : ?> |
|
305 | + <?php if ($_[ 'shares' ][ 'num_shares_link' ] > 0) : ?> |
|
306 | 306 | <?php p($l->t('Links:')); ?> |
307 | - <span class="info"><?php p($_['shares']['num_shares_link']); ?></span><br> |
|
307 | + <span class="info"><?php p($_[ 'shares' ][ 'num_shares_link' ]); ?></span><br> |
|
308 | 308 | <?php endif; ?> |
309 | 309 | |
310 | - <?php if ($_['shares']['num_shares_mail'] > 0) : ?> |
|
310 | + <?php if ($_[ 'shares' ][ 'num_shares_mail' ] > 0) : ?> |
|
311 | 311 | <?php p($l->t('Emails:')); ?> |
312 | - <span class="info"><?php p($_['shares']['num_shares_mail']); ?></span><br> |
|
312 | + <span class="info"><?php p($_[ 'shares' ][ 'num_shares_mail' ]); ?></span><br> |
|
313 | 313 | <?php endif; ?> |
314 | 314 | |
315 | - <?php if ($_['shares']['num_fed_shares_sent'] > 0) : ?> |
|
315 | + <?php if ($_[ 'shares' ][ 'num_fed_shares_sent' ] > 0) : ?> |
|
316 | 316 | <?php p($l->t('Federated sent:')); ?> |
317 | - <span class="info"><?php p($_['shares']['num_fed_shares_sent']); ?></span><br> |
|
317 | + <span class="info"><?php p($_[ 'shares' ][ 'num_fed_shares_sent' ]); ?></span><br> |
|
318 | 318 | <?php endif; ?> |
319 | 319 | |
320 | - <?php if ($_['shares']['num_fed_shares_received'] > 0) : ?> |
|
320 | + <?php if ($_[ 'shares' ][ 'num_fed_shares_received' ] > 0) : ?> |
|
321 | 321 | <?php p($l->t('Federated received:')); ?> |
322 | - <span class="info"><?php p($_['shares']['num_fed_shares_received']); ?></span><br> |
|
322 | + <span class="info"><?php p($_[ 'shares' ][ 'num_fed_shares_received' ]); ?></span><br> |
|
323 | 323 | <?php endif; ?> |
324 | 324 | |
325 | - <?php if ($_['shares']['num_shares_room'] > 0) : ?> |
|
325 | + <?php if ($_[ 'shares' ][ 'num_shares_room' ] > 0) : ?> |
|
326 | 326 | <?php p($l->t('Talk conversations:')); ?> |
327 | - <span class="info"><?php p($_['shares']['num_shares_room']); ?></span><br> |
|
327 | + <span class="info"><?php p($_[ 'shares' ][ 'num_shares_room' ]); ?></span><br> |
|
328 | 328 | <?php endif; ?> |
329 | 329 | </div> |
330 | 330 | </div> |
@@ -348,31 +348,31 @@ discard block |
||
348 | 348 | <div class="phpinfo-wrapper"> |
349 | 349 | <p> |
350 | 350 | <?php p($l->t('Version:')); ?> |
351 | - <em id="phpVersion"><?php p($_['php']['version']); ?></em> |
|
351 | + <em id="phpVersion"><?php p($_[ 'php' ][ 'version' ]); ?></em> |
|
352 | 352 | </p> |
353 | 353 | <p> |
354 | 354 | <?php p($l->t('Memory limit:')); ?> |
355 | - <em id="phpMemLimit"><?php p($_['php']['memory_limit']); ?></em> |
|
355 | + <em id="phpMemLimit"><?php p($_[ 'php' ][ 'memory_limit' ]); ?></em> |
|
356 | 356 | </p> |
357 | 357 | <p> |
358 | 358 | <?php p($l->t('Max execution time:')); ?> |
359 | - <em id="phpMaxExecTime"><?php p($_['php']['max_execution_time']); ?></em> |
|
359 | + <em id="phpMaxExecTime"><?php p($_[ 'php' ][ 'max_execution_time' ]); ?></em> |
|
360 | 360 | </p> |
361 | 361 | <p> |
362 | 362 | <?php p($l->t('Upload max size:')); ?> |
363 | - <em id="phpUploadMaxSize"><?php p($_['php']['upload_max_filesize']); ?></em> |
|
363 | + <em id="phpUploadMaxSize"><?php p($_[ 'php' ][ 'upload_max_filesize' ]); ?></em> |
|
364 | 364 | </p> |
365 | 365 | <p> |
366 | 366 | <?php p($l->t('OPcache Revalidate Frequency:')); ?> |
367 | - <em id="phpOpcacheRevalidateFreq"><?php p($_['php']['opcache_revalidate_freq']); ?></em> |
|
367 | + <em id="phpOpcacheRevalidateFreq"><?php p($_[ 'php' ][ 'opcache_revalidate_freq' ]); ?></em> |
|
368 | 368 | </p> |
369 | 369 | <p> |
370 | 370 | <?php p($l->t('Extensions:')); ?> |
371 | - <em id="phpExtensions"><?php p($_['php']['extensions'] !== null ? implode(', ', $_['php']['extensions']) : $l->t('Unable to list extensions')); ?></em> |
|
371 | + <em id="phpExtensions"><?php p($_[ 'php' ][ 'extensions' ] !== null ? implode(', ', $_[ 'php' ][ 'extensions' ]) : $l->t('Unable to list extensions')); ?></em> |
|
372 | 372 | </p> |
373 | 373 | <?php if ($phpinfo): ?> |
374 | 374 | <p> |
375 | - <a target="_blank" href="<?= $_['phpinfoUrl'] ?>"><?php p($l->t('Show phpinfo')) ?></a> |
|
375 | + <a target="_blank" href="<?= $_[ 'phpinfoUrl' ] ?>"><?php p($l->t('Show phpinfo')) ?></a> |
|
376 | 376 | </p> |
377 | 377 | <?php endif; ?> |
378 | 378 | </div> |
@@ -389,15 +389,15 @@ discard block |
||
389 | 389 | <div class="database-wrapper"> |
390 | 390 | <p> |
391 | 391 | <?php p($l->t('Type:')); ?> |
392 | - <em id="databaseType"><?php p($_['database']['type']); ?></em> |
|
392 | + <em id="databaseType"><?php p($_[ 'database' ][ 'type' ]); ?></em> |
|
393 | 393 | </p> |
394 | 394 | <p> |
395 | 395 | <?php p($l->t('Version:')); ?> |
396 | - <em id="databaseVersion"><?php p($_['database']['version']); ?></em> |
|
396 | + <em id="databaseVersion"><?php p($_[ 'database' ][ 'version' ]); ?></em> |
|
397 | 397 | </p> |
398 | 398 | <p> |
399 | 399 | <?php p($l->t('Size:')); ?> |
400 | - <em id="databaseSize"><?php p($_['database']['size']); ?></em> |
|
400 | + <em id="databaseSize"><?php p($_[ 'database' ][ 'size' ]); ?></em> |
|
401 | 401 | </p> |
402 | 402 | </div> |
403 | 403 | </div> |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | <?php p($l->t('You can connect an external monitoring tool by using this end point:')); ?> |
416 | 416 | </p> |
417 | 417 | <div class="monitoring-wrapper"> |
418 | - <input type="text" readonly="readonly" id="monitoring-endpoint-url" value="<?php echo p($_['ocs']); ?>"/> |
|
418 | + <input type="text" readonly="readonly" id="monitoring-endpoint-url" value="<?php echo p($_[ 'ocs' ]); ?>"/> |
|
419 | 419 | <a class="clipboardButton icon icon-clippy" title="<?php p($l->t('Copy')); ?>" aria-label="<?php p($l->t('Copy')); ?>" data-clipboard-target="#monitoring-endpoint-url"></a> |
420 | 420 | </div> |
421 | 421 | <p class="settings-hint"> |