-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.php
More file actions
executable file
·110 lines (96 loc) · 2.31 KB
/
install.php
File metadata and controls
executable file
·110 lines (96 loc) · 2.31 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
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
<?php
/**
* @package RedPRODUCTFINDER.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'
);
$redcoreInstaller = JPath::find($searchPaths, 'install.php');
if ($redcoreInstaller)
{
require_once $redcoreInstaller;
}
}
// Register component prefix
JLoader::registerPrefix('Redproductfinder', __DIR__);
/**
* Script file of redPRODUCTFINDER component
*
* @package RedProductfinder.Installer
*
* @since 2.0
*/
class Com_RedProductfinderInstallerScript extends Com_RedcoreInstallerScript
{
/**
* Installed redPRODUCTFINDER 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 redPRODUCTFINDER 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)
{
parent::uninstall($parent);
}
/**
* Display install message
*
* @return void
*/
public function displayInstallMsg()
{
echo '<p><img src="' . JUri::root() . '/media/com_redproductfinder/images/redproductfinder_logo_400width.png" alt="redPRODUCTFINDER Logo" width="500"></p>';
echo '<br /><br /><p>Remember to check for updates at:<br />';
echo '<a href="http://www.redcomponent.com/" target="_new">';
echo '<img src="' . JUri::root() . '/media/com_redproductfinder/images/redcomponent_logo.jpg" alt="">';
echo '</a></p>';
}
}
?>