Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Rello committed Jun 17, 2023
2 parents 578afa8 + 80b10ae commit f1efb31
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/Controller/ScannerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,14 @@ public function __construct(
$this->DBController = $DBController;
$this->SettingController = $SettingController;
$this->IDateTimeZone = $IDateTimeZone;
$this->eventSource = OC::$server->createEventSource();
$this->lastUpdated = time();

// @TODO: Remove method_exists when min-version="28"
if (method_exists(\OC::$server, 'createEventSource')) {
$this->eventSource = \OC::$server->createEventSource();
} else {
$this->eventSource = \OCP\Server::get(IEventSourceFactory::class)->create();
}
}

/**
Expand Down

0 comments on commit f1efb31

Please sign in to comment.