Project

General

Profile

« Previous | Next » 

Revision 1716

Added by Dietmar about 12 years ago

! update folder admin/settings admin/skel/htt
! change Template to div container

View differences:

index.php
4 4
 * @category        admin
5 5
 * @package         settings
6 6
 * @author          Ryan Djurovich, WebsiteBaker Project
7
 * @copyright       2009-2011, Website Baker Org. e.V.
7
 * @copyright       2009-2012, WebsiteBaker Org. e.V.
8 8
 * @link			http://www.websitebaker2.org/
9 9
 * @license         http://www.gnu.org/licenses/gpl.html
10 10
 * @platform        WebsiteBaker 2.8.x
......
24 24
	$admin = new admin('Settings', 'settings_basic');
25 25
}
26 26

  
27
// add new values, later in upgrade-script
28
$cfg = array(
29
	'website_signature' => defined('WEBSITE_SIGNATURE') ? WEBSITE_SIGNATURE : '',
30
	'confirmed_registration' => (defined('CONFIRMED_REGISTRATION') ? CONFIRMED_REGISTRATION : '0'),
31
	);
32
db_update_key_value( 'settings', $cfg );
33

  
27 34
// Include the WB functions file
28 35
require_once(WB_PATH.'/framework/functions.php');
29 36
require_once(WB_PATH.'/framework/functions-utf8.php');
30 37

  
38
$mLang = ModLanguage::getInstance();
39
$mLang->setLanguage(dirname(__FILE__).'/languages/', LANGUAGE, DEFAULT_LANGUAGE);
40

  
31 41
// Setup template object, parse vars to it, then parse it
32 42
// Create new template object
33
$template = new Template(dirname($admin->correct_theme_source('settings.htt')));
43
$template = new Template(dirname($admin->correct_theme_source('settings.htt')),'keep');
34 44
// $template->debug = true;
35 45
$template->set_file('page',        'settings.htt');
36 46
$template->set_block('page',       'main_block', 'main');
......
145 155
		}
146 156
	}
147 157

  
158
	$sSelected = ' selected="selected"';
159
	$checked   = ' checked="checked"';
160
/*-- insert all needed vars from language files ----------------------------------------*/
161
	$template->set_var($mLang->getLangArray());
162

  
148 163
	$template->set_var(array(
149 164
						'WB_URL' => WB_URL,
150 165
						'THEME_URL' => THEME_URL,
......
152 167
					 ));
153 168

  
154 169
	// Insert language values
155
	$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'language' ORDER BY directory");
156
	if($result->numRows() > 0)
170
	$sql  = 'SELECT `name`, `directory` FROM `'.TABLE_PREFIX.'addons` ';
171
	$sql .= 'WHERE `type` = \'language\' ';
172
	$sql .= 'AND `function` != \'theme\' ';
173
	$sql .= 'ORDER BY `directory`';
174

  
175
	if( ($result = $database->query($sql)) && ($result->numRows() > 0) )
176
//	$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'language' ORDER BY directory");
177
//	if($result->numRows() > 0)
157 178
	{
158 179
		while($addon = $result->fetchRow()) {
159 180
	        $langIcons = (empty($addon['directory'])) ? 'none' : strtolower($addon['directory']);
......
161 182
			$template->set_var('CODE',        $addon['directory']);
162 183
			$template->set_var('NAME',        $addon['name']);
163 184
			$template->set_var('FLAG',        THEME_URL.'/images/flags/'.$langIcons);
164
			$template->set_var('SELECTED',    (DEFAULT_LANGUAGE == $addon['directory'] ? ' selected="selected"' : '') );
185
			$template->set_var('SELECTED',    (DEFAULT_LANGUAGE == $addon['directory'] ? $sSelected : '') );
165 186
			$template->parse('language_list', 'language_list_block', true);
166 187
		}
167 188
	}
......
175 196
			$template->set_var('VALUE', $hour_offset);
176 197
			$template->set_var('NAME', $title);
177 198
			if(DEFAULT_TIMEZONE == $hour_offset*60*60) {
178
				$template->set_var('SELECTED', ' selected="selected"');
199
				$template->set_var('SELECTED', $sSelected);
179 200
			} else {
180 201
				$template->set_var('SELECTED', '');
181 202
			}
