Merge branch 'develop' into api_ping
This commit is contained in:
commit
04dceb9551
135 changed files with 2234 additions and 3196 deletions
10
mod/ping.php
10
mod/ping.php
|
|
@ -5,7 +5,6 @@ require_once('include/ForumManager.php');
|
|||
require_once('include/group.php');
|
||||
require_once("mod/proxy.php");
|
||||
|
||||
if(! function_exists('ping_init')) {
|
||||
function ping_init(&$a) {
|
||||
|
||||
header("Content-type: text/xml");
|
||||
|
|
@ -339,9 +338,7 @@ function ping_init(&$a) {
|
|||
|
||||
killme();
|
||||
}
|
||||
}
|
||||
|
||||
if(! function_exists('ping_get_notifications')) {
|
||||
function ping_get_notifications($uid) {
|
||||
|
||||
$result = array();
|
||||
|
|
@ -392,7 +389,11 @@ function ping_get_notifications($uid) {
|
|||
// Replace the name with {0} but ensure to make that only once
|
||||
// The {0} is used later and prints the name in bold.
|
||||
|
||||
$pos = strpos($notification["message"],$notification['name']);
|
||||
if ($notification['name'] != "")
|
||||
$pos = strpos($notification["message"],$notification['name']);
|
||||
else
|
||||
$pos = false;
|
||||
|
||||
if ($pos !== false)
|
||||
$notification["message"] = substr_replace($notification["message"],"{0}",$pos,strlen($notification["name"]));
|
||||
|
||||
|
|
@ -409,4 +410,3 @@ function ping_get_notifications($uid) {
|
|||
|
||||
return($result);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue