forked from mobilejoomla/mobilejoomla
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.script.php
51 lines (47 loc) · 983 Bytes
/
install.script.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
<?php
defined('_JEXEC') or die();
include_once dirname(__FILE__).'/classes/mjinstaller.php';
class Com_MobilejoomlaInstallerScript
{
/**
* @param string $type
* @param JInstallerComponent $adapter
*/
function preflight($type, $adapter)
{
$path = $adapter->getParent()->getPath('source');
$xmldest = $path.'/mobilejoomla.xml';
$xmlsrc = $path.'/mobilejoomla.j2x.xml';
if(JFile::exists($xmlsrc))
{
if(JFile::exists($xmldest))
JFile::delete($xmldest);
JFile::move($xmlsrc, $xmldest);
}
$adapter->getParent()->setPath('manifest', $xmldest);
}
/**
* @param JInstallerComponent $adapter
* @return bool
*/
function install($adapter)
{
return MjInstaller::install();
}
/**
* @param JInstallerComponent $adapter
* @return bool
*/
function update($adapter)
{
return MjInstaller::install();
}
/**
* @param JInstallerComponent $adapter
* @return bool
*/
function uninstall($adapter)
{
return MjInstaller::uninstall();
}
}