-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpkg_script.php
More file actions
35 lines (29 loc) · 752 Bytes
/
Copy pathpkg_script.php
File metadata and controls
35 lines (29 loc) · 752 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/**
* @package Articles Good Search
*
* @copyright Copyright (C) 2017 Joomcar extensions. All rights reserved.
* @license GNU General Public License version 2 or later.
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
class pkg_articles_good_searchInstallerScript {
public function postflight($route, $_this) {
$db = JFactory::getDbo();
try
{
$q = $db->getQuery(true);
$q->update('#__extensions');
$q->set(array('enabled = 1'));
$q->where("element = 'ArticlesGoodSearch'");
$q->where("type = 'plugin'", 'AND');
$db->setQuery($q);
method_exists($db, 'execute') ? $db->execute() : $db->query();
}
catch (Exception $e)
{
throw $e;
}
}
}
?>