From 0ebd4aa78303792a97c111229080224ba1bcf2de Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Thu, 23 Sep 2010 18:33:07 -0700 Subject: [PATCH] per design spec, hide global directory if update url not present --- mod/directory.php | 8 +++++++- view/directory_header.tpl | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mod/directory.php b/mod/directory.php index 6aa890226b..01cb1a3ffb 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -10,10 +10,16 @@ function directory_content(&$a) { $tpl .= load_view_file('view/directory_header.tpl'); - + $globaldir = ''; + $gdirpath = dirname(get_config('system','directory_submit_url')); + if(strlen($gdirpath)) { + $globaldir = ''; + } $o .= replace_macros($tpl, array( '$search' => $search, + '$globaldir' => $globaldir, '$finding' => (strlen($search) ? '

' . t('Finding: ') . "'" . $search . "'" . '

' : "") )); diff --git a/view/directory_header.tpl b/view/directory_header.tpl index ba39236f2f..03eed62b3c 100644 --- a/view/directory_header.tpl +++ b/view/directory_header.tpl @@ -1,6 +1,6 @@

Site Directory

- +$globaldir $finding