This repository was archived by the owner on Dec 15, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathscript.php
More file actions
64 lines (57 loc) · 1.28 KB
/
script.php
File metadata and controls
64 lines (57 loc) · 1.28 KB
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
56
57
58
59
60
61
62
63
64
<?php
/**
* File script.php
* Created 8/11/13 10:55 PM
* Author Matt Thomas matt@betweenbrain.com
* Copyright Copyright (C) 2013 betweenbrain llc.
*/
/**
* Installation class to perform additional changes during install/uninstall/update
*
* @package Ajax
* @since 3.0
*/
class Com_AjaxInstallerScript
{
/**
* An array of supported database types
*
* @var array
* @since 3.0
*/
protected $dbSupport = array('mysql', 'mysqli', 'postgresql', 'sqlsrv', 'sqlazure');
/**
* Function to act after the installation process runs
*
* @param string $type The action being performed
* @param JInstallerPackage $parent The class calling this method
* @param array $results The results of each installer action
*
* @return void
*
* @since 3.0
*/
public function postflight($type, $parent)
{
// Get a db connection.
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
//Build the query
$query
->delete($db->quoteName('#__menu'))
->where('title LIKE \'com_ajax\'');
$db->setQuery($query);
//execute db object
try
{
// Execute the query
$results = $db->query();
}
catch (Exception $e)
{
//print the errors
echo $e->getMessage();
}
}
}