Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

Commit 58a6e9c

Browse files
committed
Anpassungen für PHP7
1 parent 8839ac9 commit 58a6e9c

File tree

916 files changed

+616
-600
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

916 files changed

+616
-600
lines changed

LICENSE

100644100755
File mode changed.

README.md

100644100755
File mode changed.

backup_restore.php

100644100755
File mode changed.

install.php

100644100755
File mode changed.

pcc/data/commands/smartphone/acp/acppage.class.php

100644100755
File mode changed.

pcc/data/commands/smartphone/acp/backup/deletebackupaction.class.php

100644100755
File mode changed.

pcc/data/commands/smartphone/acp/backup/listbackupspage.class.php

100644100755
File mode changed.

pcc/data/commands/smartphone/acp/backup/loadbackupaction.class.php

100644100755
File mode changed.

pcc/data/commands/smartphone/acp/backup/makebackupaction.class.php

100644100755
File mode changed.

pcc/data/commands/smartphone/acp/backup/templates/listbackups.html

100644100755
File mode changed.

pcc/data/commands/smartphone/acp/database/databasepage.class.php

100644100755
File mode changed.

pcc/data/commands/smartphone/acp/database/dumpdatabaseaction.class.php

100644100755
File mode changed.

pcc/data/commands/smartphone/acp/database/templates/database.html

100644100755
File mode changed.

pcc/data/commands/smartphone/acp/infopage.class.php

100644100755
File mode changed.

pcc/data/commands/smartphone/acp/settingsformpage.class.php

100644100755
File mode changed.

pcc/data/commands/smartphone/acp/templates/acpinfo.html

100644100755
File mode changed.

pcc/data/commands/smartphone/acp/templates/acppage.html

100644100755
File mode changed.

pcc/data/commands/smartphone/acp/templates/settingsform.html

100644100755
File mode changed.

pcc/data/commands/smartphone/acp/user/addgroupformpage.class.php

100644100755
File mode changed.

pcc/data/commands/smartphone/acp/user/adduserformpage.class.php

100644100755
File mode changed.

pcc/data/commands/smartphone/acp/user/deletegroupaction.class.php

100644100755
File mode changed.

pcc/data/commands/smartphone/acp/user/deleteuseraction.class.php

100644100755
File mode changed.

pcc/data/commands/smartphone/acp/user/editgroupformpage.class.php

100644100755
File mode changed.

pcc/data/commands/smartphone/acp/user/edituserformpage.class.php

100644100755
File mode changed.

pcc/data/commands/smartphone/acp/user/listgroupspage.class.php

100644100755
File mode changed.

pcc/data/commands/smartphone/acp/user/templates/addgroupform.html

100644100755
File mode changed.

pcc/data/commands/smartphone/acp/user/templates/adduserform.html

100644100755
File mode changed.

pcc/data/commands/smartphone/acp/user/templates/editgroupform.html

100644100755
File mode changed.

pcc/data/commands/smartphone/acp/user/templates/edituserform.html

100644100755
File mode changed.

pcc/data/commands/smartphone/acp/user/templates/groupslist.html

100644100755
File mode changed.

pcc/data/commands/smartphone/acp/user/templates/userlist.html

100644100755
File mode changed.

pcc/data/commands/smartphone/datapage.class.php

100644100755
File mode changed.

pcc/data/commands/smartphone/fbcalllistpage.class.php

100644100755
File mode changed.

pcc/data/commands/smartphone/fbsmarthomepage.class.php

100644100755
File mode changed.

pcc/data/commands/smartphone/fbstatepage.class.php

100644100755
File mode changed.

pcc/data/commands/smartphone/indexpage.class.php

100644100755
File mode changed.

pcc/data/commands/smartphone/statepage.class.php

100644100755
File mode changed.

pcc/data/commands/smartphone/statesyncajax.class.php

100644100755
+19-19
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use RWF\Request\Request;
1212
use RWF\Runtime\RaspberryPi;
1313
use RWF\Util\FileUtil;
14-
use RWF\Util\String;
14+
use RWF\Util\StringUtils;
1515
use RWF\Util\TimeUtil;
1616

