Project

General

Profile

« Previous | Next » 

Revision 1721

Added by Dietmar about 12 years ago

  1. fixed admin/settings, remove unknown variables

View differences:

index.php
40 40

  
41 41
// Setup template object, parse vars to it, then parse it
42 42
// Create new template object
43
$template = new Template(dirname($admin->correct_theme_source('settings.htt')),'keep');
43
$template = new Template(dirname($admin->correct_theme_source('settings.htt')));
44 44
// $template->debug = true;
45 45
$template->set_file('page',        'settings.htt');
46 46
$template->set_block('page',       'main_block', 'main');
......
397 397
	// Work-out if multiple menus feature is enabled
398 398
	if(defined('MULTIPLE_MENUS') && MULTIPLE_MENUS == true)
399 399
	{
400
		$template->set_var('MULTIPLE_MENUS_ENABLED', $checked);
400
    	$template->set_var(array(
401
				'MULTIPLE_MENUS_ENABLED' => $checked,
402
				'MULTIPLE_MENUS_DISABLED' => '',
403
				));
401 404
	} else {
402
		$template->set_var('MULTIPLE_MENUS_DISABLED', $checked);
405
    	$template->set_var(array(
406
				'MULTIPLE_MENUS_DISABLED' => $checked,
407
				'MULTIPLE_MENUS_ENABLED' => '',
408
				));
403 409
	}
404 410

  
405 411
	// Work-out if page languages feature is enabled
406 412
	if(defined('PAGE_LANGUAGES') && PAGE_LANGUAGES == true)
407 413
	{
408
        $template->set_var('PAGE_LANGUAGES_ENABLED', $checked);
414
    	$template->set_var(array(
415
				'PAGE_LANGUAGES_ENABLED' => $checked,
416
				'PAGE_LANGUAGES_DISABLED' => '',
417
				));
409 418
	} else {
410
        $template->set_var('PAGE_LANGUAGES_DISABLED', $checked);
419
    	$template->set_var(array(
420
				'PAGE_LANGUAGES_DISABLED' => $checked,
421
				'PAGE_LANGUAGES_ENABLED' => '',
422
				));
411 423
	}
412 424

  
413 425
	// Work-out if warn_page_leave feature is enabled
414 426
	if (defined('WARN_PAGE_LEAVE') && WARN_PAGE_LEAVE == true)
415 427
	{
416 428
		$template->set_var('WARN_PAGE_LEAVE_ENABLED', $checked);
429
    	$template->set_var(array(
430
				'WARN_PAGE_LEAVE_ENABLED' => $checked,
431
				'WARN_PAGE_LEAVE_DISABLED' => '',
432
				));
417 433
	} else {
418 434
		$template->set_var('WARN_PAGE_LEAVE_DISABLED', $checked);
435
    	$template->set_var(array(
436
				'MANAGE_SECTIONS_DISABLED' => $checked,
437
				'WARN_PAGE_LEAVE_DISABLED' => '',
438
				));
419 439
	}
420 440

  
421 441
	// Work-out if smart login feature is enabled
422 442
	if(defined('SMART_LOGIN') && SMART_LOGIN == true)
423 443
	{
424 444
		$template->set_var('SMART_LOGIN_ENABLED', $checked);
445
    	$template->set_var(array(
446
				'SMART_LOGIN_ENABLED' => $checked,
447
				'SMART_LOGIN_DISABLED' => '',
448
				));
425 449
	} else {
426 450
		$template->set_var('SMART_LOGIN_DISABLED', $checked);
451
    	$template->set_var(array(
452
				'SMART_LOGIN_DISABLED' => $checked,
453
				'SMART_LOGIN_ENABLED' => '',
454
				));
427 455
	}
428 456

  
429 457
	/* Make's sure GD library is installed */
......
437 465
	// Work-out if section blocks feature is enabled
438 466
	if(defined('SECTION_BLOCKS') && SECTION_BLOCKS == true)
439 467
	{
440
		$template->set_var('SECTION_BLOCKS_ENABLED', $checked);
468
    	$template->set_var(array(
469
				'SECTION_BLOCKS_ENABLED' => $checked,
470
				'SECTION_BLOCKS_DISABLED' => '',
471
				));
441 472
	} else {
442
		$template->set_var('SECTION_BLOCKS_DISABLED', $checked);
473
    	$template->set_var(array(
474
				'SECTION_BLOCKS_DISABLED' => $checked,
475
				'SECTION_BLOCKS_ENABLED' => '',
476
				));
443 477
	}
