DarkTexas 🦄
Chevereto Member
Hi!
I've changed according to this answer by @Rodolfo (THREAD) I have changed my app/lib/classes/class.image.php to:
However, when a User does register themself and uploads a image the expire time (for the upload, checked via PHPMyAdmin) is set to NULL unless the user goes into their settings and hits "Save", where all 3 options are available. Without changing anything but pressing "Save" the next upload does have a expire time.
Is that a bug or do I need to do something else?
I've changed according to this answer by @Rodolfo (THREAD) I have changed my app/lib/classes/class.image.php to:
Code:
public static function getAvailableExpirations()
{
$string = _s('After %n %t');
$translate = [ // Just for gettext parsing
'minute' => _n('minute', 'minutes', 1),
'hour' => _n('hour', 'hours', 1),
'day' => _n('day', 'days', 1),
'week' => _n('week', 'weeks', 1),
'month' => _n('month', 'months', 1),
'year' => _n('year', 'years', 1),
];
$table = [
['day', 3],
['day', 7],
['month', 1],
];
foreach ($table as $expire) {
$unit = $expire[0];
$interval_spec = 'P' . (in_array($unit, ['second', 'minute', 'hour']) ? 'T' : null) . $expire[1] . strtoupper($unit[0]);
$return[$interval_spec] = strtr($string, ['%n' => $expire[1], '%t' => _n($unit, $unit . 's', $expire[1])]);
}
return $return;
}
However, when a User does register themself and uploads a image the expire time (for the upload, checked via PHPMyAdmin) is set to NULL unless the user goes into their settings and hits "Save", where all 3 options are available. Without changing anything but pressing "Save" the next upload does have a expire time.
Is that a bug or do I need to do something else?