From e628424ccf284da2b26fde8ed6f9f2daea64755a Mon Sep 17 00:00:00 2001
From: Roeland Jago Douma <roeland@famdouma.nl>
Date: Wed, 17 Jan 2018 15:18:22 +0100
Subject: [PATCH] Warn about the old OCP\API::register construct for OCS

* Add sleep
* Add log message

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
---
 ocs/v1.php | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ocs/v1.php b/ocs/v1.php
index b6ed5697a69..fb996d0564d 100644
--- a/ocs/v1.php
+++ b/ocs/v1.php
@@ -56,6 +56,10 @@ try {
 	OC_App::loadApps();
 
 	OC::$server->getRouter()->match('/ocs'.\OC::$server->getRequest()->getRawPathInfo());
+
+	sleep(1);
+	OC::$server->getLogger()->info('This uses an old OCP\API::register construct. This will be removed in a future version of Nextcloud. Please migrate to the OCSController');
+
 	return;
 } catch (ResourceNotFoundException $e) {
 	// Fall through the not found
-- 
GitLab