Skip to content

Commit

Permalink
2.2.3
Browse files Browse the repository at this point in the history
Cleanup  obsolete versions after install
  • Loading branch information
conseilgouz committed Oct 12, 2023
1 parent 0e04531 commit ceffb2c
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bday.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>GNU General Public License version 3 or later; see LICENSE.txt</license>
<authorEmail>pascal.leconte@conseilgouz.com</authorEmail>
<authorUrl>www.conseilgouz.com</authorUrl>
<version>2.2.2</version>
<version>2.2.3</version>
<description>PLG_SYSTEM_BDAY_XML_DESCRIPTION</description>
<files>
<folder plugin="bday">services</folder>
Expand Down Expand Up @@ -145,6 +145,6 @@
</fields>
</config>
<updateservers>
<server type="plugin" folder="system" priority="1" name="bday">https://www.conseilgouz.com/updates/plg_system_bday_update.xml</server>
<server type="extension" priority="1" name="bday">https://raw.githubusercontent.com/conseilgouz/updates_github/master/plg_system_bday_update.xml</server>
</updateservers>
</extension>
12 changes: 12 additions & 0 deletions plg_system_bday_changelog.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
<changelogs>
<changelog>
<element>plg_system_bday</element>
<type>plugin</type>
<group>system</group>
<version>2.2.3</version>
<note>
<item>Update : 12/10/2023</item>
</note>
<fix>
<item>Cleanup obsolete versions after install</item>
</fix>
</changelog>
<changelog>
<element>plg_system_bday</element>
<type>plugin</type>
Expand Down
28 changes: 26 additions & 2 deletions script.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* BDay Plugin - Joomla 4.x/5.x plgin
* Version : 2.2.0
* Version : 2.2.3
* Package : BirthBay Plugin
* copyright : Copyright (C) 2023 ConseilGouz. All rights reserved.
* license : https://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
Expand Down Expand Up @@ -122,7 +122,31 @@ private function postinstall_cleanup() {
catch (RuntimeException $e) {
JLog::add('unable to enable plugin bday', JLog::ERROR, 'jerror');
}

// remove obsolete update sites
$db = Factory::getDbo();
$query = $db->getQuery(true)
->delete('#__update_sites')
->where($db->quoteName('location') . ' like "%432473037d.url-de-test.ws/%"');
$db->setQuery($query);
$db->execute();
// BDay plugin is now on Github
$query = $db->getQuery(true)
->delete('#__update_sites')
->where($db->quoteName('location') . ' like "%conseilgouz.com/updates/%_system_bday%"');
$db->setQuery($query);
$db->execute();
// remove obsolete package bday
$query = $db->getQuery(true)
->delete('#__extensions')
->where($db->quoteName('type') . ' like "package" AND element like "%BDay%"');
$db->setQuery($query);
$db->execute();
$query = $db->getQuery(true)
->delete('#__extensions')
->where($db->quoteName('type') . ' like "package" AND name like "%BDay%"');
$db->setQuery($query);
$db->execute();

}

// Check if Joomla version passes minimum requirement
Expand Down

0 comments on commit ceffb2c

Please sign in to comment.