diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/ajax/newfile.php | 2 | ||||
-rw-r--r-- | apps/files/ajax/scan.php | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/files/ajax/newfile.php b/apps/files/ajax/newfile.php index 606576760ec..46629e1b602 100644 --- a/apps/files/ajax/newfile.php +++ b/apps/files/ajax/newfile.php @@ -16,7 +16,7 @@ $content = isset( $_REQUEST['content'] ) ? $_REQUEST['content'] : ''; $source = isset( $_REQUEST['source'] ) ? trim($_REQUEST['source'], '/\\') : ''; if($source) { - $eventSource=new OC_EventSource(); + $eventSource = \OC::$server->createEventSource(); } else { OC_JSON::callCheck(); } diff --git a/apps/files/ajax/scan.php b/apps/files/ajax/scan.php index 3ec7f9394b1..da5a2ce6f26 100644 --- a/apps/files/ajax/scan.php +++ b/apps/files/ajax/scan.php @@ -15,7 +15,7 @@ if (isset($_GET['users'])) { $users = array(OC_User::getUser()); } -$eventSource = new OC_EventSource(); +$eventSource = \OC::$server->createEventSource(); $listener = new ScanListener($eventSource); foreach ($users as $user) { @@ -39,12 +39,12 @@ class ScanListener { private $lastCount = 0; /** - * @var \OC_EventSource event source to pass events to + * @var \OCP\IEventSource event source to pass events to */ private $eventSource; /** - * @param \OC_EventSource $eventSource + * @param \OCP\IEventSource $eventSource */ public function __construct($eventSource) { $this->eventSource = $eventSource; |