diff options
author | Evan Prodromou <evan@prodromou.name> | 2008-06-13 11:46:32 -0400 |
---|---|---|
committer | Evan Prodromou <evan@prodromou.name> | 2008-06-13 11:46:32 -0400 |
commit | 59d8b8b199fb7c3d985308b028d8cd358f8d2d6b (patch) | |
tree | 825f7121f754737c30da3d000024082c12284c12 /lib | |
parent | 704155647f044edb88ca05218f04ed8d989aee4f (diff) |
show logo only if file exists, add h1 and h2 to all pages
darcs-hash:20080613154632-84dde-d2eec5c1472d76eb5d3e8eb253b6a3572a8f721b.gz
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util.php | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/util.php b/lib/util.php index e1e508176..4869d4dfd 100644 --- a/lib/util.php +++ b/lib/util.php @@ -178,12 +178,17 @@ function common_show_header($pagetitle, $callable=NULL, $data=NULL, $headercall= common_element_start('div', array('id' => 'wrap')); common_element_start('div', array('id' => 'header')); common_nav_menu(); - common_element_start('a', array('href' => common_local_url('public'))); - common_element('img', array('src' => ($config['site']['logo']) ? - ($config['site']['logo']) : theme_path('logo.png'), - 'alt' => $config['site']['name'], - 'id' => 'logo')); - common_element_end('a'); + if ($config['site']['logo'] || file_exists(theme_file('logo.png'))) { + common_element_start('a', array('href' => common_local_url('public'))); + common_element('img', array('src' => ($config['site']['logo']) ? + ($config['site']['logo']) : theme_path('logo.png'), + 'alt' => $config['site']['name'], + 'id' => 'logo')); + common_element_end('a'); + } + common_element('h1', 'pagetitle', $pagetitle); + common_element('h2', 'sitename', $config['site']['name']); + if ($headercall) { if ($data) { call_user_func($headercall, $data); |