1 |
2
|
Manuela
|
<?php
|
2 |
|
|
/**
|
3 |
|
|
*
|
4 |
|
|
* @category module
|
5 |
|
|
* @package droplet
|
6 |
|
|
* @author Ruud Eisinga (Ruud) John (PCWacht)
|
7 |
|
|
* @author WebsiteBaker Project
|
8 |
|
|
* @copyright Ryan Djurovich
|
9 |
|
|
* @copyright WebsiteBaker Org. e.V.
|
10 |
|
|
* @link http://www.websitebaker.org/
|
11 |
|
|
* @license http://www.gnu.org/licenses/gpl.html
|
12 |
|
|
* @platform WebsiteBaker 2.8.3
|
13 |
|
|
* @requirements PHP 5.3.6 and higher
|
14 |
|
|
* @version $Id$
|
15 |
|
|
* @filesource $HeadURL$
|
16 |
|
|
* @lastmodified $Date$
|
17 |
|
|
*
|
18 |
|
|
*/
|
19 |
|
|
|
20 |
|
|
if(defined('WB_PATH'))
|
21 |
|
|
{
|
22 |
|
|
if (is_writable(WB_PATH.'/temp/cache')) {
|
23 |
|
|
Translate::getInstance()->clearCache();
|
24 |
|
|
}
|
25 |
|
|
// create tables from sql dump file
|
26 |
|
|
if (is_readable(__DIR__.'/install-struct.sql')) {
|
27 |
|
|
$database->SqlImport(__DIR__.'/install-struct.sql', TABLE_PREFIX, __FILE__ );
|
28 |
|
|
}
|
29 |
|
|
if (!function_exists('insertDropletFile')) { require('droplets.functions.php'); }
|
30 |
|
|
$msg = array();
|
31 |
|
|
$sBaseDir = rtrim(str_replace('\\', '/',realpath(dirname(__FILE__).'/example/')), '/').'/';
|
32 |
|
|
$aDropletFiles = getDropletFromFiles($sBaseDir);
|
33 |
|
|
$bOverwriteDroplets = false;
|
34 |
|
|
insertDropletFile($aDropletFiles, $database, $admin,$msg,$bOverwriteDroplets);
|
35 |
|
|
}
|