From aeed70e6c037d98ac3d4d313f470d7112a63e044 Mon Sep 17 00:00:00 2001 From: Eduardo Kraus Date: Wed, 9 Oct 2024 10:18:18 -0300 Subject: [PATCH] webpage_image.svg --- classes/webpages.php | 6 +++--- index.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/classes/webpages.php b/classes/webpages.php index cf6140f2..82d378b6 100644 --- a/classes/webpages.php +++ b/classes/webpages.php @@ -256,7 +256,7 @@ public function page_details() { $imagem = ""; $fs = get_file_storage(); $file = $fs->get_file(context_system::instance()->id, 'local_kopere_dashboard', 'webpage_image', - $webpages->id, '/', 'webpage_image.img'); + $webpages->id, '/', 'webpage_image.svg'); if ($file && isset($file->get_filename()[3])) { $url = moodle_url::make_pluginfile_url($file->get_contextid(), $file->get_component(), $file->get_filearea(), $file->get_itemid(), "/", $file->get_filename()); @@ -338,7 +338,7 @@ public function page_edit() { $imagem = ""; $fs = get_file_storage(); $file = $fs->get_file(context_system::instance()->id, 'local_kopere_dashboard', - 'webpage_image', $webpages->id, '/', 'webpage_image.img'); + 'webpage_image', $webpages->id, '/', 'webpage_image.svg'); if ($file && isset($file->get_filename()[3])) { $url = moodle_url::make_pluginfile_url($file->get_contextid(), $file->get_component(), $file->get_filearea(), $file->get_itemid(), "/", $file->get_filename()); @@ -511,7 +511,7 @@ private function save_image($webpages) { 'filearea' => "webpage_image", 'filepath' => '/', 'itemid' => $webpages->id, - 'filename' => "webpage_image.img", + 'filename' => "webpage_image.svg", ]; $fs->create_file_from_pathname($filerecord, $_FILES["imagem"]["tmp_name"]); diff --git a/index.php b/index.php index 98c52ce1..0030afc0 100644 --- a/index.php +++ b/index.php @@ -190,7 +190,7 @@ } $fs = get_file_storage(); - $file = $fs->get_file($context->id, 'local_kopere_dashboard', 'webpage_image', $webpages->id, '/', 'webpage_image.img'); + $file = $fs->get_file($context->id, 'local_kopere_dashboard', 'webpage_image', $webpages->id, '/', 'webpage_image.svg'); if ($file && isset($file->get_filename()[3])) { $webpages->imagem = moodle_url::make_pluginfile_url($file->get_contextid(), $file->get_component(), $file->get_filearea(), $file->get_itemid(), "/", $file->get_filename());