Only some code beautification.
This commit is contained in:
parent
7cba752f8a
commit
254159cc26
2 changed files with 13 additions and 13 deletions
|
@ -40,14 +40,14 @@ function notify_content(&$a) {
|
|||
return login();
|
||||
|
||||
$notif_tpl = get_markup_template('notifications.tpl');
|
||||
|
||||
|
||||
$not_tpl = get_markup_template('notify.tpl');
|
||||
require_once('include/bbcode.php');
|
||||
|
||||
$r = q("SELECT * from notify where uid = %d and seen = 0 order by date desc",
|
||||
intval(local_user())
|
||||
);
|
||||
|
||||
|
||||
if (count($r) > 0) {
|
||||
foreach ($r as $it) {
|
||||
$notif_content .= replace_macros($not_tpl,array(
|
||||
|
@ -60,7 +60,7 @@ function notify_content(&$a) {
|
|||
} else {
|
||||
$notif_content .= t('No more system notifications.');
|
||||
}
|
||||
|
||||
|
||||
$o .= replace_macros($notif_tpl, array(
|
||||
'$notif_header' => t('System Notifications'),
|
||||
'$tabs' => '', // $tabs,
|
||||
|
|
20
mod/ping.php
20
mod/ping.php
|
@ -5,7 +5,7 @@ require_once("include/datetime.php");
|
|||
function ping_init(&$a) {
|
||||
|
||||
header("Content-type: text/xml");
|
||||
|
||||
|
||||
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>
|
||||
<result>";
|
||||
|
||||
|
@ -69,7 +69,7 @@ function ping_init(&$a) {
|
|||
intval(local_user())
|
||||
);
|
||||
|
||||
if(count($r)) {
|
||||
if(count($r)) {
|
||||
|
||||
$arr = array('items' => $r);
|
||||
call_hooks('network_ping', $arr);
|
||||
|
@ -95,11 +95,11 @@ function ping_init(&$a) {
|
|||
break;
|
||||
case ACTIVITY_FRIEND:
|
||||
$obj = parse_xml_string($xmlhead.$it['object']);
|
||||
$it['fname'] = $obj->title;
|
||||
$it['fname'] = $obj->title;
|
||||
$friends[] = $it;
|
||||
break;
|
||||
default:
|
||||
if ($it['parent']!=$it['id']) {
|
||||
if ($it['parent']!=$it['id']) {
|
||||
$comments[] = $it;
|
||||
} else {
|
||||
if(! $it['wall'])
|
||||
|
@ -121,7 +121,7 @@ function ping_init(&$a) {
|
|||
WHERE `intro`.`uid` = %d AND `intro`.`blocked` = 0 AND `intro`.`ignore` = 0 AND `intro`.`contact-id`!=0",
|
||||
intval(local_user())
|
||||
);
|
||||
|
||||
|
||||
$intro = count($intros1) + count($intros2);
|
||||
$intros = $intros1+$intros2;
|
||||
|
||||
|
@ -135,7 +135,7 @@ function ping_init(&$a) {
|
|||
);
|
||||
if($mails)
|
||||
$mail = $mails[0]['total'];
|
||||
|
||||
|
||||
if ($a->config['register_policy'] == REGISTER_APPROVE && is_site_admin()){
|
||||
$regs = q("SELECT `contact`.`name`, `contact`.`url`, `contact`.`micro`, `register`.`created`, COUNT(*) as `total` FROM `contact` RIGHT JOIN `register` ON `register`.`uid`=`contact`.`uid` WHERE `contact`.`self`=1");
|
||||
if($regs)
|
||||
|
@ -195,7 +195,7 @@ function ping_init(&$a) {
|
|||
xmlify($href), xmlify($name), xmlify($url), xmlify($photo), xmlify($date), xmlify($seen), xmlify($message)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
echo "<intro>$intro</intro>
|
||||
<mail>$mail</mail>
|
||||
<net>$network</net>
|
||||
|
@ -208,7 +208,7 @@ function ping_init(&$a) {
|
|||
<events-today>$events_today</events-today>
|
||||
<birthdays>$birthdays</birthdays>
|
||||
<birthdays-today>$birthdays_today</birthdays-today>\r\n";
|
||||
|
||||
|
||||
$tot = $mail+$intro+$register+count($comments)+count($likes)+count($dislikes)+count($friends)+count($posts)+count($tags);
|
||||
|
||||
require_once('include/bbcode.php');
|
||||
|
@ -222,7 +222,7 @@ function ping_init(&$a) {
|
|||
if($zz['seen'] == 0)
|
||||
$sysnotify ++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo ' <notif count="'. $sysnotify .'">';
|
||||
if(count($z)) {
|
||||
|
@ -234,7 +234,7 @@ function ping_init(&$a) {
|
|||
|
||||
if($firehose) {
|
||||
if ($intro>0){
|
||||
foreach ($intros as $i) {
|
||||
foreach ($intros as $i) {
|
||||
echo xmlize( $a->get_baseurl().'/notifications/intros/'.$i['id'], $i['name'], $i['url'], $i['photo'], relative_date($i['datetime']), 'notify-unseen',t("{0} wants to be your friend") );
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue