diff --git a/attachments_component/admin/src/Controller/AttachmentsController.php b/attachments_component/admin/src/Controller/AttachmentsController.php index 10ade93c..9ed281d0 100644 --- a/attachments_component/admin/src/Controller/AttachmentsController.php +++ b/attachments_component/admin/src/Controller/AttachmentsController.php @@ -156,13 +156,12 @@ public function delete() $cid = $input->get('cid', array(), 'array'); $deleted_ids = Array(); + /** @var \JMCameron\Component\Attachments\Administrator\Model\AttachmentModel $model */ + $model = $this->getModel('Attachment'); + $attachment = $model->getTable(); + if (count($cid)) { - /** @var \JMCameron\Component\Attachments\Administrator\Model\AttachmentModel $model */ - $model = $this->getModel('Attachment'); - $attachment = $model->getTable(); - - // Loop through the attachments and delete them one-by-one foreach ($cid as $attachment_id) { diff --git a/attachments_component/admin/tmpl/help/default.php b/attachments_component/admin/tmpl/help/default.php index 54f597d1..785021f0 100644 --- a/attachments_component/admin/tmpl/help/default.php +++ b/attachments_component/admin/tmpl/help/default.php @@ -91,7 +91,7 @@ ?>
- +

>logo_img ?>


diff --git a/attachments_component/site/tmpl/attachments/default.php b/attachments_component/site/tmpl/attachments/default.php index e07d1b2c..5a5b0a3c 100644 --- a/attachments_component/site/tmpl/attachments/default.php +++ b/attachments_component/site/tmpl/attachments/default.php @@ -174,7 +174,8 @@ else { $url = $base_url . $attachment->url; if (strtoupper(substr(PHP_OS,0,3) == 'WIN')) { - $url = utf8_encode($url); + // $url = utf8_encode($url); Deprecated from php 8.2 + $url = iconv('ISO-8859-1', 'UTF-8', $url); } } $tooltip = Text::sprintf('ATTACH_DOWNLOAD_THIS_FILE_S', $actual_filename); diff --git a/attachments_component/site/tmpl/update/default.php b/attachments_component/site/tmpl/update/default.php index 9f426aa8..c7f72055 100644 --- a/attachments_component/site/tmpl/update/default.php +++ b/attachments_component/site/tmpl/update/default.php @@ -204,7 +204,7 @@ get('allow_frontend_access_editing', false) ): ?>      -
access_level; ?>
+
access_level; ?>
get('user_field_1_name') ): ?>

diff --git a/attachments_component/site/tmpl/upload/default.php b/attachments_component/site/tmpl/upload/default.php index b5ed07c6..7c86ed99 100644 --- a/attachments_component/site/tmpl/upload/default.php +++ b/attachments_component/site/tmpl/upload/default.php @@ -147,7 +147,7 @@ get('allow_frontend_access_editing', false) ): ?>      -

access_level; ?>
+
access_level; ?>
get('user_field_1_name', false) ): ?>

diff --git a/attachments_for_content/attachments_for_content.php b/attachments_for_content/attachments_for_content.php index f18ed7c3..c6ba99dc 100644 --- a/attachments_for_content/attachments_for_content.php +++ b/attachments_for_content/attachments_for_content.php @@ -496,14 +496,13 @@ public function isParentPublished($parent_id, $parent_entity = 'default') } $now = Factory::getDate()->toUnix(); - $nullDate = Factory::getDate($db->getNullDate())->toUnix(); if ($article) { - $publish_up = Factory::getDate($article->publish_up)->toUnix(); - $publish_down = Factory::getDate($article->publish_down)->toUnix(); + $publish_up = $article->publish_up? Factory::getDate($article->publish_up)->toUnix() : null; + $publish_down = $article->publish_down? Factory::getDate($article->publish_down)->toUnix() : null; - $published = (($article->state == 1) && ($now >= $publish_up) && (($publish_down == $nullDate) || ($now <= $publish_down))); + $published = (($article->state == 1) && ($now >= $publish_up) && (($publish_down === null) || ($now <= $publish_down))); } else { @@ -593,11 +592,10 @@ public function getParentPublishedFilter($parent_state, $filter_entity) if (($filter_entity == 'ALL') || ($filter_entity == 'ARTICLE')) { $now = Factory::getDate()->toSql(); - $nullDate = $db->getNullDate(); $where[] = "EXISTS (SELECT * FROM #__content AS c1 " . "WHERE (a.parent_entity = 'article' AND c1.id = a.parent_id AND c1.state=1 AND " . - '(c1.publish_up = ' . $db->quote($nullDate) . ' OR c1.publish_up <= ' . $db->quote($now) . ') AND ' . - '(c1.publish_down = ' . $db->quote($nullDate) . ' OR c1.publish_down >= ' . $db->quote($now) . ')))'; + '(c1.publish_up IS null OR c1.publish_up <= ' . $db->quote($now) . ') AND ' . + '(c1.publish_down IS null OR c1.publish_down >= ' . $db->quote($now) . ')))'; } if (($filter_entity == 'ALL') || ($filter_entity == 'CATEGORY')) diff --git a/pkg_attachments/language/en-GB/en-GB.pkg_attachments.sys.ini b/pkg_attachments/language/en-GB/en-GB.pkg_attachments.sys.ini index 1a24ad6f..baa10aed 100644 --- a/pkg_attachments/language/en-GB/en-GB.pkg_attachments.sys.ini +++ b/pkg_attachments/language/en-GB/en-GB.pkg_attachments.sys.ini @@ -6,6 +6,6 @@ ; English translation -ATTACH_PACKAGE_ATTACHMENTS_FOR_JOOMLA_16PLUS="Attachments for Joomla 2.5+ or 3.x" +ATTACH_PACKAGE_ATTACHMENTS_FOR_JOOMLA_40PLUS="Attachments for Joomla 4.0+" ATTACH_PACKAGE_NOTICE_UNINSTALL_PACKAGE_S="To uninstall the Attachments extension, uninstall the Package '%s'!" -PKG_ATTACHMENTS="Package: Attachments for Joomla 2.5+ or 3.x" +PKG_ATTACHMENTS="Package: Attachments for Joomla 4.0+" diff --git a/pkg_attachments/pkg_attachments.xml b/pkg_attachments/pkg_attachments.xml index 40bfc833..549d44eb 100644 --- a/pkg_attachments/pkg_attachments.xml +++ b/pkg_attachments/pkg_attachments.xml @@ -14,16 +14,15 @@ ATTACH_PACKAGE_ATTACHMENTS_FOR_JOOMLA_40PLUS - attachments_plugin.zip - attachments_search.zip - attachments_plugin_framework.zip - attachments_for_content.zip - show_attachments_in_editor_plugin.zip - add_attachment_btn_plugin.zip - insert_attachments_token_btn_plugin.zip - attachments_quickicon_plugin.zip - - attachments_component.zip + attachments_component.zip + attachments_plugin.zip + attachments_search.zip + attachments_plugin_framework.zip + attachments_for_content.zip + show_attachments_in_editor_plugin.zip + add_attachment_btn_plugin.zip + insert_attachments_token_btn_plugin.zip + attachments_quickicon_plugin.zip