-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install : initialize com_mail params if empty Uninstall : delete automsg scheduled tasks
- Loading branch information
1 parent
bfe13cf
commit d16478e
Showing
9 changed files
with
69 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,12 @@ | |
<extension version="4.0" type="plugin" group="system" method="upgrade"> | ||
<name>plgautomsginstaller</name> | ||
<author>ConseilGouz</author> | ||
<creationDate>2024-06-20</creationDate> | ||
<creationDate>2024-06-21</creationDate> | ||
<copyright>(C)2024 ConseilGouz. All rights reserved.</copyright> | ||
<license>GNU General Public License version 3 or later; see LICENSE.txt</license> | ||
<authorEmail>[email protected]</authorEmail> | ||
<authorUrl>www.conseilgouz.com</authorUrl> | ||
<version>4.2.12</version> | ||
<version>4.2.13</version> | ||
<description>AutoMsg</description> | ||
<scriptfile>script.install.php</scriptfile> | ||
<files> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,12 @@ | |
<extension type="component" method="upgrade"> | ||
<name>COM_AUTOMSG</name> | ||
<author>ConseilGouz</author> | ||
<creationDate>2024-06-20</creationDate> | ||
<creationDate>2024-06-21</creationDate> | ||
<copyright>(C)2024 ConseilGouz. All rights reserved.</copyright> | ||
<license>GNU General Public License version 3 or later; see LICENSE.txt</license> | ||
<authorEmail>[email protected]</authorEmail> | ||
<authorUrl>www.conseilgouz.com</authorUrl> | ||
<version>4.2.12</version> | ||
<version>4.2.13</version> | ||
<description>COM_AUTOMSG_XML_DESCRIPTION</description> | ||
<namespace path="src">ConseilGouz\Component\Automsg</namespace> | ||
<files folder="site"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ | |
<description>AutoMsg library</description> | ||
<libraryname>automsg</libraryname> | ||
<author>ConseilGouz</author> | ||
<version>4.2.12</version> | ||
<creationDate>2024-06-20</creationDate> | ||
<version>4.2.13</version> | ||
<creationDate>2024-06-21</creationDate> | ||
<copyright>(C)2024 ConseilGouz. All rights reserved.</copyright> | ||
<license>GNU General Public License version 3 or later; https://www.gnu.org/licenses/gpl-3.0.html GNU/GPL</license> | ||
<authorEmail>[email protected]</authorEmail> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,12 @@ | |
<extension version="4.0" type="plugin" group="content" method="upgrade"> | ||
<name>PLG_CONTENT_AUTOMSG</name> | ||
<author>conseilgouz</author> | ||
<creationDate>2024-06-20</creationDate> | ||
<creationDate>2024-06-21</creationDate> | ||
<copyright>Copyright (C) 2024 ConseilGouz. All rights reserved.</copyright> | ||
<license>GNU General Public License version 3 or later; see LICENSE.txt</license> | ||
<authorEmail>[email protected]</authorEmail> | ||
<authorUrl>www.conseilgouz.com</authorUrl> | ||
<version>4.2.12</version> | ||
<version>4.2.13</version> | ||
<description>PLG_CONTENT_AUTOMSG_XML_DESCRIPTION</description> | ||
<files> | ||
<folder plugin="automsg">services</folder> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,14 +2,15 @@ | |
<extension version="4.1" type="plugin" group="task" method="upgrade"> | ||
<name>PLG_TASK_AUTOMSG</name> | ||
<author>conseilgouz</author> | ||
<creationDate>2024-06-20</creationDate> | ||
<creationDate>2024-06-21</creationDate> | ||
<copyright>Copyright (C) 2024 ConseilGouz. All rights reserved.</copyright> | ||
<license>GNU General Public License version 3 or later; see LICENSE.txt</license> | ||
<authorEmail>[email protected]</authorEmail> | ||
<authorUrl>www.conseilgouz.com</authorUrl> | ||
<version>4.2.12</version> | ||
<version>4.2.13</version> | ||
<description>PLG_TASK_AUTOMSG_DESC</description> | ||
<namespace path="src">ConseilGouz\Plugin\Task\AutoMsg</namespace> | ||
<scriptfile>script.php</scriptfile> | ||
<files> | ||
<folder plugin="automsg">services</folder> | ||
<folder>forms</folder> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
/** | ||
* @package AutoMsg | ||
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU/GPL | ||
* @copyright (C) 2024 ConseilGouz. All Rights Reserved. | ||
* @author ConseilGouz | ||
* @license GNU/GPLv3 | ||
*/ | ||
// no direct access | ||
defined('_JEXEC') or die; | ||
|
||
use Joomla\CMS\Factory; | ||
use Joomla\Component\Scheduler\Administrator\Model\TaskModel; | ||
use Joomla\Database\DatabaseInterface; | ||
|
||
class plgtaskAutomsgInstallerScript | ||
{ | ||
public function uninstall($parent) | ||
{ | ||
$db = Factory::getContainer()->get(DatabaseInterface::class); | ||
$query = $db->getQuery(true); | ||
$query->select('id'); | ||
$query->from('#__scheduler_tasks'); | ||
$query->where('type = ' . $db->quote('automsg')); | ||
$db->setQuery($query); | ||
$found = $db->loadObjectList(); | ||
foreach ($found as $one) { // should be only one, but in case, just loop | ||
$pks['id'] = $one->id; | ||
$task = new TaskModel(array('ignore_request' => true)); | ||
$table = $task->getTable(); | ||
$table->delete($pks); | ||
} | ||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,12 @@ | |
<extension version="4.0" type="plugin" group="user" method="upgrade"> | ||
<name>PLG_USER_AUTOMSG_NAME</name> | ||
<author>ConseilGouz</author> | ||
<creationDate>2024-06-20</creationDate> | ||
<creationDate>2024-06-21</creationDate> | ||
<copyright>(C)2024 ConseilGouz. All rights reserved.</copyright> | ||
<license>GNU General Public License version 3 or later; see LICENSE.txt</license> | ||
<authorEmail>[email protected]</authorEmail> | ||
<authorUrl>www.conseilgouz.com</authorUrl> | ||
<version>4.2.12</version> | ||
<version>4.2.13</version> | ||
<description>PLG_USER_AUTOMSG_XML_DESCRIPTION</description> | ||
<files> | ||
<folder plugin="automsg">services</folder> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters