Skip to content

Commit

Permalink
5.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
conseilgouz committed May 12, 2022
1 parent f8e987f commit e3073fa
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 198 deletions.
11 changes: 1 addition & 10 deletions autoreadmore.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Joomla\String\StringHelper;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\Registry\Registry;
use ConseilGouz\Plugin\Content\Autoreadmore\Helper\AutoReadMoreString;

class PlgContentAutoReadMore extends CMSPlugin
{
Expand Down Expand Up @@ -347,11 +348,6 @@ public function onContentPrepare($context, &$article, $params, $page=null)
{
// Truncate
// $text = StringHelper::substr($text, 0, $maxLimit);
if (!class_exists('AutoReadMoreString'))
{
require_once dirname(__FILE__) . '/helpers/AutoReadMoreString.php';
}

$text = AutoReadMoreString::truncate($text, $maxLimit, '…', true, $noSpaceLanguage);

if (!$noSpaceLanguage)
Expand All @@ -375,11 +371,6 @@ public function onContentPrepare($context, &$article, $params, $page=null)
// Limit by words
elseif ($limittype == 1)
{
if (!class_exists('AutoReadMoreString'))
{
require_once dirname(__FILE__) . '/helpers/AutoReadMoreString.php';
}

$original_length = StringHelper::strlen($text);
$text = AutoReadMoreString::truncateByWords($text, $maxLimit, $article->readmore);
$newLength = StringHelper::strlen($text);
Expand Down
1 change: 0 additions & 1 deletion autoreadmore.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<description>PLG_CONTENT_AUTOREADMORE_THANK_YOU_FOR_USING_AUTO_READ_MORE</description>
<namespace path="src">ConseilGouz\Plugin\Content\Autoreadmore</namespace>
<files>
<folder>helpers</folder>
<folder>src</folder>
<filename>README.md</filename>
<filename plugin="autoreadmore">autoreadmore.php</filename>
Expand Down
185 changes: 0 additions & 185 deletions helpers/string.php

This file was deleted.

1 change: 1 addition & 0 deletions plg_autoreadmore_changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
</fix>
<addition>
<item>add version display in admin</item>
<item>namespace</item>
</addition>
</changelog>
<changelog>
Expand Down
2 changes: 1 addition & 1 deletion scriptfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function postflight($type, $parent) {
}

private function postinstall_cleanup() {
$obsloteFolders = ['extensions', 'images','language'];
$obsloteFolders = ['extensions', 'images','language','helpers'];
// Remove plugins' files which load outside of the component. If any is not fully updated your site won't crash.
foreach ($obsloteFolders as $folder)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @copyright (C) 2022 www.conseilgouz.com. All Rights Reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/

namespace ConseilGouz\Plugin\Content\Autoreadmore\Helper;
// No direct access
defined('_JEXEC') or die('Restricted access');
use Joomla\String\StringHelper;
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit e3073fa

Please sign in to comment.