-
Notifications
You must be signed in to change notification settings - Fork 0
/
t4.scripts.php
55 lines (48 loc) · 1.08 KB
/
t4.scripts.php
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
/**
* @version SEBLOD 2.x Core ~ $Id: pkg_script.php sebastienheraud $
* @package SEBLOD (App Builder & CCK) // SEBLOD nano (Form Builder)
* @url http://www.seblod.com
* @editor Octopoos - www.octopoos.com
* @copyright Copyright (C) 2012 SEBLOD. All Rights Reserved.
* @license GNU General Public License version 2 or later; see _LICENSE.php
**/
// No Direct Access
defined( '_JEXEC' ) or die;
// Script
class plgsystemT4InstallerScript
{
// install
function install( $parent )
{
}
// uninstall
function uninstall( $parent )
{
}
// update
function update( $parent )
{
}
// preflight
function preflight( $type, $parent )
{
}
// postflight
public function postflight($route, $adapter)
{
// Enable the helper plugin right after install it
if ( $route == 'install' )
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->update('#__extensions')
->set('enabled=1')
->where(array('element=' . $db->quote('t4'), 'type=' . $db->quote('plugin')));
$db->setQuery($query);
$db->execute();
}
return true;
}
}
?>