Skip to content

Commit

Permalink
using const
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtificialOwl committed Oct 5, 2021
1 parent 416dac1 commit 5d32ac7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/Listeners/NodeEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ public function handle(Event $event): void {
}

$filepath = $storage->getLocalFile($node->getInternalPath());
$root = $this->configService->getSystemValue('datadirectory');

$root = $this->configService->getSystemValue(ConfigService::DATA_DIRECTORY);
if (strpos($filepath, $root) !== 0) {
return;
}
Expand Down
1 change: 1 addition & 0 deletions lib/Service/ConfigService.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class ConfigService {


const MAINTENANCE = 'maintenance';
const DATA_DIRECTORY = 'datadirectory';

const SELF_SIGNED_CERT = 'self_signed_cert';
const DELAY_FULL_RP = 'delay_full_rp';
Expand Down
2 changes: 1 addition & 1 deletion lib/Service/FilesService.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function initRestoringData(RestoringData $data): void {
break;

case RestoringData::ROOT_DATA:
$root = $this->configService->getSystemValue('datadirectory');
$root = $this->configService->getSystemValue(ConfigService::DATA_DIRECTORY);
break;

case RestoringData::FILE_CONFIG:
Expand Down

0 comments on commit 5d32ac7

Please sign in to comment.