use Friendica\Core\Logger;
use Friendica\Core\System;
use Friendica\DI;
+use Friendica\Model\Contact;
use Friendica\Model\Post;
use Friendica\Network\HTTPException;
use Friendica\Security\BasicAuth;
*/
protected static $request = [];
- public static function delete(array $parameters = [])
+ public function delete()
{
self::checkAllowedScope(self::SCOPE_WRITE);
}
}
- public static function patch(array $parameters = [])
+ public function patch()
{
self::checkAllowedScope(self::SCOPE_WRITE);
}
}
- public static function post(array $parameters = [])
+ public function post()
{
self::checkAllowedScope(self::SCOPE_WRITE);
}
}
- public static function put(array $parameters = [])
+ public function put()
{
self::checkAllowedScope(self::SCOPE_WRITE);
* Set boundaries for the "link" header
* @param array $boundaries
* @param int $id
- * @return array
*/
protected static function setBoundaries(int $id)
{
}
}
}
+
+ public static function getContactIDForSearchterm($searchterm)
+ {
+ if (intval($searchterm) == 0) {
+ $cid = Contact::getIdForURL($searchterm, 0, false);
+ } else {
+ $cid = intval($searchterm);
+ }
+
+ return $cid;
+ }
}