diff options
author | Simon Rettberg | 2020-01-16 12:38:40 +0100 |
---|---|---|
committer | Simon Rettberg | 2020-01-16 12:38:40 +0100 |
commit | 2d8e5e0d95428b5f31238b651277788bd5d43584 (patch) | |
tree | 3f98bf85c52c3891788e70cb0f7530b54f46a10d /modules-available/sysconfig | |
parent | Update translations (diff) | |
download | slx-admin-2d8e5e0d95428b5f31238b651277788bd5d43584.tar.gz slx-admin-2d8e5e0d95428b5f31238b651277788bd5d43584.tar.xz slx-admin-2d8e5e0d95428b5f31238b651277788bd5d43584.zip |
[sysconfig] No byte-array packing, escape ini
Diffstat (limited to 'modules-available/sysconfig')
-rw-r--r-- | modules-available/sysconfig/inc/configmodule/screensaver.inc.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/modules-available/sysconfig/inc/configmodule/screensaver.inc.php b/modules-available/sysconfig/inc/configmodule/screensaver.inc.php index 813b040d..60687fac 100644 --- a/modules-available/sysconfig/inc/configmodule/screensaver.inc.php +++ b/modules-available/sysconfig/inc/configmodule/screensaver.inc.php @@ -73,29 +73,29 @@ class ConfigModule_Screensaver extends ConfigModule private function getFileArray() { $files = array( - '/opt/openslx/xscreensaver/style.qss' => array_values(unpack('C*', $this->moduleData['qss'])), - '/opt/openslx/xscreensaver/text-idle-kill' => array_values(unpack('C*', $this->wrapHtmlTags('text-idle-kill'))), - '/opt/openslx/xscreensaver/text-no-timeout' => array_values(unpack('C*', $this->wrapHtmlTags('text-no-timeout'))), - '/opt/openslx/xscreensaver/text-shutdown' => array_values(unpack('C*', $this->wrapHtmlTags('text-shutdown'))), + '/opt/openslx/xscreensaver/style.qss' => $this->moduleData['qss'], + '/opt/openslx/xscreensaver/text-idle-kill' => $this->wrapHtmlTags('text-idle-kill'), + '/opt/openslx/xscreensaver/text-no-timeout' => $this->wrapHtmlTags('text-no-timeout'), + '/opt/openslx/xscreensaver/text-shutdown' => $this->wrapHtmlTags('text-shutdown'), ); /* Create the message.ini from the messages array */ $messages = ''; - foreach ($this->moduleData['messages'] as $categorie => $array) { - $messages = $messages . '[' . $categorie . ']' . "\n"; + foreach ($this->moduleData['messages'] as $category => $array) { + $messages .= '[' . $category . ']' . "\n"; foreach ($array as $key => $message) { - $messages = $messages . $key . '="' . $message . '"' . "\n"; + $messages .= $key . '="' . str_replace(['\\', '"', "\n", "\r"], '-', $message) . '"' . "\n"; } } - $files['/opt/openslx/xscreensaver/messages.ini'] = array_values(unpack('C*', $messages)); + $files['/opt/openslx/xscreensaver/messages.ini'] = $messages; /* Add locked files if there are any */ if (isset($this->moduleData['texts']['text-idle-kill-locked'])) - $files['/opt/openslx/xscreensaver/text-idle-kill-locked'] = array_values(unpack('C*', $this->wrapHtmlTags('text-idle-kill-locked'))); + $files['/opt/openslx/xscreensaver/text-idle-kill-locked'] = $this->wrapHtmlTags('text-idle-kill-locked'); if (isset($this->moduleData['texts']['text-no-timeout-locked'])) - $files['/opt/openslx/xscreensaver/text-no-timeout-locked'] = array_values(unpack('C*', $this->wrapHtmlTags('text-no-timeout-locked'))); + $files['/opt/openslx/xscreensaver/text-no-timeout-locked'] = $this->wrapHtmlTags('text-no-timeout-locked'); if (isset($this->moduleData['texts']['text-shutdown-locked'])) - $files['/opt/openslx/xscreensaver/text-shutdown-locked'] = array_values(unpack('C*', $this->wrapHtmlTags('text-shutdown-locked'))); + $files['/opt/openslx/xscreensaver/text-shutdown-locked'] = $this->wrapHtmlTags('text-shutdown-locked'); return $files; } |