diff options
Diffstat (limited to 'mod/item.php')
-rw-r--r-- | mod/item.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/mod/item.php b/mod/item.php index 218e9c174..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'; } @@ -411,7 +409,7 @@ function item_post(&$a) { * owner from seeing it. This is because the permissions may not yet have been * set for the post. If it's private, the photo permissions should be set * appropriately. But we didn't know the final permissions on the post until - * now. So now we'll look for links of uploaded messages that are in the + * now. So now we'll look for links of uploaded photos and attachments that are in the * post and set them to the same permissions as the post itself. * */ |