Skip to content

Commit

Permalink
Merge pull request #223 from techjoomla/release-1.1.7
Browse files Browse the repository at this point in the history
Merge `release-1.1.7` into `master`
  • Loading branch information
manojLondhe authored Aug 17, 2021
2 parents ff61edd + 955e593 commit 5dfb56a
Show file tree
Hide file tree
Showing 12 changed files with 60 additions and 14 deletions.
4 changes: 2 additions & 2 deletions tjreports/administrator/views/tjreport/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ protected function addDocumentHeaderData()

$document = Factory::getDocument();

HTMLHelper::_('script', 'components/com_tjreports/assets/js/tjrContentService.min.js');
HTMLHelper::_('script', 'components/com_tjreports/assets/js/tjrContentUI.min.js');
HTMLHelper::_('script', 'com_tjreports/tjrContentService.min.js', array("relative" => true));
HTMLHelper::_('script', 'com_tjreports/tjrContentUI.min.js', array("relative" => true));
HTMLHelper::_('stylesheet', 'components/com_tjreports/assets/css/tjreports.min.css');

$document->addScriptDeclaration('tjrContentUI.base_url = "' . Uri::base() . '"');
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tjreports/plugins/actionlog/tjreports/tjreports.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<extension version="3.9" type="plugin" group="actionlog" method="upgrade">
<name>plg_actionlog_tjreports</name>
<author>Techjoomla</author>
<creationDate>12th Jul 2021</creationDate>
<creationDate>17th Aug 2021</creationDate>
<copyright>Copyright (C) 2016 - 2021 Techjoomla. All rights reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>https://techjoomla.com</authorUrl>
<version>1.1.6</version>
<version>1.1.7</version>
<description>PLG_ACTIONLOG_TJREPORTS_XML_DESCRIPTION</description>
<files>
<filename plugin="tjreports">tjreports.php</filename>
Expand Down
4 changes: 2 additions & 2 deletions tjreports/plugins/content/tjreportsfields/tjreportsfields.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<author>Techjoomla</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl>https://techjoomla.com</authorUrl>
<creationDate>12th Jul 2021</creationDate>
<creationDate>17th Aug 2021</creationDate>
<copyright>Copyright (C) 2016 - 2021 Techjoomla. All rights reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<version>1.1.6</version>
<version>1.1.7</version>

<files>
<filename plugin="tjreportsfields">tjreportsfields.php</filename>
Expand Down
4 changes: 2 additions & 2 deletions tjreports/plugins/privacy/tjreports/tjreports.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<extension version="3.4" type="plugin" group="privacy" method="upgrade">
<name>plg_privacy_tjreports</name>
<version>1.1.6</version>
<creationDate>12th Jul 2021</creationDate>
<version>1.1.7</version>
<creationDate>17th Aug 2021</creationDate>
<author>Techjoomla</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl>https://techjoomla.com</authorUrl>
Expand Down
4 changes: 2 additions & 2 deletions tjreports/plugins/user/tjreportsindexer/tjreportsindexer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<author>Techjoomla</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl>https://techjoomla.com</authorUrl>
<creationDate>12th Jul 2021</creationDate>
<creationDate>17th Aug 2021</creationDate>
<copyright>Copyright (C) 2016 - 2021 Techjoomla. All rights reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<version>1.1.6</version>
<version>1.1.7</version>
<install>
<sql>
<file driver="mysql" charset="utf8">sql/tjreportsindexer.install.sql</file>
Expand Down
46 changes: 46 additions & 0 deletions tjreports/script.tjreports.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@
**/
class Com_TjreportsInstallerScript
{
private $removeFilesAndFolders = array(
'files' => array(
// Since v1.1.7
'components/com_tjreports/assets/js/tjrContentService.js',
'components/com_tjreports/assets/js/tjrContentService.min.js',
'components/com_tjreports/assets/js/tjrContentUI.js',
'components/com_tjreports/assets/js/tjrContentUI.min.js',
),
'folders' => array()
);

/** @var array The list of extra modules and plugins to install */
private $queue = array(

Expand Down Expand Up @@ -238,6 +249,9 @@ public function postflight($type, $parent)
}
}

// Remove obsolete files and folders
$this->removeObsoleteFilesAndFolders($this->removeFilesAndFolders);

$this->migrateReportsOrdering();
}

Expand Down Expand Up @@ -266,4 +280,36 @@ public function migrateReportsOrdering()
$reportTable->save($data);
}
}

/**
* Removes obsolete files and folders
*
* @param array $removeFilesAndFolders
*/
private function removeObsoleteFilesAndFolders($removeFilesAndFolders)
{
// Remove files
jimport('joomla.filesystem.file');
if(!empty($removeFilesAndFolders['files']))
{
foreach($removeFilesAndFolders['files'] as $file)
{
$f = JPATH_ROOT.'/'.$file;
if(!JFile::exists($f)) continue;
JFile::delete($f);
}
}

// Remove folders
jimport('joomla.filesystem.file');
if(!empty($removeFilesAndFolders['folders']))
{
foreach($removeFilesAndFolders['folders'] as $folder)
{
$f = JPATH_ROOT.'/'.$folder;
if(!file_exists($f)) continue;
JFolder::delete($f);
}
}
}
}
4 changes: 2 additions & 2 deletions tjreports/site/views/reports/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ protected function addDocumentHeaderData()
HTMLHelper::stylesheet(Uri::root() . '/media/techjoomla_strapper/bs3/css/bootstrap.min.css');
}

HTMLHelper::_('script', 'components/com_tjreports/assets/js/tjrContentService.min.js', array("relative" => true));
HTMLHelper::_('script', 'components/com_tjreports/assets/js/tjrContentUI.min.js', array("relative" => true));
HTMLHelper::_('script', 'com_tjreports/tjrContentService.min.js', array("relative" => true));
HTMLHelper::_('script', 'com_tjreports/tjrContentUI.min.js', array("relative" => true));
HTMLHelper::_('stylesheet', 'components/com_tjreports/assets/css/tjreports.min.css');

$document->addScriptDeclaration('tjrContentUI.base_url = "' . Uri::base() . '"');
Expand Down
4 changes: 2 additions & 2 deletions tjreports/tjreports.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<authorUrl>https://techjoomla.com</authorUrl>
<copyright>Copyright (C) 2016 - 2021 Techjoomla. All rights reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<creationDate>12th Jul 2021</creationDate>
<version>1.1.6</version>
<creationDate>17th Aug 2021</creationDate>
<version>1.1.7</version>
<description>This component is used to access all the report at single place.</description>
<install>
<!-- Runs on install -->
Expand Down

0 comments on commit 5dfb56a

Please sign in to comment.