......
189 210
		$template->set_var('VALUE', $code);
190 211
		$template->set_var('NAME', $title);
191 212
		if(DEFAULT_CHARSET == $code) {
192
			$template->set_var('SELECTED', ' selected="selected"');
213
			$template->set_var('SELECTED', $sSelected);
193 214
		} else {
194 215
			$template->set_var('SELECTED', '');
195 216
		}
......
208 229
		}
209 230
		$template->set_var('NAME', $title);
210 231
		if(DEFAULT_DATE_FORMAT == $format) {
211
			$template->set_var('SELECTED', ' selected="selected"');
232
			$template->set_var('SELECTED', $sSelected);
212 233
		} else {
213 234
			$template->set_var('SELECTED', '');
214 235
		}
......
226 247
		}
227 248
		$template->set_var('NAME', $title);
228 249
		if(DEFAULT_TIME_FORMAT == $format) {
229
			$template->set_var('SELECTED', ' selected="selected"');
250
			$template->set_var('SELECTED', $sSelected);
230 251
		} else {
231 252
			$template->set_var('SELECTED', '');
232 253
		}
233 254
		$template->parse('time_format_list', 'time_format_list_block', true);
234 255
	}
235 256

  
236
	// Insert templates
237
	$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template' AND function != 'theme' ORDER BY name");
