From 0bbedf63eb6bb66308b4ba6781813c9ebd3c3634 Mon Sep 17 00:00:00 2001 From: Denys Date: Tue, 7 Feb 2023 03:59:39 +0200 Subject: [PATCH] Update to 5.12 --- build.xml | 2 +- packages/lib_juimage/juimage.xml | 1 - packages/lib_juimage/script.php | 96 ------------------------- packages/plg_system_juimage/juimage.php | 2 +- script.php | 6 +- 5 files changed, 7 insertions(+), 100 deletions(-) delete mode 100644 packages/lib_juimage/script.php diff --git a/build.xml b/build.xml index 3b3a03a..05c3749 100644 --- a/build.xml +++ b/build.xml @@ -3,7 +3,7 @@ basedir="."> + value="5.12" /> @version@ Joomla! Ukraine https://joomla-ua.org - script.php src vendor diff --git a/packages/lib_juimage/script.php b/packages/lib_juimage/script.php deleted file mode 100644 index 8b03352..0000000 --- a/packages/lib_juimage/script.php +++ /dev/null @@ -1,96 +0,0 @@ -unlinkRecursive($folder, 1); - } - } - - return true; - } - - /** - * @param $dir - * @param $deleteRootToo - * - * @return bool - * @since 5.0 - */ - public function unlinkRecursive($dir, $deleteRootToo) - { - if(!$dh = opendir($dir)) - { - return true; - } - - while(false !== ($obj = readdir($dh))) - { - if($obj === '.' || $obj === '..') - { - continue; - } - - if(!unlink($dir . '/' . $obj)) - { - $this->unlinkRecursive($dir . '/' . $obj, true); - } - } - - closedir($dh); - - if($deleteRootToo) - { - rmdir($dir); - } - - return true; - } -} \ No newline at end of file diff --git a/packages/plg_system_juimage/juimage.php b/packages/plg_system_juimage/juimage.php index 47e8d03..b9bb5fd 100644 --- a/packages/plg_system_juimage/juimage.php +++ b/packages/plg_system_juimage/juimage.php @@ -28,6 +28,6 @@ class plgSystemJUImage extends CMSPlugin */ public function onAfterInitialise() { - require_once JPATH_LIBRARIES . '/juimage/JUImage.php'; + JLoader::registerPrefix('JUImage', JPATH_LIBRARIES . '/juimage/JUImage.php'); } } \ No newline at end of file diff --git a/script.php b/script.php index 676cd90..f54bffe 100644 --- a/script.php +++ b/script.php @@ -10,9 +10,13 @@ * @package JUImage */ +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; +use Joomla\CMS\Version; + defined('_JEXEC') or die; -class Pkg_JUImageInstallerScript +class pkg_juimageInstallerScript { /** * @return bool