Move activity_match() to Protocol\Activity::match()

- With tests
This commit is contained in:
Philipp Holzer
2019-10-23 02:05:11 +02:00
parent 9e94e8b48c
commit 52c42491c4
9 changed files with 135 additions and 37 deletions

View File

@@ -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
*