Project

General

Profile

« Previous | Next » 

Revision 1684

Added by Dietmar about 12 years ago

! update upgrade-script, now don't overwrite existings values in settings
+ add field tooltip to table pages in installer
! change some module tool_icon.png (Tks to Stefek)
! add date_time string to backup_droplets.zip
- search and comment out founded require_once(WB_PATH."/framework/class.database.php");
- this will be never needed anymore and produce errors
! rename class.msg_queue.php in msgQueue.php to work with autokoader
+ add function format_message to class.wb.php

View differences:

tool.php
96 96
	case 'save_settings_default':
97 97
		if (!$admin->checkFTAN())
98 98
		{
99
			if(!$admin_header) { $admin->print_header(); }
99
// 			if(!$admin_header) { $admin->print_header(); }
100 100
			$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'],$_SERVER['REQUEST_URI']);
101 101
		}
102 102
		if(file_exists($MultitabTarget)) {
......
119 119
endswitch;
120 120

  
121 121
// set template file and assign module and template block
122
$tpl = new Template(WB_PATH.'/modules/SecureFormSwitcher/htt','keep');
123
$tpl->set_file('page', 'switchform.htt');
124
$tpl->debug = false; // false, true
125
$tpl->set_block('page', 'main_block', 'main');
122
$oSecureTpl = new Template(WB_PATH.'/modules/SecureFormSwitcher/htt','keep');
123
// $tpl = new Template(dirname($admin->correct_theme_source('switchform.htt')),'keep');
124
$oSecureTpl->set_file('page', 'switchform.htt');
125
$oSecureTpl->debug = false; // false, true
126
$oSecureTpl->set_block('page', 'main_block', 'main');
126 127

  
127 128
$checked = ($setting['secure_form_module']!='');
128 129

  
......
144 145
// convert settings name to upper
145 146
array_walk($setting,'converttoupper', array(&$search, &$replace ));
146 147

  
147
$tpl->set_var($replace);
148
$tpl->set_var(array(
148
$oSecureTpl->set_var($replace);
149
$oSecureTpl->set_var(array(
149 150
	'FTAN' => $admin->getFTAN(),
150 151
	'SERVER_REQUEST_URI' => $_SERVER['REQUEST_URI'],
151 152
	'TEXT_CANCEL' => $TEXT['CANCEL'],
......
167 168
	)
168 169
);
169 170

  
170
$tpl->set_var(array(
171
$oSecureTpl->set_var(array(
171 172
		'USEIP_SELECTED' => '',
172 173
		'TXT_SECFORM_USEIP' => $SFS_TEXT['WB_SECFORM_USEIP'],
173 174
        'TXT_SECFORM_USEIP_TOOLTIP' => $SFS_TEXT['WB_SECFORM_USEIP_TOOLTIP'], // Tooltip
......
179 180
	)
180 181
);
181 182

  
182
$tpl->set_block('main_block', 'useip_mtab_loop', 'mtab_loop');
183
$oSecureTpl->set_block('main_block', 'useip_mtab_loop', 'mtab_loop');
183 184
	for($x=0; $x < 5; $x++) {
184 185
		// iu value == default set first option with standardtext
185 186
		if(intval($default_cfg['fingerprint_with_ip_octets'])==$x ) {
186
			$tpl->set_var(array(
187
			$oSecureTpl->set_var(array(
187 188
					'USEIP_VALUE' => $x,
188 189
					'USEIP_DEFAULT_SELECTED' => ((intval($setting['fingerprint_with_ip_octets'])==$x) ? ' selected="selected"' : ''),
189 190
					'USEIP_SELECTED' => '',
190 191
					)
191 192
			);
192 193
		} else {
193
			$tpl->set_var(array(
194
			$oSecureTpl->set_var(array(
194 195
					'USEIP_VALUE' => $x,
195 196
					'USEIP_SELECTED' => ((intval($setting['fingerprint_with_ip_octets'])==$x) && (intval($setting['fingerprint_with_ip_octets'])!=intval($default_cfg['fingerprint_with_ip_octets'])) ? ' selected="selected"' : ''),
196 197
				)
197 198
			);
198 199
		}
199
		$tpl->parse('mtab_loop','useip_mtab_loop', true);
200
		$oSecureTpl->parse('mtab_loop','useip_mtab_loop', true);
200 201
	}
201 202

  
202
$tpl->set_block('main_block', 'show_mtab_block', 'show_mtab');
203
$tpl->set_block('main_block', 'mtab_block', 'mtab');
203
$oSecureTpl->set_block('main_block', 'show_mtab_block', 'show_mtab');
204
$oSecureTpl->set_block('main_block', 'mtab_block', 'mtab');
204 205
if($checked) {
205
	$tpl->set_var(array(
206
	$oSecureTpl->set_var(array(
206 207
			'TEXT_ENABLED' => $SFS_TEXT['ON_OFF'],
207 208
			'TXT_SECFORM_TOKENNAME' => $SFS_TEXT['WB_SECFORM_TOKENNAME'],
208 209
            'TXT_SECFORM_TOKENNAME_TOOLTIP' => $SFS_TEXT['WB_SECFORM_TOKENNAME_TOOLTIP'],
......
217 218
            'TXT_SECFORM_USEFP_TOOLTIP' => $SFS_TEXT['WB_SECFORM_USEFP_TOOLTIP'],
218 219
		)
219 220
	);
220
	$tpl->parse('mtab','mtab_block', true);
221
	$tpl->parse('show_mtab','show_mtab_block', true);
221
	$oSecureTpl->parse('mtab','mtab_block', true);
222
	$oSecureTpl->parse('show_mtab','show_mtab_block', true);
222 223
} else  {
223
	$tpl->parse('mtab', '');
224
	$tpl->parse('show_mtab', '');
224
	$oSecureTpl->parse('mtab', '');
225
	$oSecureTpl->parse('show_mtab', '');
225 226
}
226 227

  
227 228
// Parse template object
228
$tpl->parse('main', 'main_block', false);
229
$output = $tpl->finish($tpl->parse('output', 'page'));
230
unset($tpl);
229
$oSecureTpl->parse('main', 'main_block', false);
230
$output = $oSecureTpl->finish($oSecureTpl->parse('output', 'page'));
231
unset($oSecureTpl);
231 232
print $output;
232 233

  

Also available in: Unified diff