aboutsummaryrefslogtreecommitdiffstats
path: root/mod/item.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-11-07 00:47:50 -0800
committerfriendica <info@friendica.com>2013-11-07 00:47:50 -0800
commit7381326b7a7a271da52464d15774a1309adb2bd5 (patch)
tree3427097b3dc93977f37c8f0b1b49eabc37160611 /mod/item.php
parentdf4c9171207065f32db52c910f86e5ef277eaa1f (diff)
downloadvolse-hubzilla-7381326b7a7a271da52464d15774a1309adb2bd5.tar.gz
volse-hubzilla-7381326b7a7a271da52464d15774a1309adb2bd5.tar.bz2
volse-hubzilla-7381326b7a7a271da52464d15774a1309adb2bd5.zip
provide expire feature on post and comments as well as private messages. This requires a feature setting and is currently unmaskable - if the author says it's gone, there's not a lot you can do to stop it or try and save it. It's gone.
Diffstat (limited to 'mod/item.php')
-rw-r--r--mod/item.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/mod/item.php b/mod/item.php
index 2b8de1247..be24d242c 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -327,11 +327,9 @@ function item_post(&$a) {
$expires = '0000-00-00 00:00:00';
- if(feature_enabled($profile_uid,'expire')) {
- // expire_quantity, e.g. '3'
- // expire_units, e.g. days, weeks, months
- if(x($_REQUEST,'expire_quantity') && (x($_REQUEST,'expire_units'))) {
- $expire = datetime_convert('UTC','UTC', 'now + ' . $_REQUEST['expire_quantity'] . ' ' . $_REQUEST['expire_units']);
+ if(feature_enabled($profile_uid,'content_expire')) {
+ if(x($_REQUEST,'expire')) {
+ $expires = datetime_convert(date_default_timezone_get(),'UTC', $_REQUEST['expire']);
if($expires <= datetime_convert())
$expires = '0000-00-00 00:00:00';
}