aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/editblock.php3
-rw-r--r--mod/editlayout.php3
-rw-r--r--mod/editpost.php6
-rw-r--r--mod/editwebpage.php4
-rw-r--r--mod/item.php8
-rw-r--r--mod/message.php6
6 files changed, 22 insertions, 8 deletions
diff --git a/mod/editblock.php b/mod/editblock.php
index a111f6666..9c691640b 100644
--- a/mod/editblock.php
+++ b/mod/editblock.php
@@ -144,6 +144,9 @@ function editblock_content(&$a) {
'$preview' => ((feature_enabled(local_user(),'preview')) ? t('Preview') : ''),
'$jotplugins' => $jotplugins,
'$sourceapp' => t($a->sourcename),
+ '$defexpire' => '',
+ '$feature_expire' => 'none',
+ '$expires' => t('Set expiration date'),
));
diff --git a/mod/editlayout.php b/mod/editlayout.php
index 7bcd02512..f8906d981 100644
--- a/mod/editlayout.php
+++ b/mod/editlayout.php
@@ -129,6 +129,9 @@ function editlayout_content(&$a) {
'$preview' => ((feature_enabled(local_user(),'preview')) ? t('Preview') : ''),
'$jotplugins' => $jotplugins,
'$sourceapp' => t($a->sourcename),
+ '$defexpire' => '',
+ '$feature_expire' => 'none',
+ '$expires' => t('Set expiration date'),
));
$ob = get_observer_hash();
diff --git a/mod/editpost.php b/mod/editpost.php
index 161e8f301..81eef2782 100644
--- a/mod/editpost.php
+++ b/mod/editpost.php
@@ -48,7 +48,8 @@ function editpost_content(&$a) {
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
'$ispublic' => '&nbsp;', // t('Visible to <strong>everybody</strong>'),
'$geotag' => $geotag,
- '$nickname' => $channel['channel_address']
+ '$nickname' => $channel['channel_address'],
+ '$expireswhen' => t('Expires YYYY-MM-DD HH:MM'),
));
@@ -126,6 +127,9 @@ function editpost_content(&$a) {
'$jotplugins' => $jotplugins,
'$sourceapp' => t($a->sourcename),
'$catsenabled' => $catsenabled,
+ '$defexpire' => $itm[0]['expires'],
+ '$feature_expire' => 'none',
+ '$expires' => t('Set expiration date'),
));
return $o;
diff --git a/mod/editwebpage.php b/mod/editwebpage.php
index 44ac0bc85..5a21aa78d 100644
--- a/mod/editwebpage.php
+++ b/mod/editwebpage.php
@@ -150,6 +150,10 @@ function editwebpage_content(&$a) {
'$preview' => ((feature_enabled(local_user(),'preview')) ? t('Preview') : ''),
'$jotplugins' => $jotplugins,
'$sourceapp' => t($a->sourcename),
+ '$defexpire' => '',
+ '$feature_expire' => 'none',
+ '$expires' => t('Set expiration date'),
+
));
$ob = get_observer_hash();
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';
}
diff --git a/mod/message.php b/mod/message.php
index e31d903a7..dbbe8836b 100644
--- a/mod/message.php
+++ b/mod/message.php
@@ -324,7 +324,8 @@ function message_content(&$a) {
'$insert' => t('Insert web link'),
'$wait' => t('Please wait'),
'$submit' => t('Submit'),
- '$expires' => t('Expires: (leave blank for never)')
+ '$expires' => t('Expires: (leave blank for never)'),
+ '$feature_expire' => ((feature_enabled(local_user(),'content_expire')) ? '1' : ''),
));
return $o;
@@ -499,7 +500,8 @@ function message_content(&$a) {
'$insert' => t('Insert web link'),
'$submit' => t('Submit'),
'$wait' => t('Please wait'),
- '$expires' => t('Expires: (leave blank for never)')
+ '$expires' => t('Expires: (leave blank for never)'),
+ '$feature_expire' => ((feature_enabled(local_user(),'content_expire')) ? '1' : ''),
));
return $o;