Project

General

Profile

1 1420 Luisehahne
<?php
2
/**
3
 *
4
 * @category        module
5
 * @package         droplet
6
 * @author          Ruud Eisinga (Ruud) John (PCWacht)
7
 * @author          WebsiteBaker Project
8 1916 Luisehahne
 * @copyright       2009-2013, WebsiteBaker Org. e.V.
9
 * @link            http://www.websitebaker.org/
10 1420 Luisehahne
 * @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$
14 1916 Luisehahne
 * @filesource      $HeadURL$
15 1420 Luisehahne
 * @lastmodified    $Date$
16
 *
17
 */
18 1503 Luisehahne
/* -------------------------------------------------------- */
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 1916 Luisehahne
} else {
24
	if(!function_exists('insertDropletFile')) { require('droplets.functions.php'); }
25
	$database = WbDatabase::getInstance();
26
	$sError = '';
27 1540 Luisehahne
	$msg = array();
28 1916 Luisehahne
	$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 1540 Luisehahne
	}
36 1420 Luisehahne
37 1916 Luisehahne
}