@@ -75,16 +75,16 @@ discard block |
||
| 75 | 75 | public static function isStorageDisk($device): bool |
| 76 | 76 | { |
| 77 | 77 | $result = false; |
| 78 | - if ( ! file_exists("{$device}")) { |
|
| 78 | + if (!file_exists("{$device}")) { |
|
| 79 | 79 | return $result; |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | - $tmp_dir = '/tmp/mnt_' . time(); |
|
| 82 | + $tmp_dir = '/tmp/mnt_'.time(); |
|
| 83 | 83 | Util::mwMkdir($tmp_dir); |
| 84 | 84 | $out = []; |
| 85 | 85 | |
| 86 | 86 | $storage = new Storage(); |
| 87 | - $uid_part = 'UUID=' . $storage->getUuid($device) . ''; |
|
| 87 | + $uid_part = 'UUID='.$storage->getUuid($device).''; |
|
| 88 | 88 | $format = $storage->getFsType($device); |
| 89 | 89 | if ($format === '') { |
| 90 | 90 | return false; |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | Util::mwExec("{$umountPath} {$device}"); |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | - if ( ! self::isStorageDiskMounted($device)) { |
|
| 106 | + if (!self::isStorageDiskMounted($device)) { |
|
| 107 | 107 | Util::mwExec("{$rmPath} -rf '{$tmp_dir}'"); |
| 108 | 108 | } |
| 109 | 109 | |
@@ -233,9 +233,9 @@ discard block |
||
| 233 | 233 | $timeoutPath = Util::which('timeout'); |
| 234 | 234 | $sshfsPath = Util::which('sshfs'); |
| 235 | 235 | |
| 236 | - $command = "{$timeoutPath} -t 3 {$sshfsPath} -p {$port} -o nonempty -o password_stdin -o 'StrictHostKeyChecking=no' " . |
|
| 237 | - "{$user}@{$host}:{$remout_dir} {$local_dir} << EOF\n" . |
|
| 238 | - "{$pass}\n" . |
|
| 236 | + $command = "{$timeoutPath} -t 3 {$sshfsPath} -p {$port} -o nonempty -o password_stdin -o 'StrictHostKeyChecking=no' ". |
|
| 237 | + "{$user}@{$host}:{$remout_dir} {$local_dir} << EOF\n". |
|
| 238 | + "{$pass}\n". |
|
| 239 | 239 | "EOF\n"; |
| 240 | 240 | // file_put_contents('/tmp/sshfs_'.$host, $command); |
| 241 | 241 | Util::mwExec($command, $out); |
@@ -267,19 +267,19 @@ discard block |
||
| 267 | 267 | |
| 268 | 268 | // Собираем строку подключения к ftp. |
| 269 | 269 | $auth_line = ''; |
| 270 | - if ( ! empty($user)) { |
|
| 271 | - $auth_line .= 'user="' . $user; |
|
| 272 | - if ( ! empty($pass)) { |
|
| 270 | + if (!empty($user)) { |
|
| 271 | + $auth_line .= 'user="'.$user; |
|
| 272 | + if (!empty($pass)) { |
|
| 273 | 273 | $auth_line .= ":{$pass}"; |
| 274 | 274 | } |
| 275 | 275 | $auth_line .= '",'; |
| 276 | 276 | } |
| 277 | 277 | |
| 278 | - $connect_line = 'ftp://' . $host; |
|
| 279 | - if ( ! empty($port)) { |
|
| 278 | + $connect_line = 'ftp://'.$host; |
|
| 279 | + if (!empty($port)) { |
|
| 280 | 280 | $connect_line .= ":{$port}"; |
| 281 | 281 | } |
| 282 | - if ( ! empty($remout_dir)) { |
|
| 282 | + if (!empty($remout_dir)) { |
|
| 283 | 283 | $connect_line .= "$remout_dir"; |
| 284 | 284 | } |
| 285 | 285 | |
@@ -305,10 +305,10 @@ discard block |
||
| 305 | 305 | */ |
| 306 | 306 | public static function mkfs_disk($dev) |
| 307 | 307 | { |
| 308 | - if ( ! file_exists($dev)) { |
|
| 308 | + if (!file_exists($dev)) { |
|
| 309 | 309 | $dev = "/dev/{$dev}"; |
| 310 | 310 | } |
| 311 | - if ( ! file_exists($dev)) { |
|
| 311 | + if (!file_exists($dev)) { |
|
| 312 | 312 | return false; |
| 313 | 313 | } |
| 314 | 314 | $dir = ''; |
@@ -343,7 +343,7 @@ discard block |
||
| 343 | 343 | Util::mwExec("/sbin/shell_functions.sh 'killprocesses' '$dir' -TERM 0"); |
| 344 | 344 | Util::mwExec("{$umountPath} {$dir}"); |
| 345 | 345 | } |
| 346 | - $result = ! self::isStorageDiskMounted($dir); |
|
| 346 | + $result = !self::isStorageDiskMounted($dir); |
|
| 347 | 347 | if ($result && file_exists($dir)) { |
| 348 | 348 | // Если диск не смонтирован, то удаляем каталог. |
| 349 | 349 | Util::mwExec("{$rmPath} -rf '{$dir}'"); |
@@ -413,7 +413,7 @@ discard block |
||
| 413 | 413 | */ |
| 414 | 414 | public static function statusMkfs($dev): string |
| 415 | 415 | { |
| 416 | - if ( ! file_exists($dev)) { |
|
| 416 | + if (!file_exists($dev)) { |
|
| 417 | 417 | $dev = "/dev/{$dev}"; |
| 418 | 418 | } |
| 419 | 419 | $out = []; |
@@ -434,9 +434,9 @@ discard block |
||
| 434 | 434 | if ($di === null) { |
| 435 | 435 | return; |
| 436 | 436 | } |
| 437 | - $config = $di->getShared('config'); |
|
| 437 | + $config = $di->getShared('config'); |
|
| 438 | 438 | $phpSessionDir = $config->path('www.phpSessionDir'); |
| 439 | - if ( ! empty($phpSessionDir)) { |
|
| 439 | + if (!empty($phpSessionDir)) { |
|
| 440 | 440 | $rmPath = Util::which('rm'); |
| 441 | 441 | Util::mwExec("{$rmPath} -rf {$phpSessionDir}/*"); |
| 442 | 442 | } |
@@ -452,7 +452,7 @@ discard block |
||
| 452 | 452 | // Создание больщого файла для тестов. |
| 453 | 453 | // head -c 1500MB /dev/urandom > /storage/usbdisk1/big_file.mp3 |
| 454 | 454 | foreach ($hdd as $disk) { |
| 455 | - if ($disk['sys_disk'] === true && ! self::isStorageDiskMounted("{$disk['id']}4")) { |
|
| 455 | + if ($disk['sys_disk'] === true && !self::isStorageDiskMounted("{$disk['id']}4")) { |
|
| 456 | 456 | // Это системный диск (4ый раздел). Он не смонтирован. |
| 457 | 457 | continue; |
| 458 | 458 | } |
@@ -476,7 +476,7 @@ discard block |
||
| 476 | 476 | Util::restartPHPWorker(WorkerRemoveOldRecords::class); |
| 477 | 477 | } |
| 478 | 478 | |
| 479 | - if ( ! $need_alert) { |
|
| 479 | + if (!$need_alert) { |
|
| 480 | 480 | continue; |
| 481 | 481 | } |
| 482 | 482 | |
@@ -516,8 +516,8 @@ discard block |
||
| 516 | 516 | $m_size = round(($disk_data[1] + $disk_data[2]) / 1024, 1); |
| 517 | 517 | $res_disks[] = [ |
| 518 | 518 | 'id' => $disk_data[0], |
| 519 | - 'size' => "" . $m_size, |
|
| 520 | - 'size_text' => "" . $m_size . " Mb", |
|
| 519 | + 'size' => "".$m_size, |
|
| 520 | + 'size_text' => "".$m_size." Mb", |
|
| 521 | 521 | 'vendor' => 'Debian', |
| 522 | 522 | 'mounted' => '/storage/usbdisk1', |
| 523 | 523 | 'free_space' => round($disk_data[2] / 1024, 1), |
@@ -537,10 +537,10 @@ discard block |
||
| 537 | 537 | $disks = $this->diskGetDevices(); |
| 538 | 538 | $disks = array_unique($disks); |
| 539 | 539 | |
| 540 | - $cf_disk = ''; |
|
| 540 | + $cf_disk = ''; |
|
| 541 | 541 | $varEtcDir = $this->config->path('core.varEtcDir'); |
| 542 | - if (file_exists($varEtcDir . '/cfdevice')) { |
|
| 543 | - $cf_disk = trim(file_get_contents($varEtcDir . '/cfdevice')); |
|
| 542 | + if (file_exists($varEtcDir.'/cfdevice')) { |
|
| 543 | + $cf_disk = trim(file_get_contents($varEtcDir.'/cfdevice')); |
|
| 544 | 544 | } |
| 545 | 545 | |
| 546 | 546 | foreach ($disks as $disk) { |
@@ -556,8 +556,8 @@ discard block |
||
| 556 | 556 | $sys_disk = ($cf_disk == $disk); |
| 557 | 557 | |
| 558 | 558 | $mb_size = 0; |
| 559 | - if (is_file("/sys/block/" . $disk . "/size")) { |
|
| 560 | - $original_size = trim(file_get_contents("/sys/block/" . $disk . "/size")); |
|
| 559 | + if (is_file("/sys/block/".$disk."/size")) { |
|
| 560 | + $original_size = trim(file_get_contents("/sys/block/".$disk."/size")); |
|
| 561 | 561 | $original_size = ($original_size * 512 / 1024 / 1024); |
| 562 | 562 | $mb_size = $original_size; |
| 563 | 563 | } |
@@ -664,14 +664,14 @@ discard block |
||
| 664 | 664 | private function getVendorDisk($disk): string |
| 665 | 665 | { |
| 666 | 666 | $temp_vendor = []; |
| 667 | - if (is_file("/sys/block/" . $disk . "/device/vendor")) { |
|
| 668 | - $data = trim(file_get_contents("/sys/block/" . $disk . "/device/vendor")); |
|
| 667 | + if (is_file("/sys/block/".$disk."/device/vendor")) { |
|
| 668 | + $data = trim(file_get_contents("/sys/block/".$disk."/device/vendor")); |
|
| 669 | 669 | if ($data != '') { |
| 670 | 670 | $temp_vendor[] = trim(str_replace(',', ' ', $data)); |
| 671 | 671 | } |
| 672 | 672 | } |
| 673 | - if (is_file("/sys/block/" . $disk . "/device/model")) { |
|
| 674 | - $data = trim(file_get_contents("/sys/block/" . $disk . "/device/model")); |
|
| 673 | + if (is_file("/sys/block/".$disk."/device/model")) { |
|
| 674 | + $data = trim(file_get_contents("/sys/block/".$disk."/device/model")); |
|
| 675 | 675 | if ($data != '') { |
| 676 | 676 | $temp_vendor[] = trim(str_replace(',', ' ', $data)); |
| 677 | 677 | } |
@@ -679,8 +679,8 @@ discard block |
||
| 679 | 679 | if (count($temp_vendor) == 0) { |
| 680 | 680 | $temp_vendor[] = $disk; |
| 681 | 681 | } |
| 682 | - if (is_file("/sys/block/" . $disk . "/device/type")) { |
|
| 683 | - $data = trim(file_get_contents("/sys/block/" . $disk . "/device/type")); |
|
| 682 | + if (is_file("/sys/block/".$disk."/device/type")) { |
|
| 683 | + $data = trim(file_get_contents("/sys/block/".$disk."/device/type")); |
|
| 684 | 684 | if ($data != '') { |
| 685 | 685 | $temp_vendor[] = trim(str_replace(',', ' ', $data)); |
| 686 | 686 | } |
@@ -706,7 +706,7 @@ discard block |
||
| 706 | 706 | Util::mwExec("{$dfPath} -m | {$grepPath} {$hdd} | {$awkPath} '{print $4}'", $out); |
| 707 | 707 | $result = 0; |
| 708 | 708 | foreach ($out as $res) { |
| 709 | - if ( ! is_numeric($res)) { |
|
| 709 | + if (!is_numeric($res)) { |
|
| 710 | 710 | continue; |
| 711 | 711 | } |
| 712 | 712 | $result += (1 * $res); |
@@ -743,19 +743,19 @@ discard block |
||
| 743 | 743 | $path_size_info = $tmp_path; |
| 744 | 744 | } |
| 745 | 745 | if (empty($path_size_info)) { |
| 746 | - $tmp_path = "/sys/block/" . substr($dev, 0, 3) . "/{$dev}/size"; |
|
| 746 | + $tmp_path = "/sys/block/".substr($dev, 0, 3)."/{$dev}/size"; |
|
| 747 | 747 | if (file_exists($tmp_path)) { |
| 748 | 748 | $path_size_info = $tmp_path; |
| 749 | 749 | } |
| 750 | 750 | } |
| 751 | 751 | |
| 752 | - if ( ! empty($path_size_info)) { |
|
| 752 | + if (!empty($path_size_info)) { |
|
| 753 | 753 | $original_size = trim(file_get_contents($path_size_info)); |
| 754 | 754 | $original_size = ($original_size * 512 / 1024 / 1024); |
| 755 | 755 | $mb_size = $original_size; |
| 756 | 756 | } |
| 757 | 757 | |
| 758 | - $tmp_dir = "/tmp/{$dev}_" . time(); |
|
| 758 | + $tmp_dir = "/tmp/{$dev}_".time(); |
|
| 759 | 759 | $out = []; |
| 760 | 760 | |
| 761 | 761 | $fs = null; |
@@ -812,7 +812,7 @@ discard block |
||
| 812 | 812 | } |
| 813 | 813 | Util::mwMkdir($dir); |
| 814 | 814 | |
| 815 | - if ( ! file_exists($dir)) { |
|
| 815 | + if (!file_exists($dir)) { |
|
| 816 | 816 | Util::sysLogMsg('Storage', "Unable mount $dev $format to $dir. Unable create dir."); |
| 817 | 817 | |
| 818 | 818 | return false; |
@@ -823,7 +823,7 @@ discard block |
||
| 823 | 823 | Util::mwExec("{$mountNtfs3gPath} /dev/{$dev} {$dir}", $out); |
| 824 | 824 | } else { |
| 825 | 825 | $storage = new Storage(); |
| 826 | - $uid_part = 'UUID=' . $storage->getUuid("/dev/{$dev}") . ''; |
|
| 826 | + $uid_part = 'UUID='.$storage->getUuid("/dev/{$dev}").''; |
|
| 827 | 827 | $mountPath = Util::which('mount'); |
| 828 | 828 | Util::mwExec("{$mountPath} -t {$format} {$uid_part} {$dir}", $out); |
| 829 | 829 | } |
@@ -837,14 +837,14 @@ discard block |
||
| 837 | 837 | public function configure(): void |
| 838 | 838 | { |
| 839 | 839 | $cf_disk = ''; |
| 840 | - $varEtcDir = $this->config->path('core.varEtcDir'); |
|
| 840 | + $varEtcDir = $this->config->path('core.varEtcDir'); |
|
| 841 | 841 | $storage_dev_file = "{$varEtcDir}/storage_device"; |
| 842 | 842 | if (file_exists($storage_dev_file)) { |
| 843 | 843 | unlink($storage_dev_file); |
| 844 | 844 | } |
| 845 | 845 | |
| 846 | - if (file_exists($varEtcDir . '/cfdevice')) { |
|
| 847 | - $cf_disk = trim(file_get_contents($varEtcDir . '/cfdevice')); |
|
| 846 | + if (file_exists($varEtcDir.'/cfdevice')) { |
|
| 847 | + $cf_disk = trim(file_get_contents($varEtcDir.'/cfdevice')); |
|
| 848 | 848 | } |
| 849 | 849 | |
| 850 | 850 | $disks = $this->getDiskSettings(); |
@@ -858,18 +858,18 @@ discard block |
||
| 858 | 858 | // Если это системный диск, то пытаемся подключить раздел 4. |
| 859 | 859 | $dev = "{$disk['device']}4"; |
| 860 | 860 | } |
| 861 | - if ( ! $this->hddExists($dev)) { |
|
| 861 | + if (!$this->hddExists($dev)) { |
|
| 862 | 862 | // Диск не существует. |
| 863 | 863 | continue; |
| 864 | 864 | } |
| 865 | - if ($disk['media'] === '1' || ! file_exists($storage_dev_file)) { |
|
| 865 | + if ($disk['media'] === '1' || !file_exists($storage_dev_file)) { |
|
| 866 | 866 | file_put_contents($storage_dev_file, "/storage/usbdisk{$disk['id']}"); |
| 867 | 867 | $this->updateConfigWithNewMountPoint("/storage/usbdisk{$disk['id']}"); |
| 868 | 868 | } |
| 869 | 869 | |
| 870 | - $str_uid = 'UUID=' . $this->getUuid($dev) . ''; |
|
| 870 | + $str_uid = 'UUID='.$this->getUuid($dev).''; |
|
| 871 | 871 | $format_p4 = $this->getFsType($dev); |
| 872 | - $conf .= "{$str_uid} /storage/usbdisk{$disk['id']} {$format_p4} async,rw 0 0\n"; |
|
| 872 | + $conf .= "{$str_uid} /storage/usbdisk{$disk['id']} {$format_p4} async,rw 0 0\n"; |
|
| 873 | 873 | $mount_point = "/storage/usbdisk{$disk['id']}"; |
| 874 | 874 | Util::mwMkdir($mount_point); |
| 875 | 875 | } |
@@ -952,8 +952,8 @@ discard block |
||
| 952 | 952 | $this->config = $this->di->getShared('config'); |
| 953 | 953 | |
| 954 | 954 | // Delete boot cache folders |
| 955 | - if (str_contains($mount_point, '/mountpoint')===false |
|
| 956 | - && is_dir('/mountpoint')){ |
|
| 955 | + if (str_contains($mount_point, '/mountpoint') === false |
|
| 956 | + && is_dir('/mountpoint')) { |
|
| 957 | 957 | $rmPath = Util::which('rm'); |
| 958 | 958 | Util::mwExec("{$rmPath} -rf /mountpoint"); |
| 959 | 959 | } |
@@ -971,11 +971,11 @@ discard block |
||
| 971 | 971 | Util::mwMkdir('/storage'); |
| 972 | 972 | $chmodPath = Util::which('chmod'); |
| 973 | 973 | Util::mwExec("{$chmodPath} 755 /storage"); |
| 974 | - if ( ! file_exists($varEtcDir . '/cfdevice')) { |
|
| 974 | + if (!file_exists($varEtcDir.'/cfdevice')) { |
|
| 975 | 975 | return; |
| 976 | 976 | } |
| 977 | 977 | $fstab = ''; |
| 978 | - $file_data = file_get_contents($varEtcDir . '/cfdevice'); |
|
| 978 | + $file_data = file_get_contents($varEtcDir.'/cfdevice'); |
|
| 979 | 979 | $cf_disk = trim($file_data); |
| 980 | 980 | if ('' == $cf_disk) { |
| 981 | 981 | return; |
@@ -985,9 +985,9 @@ discard block |
||
| 985 | 985 | $part3 = (strpos($cf_disk, 'mmcblk') !== false) ? "{$cf_disk}p3" : "{$cf_disk}3"; // Conf |
| 986 | 986 | |
| 987 | 987 | |
| 988 | - $uid_part2 = 'UUID=' . $this->getUuid("/dev/{$part2}") . ''; |
|
| 988 | + $uid_part2 = 'UUID='.$this->getUuid("/dev/{$part2}").''; |
|
| 989 | 989 | $format_p2 = $this->getFsType($part2); |
| 990 | - $uid_part3 = 'UUID=' . $this->getUuid("/dev/{$part3}") . ''; |
|
| 990 | + $uid_part3 = 'UUID='.$this->getUuid("/dev/{$part3}").''; |
|
| 991 | 991 | $format_p3 = $this->getFsType($part3); |
| 992 | 992 | |
| 993 | 993 | // $fstab .= "/dev/{$part1} /cf msdos ro 1 1\n"; // НЕ МОНТИРУЕМ! |
@@ -1032,24 +1032,24 @@ discard block |
||
| 1032 | 1032 | } |
| 1033 | 1033 | } |
| 1034 | 1034 | |
| 1035 | - if ( ! empty($path)) { |
|
| 1035 | + if (!empty($path)) { |
|
| 1036 | 1036 | Util::mwMkdir($path); |
| 1037 | 1037 | } |
| 1038 | 1038 | |
| 1039 | 1039 | $downloadCacheDir = appPath('sites/pbxcore/files/cache'); |
| 1040 | - if ( ! $isLiveCd ) { |
|
| 1040 | + if (!$isLiveCd) { |
|
| 1041 | 1041 | Util::mwMkdir($downloadCacheDir); |
| 1042 | 1042 | Util::createUpdateSymlink($this->config->path('www.downloadCacheDir'), $downloadCacheDir); |
| 1043 | 1043 | } |
| 1044 | 1044 | |
| 1045 | 1045 | $jsCacheDir = appPath('sites/admin-cabinet/assets/js/cache'); |
| 1046 | - Util::createUpdateSymlink($this->config->path('adminApplication.assetsCacheDir') . '/js', $jsCacheDir); |
|
| 1046 | + Util::createUpdateSymlink($this->config->path('adminApplication.assetsCacheDir').'/js', $jsCacheDir); |
|
| 1047 | 1047 | |
| 1048 | 1048 | $cssCacheDir = appPath('sites/admin-cabinet/assets/css/cache'); |
| 1049 | - Util::createUpdateSymlink($this->config->path('adminApplication.assetsCacheDir') . '/css', $cssCacheDir); |
|
| 1049 | + Util::createUpdateSymlink($this->config->path('adminApplication.assetsCacheDir').'/css', $cssCacheDir); |
|
| 1050 | 1050 | |
| 1051 | 1051 | $imgCacheDir = appPath('sites/admin-cabinet/assets/img/cache'); |
| 1052 | - Util::createUpdateSymlink($this->config->path('adminApplication.assetsCacheDir') . '/img', $imgCacheDir); |
|
| 1052 | + Util::createUpdateSymlink($this->config->path('adminApplication.assetsCacheDir').'/img', $imgCacheDir); |
|
| 1053 | 1053 | |
| 1054 | 1054 | Util::createUpdateSymlink($this->config->path('www.phpSessionDir'), '/var/lib/php/session'); |
| 1055 | 1055 | Util::createUpdateSymlink($this->config->path('www.uploadDir'), '/ultmp'); |
@@ -1084,13 +1084,13 @@ discard block |
||
| 1084 | 1084 | $cacheDirs[] = $this->config->path('www.downloadCacheDir'); |
| 1085 | 1085 | $cacheDirs[] = $this->config->path('www.managedCacheDir'); |
| 1086 | 1086 | $cacheDirs[] = $this->config->path('www.modelsCacheDir'); |
| 1087 | - $cacheDirs[] = $this->config->path('adminApplication.assetsCacheDir') . '/js'; |
|
| 1088 | - $cacheDirs[] = $this->config->path('adminApplication.assetsCacheDir') . '/css'; |
|
| 1089 | - $cacheDirs[] = $this->config->path('adminApplication.assetsCacheDir') . '/img'; |
|
| 1087 | + $cacheDirs[] = $this->config->path('adminApplication.assetsCacheDir').'/js'; |
|
| 1088 | + $cacheDirs[] = $this->config->path('adminApplication.assetsCacheDir').'/css'; |
|
| 1089 | + $cacheDirs[] = $this->config->path('adminApplication.assetsCacheDir').'/img'; |
|
| 1090 | 1090 | $cacheDirs[] = $this->config->path('adminApplication.voltCacheDir'); |
| 1091 | 1091 | $rmPath = Util::which('rm'); |
| 1092 | 1092 | foreach ($cacheDirs as $cacheDir) { |
| 1093 | - if ( ! empty($cacheDir)) { |
|
| 1093 | + if (!empty($cacheDir)) { |
|
| 1094 | 1094 | Util::mwExec("{$rmPath} -rf {$cacheDir}/*"); |
| 1095 | 1095 | } |
| 1096 | 1096 | } |
@@ -1149,12 +1149,12 @@ discard block |
||
| 1149 | 1149 | */ |
| 1150 | 1150 | public function saveDiskSettings($data, $id = '1'): void |
| 1151 | 1151 | { |
| 1152 | - if ( ! is_array($data)) { |
|
| 1152 | + if (!is_array($data)) { |
|
| 1153 | 1153 | return; |
| 1154 | 1154 | } |
| 1155 | 1155 | $disk_data = $this->getDiskSettings($id); |
| 1156 | 1156 | if (count($disk_data) === 0) { |
| 1157 | - $uniqid = strtoupper('STORAGE-DISK-' . md5(time())); |
|
| 1157 | + $uniqid = strtoupper('STORAGE-DISK-'.md5(time())); |
|
| 1158 | 1158 | $storage_settings = new StorageModel(); |
| 1159 | 1159 | foreach ($data as $key => $val) { |
| 1160 | 1160 | $storage_settings->writeAttribute($key, $val); |