From a826a9c81a8d00658d7a5386f8997280b73d1e52 Mon Sep 17 00:00:00 2001 From: Shish Date: Mon, 19 Mar 2012 10:25:36 +0000 Subject: [PATCH] expiration only applies without niceurls --- ext/image/main.php | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/ext/image/main.php b/ext/image/main.php index ffaecc5a..a82c7b78 100644 --- a/ext/image/main.php +++ b/ext/image/main.php @@ -241,6 +241,8 @@ class ImageIO extends Extension { } public function onSetupBuilding(SetupBuildingEvent $event) { + global $config; + $sb = new SetupBlock("Image Options"); $sb->position = 30; // advanced only @@ -251,15 +253,17 @@ class ImageIO extends Extension { if(function_exists("exif_read_data")) { $sb->add_bool_option("image_show_meta", "
Show metadata: "); } - - $expires = array(); - $expires['1 Minute'] = 60; - $expires['1 Hour'] = 3600; - $expires['1 Day'] = 86400; - $expires['1 Month (31 days)'] = 2678400; //(60*60*24*31) - $expires['1 Year'] = 31536000; // 365 days (60*60*24*365) - $expires['Never'] = 3153600000; // 100 years.. - $sb->add_choice_option("image_expires", $expires, "
Image Expiration: "); + + if(!$config->get_bool("nice_urls")) { + $expires = array(); + $expires['1 Minute'] = 60; + $expires['1 Hour'] = 3600; + $expires['1 Day'] = 86400; + $expires['1 Month (31 days)'] = 2678400; //(60*60*24*31) + $expires['1 Year'] = 31536000; // 365 days (60*60*24*365) + $expires['Never'] = 3153600000; // 100 years.. + $sb->add_choice_option("image_expires", $expires, "
Image Expiration: "); + } $event->panel->add_block($sb);