From e10f863f1c90a787909e48c72b909ee2f337e65b Mon Sep 17 00:00:00 2001 From: Daku Date: Wed, 25 Jan 2012 03:25:13 +0000 Subject: [PATCH] fixed problem with random image tab not showing popular by day/month/year should only show if ext is enabled --- themes/danbooru/layout.class.php | 4 ++-- themes/lite/layout.class.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/themes/danbooru/layout.class.php b/themes/danbooru/layout.class.php index 55e58893..db350f14 100644 --- a/themes/danbooru/layout.class.php +++ b/themes/danbooru/layout.class.php @@ -140,10 +140,10 @@ class Layout { # be nice to be correct case "post": case "upload": - $custom_sublinks .= "
  • Popular by Day/Month/Year
  • "; + if(file_exists("ext/numeric_score")){ $custom_sublinks .= "
  • Popular by Day/Month/Year
  • ";} $custom_sublinks .= "
  • All
  • "; $custom_sublinks .= "
  • My Favorites
  • "; - if(class_exists("random_image")) $custom_sublinks .= "
  • Random Image
  • "; + if(file_exists("ext/random_image")){ $custom_sublinks .= "
  • Random Image
  • ";} if($hw){ $custom_sublinks .= "
  • Help
  • "; }else{ $custom_sublinks .= "
  • Help
  • ";} break; diff --git a/themes/lite/layout.class.php b/themes/lite/layout.class.php index 6dbf16c2..6532aa2a 100644 --- a/themes/lite/layout.class.php +++ b/themes/lite/layout.class.php @@ -94,11 +94,11 @@ class Layout { # the subnav links aren't shown, but it would # be nice to be correct case "post": - $cs .= "Popular by Day/Month/Year "; + if(file_exists("ext/numeric_score")){ $cs .= "Popular by Day/Month/Year ";} $cs .= "All"; $cs .= "My Favorites"; $cs .= "Feed"; - if(class_exists("random_image")) $cs .= "Random Image"; + if(file_exists("ext/random_image")){ $cs .= "Random Image";} if($hw){ $cs .= "Help"; }else{ $cs .= "Help";} break;