diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-04-21 17:47:26 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-04-22 17:22:40 +0200 |
commit | 48b61b7b5af26f67f2e9555467feda93a1490b83 (patch) | |
tree | 296f69ba7577c347cfcf6794f35475bfa35bfc60 /core/Command | |
parent | e37b95ae53d098ffa93018e90d2443867f047a4f (diff) | |
download | nextcloud-server-48b61b7b5af26f67f2e9555467feda93a1490b83.tar.gz nextcloud-server-48b61b7b5af26f67f2e9555467feda93a1490b83.zip |
Deprecate appinfo/update.php - RepairSteps within info.xml are to be used
Diffstat (limited to 'core/Command')
-rw-r--r-- | core/Command/App/CheckCode.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/core/Command/App/CheckCode.php b/core/Command/App/CheckCode.php index 78f4390e70a..f73c8457032 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('<info>App is compliant - awesome job!</info>'); 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("<info>Deprecated file found: $updatePhp - please use repair steps</info>"); + } + } } |