diff --git a/lib/classes/patch/384alpha2a.php b/lib/classes/patch/384alpha2a.php new file mode 100644 index 0000000000..c92da4c6a6 --- /dev/null +++ b/lib/classes/patch/384alpha2a.php @@ -0,0 +1,72 @@ +release; + } + + /** + * {@inheritdoc} + */ + public function require_all_upgrades() + { + return false; + } + + /** + * {@inheritdoc} + */ + public function concern() + { + return $this->concern; + } + + /** + * {@inheritdoc} + */ + public function apply(base $appbox, Application $app) + { + $finder = new Finder(); + $fs = new Filesystem(); + foreach ($finder->files()->in($app['root.path'].'/config/status') as $file) { + if (!$file->isFile()) { + continue; + } + $fileName = $file->getFileName(); + $chunks = explode('-', $fileName); + + if (count($chunks) < 4) { + continue; + } + + $suffix = array_pop($chunks); + $uniqid = md5(implode('-', $chunks)); + + $fs->rename($file->getRealPath(), $app['root.path'].'/config/status/' . $uniqid . '-' . $suffix); + } + } +}