Fix IMGDIR/CSSDIR when no config.php yet and creating setting to disable remoteurls for sflogo

This commit is contained in:
Deon George 2009-07-25 18:01:05 +10:00
parent a1cfa2f60c
commit 869b9be7e9
3 changed files with 12 additions and 2 deletions

View File

@ -107,6 +107,10 @@ class Config {
'desc'=>'Group DN, where membership will exempt the users from readonly attrs',
'default'=>null);
$this->default->appearance['remoteurls'] = array(
'desc'=>'Whether to include renders for remote URLs',
'default'=>true);
$this->default->appearance['timezone'] = array(
'desc'=>'Define our timezone, if not defined in php.ini',
'default'=>null);

View File

@ -2518,7 +2518,7 @@ function get_href($type,$extra_info='') {
case 'forum':
return sprintf('%s/mailarchive/forum.php?forum_name=%s',$sf,$forum_id);
case 'logo':
return sprintf('http://sflogo.sourceforge.net/sflogo.php?group_id=%s&type=8',$group_id);
return isset($_SESSION) && ! $_SESSION[APPCONFIG]->getValue('appearance','remoteurls') ? '' : sprintf('http://sflogo.sourceforge.net/sflogo.php?group_id=%s&type=8',$group_id);
case 'sf':
return sprintf('%s/projects/phpldapadmin',$sf);
case 'web':

View File

@ -31,6 +31,12 @@ class page {
if (defined('DEBUG_ENABLED') && DEBUG_ENABLED)
debug_log('Entered with [%s]',129,__FILE__,__LINE__,__METHOD__,$index);
# If we done have a configuration, then our IMGDIR and CSS are not defined
if (! defined('IMGDIR'))
define('IMGDIR','images/default');
if (! defined('CSSDIR'))
define('CSSDIR','css/default');
$this->index = $index;
# To be defined in a configuration file.
@ -324,7 +330,7 @@ class page {
printf('<tr class="foot"><td><small>%s</small></td><td colspan=2><div id="ajFOOT">%s</div>%s</td></tr>',
isCompress() ? '[C]' : '&nbsp;',
app_version(),
sprintf('<a href="%s"><img src="%s" border="0" alt="SourceForge.net Logo" /></a>',get_href('sf'),get_href('logo')));
get_href('logo') ? sprintf('<a href="%s"><img src="%s" border="0" alt="SourceForge.net Logo" /></a>',get_href('sf'),get_href('logo')) : '&nbsp;');
}
/**