Merge pull request #24177 from owncloud/deprecate-update.php
Deprecate appinfo/update.php - RepairSteps within info.xml are to be …
This commit is contained in:
commit
5a8238788b
|
@ -170,6 +170,8 @@ class CheckCode extends Command {
|
||||||
$errors = array_merge($errors, $infoErrors);
|
$errors = array_merge($errors, $infoErrors);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->analyseUpdateFile($appId, $output);
|
||||||
|
|
||||||
if (empty($errors)) {
|
if (empty($errors)) {
|
||||||
$output->writeln('<info>App is compliant - awesome job!</info>');
|
$output->writeln('<info>App is compliant - awesome job!</info>');
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -178,4 +180,20 @@ class CheckCode extends Command {
|
||||||
return 101;
|
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>");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue