~ubuntu-branches/debian/jessie/phpldapadmin/jessie

« back to all changes in this revision

Viewing changes to lib/config_default.php

  • Committer: Bazaar Package Importer
  • Author(s): Fabio Tranchitella
  • Date: 2009-03-16 14:54:15 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090316145415-7dsvj319dd02h83j
Tags: 1.1.0.6-1
* New upstream release. (Closes: #518578)
* debian/rules: removed "-m 644" from the dh_install call. (Closes: #518847)
* debian/postrm: remove config.php at purge time. (Closes: #519086)
* debian/patches/hungarian.dpatch: fixed a hungarian translation.
  (Closes: #505559)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
 
// $Header: /cvsroot/phpldapadmin/phpldapadmin/lib/config_default.php,v 1.27.2.7 2008/01/30 11:16:02 wurley Exp $
 
2
// $Header: /cvsroot/phpldapadmin/phpldapadmin/lib/config_default.php,v 1.27.2.9 2008/12/12 12:20:22 wurley Exp $
3
3
 
4
4
/**
5
5
 * Configuration processing and defaults.
84
84
                        'desc'=>'Array of attributes that should show a the time when showing the jscalendar',
85
85
                        'default'=>array(''));
86
86
 
 
87
                $this->default->appearance['disable_default_template'] = array(
 
88
                        'desc'=>'Disabled the Default Template',
 
89
                        'default'=>false);
 
90
 
87
91
                $this->default->appearance['hide_debug_info'] = array(
88
92
                        'desc'=>'Hide the features that may provide sensitive debugging information to the browser',
89
93
                        'default'=>true);
508
512
 
509
513
                if (! isset($config[$key]))
510
514
                        error(sprintf('A call was made in [%s] to GetValue requesting [%s] that isnt predefined.',
511
 
                                basename($_SERVER['PHP_SELF']),$key),'error',true);
 
515
                                basename($_SERVER['PHP_SELF']),$key),'error',null,true);
512
516
 
513
517
                if (! isset($config[$key][$index]))
514
 
                        error(sprintf('Requesting an index [%s] in key [%s] that isnt predefined.',$index,$key),'error',true);
 
518
                        error(sprintf('Requesting an index [%s] in key [%s] that isnt predefined.',$index,$key),'error',null,true);
515
519
 
516
520
                return isset($config[$key][$index]['value']) ? $config[$key][$index]['value'] : $config[$key][$index]['default'];
517
521
        }
526
530
                                if (isset($this->default->$masterkey)) {
527
531
 
528
532
                                        if (! is_array($masterdetails))
529
 
                                                error(sprintf('Error in configuration file, [%s] should be an ARRAY.',$masterdetails),'error',true);
 
533
                                                error(sprintf('Error in configuration file, [%s] should be an ARRAY.',$masterdetails),'error',null,true);
530
534
 
531
535
                                        foreach ($masterdetails as $key => $value) {
532
536
                                                # Test that the key is correct.
533
537
                                                if (! in_array($key,array_keys($this->default->$masterkey)))
534
 
                                                        error(sprintf('Error in configuration file, [%s] has not been defined as a configurable variable.',$key),'error',true);
 
538
                                                        error(sprintf('Error in configuration file, [%s] has not been defined as a configurable variable.',$key),'error',null,true);
535
539
 
536
540
                                                # Test if its should be an array or not.
537
541
                                                if (is_array($this->default->{$masterkey}[$key]['default']) && ! is_array($value))
538
 
                                                        error(sprintf('Error in configuration file, %s[\'%s\'] SHOULD be an array of values.',$masterkey,$key),'error',true);
 
542
                                                        error(sprintf('Error in configuration file, %s[\'%s\'] SHOULD be an array of values.',$masterkey,$key),'error',null,true);
539
543
 
540
544
                                                if (! is_array($this->default->{$masterkey}[$key]['default']) && is_array($value))
541
 
                                                        error(sprintf('Error in configuration file, %s[\'%s\'] should NOT be an array of values.',$masterkey,$key),'error',true);
 
545
                                                        error(sprintf('Error in configuration file, %s[\'%s\'] should NOT be an array of values.',$masterkey,$key),'error',null,true);
542
546
                                        }
543
547
 
544
548
                                } else {
545
 
                                        error(sprintf('Error in configuration file, [%s] has not been defined as a MASTER configurable variable.',$masterkey),'error',true);
 
549
                                        error(sprintf('Error in configuration file, [%s] has not been defined as a MASTER configurable variable.',$masterkey),'error',null,true);
546
550
                                }
547
551
                        }
548
552
                }