1 |
1457
|
Luisehahne
|
<?php
|
2 |
|
|
/**
|
3 |
|
|
*
|
4 |
|
|
* @category module
|
5 |
|
|
* @package droplet
|
6 |
|
|
* @author Ruud Eisinga (Ruud) John (PCWacht)
|
7 |
|
|
* @author WebsiteBaker Project
|
8 |
|
|
* @copyright 2004-2009, Ryan Djurovich
|
9 |
|
|
* @copyright 2009-2011, Website Baker Org. e.V.
|
10 |
|
|
* @link http://www.websitebaker2.org/
|
11 |
|
|
* @license http://www.gnu.org/licenses/gpl.html
|
12 |
|
|
* @platform WebsiteBaker 2.8.x
|
13 |
|
|
* @requirements PHP 5.2.2 and higher
|
14 |
|
|
* @version $Id$
|
15 |
|
|
* @filesource $HeadURL$
|
16 |
|
|
* @lastmodified $Date$
|
17 |
|
|
*
|
18 |
|
|
*/
|
19 |
|
|
|
20 |
|
|
if(!defined('WB_PATH')) die(header('Location: ../../index.php'));
|
21 |
|
|
|
22 |
|
|
$table = TABLE_PREFIX .'mod_droplets';
|
23 |
|
|
|
24 |
|
|
$info = $database->query("SELECT * from `$table` limit 0,1" );
|
25 |
|
|
$fields = $info->fetchRow();
|
26 |
|
|
if (!array_key_exists("admin_edit", $fields)) {
|
27 |
|
|
/**
|
28 |
|
|
* Call from the upgrade-script
|
29 |
|
|
*/
|
30 |
|
|
|
31 |
|
|
if (function_exists('db_add_field')) {
|
32 |
|
|
db_add_field("admin_edit", 'mod_droplets', "INT NOT NULL default '0'");
|
33 |
|
|
db_add_field("admin_view", 'mod_droplets', "INT NOT NULL default '0'");
|
34 |
|
|
db_add_field("show_wysiwyg", 'mod_droplets', "INT NOT NULL default '0'");
|
35 |
|
|
} else {
|
36 |
|
|
/**
|
37 |
|
|
* Not call by the upgrade-script
|
38 |
|
|
*/
|
39 |
|
|
$database->query("ALTER TABLE `$table` (
|
40 |
|
|
`admin_edit` INT NOT NULL default '0',
|
41 |
|
|
`admin_view` INT NOT NULL default '0',
|
42 |
|
|
`show_wysiwyg` INT NOT NULL default '0'
|
43 |
|
|
)");
|
44 |
|
|
}
|
45 |
|
|
}
|
46 |
989
|
aldus
|
?>
|