From 48b61b7b5af26f67f2e9555467feda93a1490b83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Thu, 21 Apr 2016 17:47:26 +0200 Subject: [PATCH] Deprecate appinfo/update.php - RepairSteps within info.xml are to be used --- core/Command/App/CheckCode.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/core/Command/App/CheckCode.php b/core/Command/App/CheckCode.php index 78f4390e70..f73c845703 100644 --- a/core/Command/App/CheckCode.php +++ b/core/Command/App/CheckCode.php @@ -170,6 +170,8 @@ class CheckCode extends Command { $errors = array_merge($errors, $infoErrors); } + $this->analyseUpdateFile($appId, $output); + if (empty($errors)) { $output->writeln('App is compliant - awesome job!'); return 0; @@ -178,4 +180,20 @@ class CheckCode extends Command { return 101; } } + + /** + * @param string $appId + * @param $output + */ + private function analyseUpdateFile($appId, OutputInterface $output) { + $appPath = \OC_App::getAppPath($appId); + if ($appPath === false) { + throw new \RuntimeException("No app with given id <$appId> known."); + } + + $updatePhp = $appPath . '/appinfo/update.php'; + if (file_exists($updatePhp)) { + $output->writeln("Deprecated file found: $updatePhp - please use repair steps"); + } + } }