preserve expiration when editing
This commit is contained in:
parent
8c80589b5a
commit
f104b4dc27
@ -218,7 +218,7 @@ class Item extends BaseObject {
|
||||
'isotime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'c'),
|
||||
'localtime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'r'),
|
||||
'editedtime' => (($item['edited'] != $item['created']) ? sprintf( t('last edited: %s'), datetime_convert('UTC', date_default_timezone_get(), $item['edited'], 'r')) : ''),
|
||||
'expiretime' => (($item['expires'] > 0) ? sprintf( t('Expires: %s'), datetime_convert('UTC', date_default_timezone_get(), $item['expires'], 'r')):''),
|
||||
'expiretime' => (($item['expires'] !== '0000-00-00 00:00:00') ? sprintf( t('Expires: %s'), datetime_convert('UTC', date_default_timezone_get(), $item['expires'], 'r')):''),
|
||||
'lock' => $lock,
|
||||
'verified' => $verified,
|
||||
'unverified' => $unverified,
|
||||
|
@ -687,6 +687,7 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional', $
|
||||
'isotime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'c'),
|
||||
'localtime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'r'),
|
||||
'editedtime' => (($item['edited'] != $item['created']) ? sprintf( t('last edited: %s'), datetime_convert('UTC', date_default_timezone_get(), $item['edited'], 'r')) : ''),
|
||||
'expiretime' => (($item['expires'] !== '0000-00-00 00:00:00') ? sprintf( t('Expires: %s'), datetime_convert('UTC', date_default_timezone_get(), $item['expires'], 'r')):''),
|
||||
'location' => $location,
|
||||
'indent' => '',
|
||||
'owner_name' => $owner_name,
|
||||
|
@ -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'),
|
||||
));
|
||||
|
Reference in New Issue
Block a user