aboutsummaryrefslogtreecommitdiffstats
path: root/mod/editpost.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-01-27 23:49:42 -0800
committerfriendica <info@friendica.com>2014-01-27 23:49:42 -0800
commitf104b4dc275891785ec03abd779d8aafe5163815 (patch)
tree69ea6813ba12817d2bf077a0e5a47f00ed8edeae /mod/editpost.php
parent8c80589b5ab196287788ff385733dec1df005044 (diff)
downloadvolse-hubzilla-f104b4dc275891785ec03abd779d8aafe5163815.tar.gz
volse-hubzilla-f104b4dc275891785ec03abd779d8aafe5163815.tar.bz2
volse-hubzilla-f104b4dc275891785ec03abd779d8aafe5163815.zip
preserve expiration when editing
Diffstat (limited to 'mod/editpost.php')
-rw-r--r--mod/editpost.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/mod/editpost.php b/mod/editpost.php
index 7cc33d60d..918a70d36 100644
--- a/mod/editpost.php
+++ b/mod/editpost.php
@@ -92,6 +92,11 @@ function editpost_content(&$a) {
}
+ $cipher = get_pconfig(get_app()->profile['profile_uid'],'system','default_cipher');
+ if(! $cipher)
+ $cipher = 'aes256';
+
+
$o .= replace_macros($tpl,array(
'$return_path' => $_SESSION['return_url'],
'$action' => 'item',
@@ -128,11 +133,12 @@ function editpost_content(&$a) {
'$jotplugins' => $jotplugins,
'$sourceapp' => t($a->sourcename),
'$catsenabled' => $catsenabled,
- '$defexpire' => $itm[0]['expires'],
- '$feature_expire' => 'none',
+ '$defexpire' => datetime_convert('UTC', date_default_timezone_get(),$itm[0]['expires']),
+ '$feature_expire' => ((feature_enabled(get_app()->profile['profile_uid'],'content_expire') && (! $webpage)) ? 'block' : 'none'),
'$expires' => t('Set expiration date'),
- '$feature_encrypt' => 'none',
+ '$feature_encrypt' => ((feature_enabled(get_app()->profile['profile_uid'],'content_encrypt') && (! $webpage)) ? 'block' : 'none'),
'$encrypt' => t('Encrypt text'),
+ '$cipher' => $cipher,
'$expiryModalOK' => t('OK'),
'$expiryModalCANCEL' => t('Cancel'),
));