From: Roland Haeder Date: Fri, 18 Dec 2015 20:55:25 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/master' into social-master X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9b7773343460514c5c5811c9add5cd96a2770c42;p=quix0rs-gnu-social.git Merge remote-tracking branch 'upstream/master' into social-master Signed-off-by: Roland Haeder --- 9b7773343460514c5c5811c9add5cd96a2770c42 diff --cc plugins/Linkback/LinkbackPlugin.php index 55615273d3,941e7c4c4b..3a7de0d045 --- a/plugins/Linkback/LinkbackPlugin.php +++ b/plugins/Linkback/LinkbackPlugin.php @@@ -139,14 -140,17 +140,17 @@@ class LinkbackPlugin extends Plugi // Based on https://github.com/indieweb/mention-client-php // which is licensed Apache 2.0 - function getWebmention($result) { + function getWebmention(Auth_Yadis_HTTPFetcher $result) { - // XXX: the fetcher only gives back one of each header, so this may fail on multiple Link headers - if(preg_match('~<((?:https?://)?[^>]+)>; rel="webmention"~', $result->headers['Link'], $match)) { - return $match[1]; - } elseif(preg_match('~<((?:https?://)?[^>]+)>; rel="http://webmention.org/?"~', $result->headers['Link'], $match)) { - return $match[1]; + if (isset($result->headers['Link'])) { + // XXX: the fetcher only gives back one of each header, so this may fail on multiple Link headers + if(preg_match('~<((?:https?://)?[^>]+)>; rel="webmention"~', $result->headers['Link'], $match)) { + return $match[1]; + } elseif(preg_match('~<((?:https?://)?[^>]+)>; rel="http://webmention.org/?"~', $result->headers['Link'], $match)) { + return $match[1]; + } } + // FIXME: Do proper DOM traversal if(preg_match('/<(?:link|a)[ ]+href="([^"]+)"[ ]+rel="[^" ]* ?webmention ?[^" ]*"[ ]*\/?>/i', $result->body, $match) || preg_match('/<(?:link|a)[ ]+rel="[^" ]* ?webmention ?[^" ]*"[ ]+href="([^"]+)"[ ]*\/?>/i', $result->body, $match)) { return $match[1]; diff --cc scripts/startdaemons.sh index c4d86053e9,2ed3528c5e..0fa72cea11 --- a/scripts/startdaemons.sh +++ b/scripts/startdaemons.sh @@@ -35,12 -35,12 +35,14 @@@ if [ $# -gt 1 ]; the fi DIR=`dirname $0` - DAEMONS=`$DIR/getvaliddaemons.php $ARGSG` -DAEMONS=`php $DIR/getvaliddaemons.php $ARGSG` ++DAEMONS=`$DIR/getvaliddaemons.php $ARGSG 2>/dev/null | grep -v "FUSE_EDEADLK"` ++ ++echo "DAEMONS='${DAEMONS}'" for f in $DAEMONS; do -- echo "Starting $f..." -- php $f $ARGSD ++ echo "Starting '$f' ..." ++ php $f $ARGSD 2>/dev/null | grep -v "FUSE_EDEADLK" echo "DONE." done diff --cc scripts/stopdaemons.sh index 274f0903e2,e725dd0bf0..e88fe26e22 --- a/scripts/stopdaemons.sh +++ b/scripts/stopdaemons.sh @@@ -39,9 -39,9 +39,9 @@@ if [ $# -gt 1 ]; the fi SDIR=`dirname $0` - DIR=`$SDIR/getpiddir.php $SITE` -DIR=`php $SDIR/getpiddir.php $SITE` ++DIR=`$SDIR/getpiddir.php $SITE 2>/dev/null | grep -v "FUSE_EDEADLK"` - DAEMONS=`$SDIR/getvaliddaemons.php $ARGSG` -DAEMONS=`php $SDIR/getvaliddaemons.php $ARGSG` ++DAEMONS=`$SDIR/getvaliddaemons.php $ARGSG 2>/dev/null | grep -v "FUSE_EDEADLK"` for f in $DAEMONS; do f=$(basename $f .php) @@@ -52,7 -52,7 +52,7 @@@ PID=`cat $ff 2>/dev/null` if [ -n "$PID" ] ; then -- echo -n "Stopping $f ($PID)..." ++ echo -n "Stopping '$f' ($PID)..." if kill -3 $PID 2>/dev/null ; then count=0 while kill -0 $PID 2>/dev/null ; do