expiration only applies without niceurls

This commit is contained in:
Shish 2012-03-19 10:25:36 +00:00
parent b4c74c5768
commit a826a9c81a

View File

@ -241,6 +241,8 @@ class ImageIO extends Extension {
} }
public function onSetupBuilding(SetupBuildingEvent $event) { public function onSetupBuilding(SetupBuildingEvent $event) {
global $config;
$sb = new SetupBlock("Image Options"); $sb = new SetupBlock("Image Options");
$sb->position = 30; $sb->position = 30;
// advanced only // advanced only
@ -252,6 +254,7 @@ class ImageIO extends Extension {
$sb->add_bool_option("image_show_meta", "<br>Show metadata: "); $sb->add_bool_option("image_show_meta", "<br>Show metadata: ");
} }
if(!$config->get_bool("nice_urls")) {
$expires = array(); $expires = array();
$expires['1 Minute'] = 60; $expires['1 Minute'] = 60;
$expires['1 Hour'] = 3600; $expires['1 Hour'] = 3600;
@ -260,6 +263,7 @@ class ImageIO extends Extension {
$expires['1 Year'] = 31536000; // 365 days (60*60*24*365) $expires['1 Year'] = 31536000; // 365 days (60*60*24*365)
$expires['Never'] = 3153600000; // 100 years.. $expires['Never'] = 3153600000; // 100 years..
$sb->add_choice_option("image_expires", $expires, "<br>Image Expiration: "); $sb->add_choice_option("image_expires", $expires, "<br>Image Expiration: ");
}
$event->panel->add_block($sb); $event->panel->add_block($sb);