Project

General

Profile

1 989 aldus
<?php
2 991 Ruebenwurz
3
// $Id$
4
5 989 aldus
/*
6
*	@version	1.0
7
*	@author		Ruud Eisinga (Ruud) John (PCWacht)
8
*	@date		June 2009
9
*
10
*
11
*	droplets are small codeblocks that are called from anywhere in the template.
12
* 	To call a droplet just use [[dropletname]]. optional parameters for a droplet can be used like [[dropletname?parameter=value&parameter2=value]]
13
*/
14
15 995 aldus
if(!defined('WB_PATH')) die(header('Location: ../../index.php'));
16 989 aldus
17 995 aldus
$table = TABLE_PREFIX .'mod_droplets';
18
19
$info = $database->query("SELECT * from `$table` limit 0,1" );
20
$fields = $info->fetchRow();
21
if (!array_key_exists("look_for_it", $fields)) {
22
	/**
23
	 *	Call from the upgrade-script
24
	 */
25
26
	if (function_exists('db_add_field')) {
27
		db_add_field($table, "admin_edit", "INT NOT NULL default '0'");
28
		db_add_field($table, "admin_view", "INT NOT NULL default '0'");
29
		db_add_field($table, "show_wysiwyg", "INT NOT NULL default '0'");
30
	} else {
31
		/**
32
		 * Not call by the upgrade-script
33
		 */
34
		$database->query("ALTER TABLE `$table` (
35
			`admin_edit` INT NOT NULL default '0',
36
			`admin_view` INT NOT NULL default '0',
37
			`show_wysiwyg` INT NOT NULL default '0'
38
			)";
39
	}
40
}
41 989 aldus
?>