Skip to content

Commit

Permalink
5.1.3
Browse files Browse the repository at this point in the history
Fix issue #7
  • Loading branch information
conseilgouz committed Nov 29, 2023
1 parent 210181a commit fae41bd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
8 changes: 4 additions & 4 deletions autoreadmore.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ public function onContentPrepare($context, &$article, &$params, $page=null)
{
return false;
}
if (is_object($params) && $params->get("autoreadmore")) {
if (is_object($params) && ($params instanceof Registry) && $params->get("autoreadmore")) {
return true;
}

$jinput = Factory::getApplication()->input;

if ($jinput->get('option', null, 'CMD') == 'com_dump')
Expand Down Expand Up @@ -179,7 +179,7 @@ public function onContentPrepare($context, &$article, &$params, $page=null)
return;
}

if (is_object($params))
if (is_object($params) && ($params instanceof Registry))
{
$this->params_content = $params;
}
Expand Down Expand Up @@ -238,7 +238,7 @@ public function onContentPrepare($context, &$article, &$params, $page=null)
// apply content plugins
if ($context == 'com_content.category') {
PluginHelper::importPlugin('content');
$myparams = $params;
$myparams = $this->params_content;
$myparams->set("autoreadmore",true);
$item_cls = new \stdClass;
$item_cls->text = $text;
Expand Down
4 changes: 2 additions & 2 deletions autoreadmore.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<extension version="3.10" type="plugin" group="content" method="upgrade">
<name>PLG_CONTENT_AUTOREADMORE_TITLE</name>
<creationDate>2023-09-12</creationDate>
<creationDate>2023-11-29</creationDate>
<copyright>Copyright (C) 2023 Conseilgouz All rights reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL</license>
<author>ConseilGouz</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl>https://www.conseilgouz.com</authorUrl>
<version>5.1.2</version>
<version>5.1.3</version>
<description>PLG_CONTENT_AUTOREADMORE_THANK_YOU_FOR_USING_AUTO_READ_MORE</description>
<namespace path="src">ConseilGouz\Plugin\Content\Autoreadmore</namespace>
<files>
Expand Down
11 changes: 11 additions & 0 deletions plg_autoreadmore_changelog.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
<changelogs>
<changelog>
<element>autoreadmore</element>
<type>plugin</type>
<version>5.1.3</version>
<note>
<item>29/11/2023</item>
</note>
<fix>
<item>fix issue #7 : related to smartslider 3</item>
</fix>
</changelog>
<changelog>
<element>autoreadmore</element>
<type>plugin</type>
Expand Down

0 comments on commit fae41bd

Please sign in to comment.