Move activity_match() to Protocol\Activity::match()
- With tests
This commit is contained in:
parent
9e94e8b48c
commit
52c42491c4
9 changed files with 135 additions and 37 deletions
|
|
@ -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
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue