Skip to content

Commit

Permalink
2.1.1
Browse files Browse the repository at this point in the history
Remove Simple Panorama from extension
  • Loading branch information
conseilgouz committed Oct 2, 2023
1 parent f5ed97b commit 02e8e4c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mod_cg_panorama.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<author>ConseilGouz</author>
<creationDate>2023-10-02</creationDate>
<copyright>Copyright (C) 2023 ConseilGouz. All rights reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<license>https://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.conseilgouz.com</authorUrl>
<version>2.1.0</version>
<version>2.1.1</version>
<description>CGPANORAMADESC</description>
<namespace path="src">ConseilGouz\Module\Cgpanorama</namespace>
<scriptfile>script.php</scriptfile>
Expand Down
11 changes: 11 additions & 0 deletions mod_cg_panorama_changelog.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
<changelogs>
<changelog>
<element>mod_cg_panorama</element>
<type>Module</type>
<version>2.1.1</version>
<note>
<item>Update : 02/10/2023</item>
</note>
<fix>
<item>Remove Simple Panorama from extension</item>
</fix>
</changelog>
<changelog>
<element>mod_cg_panorama</element>
<type>Module</type>
Expand Down
16 changes: 15 additions & 1 deletion script.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,21 @@ private function postinstall_cleanup() {
catch (\RuntimeException $e) {
Log::add('unable to update mod_post_it to cg_panorama', Log::ERROR, 'jerror');
}

// delete mod_simple_panorama from extensions
$conditions = array(
$db->quoteName('type').'='.$db->quote('module'),
$db->quoteName('element').'='.$db->quote('mod_simple_panorama')
);
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__extensions'))->where($conditions);
$db->setQuery($query);
try {
$db->execute();
}
catch (\RuntimeException $e) {
Log::add('unable to delete mod_postit from extensions', Log::ERROR, 'jerror');
}

// remove obsolete update sites
$db = Factory::getDbo();
$query = $db->getQuery(true)
Expand Down

0 comments on commit 02e8e4c

Please sign in to comment.