1 |
2
|
Manuela
|
<?php
|
2 |
|
|
/**
|
3 |
|
|
*
|
4 |
|
|
* @category modules
|
5 |
|
|
* @package jsadmin
|
6 |
|
|
* @author WebsiteBaker Project
|
7 |
|
|
* @copyright WebsiteBaker Org. e.V.
|
8 |
|
|
* @link http:/websitebaker.org/
|
9 |
|
|
* @license http://www.gnu.org/licenses/gpl.html
|
10 |
|
|
* @platform WebsiteBaker 2.8.3
|
11 |
|
|
* @requirements PHP 5.3.6 and higher
|
12 |
|
|
* @version $Id$
|
13 |
|
|
* @filesource $HeadURL$
|
14 |
|
|
* @lastmodified $Date$
|
15 |
|
|
*
|
16 |
|
|
*/
|
17 |
|
|
|
18 |
|
|
/* -------------------------------------------------------- */
|
19 |
|
|
// Must include code to stop this file being accessed directly
|
20 |
|
|
if(defined('WB_PATH') == false) { die('Illegale file access /'.basename(__DIR__).'/'.basename(__FILE__).''); }
|
21 |
|
|
/* -------------------------------------------------------- */
|
22 |
|
|
|
23 |
|
|
$msg = '';
|
24 |
|
|
$sTable = TABLE_PREFIX.'mod_jsadmin';
|
25 |
|
|
if(($sOldType = $database->getTableEngine($sTable))) {
|
26 |
|
|
if(('myisam' != strtolower($sOldType))) {
|
27 |
|
|
if(!$database->query('ALTER TABLE `'.$sTable.'` Engine = \'MyISAM\' ')) {
|
28 |
|
|
$msg = $database->get_error();
|
29 |
|
|
}
|
30 |
|
|
}
|
31 |
|
|
} else {
|
32 |
|
|
$msg = $database->get_error();
|
33 |
|
|
}
|
34 |
|
|
// ------------------------------------
|
35 |
|
|
$sInstallStruct = __DIR__.'/install-struct.sql';
|
36 |
|
|
if (!is_readable($sInstallStruct)) {
|
37 |
|
|
$msg[] = '<strong>\'missing or not readable file [install-struct.sql]\'</strong> '.$FAIL.'<br />';
|
38 |
|
|
$iErr = true;
|
39 |
|
|
} else {
|
40 |
|
|
$database->SqlImport($sInstallStruct, TABLE_PREFIX, true );
|
41 |
|
|
}
|