From: Vincent Vanwaelscappel Date: Fri, 16 Jan 2026 17:20:48 +0000 (+0100) Subject: wip #7894 @2 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=a9a06ea2a9c4bc846b04da3bb8f894c39f454955;p=cubist_cms-back.git wip #7894 @2 --- diff --git a/src/app/Magic/Form.php b/src/app/Magic/Form.php index 5f6b0d5..7a0e9a6 100644 --- a/src/app/Magic/Form.php +++ b/src/app/Magic/Form.php @@ -39,7 +39,7 @@ class Form extends SubForm * @return string */ - public function render(callable $callback = null) + public function render(?callable $callback ) { return view(CubistBackpackServiceProvider::NAMESPACE . '::form.form', ['form' => $this, 'crud' => $this->crud])->render($callback); } diff --git a/src/app/Magic/Models/CubistMagicTranslatableModel.php b/src/app/Magic/Models/CubistMagicTranslatableModel.php index 6de431c..d1c21da 100644 --- a/src/app/Magic/Models/CubistMagicTranslatableModel.php +++ b/src/app/Magic/Models/CubistMagicTranslatableModel.php @@ -63,7 +63,7 @@ class CubistMagicTranslatableModel extends CubistMagicAbstractModel return $field; } - public function getTranslations(string $key = null, array $allowedLocales = null): array + public function getTranslations(?string $key, ?array $allowedLocales): array { if ($key !== null) { // $measure_label = 'Get translation in ' . get_class($this); diff --git a/src/routes/cubist/backpack/cdnproxy.php b/src/routes/cubist/backpack/cdnproxy.php index 8cdeb6e..657ee28 100644 --- a/src/routes/cubist/backpack/cdnproxy.php +++ b/src/routes/cubist/backpack/cdnproxy.php @@ -23,7 +23,9 @@ Route::group([ $cache = \Cubist\Util\Files\Files::mkdir(storage_path('app/cache/cdnproxy')) . sha1($url) . '.' . $ext; if (!file_exists($cache) || filemtime($cache) < (time() - 604800)) { - copy($url, $cache); + if (!@copy($url, $cache) && $ext=='map') { + return false; + } } return \Cubist\Backpack\Http\Controllers\Base\XSendFileController::sendfile($cache); })->where(['url' => '.*'])->name('cdnproxy')->withoutMiddleware(["App\Http\Middleware\CheckIfAdmin"]);