444 478

  
445 479
	// Work-out if homepage redirection feature is enabled
446 480
	if(defined('HOMEPAGE_REDIRECTION') && HOMEPAGE_REDIRECTION == true)
447 481
	{
448
		$template->set_var('HOMEPAGE_REDIRECTION_ENABLED', $checked);
482
//		$template->set_var('HOMEPAGE_REDIRECTION_ENABLED', $checked);
483
    	$template->set_var(array(
484
				'HOMEPAGE_REDIRECTION_ENABLED' => $checked,
485
				'HOMEPAGE_REDIRECTION_DISABLED' => '',
486
				));
449 487
	} else {
450
		$template->set_var('HOMEPAGE_REDIRECTION_DISABLED', $checked);
488
//		$template->set_var('HOMEPAGE_REDIRECTION_DISABLED', $checked);
489
    	$template->set_var(array(
490
				'HOMEPAGE_REDIRECTION_DISABLED' => $checked,
491
				'HOMEPAGE_REDIRECTION_ENABLED' => '',
492
				));
451 493
	}
452 494

  
453 495
	// Work-out which server os should be checked
......
462 504
	if(defined('DEV_INFOS') && DEV_INFOS == true)
463 505
	{
464 506
		$template->set_var('DEV_INFOS_ENABLED', $checked);
507
    	$template->set_var(array(
508
				'DEV_INFOS_ENABLED' => $checked,
509
				'DEV_INFOS_DISABLED' => '',
510
				));
465 511
	} else {
466 512
		$template->set_var('DEV_INFOS_DISABLED', $checked);
513
    	$template->set_var(array(
514
				'DEV_INFOS_DISABLED' => $checked,
515
				'DEV_INFOS_ENABLED' => '',
516
				));
467 517
	}
468 518

  
469 519
	// Work-out if manage sections feature is enabled
470 520
	if(MANAGE_SECTIONS)
471 521
	{
472
		$template->set_var('MANAGE_SECTIONS_ENABLED', $checked);
522
    	$template->set_var(array(
523
				'MANAGE_SECTIONS_ENABLED' => $checked,
524
				'MANAGE_SECTIONS_DISABLED' => '',
525
				));
473 526
	} else {
474
		$template->set_var('MANAGE_SECTIONS_DISABLED', $checked);
527
    	$template->set_var(array(
528
				'MANAGE_SECTIONS_DISABLED' => $checked,
529
				'MANAGE_SECTIONS_ENABLED' => '',
530
				));
475 531
	}
476 532

  
477 533
	// Work-out which wbmailer routine should be checked
......
521 577
	// Work-out if intro feature is enabled
522 578
	if(INTRO_PAGE)
523 579
	{
524
		$template->set_var('INTRO_PAGE_ENABLED', $checked);
580
    	$template->set_var(array(
581
				'INTRO_PAGE_ENABLED' => $checked,
582
				'INTRO_PAGE_DISABLED' => '',
583
				));
525 584
	} else {
526
		$template->set_var('INTRO_PAGE_DISABLED', $checked);
585
    	$template->set_var(array(
586
				'INTRO_PAGE_DISABLED' => $checked,
587
				'INTRO_PAGE_ENABLED' => '',
588
				));
527 589
	}
528 590

  
529 591
	// Work-out if frontend login feature is enabled
530 592
	if(FRONTEND_LOGIN)
531 593
	{
532
		$template->set_var('PRIVATE_ENABLED', $checked);
594
    	$template->set_var(array(
595
				'PRIVATE_ENABLED' => $checked,
596
				'PRIVATE_DISABLED' => '',
597
				));
533 598
	} else {
534
		$template->set_var('PRIVATE_DISABLED', $checked);
599
    	$template->set_var(array(
600
				'PRIVATE_DISABLED' => $checked,
601
				'INTRO_PAGE_ENABLED' => '',
602
				));
535 603
	}
536 604
	// Work-out if frontend login feature is enabled
537 605

  
538 606
	if(CONFIRMED_REGISTRATION)