238
	if($result->numRows() > 0) {
239
		while($addon = $result->fetchRow()) {
240
			$template->set_var('FILE', $addon['directory']);
241
			$template->set_var('NAME', $addon['name']);
242
			if(($addon['directory'] == DEFAULT_TEMPLATE) ? $selected = ' selected="selected"' : $selected = '');
243
			$template->set_var('SELECTED', $selected);
244
			$template->parse('template_list', 'template_list_block', true);
257
// Insert templates
258
	$sql  = 'SELECT `name`, `directory` FROM `'.TABLE_PREFIX.'addons` ';
259
	$sql .= 'WHERE `type` = \'template\' ';
260
	$sql .= 'AND `function` != \'theme\' ';
261
	$sql .= 'ORDER BY `name`';
262
	if( ($result = $database->query($sql)) && ($result->numRows() > 0) )
263
	{
264
//	$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template' AND function != 'theme' ORDER BY name");
265
//	if($result->numRows() > 0) {
266
		while($addon = $result->fetchRow())
267
		{
268
			if( $admin->get_permission($addon['directory'],'template' ) )
269
			{
270
				$template->set_var('FILE', $addon['directory']);
271
				$template->set_var('NAME', $addon['name']);
272
				$selected = (($addon['directory'] == DEFAULT_TEMPLATE) ? $sSelected : '');
273
				$template->set_var('SELECTED', $selected);
274
				$template->parse('template_list', 'template_list_block', true);
275
			}
245 276
		}
246 277
	}
247 278

  
248
	// Insert backend theme
249
	$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template' AND function = 'theme' ORDER BY name");
250
	if($result->numRows() > 0) {
251
		while($addon = $result->fetchRow()) {
252
			$template->set_var('FILE', $addon['directory']);
253
			$template->set_var('NAME', $addon['name']);
254
			if(($addon['directory'] == DEFAULT_THEME) ? $selected = ' selected="selected"' : $selected = '');
255
			$template->set_var('SELECTED', $selected);
256
			$template->parse('theme_list', 'theme_list_block', true);
279
// Insert backend theme
280
	$sql  = 'SELECT `name`, `directory` FROM `'.TABLE_PREFIX.'addons` ';
281
	$sql .= 'WHERE `type` = \'template\' ';
282
	$sql .= 'AND `function` = \'theme\' ';
283
	$sql .= 'ORDER BY `name`';
284

  
285

  
286
	if( ($result = $database->query($sql)) && ($result->numRows() > 0) )
287
	{
288
//	$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template' AND function = 'theme' ORDER BY name");
289
//	if($result->numRows() > 0) {
290
		while($addon = $result->fetchRow())
291
		{
292
			if( $admin->get_permission($addon['directory'],'template' ) )
293
			{
294
				$template->set_var('FILE', $addon['directory']);
295
				$template->set_var('NAME', $addon['name']);
296
				$selected = (($addon['directory'] == DEFAULT_THEME) ? $sSelected : '');
297
				$template->set_var('SELECTED', $selected);
298
				$template->parse('theme_list', 'theme_list_block', true);
299
			}
257 300
		}
258 301
	}
259 302

  
......
262 305
	$module_name=$TEXT['NONE'];
263 306
	$template->set_var('FILE', $file);
264 307
	$template->set_var('NAME', $module_name);
265
	$selected = (!defined('WYSIWYG_EDITOR') || $file == WYSIWYG_EDITOR) ? ' selected="selected"' : '';
308
	$selected = (!defined('WYSIWYG_EDITOR') || $file == WYSIWYG_EDITOR) ? $sSelected : '';
266 309
	$template->set_var('SELECTED', $selected);
267 310
	$template->parse('editor_list', 'editor_list_block', true);
268
	$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module' AND function = 'wysiwyg' ORDER BY name");
269
	if($result->numRows() > 0)
311
	$sql  = 'SELECT `name`, `directory` FROM `'.TABLE_PREFIX.'addons` ';
312
	$sql .= 'WHERE `type` = \'module\' ';
313
	$sql .= 'AND `function` = \'wysiwyg\' ';
314
	$sql .= 'ORDER BY `name`';
315
	if( ($result = $database->query($sql)) && ($result->numRows() > 0) )
270 316
	{
317
//	$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module' AND function = 'wysiwyg' ORDER BY name");
318
//	if($result->numRows() > 0)
319
//	{
271 320
		while($addon = $result->fetchRow())
272 321
	    {
273
			$template->set_var('FILE', $addon['directory']);
274
			$template->set_var('NAME', $addon['name']);
275
			$selected = (!defined('WYSIWYG_EDITOR') || $addon['directory'] == WYSIWYG_EDITOR) ? ' selected="selected"' : '';
276
			$template->set_var('SELECTED', $selected);
277
			$template->parse('editor_list', 'editor_list_block', true);
322
			if( $admin->get_permission($addon['directory'],'module' ) )
323
			{
324
				$template->set_var('FILE', $addon['directory']);
325
				$template->set_var('NAME', $addon['name']);
326
				$selected = (!defined('WYSIWYG_EDITOR') || $addon['directory'] == WYSIWYG_EDITOR) ? $sSelected : '';
327
				$template->set_var('SELECTED', $selected);
328
				$template->parse('editor_list', 'editor_list_block', true);
329
			}
278 330
		}
279 331
	}
280 332

  
281 333
// Insert templates for search settings
282 334
	$search_template = ( ($search_template == DEFAULT_TEMPLATE) || ($search_template == '') ) ? '' : $search_template;
283
	$selected = ( ($search_template != DEFAULT_TEMPLATE) ) ?  ' selected="selected"' : $selected = '';
335
	$selected = ( ($search_template != DEFAULT_TEMPLATE) ) ?  $sSelected : '';
284 336

  
285 337
	$template->set_var(array(
286 338
	        'FILE' => '',
......
289 341
	    ));
290 342
	$template->parse('search_template_list', 'search_template_list_block', true);
291 343

  
292
	$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template' AND function = 'template' ORDER BY name");
293
	if($result->numRows() > 0)
344
	$sql  = 'SELECT `name`, `directory` FROM `'.TABLE_PREFIX.'addons` ';
345
	$sql .= 'WHERE `type` = \'template\' ';
346
	$sql .= 'AND `function` = \'template\' ';
347
	$sql .= 'ORDER BY `name`';
348
    if( ($result = $database->query($sql)) && ($result->numRows() > 0) )
294 349
	{
350
//	$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template' AND function = 'template' ORDER BY name");
351
//	if($result->numRows() > 0)
352
//	{
295 353
		while($addon = $result->fetchRow())
296 354
	    {
297
			$template->set_var('FILE', $addon['directory']);
298
			$template->set_var('NAME', $addon['name']);
299
	        $selected = ($addon['directory'] == $search_template) ? ' selected="selected"' :  $selected = '';
300
			$template->set_var('SELECTED', $selected);
301
			$template->parse('search_template_list', 'search_template_list_block', true);
302

  
355
			if( $admin->get_permission($addon['directory'],'template' ) )
356
			{
357
				$template->set_var('FILE', $addon['directory']);
358
				$template->set_var('NAME', $addon['name']);
359
		        $selected = ($addon['directory'] == $search_template) ? $sSelected :  '';
360
				$template->set_var('SELECTED', $selected);
361
				$template->parse('search_template_list', 'search_template_list_block', true);
362
			}
303 363
		}
304 364
	}
305 365

  
......
309 369
	{
310 370
		$template->set_var('VALUE', $value);
311 371
		$template->set_var('NAME', $title);
312
	    $selected = (ER_LEVEL == $value) ? ' selected="selected"' : '';
372
	    $selected = (ER_LEVEL == $value) ? $sSelected : '';
313 373
	    $template->set_var('SELECTED', $selected);
314 374
		$template->parse('error_reporting_list', 'error_reporting_list_block', true);
315 375
	}
316 376

  
377

  
317 378
	// Insert permissions values
318 379
	if($admin->get_permission('settings_advanced') != true)
319 380
	{
......
326 387
		$template->set_var('NUMBER', $i);
327 388
		if(PAGE_LEVEL_LIMIT == $i)
328 389
	    {
329
			$template->set_var('SELECTED', ' selected="selected"');
390
			$template->set_var('SELECTED', $sSelected);
330 391
		} else {
331 392
			$template->set_var('SELECTED', '');
332 393
		}
......
336 397
	// Work-out if multiple menus feature is enabled
337 398
	if(defined('MULTIPLE_MENUS') && MULTIPLE_MENUS == true)
338 399
	{
339
		$template->set_var('MULTIPLE_MENUS_ENABLED', ' checked="checked"');
400
		$template->set_var('MULTIPLE_MENUS_ENABLED', $checked);
340 401
	} else {
341
		$template->set_var('MULTIPLE_MENUS_DISABLED', ' checked="checked"');
402
		$template->set_var('MULTIPLE_MENUS_DISABLED', $checked);
342 403
	}
343 404

  
344 405
	// Work-out if page languages feature is enabled
345 406
	if(defined('PAGE_LANGUAGES') && PAGE_LANGUAGES == true)
346 407
	{
347
	        $template->set_var('PAGE_LANGUAGES_ENABLED', ' checked="checked"');
408
        $template->set_var('PAGE_LANGUAGES_ENABLED', $checked);
348 409
	} else {
349
	        $template->set_var('PAGE_LANGUAGES_DISABLED', ' checked="checked"');
410
        $template->set_var('PAGE_LANGUAGES_DISABLED', $checked);
350 411
	}
351 412

  
352 413
	// Work-out if warn_page_leave feature is enabled
353 414
	if (defined('WARN_PAGE_LEAVE') && WARN_PAGE_LEAVE == true)
354 415
	{
355
		$template->set_var('WARN_PAGE_LEAVE_ENABLED', ' checked="checked"');
416
		$template->set_var('WARN_PAGE_LEAVE_ENABLED', $checked);
356 417
	} else {
357
		$template->set_var('WARN_PAGE_LEAVE_DISABLED', ' checked="checked"');
418
		$template->set_var('WARN_PAGE_LEAVE_DISABLED', $checked);
358 419
	}
359 420

  
360 421
	// Work-out if smart login feature is enabled
361 422
	if(defined('SMART_LOGIN') && SMART_LOGIN == true)
362 423
	{
363
		$template->set_var('SMART_LOGIN_ENABLED', ' checked="checked"');
424
		$template->set_var('SMART_LOGIN_ENABLED', $checked);
364 425
	} else {
365
		$template->set_var('SMART_LOGIN_DISABLED', ' checked="checked"');
426
		$template->set_var('SMART_LOGIN_DISABLED', $checked);
366 427
	}
367 428

  
368 429
	/* Make's sure GD library is installed */
......
376 437
	// Work-out if section blocks feature is enabled
377 438
	if(defined('SECTION_BLOCKS') && SECTION_BLOCKS == true)
378 439
	{
379
		$template->set_var('SECTION_BLOCKS_ENABLED', ' checked="checked"');
440
		$template->set_var('SECTION_BLOCKS_ENABLED', $checked);
380 441
	} else {
381
		$template->set_var('SECTION_BLOCKS_DISABLED', ' checked="checked"');
442
		$template->set_var('SECTION_BLOCKS_DISABLED', $checked);
382 443
	}
383 444

  
384 445
	// Work-out if homepage redirection feature is enabled
385 446
	if(defined('HOMEPAGE_REDIRECTION') && HOMEPAGE_REDIRECTION == true)
386 447
	{
387
		$template->set_var('HOMEPAGE_REDIRECTION_ENABLED', ' checked="checked"');
448
		$template->set_var('HOMEPAGE_REDIRECTION_ENABLED', $checked);
388 449
	} else {
389
		$template->set_var('HOMEPAGE_REDIRECTION_DISABLED', ' checked="checked"');
450
		$template->set_var('HOMEPAGE_REDIRECTION_DISABLED', $checked);
390 451
	}
391 452

  
392 453
	// Work-out which server os should be checked
393 454
	if(OPERATING_SYSTEM == 'linux')
394 455
	{
395
		$template->set_var('LINUX_SELECTED', ' checked="checked"');
456
		$template->set_var('LINUX_SELECTED', $checked);
396 457
	} elseif(OPERATING_SYSTEM == 'windows') {
397
		$template->set_var('WINDOWS_SELECTED', ' checked="checked"');
458
		$template->set_var('WINDOWS_SELECTED', $checked);
398 459
	}
399 460

  
400 461
	// Work-out if developer infos feature is enabled
401 462
	if(defined('DEV_INFOS') && DEV_INFOS == true)
402 463
	{
403
		$template->set_var('DEV_INFOS_ENABLED', ' checked="checked"');
464
		$template->set_var('DEV_INFOS_ENABLED', $checked);
404 465
	} else {
405
		$template->set_var('DEV_INFOS_DISABLED', ' checked="checked"');
466
		$template->set_var('DEV_INFOS_DISABLED', $checked);
406 467
	}
407 468

  
408 469
	// Work-out if manage sections feature is enabled
409 470
	if(MANAGE_SECTIONS)
410 471
	{
411
		$template->set_var('MANAGE_SECTIONS_ENABLED', ' checked="checked"');
472
		$template->set_var('MANAGE_SECTIONS_ENABLED', $checked);
412 473
	} else {
413
		$template->set_var('MANAGE_SECTIONS_DISABLED', ' checked="checked"');
474
		$template->set_var('MANAGE_SECTIONS_DISABLED', $checked);
414 475
	}
415 476

  
416 477
	// Work-out which wbmailer routine should be checked
......
427 488
				'TEXT_WBMAILER_SMTP_AUTH_NOTICE' => $TEXT['REQUIRED'].' '.$TEXT['WBMAILER_SMTP_AUTH'],
428 489
				'TEXT_WBMAILER_SMTP_USERNAME' => $TEXT['WBMAILER_SMTP_USERNAME'],
429 490
				'TEXT_WBMAILER_SMTP_PASSWORD' => $TEXT['WBMAILER_SMTP_PASSWORD'],
430
				'SMTP_AUTH_SELECTED' => ' checked="checked"'
491
				'SMTP_AUTH_SELECTED' => $checked
431 492
				));
432 493
	if(WBMAILER_ROUTINE == 'phpmail')
433 494
	{
434
		$template->set_var('PHPMAIL_SELECTED', ' checked="checked"');
495
		$template->set_var('PHPMAIL_SELECTED', $checked);
435 496
		$template->set_var('SMTP_VISIBILITY', ' style="display: none;"');
436 497
		$template->set_var('SMTP_VISIBILITY_AUTH', '');
437 498
		// $template->set_var('SMTP_AUTH_SELECTED', '');
438 499
	} elseif(WBMAILER_ROUTINE == 'smtp')
439 500
	{
440
		$template->set_var('SMTPMAIL_SELECTED', ' checked="checked"');
501
		$template->set_var('SMTPMAIL_SELECTED', $checked);
441 502
		$template->set_var('SMTP_VISIBILITY', '');
442 503
		$template->set_var('SMTP_VISIBILITY_AUTH', '');
443 504
	}
......
445 506
	// Work-out if SMTP authentification should be checked
446 507
	if(WBMAILER_SMTP_AUTH)
447 508
	{
448
		$template->set_var('SMTP_AUTH_SELECTED', ' checked="checked"');
509
		$template->set_var('SMTP_AUTH_SELECTED', $checked);
449 510
		if(WBMAILER_ROUTINE == 'smtp')
450 511
	    {
451 512
			$template->set_var('SMTP_VISIBILITY_AUTH', '');
......
460 521
	// Work-out if intro feature is enabled
461 522
	if(INTRO_PAGE)
462 523
	{
463
		$template->set_var('INTRO_PAGE_ENABLED', ' checked="checked"');
524
		$template->set_var('INTRO_PAGE_ENABLED', $checked);
464 525
	} else {
465
		$template->set_var('INTRO_PAGE_DISABLED', ' checked="checked"');
526
		$template->set_var('INTRO_PAGE_DISABLED', $checked);
466 527
	}
467 528

  
468 529
	// Work-out if frontend login feature is enabled
469 530
	if(FRONTEND_LOGIN)
470 531
	{
471
		$template->set_var('PRIVATE_ENABLED', ' checked="checked"');
532
		$template->set_var('PRIVATE_ENABLED', $checked);
472 533
	} else {
473
		$template->set_var('PRIVATE_DISABLED', ' checked="checked"');
534
		$template->set_var('PRIVATE_DISABLED', $checked);
474 535
	}
536
	// Work-out if frontend login feature is enabled
475 537

  
538
	if(CONFIRMED_REGISTRATION)
539
	{
540
		$template->set_var('CONFIRMED_REGISTRATION_ENABLED', $checked);
541
	} else {
542
		$template->set_var('CONFIRMED_REGISTRATION_DISABLED', $checked);
543
	}
544

  
476 545
	// Work-out if page trash feature is disabled, in-line, or separate
477 546
	if(PAGE_TRASH == 'disabled')
478 547
	{
479
		$template->set_var('PAGE_TRASH_DISABLED', ' checked="checked"');
548
		$template->set_var('PAGE_TRASH_DISABLED', $checked);
480 549
		$template->set_var('DISPLAY_PAGE_TRASH_SEPARATE', 'display: none;');
481 550
	} elseif(PAGE_TRASH == 'inline')
482 551
	{
483
		$template->set_var('PAGE_TRASH_INLINE', ' checked="checked"');
552
		$template->set_var('PAGE_TRASH_INLINE', $checked);
484 553
		$template->set_var('DISPLAY_PAGE_TRASH_SEPARATE', 'display: none;');
485 554
	} elseif(PAGE_TRASH == 'separate')
486 555
	{
487
		$template->set_var('PAGE_TRASH_SEPARATE', ' checked="checked"');
556
		$template->set_var('PAGE_TRASH_SEPARATE', $checked);
488 557
		$template->set_var('DISPLAY_PAGE_TRASH_SEPARATE', 'display: inline;');
489 558
	}
490 559

  
491 560
	// Work-out if media home folde feature is enabled
492 561
	if(HOME_FOLDERS)
493 562
	{
494
		$template->set_var('HOME_FOLDERS_ENABLED', ' checked="checked"');
563
		$template->set_var('HOME_FOLDERS_ENABLED', $checked);
495 564
	} else {
496
		$template->set_var('HOME_FOLDERS_DISABLED', ' checked="checked"');
565
		$template->set_var('HOME_FOLDERS_DISABLED', $checked);
497 566
	}
498 567

  
499 568
	// Insert search select
500 569
	if(SEARCH == 'private')
501 570
	{
502
		$template->set_var('PRIVATE_SEARCH', ' selected="selected"');
571
		$template->set_var('PRIVATE_SEARCH', $sSelected);
503 572
	} elseif(SEARCH == 'registered') {
504
		$template->set_var('REGISTERED_SEARCH', ' selected="selected"');
573
		$template->set_var('REGISTERED_SEARCH', $sSelected);
505 574
	} elseif(SEARCH == 'none') {
506
		$template->set_var('NONE_SEARCH', ' selected="selected"');
575
		$template->set_var('NONE_SEARCH', $sSelected);
507 576
	}
508 577

  
509 578
	// Work-out if 777 permissions are set
510 579
	if(STRING_FILE_MODE == '0777' AND STRING_DIR_MODE == '0777')
511 580
	{
512
		$template->set_var('WORLD_WRITEABLE_SELECTED', ' checked="checked"');
581
		$template->set_var('WORLD_WRITEABLE_SELECTED', $checked);
513 582
	}
514 583

  
515 584
	// Work-out which file mode boxes are checked
516 585
	if(extract_permission(STRING_FILE_MODE, 'u', 'r'))
517 586
	{
518
		$template->set_var('FILE_U_R_CHECKED', ' checked="checked"');
587
		$template->set_var('FILE_U_R_CHECKED', $checked);
519 588
	}
520 589
	if(extract_permission(STRING_FILE_MODE, 'u', 'w'))
521 590
	{
522
		$template->set_var('FILE_U_W_CHECKED', ' checked="checked"');
591
		$template->set_var('FILE_U_W_CHECKED', $checked);
523 592
	}
524 593
	if(extract_permission(STRING_FILE_MODE, 'u', 'e'))
525 594
	{
526
		$template->set_var('FILE_U_E_CHECKED', ' checked="checked"');
595
		$template->set_var('FILE_U_E_CHECKED', $checked);
527 596
	}
528 597
	if(extract_permission(STRING_FILE_MODE, 'g', 'r'))
529 598
	{
530
		$template->set_var('FILE_G_R_CHECKED', ' checked="checked"');
599
		$template->set_var('FILE_G_R_CHECKED', $checked);
531 600
	}
532 601
	if(extract_permission(STRING_FILE_MODE, 'g', 'w'))
533 602
	{
534
		$template->set_var('FILE_G_W_CHECKED', ' checked="checked"');
603
		$template->set_var('FILE_G_W_CHECKED', $checked);
535 604
	}
536 605
	if(extract_permission(STRING_FILE_MODE, 'g', 'e'))
537 606
	{
538
		$template->set_var('FILE_G_E_CHECKED', ' checked="checked"');
607
		$template->set_var('FILE_G_E_CHECKED', $checked);
539 608
	}
540 609
	if(extract_permission(STRING_FILE_MODE, 'o', 'r'))
541 610
	{
542
		$template->set_var('FILE_O_R_CHECKED', ' checked="checked"');
611
		$template->set_var('FILE_O_R_CHECKED', $checked);
543 612
	}
544 613
	if(extract_permission(STRING_FILE_MODE, 'o', 'w'))
545 614
	{
546
		$template->set_var('FILE_O_W_CHECKED', ' checked="checked"');
615
		$template->set_var('FILE_O_W_CHECKED', $checked);
547 616
	}
548 617
	if(extract_permission(STRING_FILE_MODE, 'o', 'e'))
549 618
	{
550
		$template->set_var('FILE_O_E_CHECKED', ' checked="checked"');
619
		$template->set_var('FILE_O_E_CHECKED', $checked);
551 620
	}
552 621
	// Work-out which dir mode boxes are checked
553 622
	if(extract_permission(STRING_DIR_MODE, 'u', 'r'))
554 623
	{
555
		$template->set_var('DIR_U_R_CHECKED', ' checked="checked"');
624
		$template->set_var('DIR_U_R_CHECKED', $checked);
556 625
	}
557 626
	if(extract_permission(STRING_DIR_MODE, 'u', 'w'))
558 627
	{
559
		$template->set_var('DIR_U_W_CHECKED', ' checked="checked"');
628
		$template->set_var('DIR_U_W_CHECKED', $checked);
560 629
	}
561 630
	if(extract_permission(STRING_DIR_MODE, 'u', 'e'))
562 631
	{
563
		$template->set_var('DIR_U_E_CHECKED', ' checked="checked"');
632
		$template->set_var('DIR_U_E_CHECKED', $checked);
564 633
	}
565 634
	if(extract_permission(STRING_DIR_MODE, 'g', 'r'))
566 635
	{
567
		$template->set_var('DIR_G_R_CHECKED', ' checked="checked"');
636
		$template->set_var('DIR_G_R_CHECKED', $checked);
568 637
	}
569 638
	if(extract_permission(STRING_DIR_MODE, 'g', 'w'))
570 639
	{
571
		$template->set_var('DIR_G_W_CHECKED', ' checked="checked"');
640
		$template->set_var('DIR_G_W_CHECKED', $checked);
572 641
	}
573 642
	if(extract_permission(STRING_DIR_MODE, 'g', 'e'))
574 643
	{
575
		$template->set_var('DIR_G_E_CHECKED', ' checked="checked"');
644
		$template->set_var('DIR_G_E_CHECKED', $checked);
576 645
	}
577 646
	if(extract_permission(STRING_DIR_MODE, 'o', 'r'))
578 647
	{
579
		$template->set_var('DIR_O_R_CHECKED', ' checked="checked"');
648
		$template->set_var('DIR_O_R_CHECKED', $checked);
580 649
	}
581 650
	if(extract_permission(STRING_DIR_MODE, 'o', 'w'))
582 651
	{
583
		$template->set_var('DIR_O_W_CHECKED', ' checked="checked"');
652
		$template->set_var('DIR_O_W_CHECKED', $checked);
584 653
	}
585 654
	if(extract_permission(STRING_DIR_MODE, 'o', 'e'))
586 655
	{
587
		$template->set_var('DIR_O_E_CHECKED', ' checked="checked"');
656
		$template->set_var('DIR_O_E_CHECKED', $checked);
588 657
	}
589 658

  
590 659
	$template->set_var(array(
......
609 678
			$template->set_var('NAME', $group['name']);
610 679
			if(FRONTEND_SIGNUP == $group['group_id'])
611 680
	        {
612
				$template->set_var('SELECTED', ' selected="selected"');
681
				$template->set_var('SELECTED', $sSelected);
613 682
			} else {
614 683
				$template->set_var('SELECTED', '');
615 684
			}
......
660 729
					'TEXT_FRONTEND' => $TEXT['FRONTEND'],
661 730
					'TEXT_LOGIN' => $TEXT['LOGIN'],
662 731
					'TEXT_REDIRECT_AFTER' => $TEXT['REDIRECT_AFTER'],
663
					'TEXT_SIGNUP' => $TEXT['SIGNUP'],
732
					'TEXT_SIGNUP' => $TEXT['SIGNUP'].' '.$TEXT['GROUP'],
664 733
					'TEXT_PHP_ERROR_LEVEL' => $TEXT['PHP_ERROR_LEVEL'],
665 734
					'TEXT_MULTILINGUAL' => $TEXT['MULTILINGUAL'],
666 735
					'TEXT_DEV_INFOS' => $TEXT['DEV_INFOS'],
......
707 776
					'TEXT_EXECUTE' => $TEXT['EXECUTE'],
708 777
					'TEXT_WARN_PAGE_LEAVE' => '',
709 778
					'TEXT_SMART_LOGIN' => $TEXT['SMART_LOGIN'],
779
					'TEXT_CONFIRMED_REGISTRATION' => $TEXT['EMAIL'].' '.$TEXT['SIGNUP'],
710 780
					'TEXT_MULTIPLE_MENUS' => $TEXT['MULTIPLE_MENUS'],
711 781
					'TEXT_HOMEPAGE_REDIRECTION' => $TEXT['HOMEPAGE_REDIRECTION'],
712 782
					'TEXT_SECTION_BLOCKS' => $TEXT['SECTION_BLOCKS'],

Also available in: Unified diff