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,14 +254,16 @@ class ImageIO extends Extension {
$sb->add_bool_option("image_show_meta", "<br>Show metadata: "); $sb->add_bool_option("image_show_meta", "<br>Show metadata: ");
} }
$expires = array(); if(!$config->get_bool("nice_urls")) {
$expires['1 Minute'] = 60; $expires = array();
$expires['1 Hour'] = 3600; $expires['1 Minute'] = 60;
$expires['1 Day'] = 86400; $expires['1 Hour'] = 3600;
$expires['1 Month (31 days)'] = 2678400; //(60*60*24*31) $expires['1 Day'] = 86400;
$expires['1 Year'] = 31536000; // 365 days (60*60*24*365) $expires['1 Month (31 days)'] = 2678400; //(60*60*24*31)
$expires['Never'] = 3153600000; // 100 years.. $expires['1 Year'] = 31536000; // 365 days (60*60*24*365)
$sb->add_choice_option("image_expires", $expires, "<br>Image Expiration: "); $expires['Never'] = 3153600000; // 100 years..
$sb->add_choice_option("image_expires", $expires, "<br>Image Expiration: ");
}
$event->panel->add_block($sb); $event->panel->add_block($sb);