539 607
	{
540
		$template->set_var('CONFIRMED_REGISTRATION_ENABLED', $checked);
608
    	$template->set_var(array(
609
				'CONFIRMED_REGISTRATION_ENABLED' => $checked,
610
				'CONFIRMED_REGISTRATION_DISABLED' => '',
611
				));
541 612
	} else {
542
		$template->set_var('CONFIRMED_REGISTRATION_DISABLED', $checked);
613
    	$template->set_var(array(
614
				'CONFIRMED_REGISTRATION_DISABLED' => $checked,
615
				'CONFIRMED_REGISTRATION_ENABLED' => '',
616
				));
543 617
	}
544 618

  
545 619
	// Work-out if page trash feature is disabled, in-line, or separate
546 620
	if(PAGE_TRASH == 'disabled')
547 621
	{
548
		$template->set_var('PAGE_TRASH_DISABLED', $checked);
549
		$template->set_var('DISPLAY_PAGE_TRASH_SEPARATE', 'display: none;');
622
//		$template->set_var('PAGE_TRASH_DISABLED', $checked);
623
//		$template->set_var('DISPLAY_PAGE_TRASH_SEPARATE', 'display: none;');
624
    	$template->set_var(array(
625
				'PAGE_TRASH_DISABLED' => $checked,
626
				'PAGE_TRASH_INLINE' => '',
627
				'DISPLAY_PAGE_TRASH_SEPARATE' => 'display: none;',
628
				));
550 629
	} elseif(PAGE_TRASH == 'inline')
551 630
	{
552
		$template->set_var('PAGE_TRASH_INLINE', $checked);
553
		$template->set_var('DISPLAY_PAGE_TRASH_SEPARATE', 'display: none;');
631
//		$template->set_var('PAGE_TRASH_INLINE', $checked);
632
//		$template->set_var('DISPLAY_PAGE_TRASH_SEPARATE', 'display: none;');
633
    	$template->set_var(array(
634
				'PAGE_TRASH_INLINE' => $checked,
635
				'PAGE_TRASH_DISABLED' => '',
636
				'DISPLAY_PAGE_TRASH_SEPARATE' => 'display: none;',
637
				));
554 638
	} elseif(PAGE_TRASH == 'separate')
555 639
	{
556 640
		$template->set_var('PAGE_TRASH_SEPARATE', $checked);
......
560 644
	// Work-out if media home folde feature is enabled
561 645
	if(HOME_FOLDERS)
562 646
	{
563
		$template->set_var('HOME_FOLDERS_ENABLED', $checked);
647
    	$template->set_var(array(
648
				'HOME_FOLDERS_ENABLED' => $checked,
649
				'HOME_FOLDERS_DISABLED' => '',
650
				));
564 651
	} else {
565
		$template->set_var('HOME_FOLDERS_DISABLED', $checked);
652
    	$template->set_var(array(
653
				'HOME_FOLDERS_DISABLED' => $checked,
654
				'HOME_FOLDERS_ENABLED' => '',
655
				));
566 656
	}
567 657

  
568 658
	// Insert search select
569 659
	if(SEARCH == 'private')
570 660
	{
571
		$template->set_var('PRIVATE_SEARCH', $sSelected);
661
    	$template->set_var(array(
662
				'PRIVATE_SEARCH' => $sSelected,
663
				'REGISTERED_SEARCH' => '',
664
				'NONE_SEARCH' => '',
665
				));
666
	} elseif(SEARCH == 'public') {
667
    	$template->set_var(array(
668
				'PRIVATE_SEARCH' => '',
669
				'REGISTERED_SEARCH' => '',
670
				'NONE_SEARCH' => '',
671
				));
572 672
	} elseif(SEARCH == 'registered') {
573
		$template->set_var('REGISTERED_SEARCH', $sSelected);
673
    	$template->set_var(array(
674
				'PRIVATE_SEARCH' => '',
675
				'REGISTERED_SEARCH' => $sSelected,
676
				'NONE_SEARCH' => '',
677
				));
574 678
	} elseif(SEARCH == 'none') {
575
		$template->set_var('NONE_SEARCH', $sSelected);
679
    	$template->set_var(array(
680
				'PRIVATE_SEARCH' => '',
681
				'REGISTERED_SEARCH' => '',
682
				'NONE_SEARCH' => $sSelected,
683
				));
576 684
	}
577 685

  
578 686
	// Work-out if 777 permissions are set
687
	$template->set_var('WORLD_WRITEABLE_SELECTED', '');
579 688
	if(STRING_FILE_MODE == '0777' AND STRING_DIR_MODE == '0777')
580 689
	{
581 690
		$template->set_var('WORLD_WRITEABLE_SELECTED', $checked);

Also available in: Unified diff