Project

General

Profile

Revision 1138

Added by Ruud over 13 years ago

Fixed bug in droplets. Multiple droplets with the same parameter did not extract the new parameter. (problem introduced by code optimisations for WB2.8)
Fixed usage of the depriciated (PHP 5.3.0) split() function in class.wb. (ticket #772)
Fixed notice ob_end_clean..failed to delete buffer. (ticket #779)

View differences:

branches/2.8.x/CHANGELOG
11 11
! = Update/Change
12 12

  
13 13
------------------------------------- 2.8.1 -------------------------------------
14
25-Aug-2009 Ruud Eisinga
15
#	Fixed bug in droplets. Multiple droplets with the same parameter did not extract the new parameter.
16
	(problem introduced by code optimisations for WB2.8) 
17
#	Fixed usage of the depriciated (PHP 5.3.0) split() function in class.wb. (ticket #772)
18
#	Fixed notice ob_end_clean..failed to delete buffer. (ticket #779)
14 19
22-Aug-2009 Ruud Eisinga
15 20
# 	Changed the default searchform name in the installer. (ticket #775)
16 21
#	Fixed the recursive redirect problem when a page is called with a wrong language parm (ticket #780)
branches/2.8.x/wb/framework/class.wb.php
216 216

  
217 217
	// Get the current users group ids
218 218
	function get_groups_id() {
219
		return split(",", $_SESSION['GROUPS_ID']);
219
		return explode(",", $_SESSION['GROUPS_ID']);
220 220
	}
221 221

  
222 222
	// Get the current users group name
branches/2.8.x/wb/index.php
102 102
ob_start();
103 103
require(WB_PATH.'/templates/'.TEMPLATE.'/index.php');
104 104
$output = ob_get_contents();
105
ob_end_clean();
105
if (ob_get_length() > 0) ob_end_clean();
106 106

  
107 107
if(function_exists('evalDroplets')) { $output = evalDroplets($output); }
108 108
if(function_exists('filter_frontend_output')) { $output = filter_frontend_output($output); }
branches/2.8.x/wb/modules/droplets/info.php
14 14
$module_directory = 'droplets';
15 15
$module_name = 'Droplets';
16 16
$module_function = 'tool';
17
$module_version = '1.0.1';
17
$module_version = '1.0.2';
18 18
$module_platform = '2.8.x';
19 19
$module_author = 'Ruud and pcwacht';
20 20
$module_license = 'GPL';
branches/2.8.x/wb/modules/droplets/droplets.php
3 3
// $Id$
4 4

  
5 5
/*
6
*	@version	1.0
6
*	@version	1.0.2
7 7
*	@author		Ruud Eisinga (Ruud) John (PCWacht)
8 8
*	@date		June 2009
9 9
*
10 10
*	droplets are small codeblocks that are called from anywhere in the template. 
11
* 	To call a droplet just use [[dropletname]]. optional parameters for a droplet can be used like [[dropletname?parameter=value&parameter2=value]]
11
* 	To call a droplet just use [[dropletname]]. optional parameters for a droplet can be used like [[dropletname?parameter=value&parameter2=value]]\
12
*
13
*   1.0.2, bugfix. Reused the evalDroplet function so the extracted parameters will be only available within the scope of the eval and cleared when ready.
12 14
*/
13 15

  
14 16
function evalDroplets ($wb_page_data) {
......
37 39
		if ($query_content && $query_content->numRows() > 0){
38 40
			$fetch_content = $query_content->fetchRow();
39 41
			$codedata = ($fetch_content['code']);
40
			if(is_array($parameter)) extract($parameter, EXTR_SKIP);
41
			$newvalue = eval($codedata);
42
			$newvalue = evalDroplet($codedata, $parameter, $wb_page_data);
42 43
			if ($newvalue == "" && !$newvalue === true) 
43 44
				$newvalue = "<font color=\"red\">Error in: $match, no correct returnvalue.</font>";
44 45
			if ($newvalue === true) 
......
48 49
	}
49 50
	return $wb_page_data;
50 51
}
52

  
53
function evalDroplet($droplet, $params, &$wb_page_data) {
54
    if(is_array($params)) extract($params, EXTR_SKIP);
55
	return eval($droplet);
56
}
51 57
?>

Also available in: Unified diff