From 170c69669acc80dafda9216ad7b4790fec2a7487 Mon Sep 17 00:00:00 2001 From: aB0t Date: Thu, 19 Sep 2024 05:04:54 +0200 Subject: [PATCH] Update 2024-09-19 05:04:10 --- .../code.php | 2 +- .../settings.json | 2 +- .../code.php | 2 +- .../settings.json | 2 +- .../code.php | 2 +- .../settings.json | 2 +- .../code.php | 2 +- .../settings.json | 2 +- .../code.php | 2 +- .../settings.json | 2 +- .../code.php | 2 +- .../settings.json | 2 +- .../code.php | 2 +- .../settings.json | 2 +- .../code.php | 2 +- .../settings.json | 2 +- .../code.php | 2 +- .../settings.json | 2 +- .../code.php | 6 ++++++ .../code.power | 6 ++++++ .../code.php | 2 +- .../settings.json | 2 +- .../README.md | 1 + .../code.php | 16 ++++++++++++++-- .../code.power | 14 +++++++++++++- .../settings.json | 2 +- .../code.php | 4 ++-- .../code.power | 4 ++-- 28 files changed, 65 insertions(+), 28 deletions(-) diff --git a/src/12a2a8de-a893-4dbb-a53d-b52de4f6cb0e/code.php b/src/12a2a8de-a893-4dbb-a53d-b52de4f6cb0e/code.php index f971fe3..668c3bd 100644 --- a/src/12a2a8de-a893-4dbb-a53d-b52de4f6cb0e/code.php +++ b/src/12a2a8de-a893-4dbb-a53d-b52de4f6cb0e/code.php @@ -2,7 +2,7 @@ /** * @package Joomla.Component.Builder * - * @created 3rd September, 2020 + * @created 4th September, 2020 * @author Llewellyn van der Merwe * @git Joomla Component Builder * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. diff --git a/src/12a2a8de-a893-4dbb-a53d-b52de4f6cb0e/settings.json b/src/12a2a8de-a893-4dbb-a53d-b52de4f6cb0e/settings.json index 21a95e9..9544b7a 100644 --- a/src/12a2a8de-a893-4dbb-a53d-b52de4f6cb0e/settings.json +++ b/src/12a2a8de-a893-4dbb-a53d-b52de4f6cb0e/settings.json @@ -18,7 +18,7 @@ "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\[[[ComponentNamespace]]].File.Type", "description": "File Type Class\r\n\r\n@since 5.0.2", - "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 3rd September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", "head": "use Joomla\\Filesystem\\Path;", "composer": "" } \ No newline at end of file diff --git a/src/13c2cac1-a70d-42d7-99fc-eb7ac3443069/code.php b/src/13c2cac1-a70d-42d7-99fc-eb7ac3443069/code.php index 5d6af9c..a6f4396 100644 --- a/src/13c2cac1-a70d-42d7-99fc-eb7ac3443069/code.php +++ b/src/13c2cac1-a70d-42d7-99fc-eb7ac3443069/code.php @@ -2,7 +2,7 @@ /** * @package Joomla.Component.Builder * - * @created 3rd September, 2020 + * @created 4th September, 2020 * @author Llewellyn van der Merwe * @git Joomla Component Builder * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. diff --git a/src/13c2cac1-a70d-42d7-99fc-eb7ac3443069/settings.json b/src/13c2cac1-a70d-42d7-99fc-eb7ac3443069/settings.json index 5a5b1ba..872a672 100644 --- a/src/13c2cac1-a70d-42d7-99fc-eb7ac3443069/settings.json +++ b/src/13c2cac1-a70d-42d7-99fc-eb7ac3443069/settings.json @@ -13,7 +13,7 @@ "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.ClassHelper", "description": "Class Helper for JCB Powers\r\n\r\n@since 3.2.2", - "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 3rd September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", "head": "", "composer": "" } \ No newline at end of file diff --git a/src/1c10a5f1-204d-4f17-ad9f-0e0684f2030d/code.php b/src/1c10a5f1-204d-4f17-ad9f-0e0684f2030d/code.php index 773c39a..234b244 100644 --- a/src/1c10a5f1-204d-4f17-ad9f-0e0684f2030d/code.php +++ b/src/1c10a5f1-204d-4f17-ad9f-0e0684f2030d/code.php @@ -2,7 +2,7 @@ /** * @package Joomla.Component.Builder * - * @created 3rd September, 2020 + * @created 4th September, 2020 * @author Llewellyn van der Merwe * @git Joomla Component Builder * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. diff --git a/src/1c10a5f1-204d-4f17-ad9f-0e0684f2030d/settings.json b/src/1c10a5f1-204d-4f17-ad9f-0e0684f2030d/settings.json index f27edbb..a63c1fb 100644 --- a/src/1c10a5f1-204d-4f17-ad9f-0e0684f2030d/settings.json +++ b/src/1c10a5f1-204d-4f17-ad9f-0e0684f2030d/settings.json @@ -14,7 +14,7 @@ "namespace": "[[[NamespacePrefix]]]\\Joomla\\[[[ComponentNamespace]]].Utilities.Exception.NoUserIdFoundException", "description": "No User Id Found Exception\r\n\r\n@since 5.0.2", "extends_custom": "\\InvalidArgumentException", - "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 3rd September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", "head": "", "composer": "" } \ No newline at end of file diff --git a/src/4144ad3b-2ad5-401f-af0c-a3d856c1e688/code.php b/src/4144ad3b-2ad5-401f-af0c-a3d856c1e688/code.php index c319fff..4e7001c 100644 --- a/src/4144ad3b-2ad5-401f-af0c-a3d856c1e688/code.php +++ b/src/4144ad3b-2ad5-401f-af0c-a3d856c1e688/code.php @@ -2,7 +2,7 @@ /** * @package Joomla.Component.Builder * - * @created 3rd September, 2020 + * @created 4th September, 2020 * @author Llewellyn van der Merwe * @git Joomla Component Builder * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. diff --git a/src/4144ad3b-2ad5-401f-af0c-a3d856c1e688/settings.json b/src/4144ad3b-2ad5-401f-af0c-a3d856c1e688/settings.json index be35d7f..5039204 100644 --- a/src/4144ad3b-2ad5-401f-af0c-a3d856c1e688/settings.json +++ b/src/4144ad3b-2ad5-401f-af0c-a3d856c1e688/settings.json @@ -13,7 +13,7 @@ "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\[[[ComponentNamespace]]].File.Handler", "description": "File Handler Class\r\n\r\n@since 5.0.2", - "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 3rd September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", "head": "", "composer": "" } \ No newline at end of file diff --git a/src/46b98346-ec98-42b3-a393-96c7d1282b1c/code.php b/src/46b98346-ec98-42b3-a393-96c7d1282b1c/code.php index 93cdd90..1fd7bf9 100644 --- a/src/46b98346-ec98-42b3-a393-96c7d1282b1c/code.php +++ b/src/46b98346-ec98-42b3-a393-96c7d1282b1c/code.php @@ -2,7 +2,7 @@ /** * @package Joomla.Component.Builder * - * @created 3rd September, 2020 + * @created 4th September, 2020 * @author Llewellyn van der Merwe * @git Joomla Component Builder * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. diff --git a/src/46b98346-ec98-42b3-a393-96c7d1282b1c/settings.json b/src/46b98346-ec98-42b3-a393-96c7d1282b1c/settings.json index f17c492..2c5b0f2 100644 --- a/src/46b98346-ec98-42b3-a393-96c7d1282b1c/settings.json +++ b/src/46b98346-ec98-42b3-a393-96c7d1282b1c/settings.json @@ -37,7 +37,7 @@ "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Data.UsersSubform", "description": "CRUD the user data of any sub-form to another view (table)\r\n\r\n@since 5.0.2", - "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 3rd September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", "head": "use Joomla\\CMS\\Factory;\r\nuse Joomla\\CMS\\User\\User;", "composer": "" } \ No newline at end of file diff --git a/src/491dbe41-f26c-4de9-8a95-fcf87b35b56f/code.php b/src/491dbe41-f26c-4de9-8a95-fcf87b35b56f/code.php index 538496e..e0b87ac 100644 --- a/src/491dbe41-f26c-4de9-8a95-fcf87b35b56f/code.php +++ b/src/491dbe41-f26c-4de9-8a95-fcf87b35b56f/code.php @@ -2,7 +2,7 @@ /** * @package Joomla.Component.Builder * - * @created 3rd September, 2020 + * @created 4th September, 2020 * @author Llewellyn van der Merwe * @git Joomla Component Builder * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. diff --git a/src/491dbe41-f26c-4de9-8a95-fcf87b35b56f/settings.json b/src/491dbe41-f26c-4de9-8a95-fcf87b35b56f/settings.json index 87b2d79..b2f62b3 100644 --- a/src/491dbe41-f26c-4de9-8a95-fcf87b35b56f/settings.json +++ b/src/491dbe41-f26c-4de9-8a95-fcf87b35b56f/settings.json @@ -13,7 +13,7 @@ "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.String.ComponentCodeNameHelper", "description": "Control the naming of a component code name\r\n\r\n@since 3.2.1", - "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 3rd September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", "head": "", "composer": "" } \ No newline at end of file diff --git a/src/5acded67-0e3d-4c6b-a6ea-b533b076de0c/code.php b/src/5acded67-0e3d-4c6b-a6ea-b533b076de0c/code.php index 454fa4d..3fe2b3a 100644 --- a/src/5acded67-0e3d-4c6b-a6ea-b533b076de0c/code.php +++ b/src/5acded67-0e3d-4c6b-a6ea-b533b076de0c/code.php @@ -2,7 +2,7 @@ /** * @package Joomla.Component.Builder * - * @created 3rd September, 2020 + * @created 4th September, 2020 * @author Llewellyn van der Merwe * @git Joomla Component Builder * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. diff --git a/src/5acded67-0e3d-4c6b-a6ea-b533b076de0c/settings.json b/src/5acded67-0e3d-4c6b-a6ea-b533b076de0c/settings.json index 74c9b5f..861753a 100644 --- a/src/5acded67-0e3d-4c6b-a6ea-b533b076de0c/settings.json +++ b/src/5acded67-0e3d-4c6b-a6ea-b533b076de0c/settings.json @@ -13,7 +13,7 @@ "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Data.Guid", "description": "Globally Unique Identifier\r\n\r\n@since 5.0.2", - "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 3rd September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", "head": "", "composer": "" } \ No newline at end of file diff --git a/src/67a5e0ca-0ff0-4979-9b41-da0b09988016/code.php b/src/67a5e0ca-0ff0-4979-9b41-da0b09988016/code.php index b2db788..0ba1204 100644 --- a/src/67a5e0ca-0ff0-4979-9b41-da0b09988016/code.php +++ b/src/67a5e0ca-0ff0-4979-9b41-da0b09988016/code.php @@ -2,7 +2,7 @@ /** * @package Joomla.Component.Builder * - * @created 3rd September, 2020 + * @created 4th September, 2020 * @author Llewellyn van der Merwe * @git Joomla Component Builder * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. diff --git a/src/67a5e0ca-0ff0-4979-9b41-da0b09988016/settings.json b/src/67a5e0ca-0ff0-4979-9b41-da0b09988016/settings.json index bddf268..8e4778c 100644 --- a/src/67a5e0ca-0ff0-4979-9b41-da0b09988016/settings.json +++ b/src/67a5e0ca-0ff0-4979-9b41-da0b09988016/settings.json @@ -38,7 +38,7 @@ "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\[[[ComponentNamespace]]].File.Manager", "description": "File Manager Class\r\n\r\n@since 5.0.2", - "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 3rd September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", "head": "use Joomla\\CMS\\Factory;\r\nuse Joomla\\CMS\\User\\User;\r\nuse Joomla\\CMS\\Language\\Text;\r\nuse Joomla\\Filesystem\\File;", "composer": "" } \ No newline at end of file diff --git a/src/7832a726-87b6-4e95-887e-7b725d3fab8f/code.php b/src/7832a726-87b6-4e95-887e-7b725d3fab8f/code.php index e57858f..c378247 100644 --- a/src/7832a726-87b6-4e95-887e-7b725d3fab8f/code.php +++ b/src/7832a726-87b6-4e95-887e-7b725d3fab8f/code.php @@ -2,7 +2,7 @@ /** * @package Joomla.Component.Builder * - * @created 3rd September, 2020 + * @created 4th September, 2020 * @author Llewellyn van der Merwe * @git Joomla Component Builder * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. diff --git a/src/7832a726-87b6-4e95-887e-7b725d3fab8f/settings.json b/src/7832a726-87b6-4e95-887e-7b725d3fab8f/settings.json index 64bb26b..1e15589 100644 --- a/src/7832a726-87b6-4e95-887e-7b725d3fab8f/settings.json +++ b/src/7832a726-87b6-4e95-887e-7b725d3fab8f/settings.json @@ -30,7 +30,7 @@ "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\[[[ComponentNamespace]]].Utilities.UserHelper", "description": "Create & Update User [Save]\r\n\r\n@since 5.0.2", - "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 3rd September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", "head": "use Joomla\\CMS\\Factory;\r\nuse Joomla\\CMS\\Form\\Form;\r\nuse Joomla\\CMS\\Language\\Text;\r\nuse Joomla\\CMS\\User\\User;\r\nuse Joomla\\CMS\\User\\UserHelper as JoomlaUserHelper;\r\nuse Joomla\\CMS\\MVC\\Model\\BaseDatabaseModel;", "composer": "" } \ No newline at end of file diff --git a/src/a223b31e-ea1d-4cdf-92ae-5f9becffaff0/code.php b/src/a223b31e-ea1d-4cdf-92ae-5f9becffaff0/code.php index 7d1dd0a..0dc05d6 100644 --- a/src/a223b31e-ea1d-4cdf-92ae-5f9becffaff0/code.php +++ b/src/a223b31e-ea1d-4cdf-92ae-5f9becffaff0/code.php @@ -50,6 +50,12 @@ abstract class FileHelper */ public static function zip($workingDirectory, &$filepath): bool { + // check the work directory is set + if (!is_dir($workingDirectory)) + { + return false; + } + // store the current joomla working directory $joomla = getcwd(); diff --git a/src/a223b31e-ea1d-4cdf-92ae-5f9becffaff0/code.power b/src/a223b31e-ea1d-4cdf-92ae-5f9becffaff0/code.power index b5d6bc7..292196e 100644 --- a/src/a223b31e-ea1d-4cdf-92ae-5f9becffaff0/code.power +++ b/src/a223b31e-ea1d-4cdf-92ae-5f9becffaff0/code.power @@ -19,6 +19,12 @@ */ public static function zip($workingDirectory, &$filepath): bool { + // check the work directory is set + if (!is_dir($workingDirectory)) + { + return false; + } + // store the current joomla working directory $joomla = getcwd(); diff --git a/src/cefe4092-a4c2-41a6-a683-bd3ab5419cc6/code.php b/src/cefe4092-a4c2-41a6-a683-bd3ab5419cc6/code.php index e607e39..e04fb8d 100644 --- a/src/cefe4092-a4c2-41a6-a683-bd3ab5419cc6/code.php +++ b/src/cefe4092-a4c2-41a6-a683-bd3ab5419cc6/code.php @@ -2,7 +2,7 @@ /** * @package Joomla.Component.Builder * - * @created 3rd September, 2020 + * @created 4th September, 2020 * @author Llewellyn van der Merwe * @git Joomla Component Builder * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. diff --git a/src/cefe4092-a4c2-41a6-a683-bd3ab5419cc6/settings.json b/src/cefe4092-a4c2-41a6-a683-bd3ab5419cc6/settings.json index 9b8b69b..ea86265 100644 --- a/src/cefe4092-a4c2-41a6-a683-bd3ab5419cc6/settings.json +++ b/src/cefe4092-a4c2-41a6-a683-bd3ab5419cc6/settings.json @@ -20,7 +20,7 @@ "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\Utilities.GetHelperExtrusion", "description": "Some easy get...\r\n\r\n@since 3.2.0", - "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 3rd September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", "head": "", "composer": "" } \ No newline at end of file diff --git a/src/d46c4667-378b-49e8-9782-ffb28d92415a/README.md b/src/d46c4667-378b-49e8-9782-ffb28d92415a/README.md index 43e8e4d..32a3cf2 100644 --- a/src/d46c4667-378b-49e8-9782-ffb28d92415a/README.md +++ b/src/d46c4667-378b-49e8-9782-ffb28d92415a/README.md @@ -16,6 +16,7 @@ class Display << (F,LightGreen) >> #RoyalBlue { # Items $items # string $url # array $fileTypes + # array $access # array $fileTypeTasks + __construct(Item $item, Items $items) + get(string $entity, string $target) : ?array diff --git a/src/d46c4667-378b-49e8-9782-ffb28d92415a/code.php b/src/d46c4667-378b-49e8-9782-ffb28d92415a/code.php index 287e5a8..b843cfa 100644 --- a/src/d46c4667-378b-49e8-9782-ffb28d92415a/code.php +++ b/src/d46c4667-378b-49e8-9782-ffb28d92415a/code.php @@ -2,7 +2,7 @@ /** * @package Joomla.Component.Builder * - * @created 3rd September, 2020 + * @created 4th September, 2020 * @author Llewellyn van der Merwe * @git Joomla Component Builder * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. @@ -57,6 +57,14 @@ final class Display */ protected array $fileTypes; + /** + * The active user access + * + * @var array + * @since 5.0.2 + */ + protected array $access; + /** * The File Type Task * @@ -78,6 +86,9 @@ final class Display $this->item = $item; $this->items = $items; $this->url = rtrim(Uri::root(), '/'); + + $user = Factory::getApplication()->getIdentity(); + $this->access = $user->getAuthorisedViewLevels(); } /** @@ -95,7 +106,8 @@ final class Display { foreach ($files as $n => $file) { - if ($file->entity_type !== $target) + if ($file->entity_type !== $target || + !in_array($file->access, $this->access)) { unset($files[$n]); continue; diff --git a/src/d46c4667-378b-49e8-9782-ffb28d92415a/code.power b/src/d46c4667-378b-49e8-9782-ffb28d92415a/code.power index 327bfaf..b52aca4 100644 --- a/src/d46c4667-378b-49e8-9782-ffb28d92415a/code.power +++ b/src/d46c4667-378b-49e8-9782-ffb28d92415a/code.power @@ -30,6 +30,14 @@ */ protected array $fileTypes; + /** + * The active user access + * + * @var array + * @since 5.0.2 + */ + protected array $access; + /** * The File Type Task * @@ -51,6 +59,9 @@ $this->item = $item; $this->items = $items; $this->url = rtrim(Uri::root(), '/'); + + $user = Factory::getApplication()->getIdentity(); + $this->access = $user->getAuthorisedViewLevels(); } /** @@ -68,7 +79,8 @@ { foreach ($files as $n => $file) { - if ($file->entity_type !== $target) + if ($file->entity_type !== $target || + !in_array($file->access, $this->access)) { unset($files[$n]); continue; diff --git a/src/d46c4667-378b-49e8-9782-ffb28d92415a/settings.json b/src/d46c4667-378b-49e8-9782-ffb28d92415a/settings.json index cfa1b3b..91976a5 100644 --- a/src/d46c4667-378b-49e8-9782-ffb28d92415a/settings.json +++ b/src/d46c4667-378b-49e8-9782-ffb28d92415a/settings.json @@ -22,7 +22,7 @@ "extendsinterfaces": null, "namespace": "[[[NamespacePrefix]]]\\Joomla\\[[[ComponentNamespace]]].File.Display", "description": "File Display Class\r\n\r\n@since 5.0.2", - "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 3rd September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", + "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2020\r\n * @author Llewellyn van der Merwe \r\n * @git Joomla Component Builder \r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", "head": "use Joomla\\CMS\\Uri\\Uri;\r\nuse Joomla\\CMS\\Router\\Route;", "composer": "" } \ No newline at end of file diff --git a/src/f3c04c28-bce4-422e-be93-7d163e4e342b/code.php b/src/f3c04c28-bce4-422e-be93-7d163e4e342b/code.php index 46664c6..0ad261c 100644 --- a/src/f3c04c28-bce4-422e-be93-7d163e4e342b/code.php +++ b/src/f3c04c28-bce4-422e-be93-7d163e4e342b/code.php @@ -344,7 +344,7 @@ abstract class Schema implements SchemaInterface ]; } // check if update of default values is needed - elseif ($this->checkDefault($table, $column)) + if ($this->checkDefault($table, $column)) { $requireUpdate[$column] = [ 'column' => $column, @@ -353,7 +353,7 @@ abstract class Schema implements SchemaInterface ]; } // check if update of null is needed - elseif ($this->checkNull($table, $column)) + if ($this->checkNull($table, $column)) { $requireUpdate[$column] = [ 'column' => $column, diff --git a/src/f3c04c28-bce4-422e-be93-7d163e4e342b/code.power b/src/f3c04c28-bce4-422e-be93-7d163e4e342b/code.power index ce26d2c..255917a 100644 --- a/src/f3c04c28-bce4-422e-be93-7d163e4e342b/code.power +++ b/src/f3c04c28-bce4-422e-be93-7d163e4e342b/code.power @@ -317,7 +317,7 @@ ]; } // check if update of default values is needed - elseif ($this->checkDefault($table, $column)) + if ($this->checkDefault($table, $column)) { $requireUpdate[$column] = [ 'column' => $column, @@ -326,7 +326,7 @@ ]; } // check if update of null is needed - elseif ($this->checkNull($table, $column)) + if ($this->checkNull($table, $column)) { $requireUpdate[$column] = [ 'column' => $column,