From: Vincent Vanwaelscappel Date: Wed, 1 Feb 2023 10:10:38 +0000 (+0100) Subject: wip #5701 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=b95d07de5dbe84cbf2a3869eebb3b58471dab236;p=fluidbook-toolbox.git wip #5701 @1 --- diff --git a/app/Fluidbook/Farm.php b/app/Fluidbook/Farm.php index 2f72467c4..d93a238eb 100644 --- a/app/Fluidbook/Farm.php +++ b/app/Fluidbook/Farm.php @@ -20,6 +20,7 @@ class Farm ['name' => 'her', 'host' => 'her2.cubedesigners.com', 'weight' => 4], ['name' => 'isleofdogs', 'host' => 'paris.cubedesigners.com', 'port' => 9458, 'weight' => 2], ['name' => 'jumanji', 'host' => 'paris.cubedesigners.com', 'port' => 9459, 'weight' => 2], + ['name' => 'kingkong', 'host' => 'kingkong.cubedesigners.com', 'weight' => 2], ]; protected static function _pingCache() diff --git a/app/Http/Controllers/Admin/Operations/FluidbookPublication/StatsOperation.php b/app/Http/Controllers/Admin/Operations/FluidbookPublication/StatsOperation.php index e60cb62f8..7a0a9f574 100644 --- a/app/Http/Controllers/Admin/Operations/FluidbookPublication/StatsOperation.php +++ b/app/Http/Controllers/Admin/Operations/FluidbookPublication/StatsOperation.php @@ -48,6 +48,7 @@ trait StatsOperation 'stats3.fluidbook.com' => '9df722a0bd30878ddc4d737352427502', 'stats4.fluidbook.com' => '3ffdbe052ae625f065573df9fa9515df', 'stats5.fluidbook.com' => '85e9cc307b6e5083249949e9472a80b8', + 'stats6.fluidbook.com' => '16f4c1d77cdc4792b807718388db96a0', ]; } diff --git a/app/Models/FluidbookPublication.php b/app/Models/FluidbookPublication.php index f377b1c73..072cce4d5 100644 --- a/app/Models/FluidbookPublication.php +++ b/app/Models/FluidbookPublication.php @@ -27,9 +27,11 @@ use Cubist\Backpack\Magic\Fields\Hidden; use Cubist\Backpack\Magic\Fields\Integer; use Cubist\Backpack\Magic\Fields\SelectFromArray; use Cubist\Backpack\Magic\Operations\CreateOperation; +use Cubist\Util\ArrayUtil; use Cubist\Util\Files\Files; use Cubist\Util\Graphics\Image; use Cubist\Util\Json; +use Cubist\Util\ObjectUtil; use Datetime; class FluidbookPublication extends ToolboxSettingsModel @@ -65,6 +67,8 @@ class FluidbookPublication extends ToolboxSettingsModel $this->addOwnerField(); + $this->addField('region', SelectFromArray::class, __('Région d\'hébergement des données'), ['options' => ['UE' => __('Union européenne'), 'US' => 'USA'], 'default' => 'UE', 'allows_null' => false, 'databaseDefault' => 'UE']); + $this->addField('status', SelectFromArray::class, 'Status', [ 'options' => [-1 => __('Brouillon'), 0 => __('Prêt'), 1 => __('Téléchargé'), 2 => __('Facturé')], @@ -130,9 +134,18 @@ class FluidbookPublication extends ToolboxSettingsModel { $this->setComposedAttributes(); $this->checkHash(); + $this->checkExternalServers(); return parent::onSaving(); } + protected function checkExternalServers() + { + $o = ArrayUtil::asArray($this->install_online); + $o = array_merge(['server' => '', 'path' => ''], $o); + $o['path'] = trim($o['path'], '/-'); + $this->install_online = $o; + } + public function onSaved(): bool { $this->setComposedAttributes(); diff --git a/composer.lock b/composer.lock index 8a69586d1..b95cd5301 100644 --- a/composer.lock +++ b/composer.lock @@ -1660,13 +1660,13 @@ "source": { "type": "git", "url": "git://git.cubedesigners.com/cubist_cms-back.git", - "reference": "1890d5c11b12b6524c892e81f9b128f8163003eb" + "reference": "f9a9f0aecb03d554bb74d8f72fc88d40c851be5b" }, "dist": { "type": "tar", - "url": "https://composer.cubedesigners.com/dist/cubist/cms-back/cubist-cms-back-dev-master-d1bd98.tar", - "reference": "1890d5c11b12b6524c892e81f9b128f8163003eb", - "shasum": "ff090ce2529fce92a3464d160fefcd7a2619601d" + "url": "https://composer.cubedesigners.com/dist/cubist/cms-back/cubist-cms-back-dev-master-908c83.tar", + "reference": "f9a9f0aecb03d554bb74d8f72fc88d40c851be5b", + "shasum": "e485c2bcd745580aef91deb606795cfdf320abbf" }, "require": { "backpack/backupmanager": "^3.0", @@ -1747,7 +1747,7 @@ } ], "description": "Cubist Backpack extension", - "time": "2023-01-26T14:26:00+00:00" + "time": "2023-01-27T18:05:07+00:00" }, { "name": "cubist/cms-front", @@ -2045,15 +2045,16 @@ "source": { "type": "git", "url": "git://git.cubedesigners.com/cubist_net.git", - "reference": "9432da3e6ad49becf36fa5a8d213312d7357d434" + "reference": "c7e86c950bac79f1f8f05627c120cdabd77c572a" }, "dist": { "type": "tar", - "url": "https://composer.cubedesigners.com/dist/cubist/net/cubist-net-dev-master-1d9c49.tar", - "reference": "9432da3e6ad49becf36fa5a8d213312d7357d434", - "shasum": "8259decd968367ece05283d63501f6066a244550" + "url": "https://composer.cubedesigners.com/dist/cubist/net/cubist-net-dev-master-b52505.tar", + "reference": "c7e86c950bac79f1f8f05627c120cdabd77c572a", + "shasum": "dd64e294afe5c54b0e9fbc5fde179918f756e64d" }, "require": { + "cubist/util": "dev-master", "ext-ssh2": "*", "php": ">=5.4.0" }, @@ -2074,7 +2075,7 @@ } ], "description": "net cubist composer package", - "time": "2023-01-26T14:47:40+00:00" + "time": "2023-01-27T14:43:25+00:00" }, { "name": "cubist/pdf", @@ -2169,13 +2170,13 @@ "source": { "type": "git", "url": "git://git.cubedesigners.com/cubist_util.git", - "reference": "b4f0533e198b06cda30ac32df0a82040367a086d" + "reference": "ee5c93333942a0c69bcef25309732361b1522072" }, "dist": { "type": "tar", - "url": "https://composer.cubedesigners.com/dist/cubist/util/cubist-util-dev-master-b9655a.tar", - "reference": "b4f0533e198b06cda30ac32df0a82040367a086d", - "shasum": "232576aa808f9c4465adff9f570d6f9bfbd97430" + "url": "https://composer.cubedesigners.com/dist/cubist/util/cubist-util-dev-master-c719f9.tar", + "reference": "ee5c93333942a0c69bcef25309732361b1522072", + "shasum": "ef2ccff2a2389818d4e3eb339a78a4e0fd4ee214" }, "require": { "cubist/net": "dev-master", @@ -2207,7 +2208,7 @@ } ], "description": "Utilities class", - "time": "2023-01-25T12:44:58+00:00" + "time": "2023-01-27T14:43:13+00:00" }, { "name": "cviebrock/eloquent-sluggable",