include channel clones in PM deliveries (also some whitespace edits)

This commit is contained in:
friendica 2015-01-08 16:02:15 -08:00
parent 1a67c55f28
commit aa490a39bb
4 changed files with 18 additions and 17 deletions

View File

@ -3183,7 +3183,7 @@ function mail_store($arr) {
$arr['account_id'] = ((x($arr,'account_id')) ? intval($arr['account_id']) : 0); $arr['account_id'] = ((x($arr,'account_id')) ? intval($arr['account_id']) : 0);
$arr['mid'] = ((x($arr,'mid')) ? notags(trim($arr['mid'])) : random_string()); $arr['mid'] = ((x($arr,'mid')) ? notags(trim($arr['mid'])) : random_string());
$arr['from_xchan'] = ((x($arr,'from_xchan')) ? notags(trim($arr['from_xchan'])) : ''); $arr['from_xchan'] = ((x($arr,'from_xchan')) ? notags(trim($arr['from_xchan'])) : '');
$arr['to_xchan'] = ((x($arr,'to_xchan')) ? notags(trim($arr['to_xchan'])) : ''); $arr['to_xchan'] = ((x($arr,'to_xchan')) ? notags(trim($arr['to_xchan'])) : '');
$arr['created'] = ((x($arr,'created') !== false) ? datetime_convert('UTC','UTC',$arr['created']) : datetime_convert()); $arr['created'] = ((x($arr,'created') !== false) ? datetime_convert('UTC','UTC',$arr['created']) : datetime_convert());
$arr['expires'] = ((x($arr,'expires') !== false) ? datetime_convert('UTC','UTC',$arr['expires']) : NULL_DATE); $arr['expires'] = ((x($arr,'expires') !== false) ? datetime_convert('UTC','UTC',$arr['expires']) : NULL_DATE);
$arr['title'] = ((x($arr,'title')) ? notags(trim($arr['title'])) : ''); $arr['title'] = ((x($arr,'title')) ? notags(trim($arr['title'])) : '');

View File

@ -165,6 +165,7 @@ function notifier_run($argv, $argc){
} }
xchan_mail_query($message[0]); xchan_mail_query($message[0]);
$uid = $message[0]['channel_id']; $uid = $message[0]['channel_id'];
$recipients[] = $message[0]['from_xchan']; // include clones
$recipients[] = $message[0]['to_xchan']; $recipients[] = $message[0]['to_xchan'];
$item = $message[0]; $item = $message[0];

View File

@ -6,8 +6,8 @@ require_once("include/smarty.php");
/** /**
* This is our template processor * This is our template processor
* *
* @param string|FriendicaSmarty $s the string requiring macro substitution, * @param string|FriendicaSmarty $s the string requiring macro substitution,
* or an instance of FriendicaSmarty * or an instance of FriendicaSmarty
* @param array $r key value pairs (search => replace) * @param array $r key value pairs (search => replace)
* @return string substituted string * @return string substituted string
@ -17,10 +17,10 @@ function replace_macros($s,$r) {
$arr = array('template' => $s, 'params' => $r); $arr = array('template' => $s, 'params' => $r);
call_hooks('replace_macros', $arr); call_hooks('replace_macros', $arr);
$t = $a->template_engine(); $t = $a->template_engine();
$output = $t->replace_macros($arr['template'],$arr['params']); $output = $t->replace_macros($arr['template'],$arr['params']);
return $output; return $output;
} }
@ -40,7 +40,7 @@ function random_string($size = 64,$type = RANDOM_STRING_HEX) {
} }
/** /**
* This is our primary input filter. * This is our primary input filter.
* *
* The high bit hack only involved some old IE browser, forget which (IE5/Mac?) * The high bit hack only involved some old IE browser, forget which (IE5/Mac?)
* that had an XSS attack vector due to stripping the high-bit on an 8-bit character * that had an XSS attack vector due to stripping the high-bit on an 8-bit character
@ -105,7 +105,7 @@ function z_input_filter($channel_id,$s,$type = 'text/bbcode') {
return purify_html($s); return purify_html($s);
return escape_tags($s); return escape_tags($s);
} }
@ -316,23 +316,23 @@ function paginate(&$a) {
if($a->pager['total'] > $a->pager['itemspage']) { if($a->pager['total'] > $a->pager['itemspage']) {
$o .= '<div class="pager">'; $o .= '<div class="pager">';
if($a->pager['page'] != 1) if($a->pager['page'] != 1)
$o .= '<span class="pager_prev">'."<a href=\"$url".'&page='.($a->pager['page'] - 1).'">' . t('prev') . '</a></span> '; $o .= '<span class="pager_prev">'."<a href=\"$url".'&page='.($a->pager['page'] - 1).'">' . t('prev') . '</a></span> ';
$o .= "<span class=\"pager_first\"><a href=\"$url"."&page=1\">" . t('first') . "</a></span> "; $o .= "<span class=\"pager_first\"><a href=\"$url"."&page=1\">" . t('first') . "</a></span> ";
$numpages = $a->pager['total'] / $a->pager['itemspage']; $numpages = $a->pager['total'] / $a->pager['itemspage'];
$numstart = 1; $numstart = 1;
$numstop = $numpages; $numstop = $numpages;
if($numpages > 14) { if($numpages > 14) {
$numstart = (($pagenum > 7) ? ($pagenum - 7) : 1); $numstart = (($pagenum > 7) ? ($pagenum - 7) : 1);
$numstop = (($pagenum > ($numpages - 7)) ? $numpages : ($numstart + 14)); $numstop = (($pagenum > ($numpages - 7)) ? $numpages : ($numstart + 14));
} }
for($i = $numstart; $i <= $numstop; $i++){ for($i = $numstart; $i <= $numstop; $i++){
if($i == $a->pager['page']) if($i == $a->pager['page'])
$o .= '<span class="pager_current">'.(($i < 10) ? '&nbsp;'.$i : $i); $o .= '<span class="pager_current">'.(($i < 10) ? '&nbsp;'.$i : $i);
else else
$o .= "<span class=\"pager_n\"><a href=\"$url"."&page=$i\">".(($i < 10) ? '&nbsp;'.$i : $i)."</a>"; $o .= "<span class=\"pager_n\"><a href=\"$url"."&page=$i\">".(($i < 10) ? '&nbsp;'.$i : $i)."</a>";
@ -350,7 +350,7 @@ function paginate(&$a) {
$lastpage = (($numpages > intval($numpages)) ? intval($numpages)+1 : $numpages); $lastpage = (($numpages > intval($numpages)) ? intval($numpages)+1 : $numpages);
$o .= "<span class=\"pager_last\"><a href=\"$url"."&page=$lastpage\">" . t('last') . "</a></span> "; $o .= "<span class=\"pager_last\"><a href=\"$url"."&page=$lastpage\">" . t('last') . "</a></span> ";
if(($a->pager['total'] - ($a->pager['itemspage'] * $a->pager['page'])) > 0) if(($a->pager['total'] - ($a->pager['itemspage'] * $a->pager['page'])) > 0)
$o .= '<span class="pager_next">'."<a href=\"$url"."&page=".($a->pager['page'] + 1).'">' . t('next') . '</a></span>'; $o .= '<span class="pager_next">'."<a href=\"$url"."&page=".($a->pager['page'] + 1).'">' . t('next') . '</a></span>';
$o .= '</div>'."\r\n"; $o .= '</div>'."\r\n";
} }

View File

@ -1 +1 @@
2015-01-07.912 2015-01-08.913