1717
/**
@@ -55,15 +55,15 @@ public function processData() {
5555
$data['wireless'] .= $headline;
5656
$data['wireless'] .= '
5757
<li>
58-
<h1>' . String::encodeHTML($device['name']) . '</h1>
58+
<h1>' . StringUtils::encodeHTML($device['name']) . '</h1>
5959
<p>
60-
<span style="font-weight: bold;">'. PCC::getLanguage()->get('index.box.wlan.standard') .':</span> ' . String::encodeHTML($device['standard']) . '
60+
<span style="font-weight: bold;">'. PCC::getLanguage()->get('index.box.wlan.standard') .':</span> ' . StringUtils::encodeHTML($device['standard']) . '
6161
<br/>
62-
<span style="font-weight: bold;">'. PCC::getLanguage()->get('index.box.wlan.ssid') .':</span> ' . String::encodeHTML(($device['connected'] === true ? $device['ssid'] : RWF::getLanguage()->get('index.box.wlan.notConnected'))) . '
62+
<span style="font-weight: bold;">'. PCC::getLanguage()->get('index.box.wlan.ssid') .':</span> ' . StringUtils::encodeHTML(($device['connected'] === true ? $device['ssid'] : RWF::getLanguage()->get('index.box.wlan.notConnected'))) . '
6363
<br/>
64-
<span style="font-weight: bold;">'. PCC::getLanguage()->get('index.box.wlan.speed') .':</span> ' . String::encodeHTML(($device['connected'] === true ? $device['bitRate'] : '0')) . 'MB/s
64+
<span style="font-weight: bold;">'. PCC::getLanguage()->get('index.box.wlan.speed') .':</span> ' . StringUtils::encodeHTML(($device['connected'] === true ? $device['bitRate'] : '0')) . 'MB/s
6565
<br/>
66-
<span style="font-weight: bold;">'. PCC::getLanguage()->get('index.box.wlan.quality') .':</span> ' . String::encodeHTML(($device['connected'] === true ? $device['quality'] : '0/0')) .' -> '. String::encodeHTML(($device['connected'] === true ? $device['signalLevel'] : '0')) .'dBm
66+
<span style="font-weight: bold;">'. PCC::getLanguage()->get('index.box.wlan.quality') .':</span> ' . StringUtils::encodeHTML(($device['connected'] === true ? $device['quality'] : '0/0')) .' -> '. StringUtils::encodeHTML(($device['connected'] === true ? $device['signalLevel'] : '0')) .'dBm
6767
</p>
6868
</li>
6969
';
@@ -93,43 +93,43 @@ public function processData() {
9393

9494
if($cpuId == 0) {
9595

96-
$data['cpuClockCpu0'] = ($value > 1000 ? String::formatFloat($value / 1000) . ' GHz' : String::formatFloat($value) .' MHz');
96+
$data['cpuClockCpu0'] = ($value > 1000 ? StringUtils::formatFloat($value / 1000) . ' GHz' : StringUtils::formatFloat($value) .' MHz');
9797
}
98-
$html .= $brake . '<span style="font-weight: bold;">cpu'. $cpuId .'</span>: '. ($value > 1000 ? String::formatFloat($value / 1000) . ' GHz' : String::formatFloat($value) .' MHz');
98+
$html .= $brake . '<span style="font-weight: bold;">cpu'. $cpuId .'</span>: '. ($value > 1000 ? StringUtils::formatFloat($value / 1000) . ' GHz' : StringUtils::formatFloat($value) .' MHz');
9999
$brake = '<br/>';
100100
}
101101
$data['cpuClock'] = $html;
102102
$html = '';
103103
$brake = '';
104104
foreach($rpi->getCpuMinClock() as $cpuId => $value) {
105105

106-
$html .= $brake . '<span style="font-weight: bold;">cpu'. $cpuId .'</span>: '. ($value > 1000 ? String::formatFloat($value / 1000) . ' GHz' : String::formatFloat($value) .' MHz');
106+
$html .= $brake . '<span style="font-weight: bold;">cpu'. $cpuId .'</span>: '. ($value > 1000 ? StringUtils::formatFloat($value / 1000) . ' GHz' : StringUtils::formatFloat($value) .' MHz');
107107
$brake = '<br/>';
108108
}
109109
$data['cpuMinClock'] = $html;
110110
$html = '';
111111
$brake = '';
112112
foreach($rpi->getCpuMaxClock() as $cpuId => $value) {
113113

114-
$html .= $brake . '<span style="font-weight: bold;">cpu'. $cpuId .'</span>: '. ($value > 1000 ? String::formatFloat($value / 1000) . ' GHz' : String::formatFloat($value) .' MHz');
114+
$html .= $brake . '<span style="font-weight: bold;">cpu'. $cpuId .'</span>: '. ($value > 1000 ? StringUtils::formatFloat($value / 1000) . ' GHz' : StringUtils::formatFloat($value) .' MHz');
115115
$brake = '<br/>';
116116
}
117117
$data['cpuMaxClock'] = $html;
118118

119-
$data['coreTemp'] = String::formatFloat($rpi->getCoreTemprature());
119+
$data['coreTemp'] = StringUtils::formatFloat($rpi->getCoreTemprature());
120120

121121
//Speicher
122122
$memory = $rpi->getMemoryUsage();
123123
$data['memoryPercent'] = $memory['percent'];
124-
$data['memoryPercentDisplay'] = String::formatFloat($memory['percent'], 0);
124+
$data['memoryPercentDisplay'] = StringUtils::formatFloat($memory['percent'], 0);
125125
$data['memoryTotal'] = FileUtil::formatBytesBinary($memory['total']);
126126
$data['memoryFree'] = FileUtil::formatBytesBinary($memory['free']);
127127
$data['memoryUsed'] = FileUtil::formatBytesBinary($memory['used']);
128128

129129
//Swap
130130
$swap = $rpi->getSwapUsage();
131131
$data['swapPercent'] = $swap['percent'];
132-
$data['swapPercentDisplay'] = String::formatFloat($swap['percent'], 0);
132+
$data['swapPercentDisplay'] = StringUtils::formatFloat($swap['percent'], 0);
133133
$data['swapTotal'] = FileUtil::formatBytesBinary($swap['total']);
134134
$data['swapFree'] = FileUtil::formatBytesBinary($swap['free']);
135135
$data['swapUsed'] = FileUtil::formatBytesBinary($swap['used']);
@@ -143,11 +143,11 @@ public function processData() {
143143

144144
$data['sysMemory'] .= '
145145
<li>
146-
<h1>' . String::encodeHTML($mem['device']) . '</h1>
146+
<h1>' . StringUtils::encodeHTML($mem['device']) . '</h1>
147147
<p>
148-
<span style="font-weight: bold;">'. PCC::getLanguage()->get('index.box.memory.mountpoint') .':</span> ' . String::encodeHTML($mem['mountpoint']) . '
148+
<span style="font-weight: bold;">'. PCC::getLanguage()->get('index.box.memory.mountpoint') .':</span> ' . StringUtils::encodeHTML($mem['mountpoint']) . '
149149
<br/>
150-
<span style="font-weight: bold;">'. PCC::getLanguage()->get('index.box.memory.usage') .':</span> ' . String::formatFloat($mem['percent'], 0) . '%
150+
<span style="font-weight: bold;">'. PCC::getLanguage()->get('index.box.memory.usage') .':</span> ' . StringUtils::formatFloat($mem['percent'], 0) . '%
151151
<br/>
152152
<span style="font-weight: bold;">'. PCC::getLanguage()->get('index.box.memory.total') .':</span> ' . FileUtil::formatBytesBinary($mem['total']) . '
153153
<br/>
@@ -163,7 +163,7 @@ public function processData() {
163163
<li data-role="list-divider" role="heading">' . RWF::getLanguage()->get('index.box.memory.total') . '</li>
164164
<li>
165165
<p>
166-
<span style="font-weight: bold;">'. PCC::getLanguage()->get('index.box.memory.usage') .':</span> ' . String::formatFloat($mem['percent'], 0) . '%
166+
<span style="font-weight: bold;">'. PCC::getLanguage()->get('index.box.memory.usage') .':</span> ' . StringUtils::formatFloat($mem['percent'], 0) . '%
167167
<br/>
168168
<span style="font-weight: bold;">'. PCC::getLanguage()->get('index.box.memory.total') .':</span> ' . FileUtil::formatBytesBinary($mem['total']) . '
169169
<br/>
@@ -183,13 +183,13 @@ public function processData() {
183183

184184
$data['network'] .= '
185185
<li>
186-
<h1>' . String::encodeHTML($net['name']) . '</h1>
186+
<h1>' . StringUtils::encodeHTML($net['name']) . '</h1>
187187
<p>
188188
<span style="font-weight: bold;">'. PCC::getLanguage()->get('index.box.network.recived') .':</span> ' . FileUtil::formatBytesBinary($net['in']) . '
189189
<br/>
190190
<span style="font-weight: bold;">'. PCC::getLanguage()->get('index.box.network.transmitted') .':</span> ' . FileUtil::formatBytesBinary($net['out']) . '
191191
<br/>
192-
<span style="font-weight: bold;">'. PCC::getLanguage()->get('index.box.network.errors') .':</span> ' . String::formatFloat($net['errors'], 0) . '/' . String::formatFloat($net['drops'], 0) . '
192+
<span style="font-weight: bold;">'. PCC::getLanguage()->get('index.box.network.errors') .':</span> ' . StringUtils::formatFloat($net['errors'], 0) . '/' . StringUtils::formatFloat($net['drops'], 0) . '
193193
</p>
194194
</li>
195195
';

pcc/data/commands/smartphone/templates/data.html

100644100755
File mode changed.

pcc/data/commands/smartphone/templates/fbcalllist.html

100644100755
File mode changed.

pcc/data/commands/smartphone/templates/fbsmarthome.html

100644100755
File mode changed.

pcc/data/commands/smartphone/templates/fbstate.html

100644100755
File mode changed.

pcc/data/commands/smartphone/templates/indexpage.html

100644100755
File mode changed.

pcc/data/commands/smartphone/templates/state.html

100644100755
File mode changed.

pcc/data/commands/web/acp/backup/deletebackupaction.class.php

100644100755
File mode changed.

pcc/data/commands/web/acp/backup/loadbackupaction.class.php

100644100755
File mode changed.

pcc/data/commands/web/acp/backup/makebackupaction.class.php

100644100755
File mode changed.

pcc/data/commands/web/acp/database/databasepage.class.php

100644100755
File mode changed.

pcc/data/commands/web/acp/database/dumpdatabaseaction.class.php

100644100755
File mode changed.

pcc/data/commands/web/acp/database/templates/database.html

100644100755
File mode changed.

pcc/data/commands/web/acp/user/addgroupformpage.class.php

100644100755
File mode changed.

pcc/data/commands/web/acp/user/adduserformpage.class.php

100644100755
File mode changed.

pcc/data/commands/web/acp/user/deletegroupaction.class.php

100644100755
File mode changed.

pcc/data/commands/web/acp/user/deleteuseraction.class.php

100644100755
File mode changed.

pcc/data/commands/web/acp/user/editgroupformpage.class.php

100644100755
File mode changed.

pcc/data/commands/web/acp/user/edituserformpage.class.php

100644100755
File mode changed.

pcc/data/commands/web/acp/user/listgroupspage.class.php

100644100755
File mode changed.

pcc/data/commands/web/dataajax.class.php

100644100755
File mode changed.

pcc/data/commands/web/datasyncajax.class.php

100644100755
+14-14
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use RWF\Request\Commands\AjaxCommand;
88
use RWF\Request\Request;
99
use RWF\Runtime\RaspberryPi;
10-
use RWF\Util\String;
10+
use RWF\Util\StringUtils;
1111
use RWF\Util\FileUtil;
1212

1313
/**
@@ -66,11 +66,11 @@ public function processData() {
6666

6767
//Systemdaten
6868
//Betriebssystem
69-
$data['osName'] = String::encodeHTML($rpi->getOsName());
70-
$data['kernel'] = String::encodeHTML($rpi->getKernelVersion());
71-
$data['firmwareShort'] = String::encodeHTML(String::subString($rpi->getFirmwareVersion(), 0, 45) . ' ...');
72-
$data['firmware'] = String::encodeHTML($rpi->getFirmwareVersion());
73-
$data['hostname'] = String::encodeHTML($rpi->getHostname());
69+
$data['osName'] = StringUtils::encodeHTML($rpi->getOsName());
70+
$data['kernel'] = StringUtils::encodeHTML($rpi->getKernelVersion());
71+
$data['firmwareShort'] = StringUtils::encodeHTML(StringUtils::subString($rpi->getFirmwareVersion(), 0, 45) . ' ...');
72+
$data['firmware'] = StringUtils::encodeHTML($rpi->getFirmwareVersion());
73+
$data['hostname'] = StringUtils::encodeHTML($rpi->getHostname());
7474

7575
//RPI Revision
7676
if($rpi->getRpiRevision() != null) {
@@ -79,19 +79,19 @@ public function processData() {
7979
$data['boardType'] = 'rpi';
8080

8181
//Systemdaten
82-
$data['cpuType'] = String::encodeHTML($rpi->getCPUType());
82+
$data['cpuType'] = StringUtils::encodeHTML($rpi->getCPUType());
8383
$cpuMemory = $rpi->getCpuMemory();
8484
$gpuMemory = $rpi->getGPUMemory();
8585
$data['splitSystem'] = FileUtil::formatBytesBinary($cpuMemory);
8686
$data['splitVideo'] = FileUtil::formatBytesBinary($gpuMemory);
8787
$overclock = $rpi->getOverclockInfo();
88-
$data['ocCpu'] = String::formatFloat($overclock['cpu']);
89-
$data['ocGpu'] = String::formatFloat($overclock['gpu']);
90-
$data['ocRam'] = String::formatFloat($overclock['ram']);
91-
$data['ocVoltage'] = String::formatFloat($overclock['voltage'], 3);
88+
$data['ocCpu'] = StringUtils::formatFloat($overclock['cpu']);
89+
$data['ocGpu'] = StringUtils::formatFloat($overclock['gpu']);
90+
$data['ocRam'] = StringUtils::formatFloat($overclock['ram']);
91+
$data['ocVoltage'] = StringUtils::formatFloat($overclock['voltage'], 3);
9292

93-
$data['cpuFeatures'] = String::encodeHTML($rpi->getCPUFeatures());
94-
$data['serial'] = String::encodeHTML($rpi->getRpiSerial());
93+
$data['cpuFeatures'] = StringUtils::encodeHTML($rpi->getCPUFeatures());
94+
$data['serial'] = StringUtils::encodeHTML($rpi->getRpiSerial());
9595
$rev = $rpi->getRpiRevision();
9696
if ($rev == 1) {
9797
$data['revision'] = 'Beta';
@@ -128,7 +128,7 @@ public function processData() {
128128
} else {
129129
$data['revision'] = RWF::getLanguage()->get('global.unknown');
130130
}
131-
$data['usbCurrent'] = String::numberFormat($rpi->getUsbCurrent());
131+
$data['usbCurrent'] = StringUtils::numberFormat($rpi->getUsbCurrent());
132132

133133
//Video Lizensen
134134
if ($rpi->isSetMPEGCode()) {

pcc/data/commands/web/fbcalllistajax.class.php

100644100755
File mode changed.

pcc/data/commands/web/fbsmarthomeajax.class.php

100644100755
File mode changed.

pcc/data/commands/web/fbstateajax.class.php

100644100755
File mode changed.

pcc/data/commands/web/indexpage.class.php

100644100755
File mode changed.

pcc/data/commands/web/stateajax.class.php

100644100755
File mode changed.

0 commit comments

Comments
 (0)