From: Vincent Vanwaelscappel Date: Thu, 20 May 2021 16:17:31 +0000 (+0200) Subject: wip #4216 @2 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=ff8b1123609c1cefb1ebed9e5689e651276472dd;p=fluidbook-toolbox.git wip #4216 @2 --- diff --git a/app/Http/Controllers/API/FluidbookThemeAPIController.php b/app/Http/Controllers/API/FluidbookThemeAPIController.php index 9f0b96844..1b0bee72a 100644 --- a/app/Http/Controllers/API/FluidbookThemeAPIController.php +++ b/app/Http/Controllers/API/FluidbookThemeAPIController.php @@ -64,4 +64,10 @@ class FluidbookThemeAPIController extends Controller $theme = FluidbookTheme::find($id); $theme->delete(); } + + public function uploadfile(Request $request,$id){ + $theme = FluidbookTheme::find($id); + $theme->addFile($request->get('theme'),$request->get('path')); + $theme->save(); + } } diff --git a/app/Models/FluidbookTheme.php b/app/Models/FluidbookTheme.php index 686ca67a3..bea13de01 100644 --- a/app/Models/FluidbookTheme.php +++ b/app/Models/FluidbookTheme.php @@ -858,6 +858,11 @@ class FluidbookTheme extends CubistMagicAbstractModel } + public function addFile($field, $path) + { + $this->_handleWS2File($this->getField($field), $path); + } + public function updateWS2Table() { return; @@ -928,8 +933,8 @@ class FluidbookTheme extends CubistMagicAbstractModel } else { $res = 'rgba(' . hexdec($e[1]) . ', ' . hexdec($e[2]) . ', ' . hexdec($e[3]) . ', ' . round(hexdec($e[0]) / 255, 2) . ')'; } - }else{ - $res=$data; + } else { + $res = $data; } self::$_colorToWS3Cache[$data] = $res; } @@ -1070,7 +1075,7 @@ class FluidbookTheme extends CubistMagicAbstractModel try { $this->addMediaToField($field->getName(), $file, true); } catch (\Exception $e) { - echo 'error adding '.$file . "\n"; + echo 'error adding ' . $file . "\n"; } } } diff --git a/composer.lock b/composer.lock index 9b4d0d5b0..ac45966f4 100644 --- a/composer.lock +++ b/composer.lock @@ -141,16 +141,16 @@ }, { "name": "backpack/crud", - "version": "4.1.43", + "version": "4.1.45", "source": { "type": "git", "url": "https://github.com/Laravel-Backpack/CRUD.git", - "reference": "973e8ab33d42f02272f65e9688ea250fc9502d3d" + "reference": "c9918581306bc4a8d605b87b4757893baa03fcc1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Laravel-Backpack/CRUD/zipball/973e8ab33d42f02272f65e9688ea250fc9502d3d", - "reference": "973e8ab33d42f02272f65e9688ea250fc9502d3d", + "url": "https://api.github.com/repos/Laravel-Backpack/CRUD/zipball/c9918581306bc4a8d605b87b4757893baa03fcc1", + "reference": "c9918581306bc4a8d605b87b4757893baa03fcc1", "shasum": "" }, "require": { @@ -228,9 +228,9 @@ ], "support": { "issues": "https://github.com/Laravel-Backpack/CRUD/issues", - "source": "https://github.com/Laravel-Backpack/CRUD/tree/4.1.43" + "source": "https://github.com/Laravel-Backpack/CRUD/tree/4.1.45" }, - "time": "2021-04-26T14:56:15+00:00" + "time": "2021-05-17T05:41:10+00:00" }, { "name": "backpack/logmanager", @@ -447,16 +447,16 @@ }, { "name": "barryvdh/laravel-debugbar", - "version": "v3.5.5", + "version": "v3.5.7", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-debugbar.git", - "reference": "6420113d90bb746423fa70b9940e9e7c26ebc121" + "reference": "88fd9cfa144b06b2549e9d487fdaec68265e791e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/6420113d90bb746423fa70b9940e9e7c26ebc121", - "reference": "6420113d90bb746423fa70b9940e9e7c26ebc121", + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/88fd9cfa144b06b2549e9d487fdaec68265e791e", + "reference": "88fd9cfa144b06b2549e9d487fdaec68265e791e", "shasum": "" }, "require": { @@ -516,7 +516,7 @@ ], "support": { "issues": "https://github.com/barryvdh/laravel-debugbar/issues", - "source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.5.5" + "source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.5.7" }, "funding": [ { @@ -524,7 +524,7 @@ "type": "github" } ], - "time": "2021-04-07T11:19:20+00:00" + "time": "2021-05-13T20:18:35+00:00" }, { "name": "brick/math", @@ -1201,13 +1201,13 @@ "source": { "type": "git", "url": "git://git.cubedesigners.com/cubist_cms-back.git", - "reference": "113a21fd276bf1d80e7e2ff37e7a6a62d2c36218" + "reference": "461be09c1c0c416da5a127ed45c57690bcfd3c08" }, "dist": { "type": "tar", - "url": "https://composer.cubedesigners.com/dist/cubist/cms-back/cubist-cms-back-dev-master-81639a.tar", - "reference": "113a21fd276bf1d80e7e2ff37e7a6a62d2c36218", - "shasum": "4204ce38b6c46cdf8995da713bb26de10f2a178b" + "url": "https://composer.cubedesigners.com/dist/cubist/cms-back/cubist-cms-back-dev-master-e6cd4a.tar", + "reference": "461be09c1c0c416da5a127ed45c57690bcfd3c08", + "shasum": "826938597765677f92dd71f80372dbb591a836e9" }, "require": { "backpack/backupmanager": "^2.0", @@ -1282,7 +1282,7 @@ } ], "description": "Cubist Backpack extension", - "time": "2021-03-24T16:31:23+00:00" + "time": "2021-05-19T10:09:46+00:00" }, { "name": "cubist/cms-front", @@ -1759,16 +1759,16 @@ }, { "name": "doctrine/cache", - "version": "1.11.0", + "version": "1.11.2", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "a9c1b59eba5a08ca2770a76eddb88922f504e8e0" + "reference": "9c53086695937c50c47936ed86d96150ffbcf60d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/a9c1b59eba5a08ca2770a76eddb88922f504e8e0", - "reference": "a9c1b59eba5a08ca2770a76eddb88922f504e8e0", + "url": "https://api.github.com/repos/doctrine/cache/zipball/9c53086695937c50c47936ed86d96150ffbcf60d", + "reference": "9c53086695937c50c47936ed86d96150ffbcf60d", "shasum": "" }, "require": { @@ -1838,7 +1838,7 @@ ], "support": { "issues": "https://github.com/doctrine/cache/issues", - "source": "https://github.com/doctrine/cache/tree/1.11.0" + "source": "https://github.com/doctrine/cache/tree/1.11.2" }, "funding": [ { @@ -1854,7 +1854,7 @@ "type": "tidelift" } ], - "time": "2021-04-13T14:46:17+00:00" + "time": "2021-05-20T14:57:29+00:00" }, { "name": "doctrine/dbal", @@ -3484,16 +3484,16 @@ }, { "name": "league/commonmark", - "version": "1.6.1", + "version": "1.6.2", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "2651c497f005de305c7ba3f232cbd87b8c00ee8c" + "reference": "7d70d2f19c84bcc16275ea47edabee24747352eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/2651c497f005de305c7ba3f232cbd87b8c00ee8c", - "reference": "2651c497f005de305c7ba3f232cbd87b8c00ee8c", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/7d70d2f19c84bcc16275ea47edabee24747352eb", + "reference": "7d70d2f19c84bcc16275ea47edabee24747352eb", "shasum": "" }, "require": { @@ -3581,7 +3581,7 @@ "type": "tidelift" } ], - "time": "2021-05-08T16:08:00+00:00" + "time": "2021-05-12T11:39:41+00:00" }, { "name": "league/csv", @@ -4350,16 +4350,16 @@ }, { "name": "nesbot/carbon", - "version": "2.47.0", + "version": "2.48.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "606262fd8888b75317ba9461825a24fc34001e1e" + "reference": "d3c447f21072766cddec3522f9468a5849a76147" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/606262fd8888b75317ba9461825a24fc34001e1e", - "reference": "606262fd8888b75317ba9461825a24fc34001e1e", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/d3c447f21072766cddec3522f9468a5849a76147", + "reference": "d3c447f21072766cddec3522f9468a5849a76147", "shasum": "" }, "require": { @@ -4439,7 +4439,7 @@ "type": "tidelift" } ], - "time": "2021-04-13T21:54:02+00:00" + "time": "2021-05-07T10:08:30+00:00" }, { "name": "neutron/temporary-filesystem", @@ -6591,16 +6591,16 @@ }, { "name": "symfony/console", - "version": "v5.2.7", + "version": "v5.2.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "90374b8ed059325b49a29b55b3f8bb4062c87629" + "reference": "864568fdc0208b3eba3638b6000b69d2386e6768" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/90374b8ed059325b49a29b55b3f8bb4062c87629", - "reference": "90374b8ed059325b49a29b55b3f8bb4062c87629", + "url": "https://api.github.com/repos/symfony/console/zipball/864568fdc0208b3eba3638b6000b69d2386e6768", + "reference": "864568fdc0208b3eba3638b6000b69d2386e6768", "shasum": "" }, "require": { @@ -6668,7 +6668,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.2.7" + "source": "https://github.com/symfony/console/tree/v5.2.8" }, "funding": [ { @@ -6684,20 +6684,20 @@ "type": "tidelift" } ], - "time": "2021-04-19T14:07:32+00:00" + "time": "2021-05-11T15:45:21+00:00" }, { "name": "symfony/css-selector", - "version": "v5.2.7", + "version": "v5.2.9", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "59a684f5ac454f066ecbe6daecce6719aed283fb" + "reference": "5d5f97809015102116208b976eb2edb44b689560" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/59a684f5ac454f066ecbe6daecce6719aed283fb", - "reference": "59a684f5ac454f066ecbe6daecce6719aed283fb", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/5d5f97809015102116208b976eb2edb44b689560", + "reference": "5d5f97809015102116208b976eb2edb44b689560", "shasum": "" }, "require": { @@ -6733,7 +6733,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v5.3.0-BETA1" + "source": "https://github.com/symfony/css-selector/tree/v5.2.9" }, "funding": [ { @@ -6749,7 +6749,7 @@ "type": "tidelift" } ], - "time": "2021-04-07T16:07:52+00:00" + "time": "2021-05-16T13:07:46+00:00" }, { "name": "symfony/debug", @@ -6889,16 +6889,16 @@ }, { "name": "symfony/error-handler", - "version": "v5.2.7", + "version": "v5.2.8", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "ea3ddbf67615e883ca7c33a4de61213789846782" + "reference": "1416bc16317a8188aabde251afef7618bf4687ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/ea3ddbf67615e883ca7c33a4de61213789846782", - "reference": "ea3ddbf67615e883ca7c33a4de61213789846782", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/1416bc16317a8188aabde251afef7618bf4687ac", + "reference": "1416bc16317a8188aabde251afef7618bf4687ac", "shasum": "" }, "require": { @@ -6938,7 +6938,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v5.2.7" + "source": "https://github.com/symfony/error-handler/tree/v5.2.8" }, "funding": [ { @@ -6954,7 +6954,7 @@ "type": "tidelift" } ], - "time": "2021-04-07T15:57:33+00:00" + "time": "2021-05-07T13:42:21+00:00" }, { "name": "symfony/event-dispatcher", @@ -7184,16 +7184,16 @@ }, { "name": "symfony/finder", - "version": "v5.2.4", + "version": "v5.2.9", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "0d639a0943822626290d169965804f79400e6a04" + "reference": "ccccb9d48ca42757dd12f2ca4bf857a4e217d90d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/0d639a0943822626290d169965804f79400e6a04", - "reference": "0d639a0943822626290d169965804f79400e6a04", + "url": "https://api.github.com/repos/symfony/finder/zipball/ccccb9d48ca42757dd12f2ca4bf857a4e217d90d", + "reference": "ccccb9d48ca42757dd12f2ca4bf857a4e217d90d", "shasum": "" }, "require": { @@ -7225,7 +7225,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.2.4" + "source": "https://github.com/symfony/finder/tree/v5.2.9" }, "funding": [ { @@ -7241,7 +7241,7 @@ "type": "tidelift" } ], - "time": "2021-02-15T18:55:04+00:00" + "time": "2021-05-16T13:07:46+00:00" }, { "name": "symfony/http-client-contracts", @@ -7323,16 +7323,16 @@ }, { "name": "symfony/http-foundation", - "version": "v5.2.7", + "version": "v5.2.8", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "a416487a73bb9c9d120e9ba3a60547f4a3fb7a1f" + "reference": "e8fbbab7c4a71592985019477532629cb2e142dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/a416487a73bb9c9d120e9ba3a60547f4a3fb7a1f", - "reference": "a416487a73bb9c9d120e9ba3a60547f4a3fb7a1f", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e8fbbab7c4a71592985019477532629cb2e142dc", + "reference": "e8fbbab7c4a71592985019477532629cb2e142dc", "shasum": "" }, "require": { @@ -7376,7 +7376,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.2.7" + "source": "https://github.com/symfony/http-foundation/tree/v5.2.8" }, "funding": [ { @@ -7392,20 +7392,20 @@ "type": "tidelift" } ], - "time": "2021-05-01T13:46:24+00:00" + "time": "2021-05-07T13:41:16+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.2.7", + "version": "v5.2.9", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "1e9f6879f070f718e0055fbac232a56f67b8b6bd" + "reference": "eb540ef6870dbf33c92e372cfb869ebf9649e6cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/1e9f6879f070f718e0055fbac232a56f67b8b6bd", - "reference": "1e9f6879f070f718e0055fbac232a56f67b8b6bd", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/eb540ef6870dbf33c92e372cfb869ebf9649e6cb", + "reference": "eb540ef6870dbf33c92e372cfb869ebf9649e6cb", "shasum": "" }, "require": { @@ -7488,7 +7488,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.2.7" + "source": "https://github.com/symfony/http-kernel/tree/v5.2.9" }, "funding": [ { @@ -7504,20 +7504,20 @@ "type": "tidelift" } ], - "time": "2021-05-01T14:53:15+00:00" + "time": "2021-05-19T12:23:45+00:00" }, { "name": "symfony/mime", - "version": "v5.2.7", + "version": "v5.2.9", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "7af452bf51c46f18da00feb32e1ad36db9426515" + "reference": "64258e870f8cc75c3dae986201ea2df58c210b52" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/7af452bf51c46f18da00feb32e1ad36db9426515", - "reference": "7af452bf51c46f18da00feb32e1ad36db9426515", + "url": "https://api.github.com/repos/symfony/mime/zipball/64258e870f8cc75c3dae986201ea2df58c210b52", + "reference": "64258e870f8cc75c3dae986201ea2df58c210b52", "shasum": "" }, "require": { @@ -7571,7 +7571,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v5.2.7" + "source": "https://github.com/symfony/mime/tree/v5.2.9" }, "funding": [ { @@ -7587,7 +7587,7 @@ "type": "tidelift" } ], - "time": "2021-04-29T20:47:09+00:00" + "time": "2021-05-16T13:07:46+00:00" }, { "name": "symfony/polyfill-ctype", @@ -8382,16 +8382,16 @@ }, { "name": "symfony/routing", - "version": "v5.2.7", + "version": "v5.2.9", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "3f0cab2e95b5e92226f34c2c1aa969d3fc41f48c" + "reference": "4a7b2bf5e1221be1902b6853743a9bb317f6925e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/3f0cab2e95b5e92226f34c2c1aa969d3fc41f48c", - "reference": "3f0cab2e95b5e92226f34c2c1aa969d3fc41f48c", + "url": "https://api.github.com/repos/symfony/routing/zipball/4a7b2bf5e1221be1902b6853743a9bb317f6925e", + "reference": "4a7b2bf5e1221be1902b6853743a9bb317f6925e", "shasum": "" }, "require": { @@ -8451,7 +8451,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v5.2.7" + "source": "https://github.com/symfony/routing/tree/v5.2.9" }, "funding": [ { @@ -8467,7 +8467,7 @@ "type": "tidelift" } ], - "time": "2021-04-11T22:55:21+00:00" + "time": "2021-05-16T13:07:46+00:00" }, { "name": "symfony/service-contracts", @@ -8550,16 +8550,16 @@ }, { "name": "symfony/string", - "version": "v5.2.6", + "version": "v5.2.8", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "ad0bd91bce2054103f5eaa18ebeba8d3bc2a0572" + "reference": "01b35eb64cac8467c3f94cd0ce2d0d376bb7d1db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/ad0bd91bce2054103f5eaa18ebeba8d3bc2a0572", - "reference": "ad0bd91bce2054103f5eaa18ebeba8d3bc2a0572", + "url": "https://api.github.com/repos/symfony/string/zipball/01b35eb64cac8467c3f94cd0ce2d0d376bb7d1db", + "reference": "01b35eb64cac8467c3f94cd0ce2d0d376bb7d1db", "shasum": "" }, "require": { @@ -8613,7 +8613,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.2.6" + "source": "https://github.com/symfony/string/tree/v5.2.8" }, "funding": [ { @@ -8629,20 +8629,20 @@ "type": "tidelift" } ], - "time": "2021-03-17T17:12:15+00:00" + "time": "2021-05-10T14:56:10+00:00" }, { "name": "symfony/translation", - "version": "v5.2.7", + "version": "v5.2.9", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "e37ece5242564bceea54d709eafc948377ec9749" + "reference": "61af68dba333e2d376a325a29c2a3f2a605b4876" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/e37ece5242564bceea54d709eafc948377ec9749", - "reference": "e37ece5242564bceea54d709eafc948377ec9749", + "url": "https://api.github.com/repos/symfony/translation/zipball/61af68dba333e2d376a325a29c2a3f2a605b4876", + "reference": "61af68dba333e2d376a325a29c2a3f2a605b4876", "shasum": "" }, "require": { @@ -8706,7 +8706,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v5.2.7" + "source": "https://github.com/symfony/translation/tree/v5.2.9" }, "funding": [ { @@ -8722,7 +8722,7 @@ "type": "tidelift" } ], - "time": "2021-04-01T08:15:21+00:00" + "time": "2021-05-16T13:07:46+00:00" }, { "name": "symfony/translation-contracts", @@ -8804,16 +8804,16 @@ }, { "name": "symfony/var-dumper", - "version": "v5.2.7", + "version": "v5.2.8", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "27cb9f7cfa3853c736425c7233a8f68814b19636" + "reference": "d693200a73fae179d27f8f1b16b4faf3e8569eba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/27cb9f7cfa3853c736425c7233a8f68814b19636", - "reference": "27cb9f7cfa3853c736425c7233a8f68814b19636", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/d693200a73fae179d27f8f1b16b4faf3e8569eba", + "reference": "d693200a73fae179d27f8f1b16b4faf3e8569eba", "shasum": "" }, "require": { @@ -8872,7 +8872,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.2.7" + "source": "https://github.com/symfony/var-dumper/tree/v5.2.8" }, "funding": [ { @@ -8888,7 +8888,7 @@ "type": "tidelift" } ], - "time": "2021-04-19T14:07:32+00:00" + "time": "2021-05-07T13:42:21+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles",