Move activity_match() to Protocol\Activity::match()
- With tests
This commit is contained in:
@@ -3,20 +3,8 @@
|
||||
* @file include/text.php
|
||||
*/
|
||||
|
||||
use Friendica\Content\Text\BBCode;
|
||||
use Friendica\Model\FileTag;
|
||||
|
||||
/**
|
||||
* Compare activity uri. Knows about activity namespace.
|
||||
*
|
||||
* @param string $haystack
|
||||
* @param string $needle
|
||||
* @return boolean
|
||||
*/
|
||||
function activity_match($haystack,$needle) {
|
||||
return (($haystack === $needle) || ((basename($needle) === $haystack) && strstr($needle, NAMESPACE_ACTIVITY_SCHEMA)));
|
||||
}
|
||||
|
||||
/**
|
||||
* return array with details for categories and folders for an item
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user