Add »quarter« (3 x 1 Month = 90 days) as available expiration time.
This option is disabled by default.
Refs #87
* 'year': file available for one year
* 'none': unlimited availability
*/
-$cfg['availabilities'] = array ('minute' => true,
- 'hour' => true,
- 'day' => true,
- 'week' => true,
- 'month' => true,
- 'year' => false,
- 'none' => false);
+$cfg['availabilities'] = array (
+ 'minute' => true,
+ 'hour' => true,
+ 'day' => true,
+ 'week' => true,
+ 'month' => true,
+ 'quarter' => false,
+ 'year' => false,
+ 'none' => false
+);
/* Set a default value for the expiration time.
* The value has to equal one of the enabled options in »availabilities«, e.g. »month«)
*/
d.setSeconds (d.getSeconds() + 2419200);
return true;
}
+ if (time == 'quarter')
+ {
+ d.setSeconds (d.getSeconds() + 7257600);
+ return true;
+ }
if (time == 'year')
{
d.setSeconds (d.getSeconds() + 29030400);
"One day": "",
"One week": "",
"One month": "",
+ "One quarter": "",
"One year": "",
"None": "",
"Upload password": "",
define ('JIRAFEAU_DAY', 86400); // JIRAFEAU_HOUR * 24
define ('JIRAFEAU_WEEK', 604800); // JIRAFEAU_DAY * 7
define ('JIRAFEAU_MONTH', 2419200); // JIRAFEAU_WEEK * 4
+define ('JIRAFEAU_QUARTER', 7257600); // JIRAFEAU_MONTH * 3
define ('JIRAFEAU_YEAR', 29030400); // JIRAFEAU_MONTH * 12
?>
case 'month':
$time += JIRAFEAU_MONTH;
break;
+ case 'quarter':
+ $time += JIRAFEAU_QUARTER;
+ break;
case 'year':
$time += JIRAFEAU_YEAR;
break;
case 'month':
$time += JIRAFEAU_MONTH;
break;
+ case 'quarter':
+ $time += JIRAFEAU_QUARTER;
+ break;
case 'year':
$time += JIRAFEAU_YEAR;
break;