aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/contacts.php6
-rw-r--r--mod/profile.php7
-rw-r--r--mod/settings.php20
3 files changed, 26 insertions, 7 deletions
diff --git a/mod/contacts.php b/mod/contacts.php
index 2ed7f198e..4baa2d2d7 100644
--- a/mod/contacts.php
+++ b/mod/contacts.php
@@ -58,7 +58,7 @@ function contacts_post(&$a) {
return;
}
}
-logger('contact_edit ' . print_r($_POST,true));
+
$priority = intval($_POST['poll']);
if($priority == (-1))
@@ -269,7 +269,7 @@ function contacts_content(&$a) {
'$lbl_rep2' => t('Occasionally your friends may wish to inquire about this person\'s online legitimacy.'),
'$lbl_rep3' => t('You may help them choose whether or not to interact with this person by providing a <em>reputation</em> to guide them.'),
'$lbl_rep4' => t('Please take a moment to elaborate on this selection if you feel it could be helpful to others.'),
- '$visit' => t('Visit $name\'s profile'),
+ '$visit' => sprintf( t('Visit %s\'s profile [%s]'),$r[0]['name'],$r[0]['url']),
'$blockunblock' => t('Block/Unblock contact'),
'$ignorecont' => t('Ignore contact'),
'$altcrepair' => t('Repair contact URL settings'),
@@ -384,7 +384,7 @@ function contacts_content(&$a) {
$o .= replace_macros($tpl, array(
- '$img_hover' => t('Visit $username\'s profile'),
+ '$img_hover' => sprintf( t('Visit %s\'s profile [%s]'),$rr['name'],$rr['url']),
'$edit_hover' => t('Edit contact'),
'$id' => $rr['id'],
'$alt_text' => $alt_text,
diff --git a/mod/profile.php b/mod/profile.php
index b80feab34..52551c45f 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -241,12 +241,13 @@ function profile_content(&$a, $update = 0) {
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`network`, `contact`.`rel`,
`contact`.`thumb`, `contact`.`self`, `contact`.`writable`,
`contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
- FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
+ FROM `item`, (SELECT `p`.`id`,`p`.`created` FROM `item` AS `p` WHERE `p`.`parent` = `p`.`id`) AS `parentitem`, `contact`
WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
+ AND `contact`.`id` = `item`.`contact-id`
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
- AND `item`.`parent` IN ( %s )
+ AND `item`.`parent` = `parentitem`.`id` AND `item`.`parent` IN ( %s )
$sql_extra
- ORDER BY `parent` DESC, `gravity` ASC, `item`.`id` ASC ",
+ ORDER BY `parentitem`.`created` DESC, `gravity` ASC, `item`.`created` ASC ",
intval($a->profile['profile_uid']),
dbesc($parents_str)
);
diff --git a/mod/settings.php b/mod/settings.php
index 055042916..f898f171c 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -111,6 +111,22 @@ function settings_post(&$a) {
intval($mail_pubmail),
intval(local_user())
);
+ $r = q("SELECT * FROM `mailacct` WHERE `uid` = %d LIMIT 1",
+ intval(local_user())
+ );
+ if(count($r)) {
+ $eacct = $r[0];
+ require_once('include/email.php');
+ $mb = construct_mailbox_name($eacct);
+ if(strlen($eacct['server'])) {
+ $dcrpass = '';
+ openssl_private_decrypt(hex2bin($eacct['pass']),$dcrpass,$a->user['prvkey']);
+ $mbox = email_connect($mb,$mail_user,$dcrpass);
+ unset($dcrpass);
+ if(! $mbox)
+ notice( t('Failed to connect with email account using the settings provided.') . EOL);
+ }
+ }
}
$notify = 0;
@@ -308,7 +324,7 @@ function settings_content(&$a) {
$mail_user = ((count($r)) ? $r[0]['user'] : '');
$mail_replyto = ((count($r)) ? $r[0]['reply_to'] : '');
$mail_pubmail = ((count($r)) ? $r[0]['pubmail'] : 0);
-
+ $mail_chk = ((count($r)) ? $r[0]['last_check'] : '0000-00-00 00:00:00');
$pageset_tpl = get_markup_template('pagetypes.tpl');
$pagetype = replace_macros($pageset_tpl,array(
@@ -484,6 +500,8 @@ function settings_content(&$a) {
'$lbl_imap6' => t("Reply-to address \x28Optional\x29:"),
'$imap_replyto' => $mail_replyto,
'$lbl_imap7' => t('Send public posts to all email contacts:'),
+ '$lbl_imap8' => t('Last successful email check:'),
+ '$lbl_imap9' => (($mail_chk === '0000-00-00 00:00:00') ? t('never') : datetime_convert('UTC', date_default_timezone_get(), $mail_chk, t('g A l F d Y'))),
'$pubmail_checked' => (($mail_pubmail) ? ' checked="checked" ' : ''),
'$mail_disabled' => (($mail_disabled) ? '<div class="info-message">' . t('Email access is disabled on this site.') . '</div>' : ''),
'$imap_disabled' => $imap_disabled