forked from aeberhard/tinymce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.inc.php
46 lines (40 loc) · 1.06 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
<?php
/**
* TinyMCE Addon
*
* @author andreaseberhard[at]gmail[dot]com Andreas Eberhard
* @author <a href="http://www.redaxo.de">www.redaxo.de</a>
*
* @package redaxo4
* @version svn:$Id$
*/
$addonname = 'tinymce';
$error = '';
// REDAXO 3.2.3, 4.0.x, 4.1.x - Dateien in Ordner files/addons/ kopieren
if ($REX['VERSION'] . $REX['SUBVERSION'] < '42')
{
include($REX['INCLUDE_PATH'] . '/addons/' . $addonname . '/functions/functions.inc.php');
$source_dir = $REX['INCLUDE_PATH'] . '/addons/' . $addonname . '/files';
$dest_dir = $REX['MEDIAFOLDER'] . '/addons/' . $addonname;
$start_dir = $REX['MEDIAFOLDER'] . '/addons';
if (is_dir($source_dir))
{
if (!is_dir($start_dir))
{
mkdir($start_dir);
}
if(!rex_copyDir($source_dir, $dest_dir , $start_dir))
{
$error = 'Verzeichnis '.$source_dir.' konnte nicht nach '.$dest_dir.' kopiert werden!';
}
}
}
if ($error != '')
{
$REX['ADDON']['installmsg'][$addonname] = $error;
$REX['ADDON']['install'][$addonname] = false;
}
else
{
$REX['ADDON']['install'][$addonname] = true;
}