-
Notifications
You must be signed in to change notification settings - Fork 2
/
install.inc.php
executable file
·65 lines (52 loc) · 1.83 KB
/
install.inc.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
<?php
/**
* RexMarkitup for Redaxo
*
* @version 1.0.7
* @link http://markitup.jaysalvat.com
* @author Redaxo Addon: rexdev.de
* @package redaxo 4.4.x/4.5.x/4.6.x
*/
$myself = 'rex_markitup';
// INSTALL CONDITIONS
////////////////////////////////////////////////////////////////////////////////
$requiered_REX = '4.4.0';
$requiered_PHP = '5.3.0';
$requiered_addons = array('textile');
// CHECK REDAXO VERSION
////////////////////////////////////////////////////////////////////////////////
if(version_compare($REX['VERSION'].'.'.$REX['SUBVERSION'].'.'.$REX['MINORVERSION'], $requiered_REX, '<'))
{
$REX['ADDON']['installmsg'][$myself] = 'Dieses Addon benötigt Redaxo Version '.$requiered_REX.' oder höher.';
$REX['ADDON']['install'][$myself] = 0;
return;
}
// CHECK PHP VERSION
////////////////////////////////////////////////////////////////////////////////
if(version_compare(PHP_VERSION, $requiered_PHP, '<'))
{
$REX['ADDON']['installmsg'][$myself] = 'Dieses Addon benötigt mind. PHP '.$requiered_PHP.'!';
$REX['ADDON']['install'][$myself] = 0;
return;
}
// CHECK REQUIERED ADDONS
////////////////////////////////////////////////////////////////////////////////
foreach($requiered_addons as $a)
{
if (!OOAddon::isInstalled($a))
{
$REX['ADDON']['installmsg'][$myself] = '<br />Addon "'.$a.'" ist nicht installiert. >>> <a href="index.php?page=addon&addonname='.$a.'&install=1">jetzt installieren</a> <<<';
$REX['ADDON']['install'][$myself] = 0;
return;
}
else
{
if (!OOAddon::isAvailable($a))
{
$REX['ADDON']['installmsg'][$myself] = '<br />Addon "'.$a.'" ist nicht aktiviert. >>> <a href="index.php?page=addon&addonname='.$a.'&activate=1">jetzt aktivieren</a> <<<';
$REX['ADDON']['install'][$myself] = 0;
return;
}
}
}
$REX['ADDON']['install'][$myself] = 1;