diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-09-08 18:46:27 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-09-08 18:46:27 +0200 |
commit | 70abce04827517d4391cc1bb3cd71574fc19724a (patch) | |
tree | a744a503ed1ef283949b3995d04cb58cf0ed1373 /apps/files/ajax | |
parent | ffee4da397d8f74f8e4ce4f479c2a9447e60477c (diff) | |
parent | fa3393674c854e884abf10d3b82dab03aca83c61 (diff) | |
download | nextcloud-server-70abce04827517d4391cc1bb3cd71574fc19724a.tar.gz nextcloud-server-70abce04827517d4391cc1bb3cd71574fc19724a.zip |
Merge pull request #10739 from owncloud/eventsource-public
Add EventSource to the public API
Diffstat (limited to 'apps/files/ajax')
-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; |