From 9d10c68446615eaa555d8cb7fdbda81158368e21 Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Tue, 22 Apr 2014 11:20:17 +0200 Subject: [PATCH 1/3] Rename icone status --- lib/classes/databox/status.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/classes/databox/status.php b/lib/classes/databox/status.php index 5c4a69c588..8dc5da54d6 100644 --- a/lib/classes/databox/status.php +++ b/lib/classes/databox/status.php @@ -69,8 +69,14 @@ class databox_status return; } - $path = $this->path = $app['root.path'] . "/config/status/" . urlencode($sbas_params[$sbas_id]["host"]) . "-" . urlencode($sbas_params[$sbas_id]["port"]) . "-" . urlencode($sbas_params[$sbas_id]["dbname"]); - $url = $this->url = "/custom/status/" . urlencode($sbas_params[$sbas_id]["host"]) . "-" . urlencode($sbas_params[$sbas_id]["port"]) . "-" . urlencode($sbas_params[$sbas_id]["dbname"]); + $uniqid = md5(implode('-', array( + $sbas_params[$sbas_id]["host"], + $sbas_params[$sbas_id]["port"], + $sbas_params[$sbas_id]["dbname"] + ))); + + $path = $this->path = $app['root.path'] . "/config/status/" . $uniqid; + $url = $this->url = "/custom/status/" . $uniqid; $databox = $app['phraseanet.appbox']->get_databox((int) $sbas_id); $xmlpref = $databox->get_structure(); From d0d83cd705553d0eddaee06cc28a1f2c921913a4 Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Tue, 22 Apr 2014 11:20:36 +0200 Subject: [PATCH 2/3] Add migration patch --- lib/classes/patch/384alpha2a.php | 72 ++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 lib/classes/patch/384alpha2a.php 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); + } + } +} From b96dc1918db18c329c186ed150332caa94abb826 Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Tue, 22 Apr 2014 11:20:56 +0200 Subject: [PATCH 3/3] Bump to version 3.8.4-alpha.2 --- lib/Alchemy/Phrasea/Core/Version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Alchemy/Phrasea/Core/Version.php b/lib/Alchemy/Phrasea/Core/Version.php index e1192b6e08..4256eaa90c 100644 --- a/lib/Alchemy/Phrasea/Core/Version.php +++ b/lib/Alchemy/Phrasea/Core/Version.php @@ -18,7 +18,7 @@ namespace Alchemy\Phrasea\Core; */ class Version { - protected static $number = '3.8.4-alpha.1'; + protected static $number = '3.8.4-alpha.2'; protected static $name = 'Diplodocus'; public static function getNumber()