-
Notifications
You must be signed in to change notification settings - Fork 2
/
install.php
116 lines (101 loc) · 2.01 KB
/
install.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?php
/**
* @package Dummy.Installer
*
* @copyright Copyright (C) 2008 - 2015 redCOMPONENT.com. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
defined('_JEXEC') or die;
// Find redCORE installer to use it as base system
if (!class_exists('Com_RedcoreInstallerScript'))
{
$searchPaths = array(
// Install
dirname(__FILE__) . '/redCORE',
// Discover install
JPATH_ADMINISTRATOR . '/components/com_redcore'
);
if ($redcoreInstaller = JPath::find($searchPaths, 'install.php'))
{
require_once $redcoreInstaller;
}
}
// Register component prefix
JLoader::registerPrefix('Dummy', __DIR__);
// Load Dummy Library
JLoader::import('dummy.library');
/**
* Script file of Dummy component
*
* @package Dummy.Installer
*
* @since 2.0
*/
class Com_DummyInstallerScript extends Com_RedcoreInstallerScript
{
/**
* Installed Dummy version.
*
* @var string
*/
private $currentVersion = '';
/**
* Array for moving current templates from db to files.
* Used on update process to version 2.1.17.
*
* @var array
*/
private $tempTemplates = array();
/**
* Method to install the component
*
* @param object $parent Class calling this method
*
* @return boolean True on success
*/
public function installOrUpdate($parent)
{
parent::installOrUpdate($parent);
$this->com_install();
return true;
}
/**
* Main Dummy installer Events
*
* @return void
*/
private function com_install()
{
// Diplay the installation message
$this->displayInstallMsg();
}
/**
* method to uninstall the component
*
* @param object $parent class calling this method
*
* @return void
*/
public function uninstall($parent)
{
// Uninstall extensions
$this->com_uninstall();
parent::uninstall($parent);
}
/**
* Main Dummy uninstaller Events
*
* @return void
*/
private function com_uninstall()
{
}
/**
* Display install message
*
* @return void
*/
public function displayInstallMsg()
{
}
}