1
|
<?php
|
2
|
/**
|
3
|
*
|
4
|
* @category module
|
5
|
* @package droplet
|
6
|
* @author Ruud Eisinga (Ruud) John (PCWacht)
|
7
|
* @author WebsiteBaker Project
|
8
|
* @copyright 2009-2013, WebsiteBaker Org. e.V.
|
9
|
* @link http://www.websitebaker.org/
|
10
|
* @license http://www.gnu.org/licenses/gpl.html
|
11
|
* @platform WebsiteBaker 2.8.x
|
12
|
* @requirements PHP 5.2.2 and higher
|
13
|
* @version $Id: install.php 1916 2013-06-07 04:06:48Z Luisehahne $
|
14
|
* @filesource $HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/modules/droplets/install.php $
|
15
|
* @lastmodified $Date: 2013-06-07 06:06:48 +0200 (Fri, 07 Jun 2013) $
|
16
|
*
|
17
|
*/
|
18
|
/* -------------------------------------------------------- */
|
19
|
// Must include code to stop this file being accessed directly
|
20
|
if(!defined('WB_PATH')) {
|
21
|
require_once(dirname(dirname(dirname(__FILE__))).'/framework/globalExceptionHandler.php');
|
22
|
throw new IllegalFileException();
|
23
|
} else {
|
24
|
if(!function_exists('insertDropletFile')) { require('droplets.functions.php'); }
|
25
|
$database = WbDatabase::getInstance();
|
26
|
$sError = '';
|
27
|
$msg = array();
|
28
|
$sBaseDir = realpath(dirname(__FILE__).'/example/');
|
29
|
$sBaseDir = rtrim(str_replace('\\', '/', $sBaseDir), '/').'/';
|
30
|
// Create table
|
31
|
if($database->SqlImport(dirname(__FILE__).'/sql/mod_droplet.sql','',false)){
|
32
|
$aDropletFiles = getDropletFromFiles($sBaseDir);
|
33
|
$bOverwriteDroplets = true;
|
34
|
insertDropletFile($aDropletFiles,$msg,$bOverwriteDroplets,$admin);
|
35
|
}
|
36
|
|
37
|
}
|