use Friendica\BaseObject;
use Friendica\Content\Feature;
-use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
require_once 'mod/share.php';
function add_page_info_data(array $data, $no_photos = false)
{
- Addon::callHooks('page_info_data', $data);
+ Hook::callAll('page_info_data', $data);
if (empty($data['type'])) {
return '';
$body = $removedlink;
}
- $url = str_replace(['/', '.'], ['\/', '\.'], $matches[1]);
- $removedlink = preg_replace("/\[url\=" . $url . "\](.*?)\[\/url\]/ism", '', $body);
+ $removedlink = preg_replace("/\[url\=" . preg_quote($matches[1], '/') . "\](.*?)\[\/url\]/ism", '', $body);
if (($removedlink == "") || strstr($body, $removedlink)) {
$body = $removedlink;
}
* model where comments can have sub-threads. That would require some massive sorting
* to get all the feed items into a mostly linear ordering, and might still require
* recursion.
+ *
+ * @param $xml
+ * @param array $importer
+ * @param array $contact
+ * @param $hub
+ * @param int $datedir
+ * @param int $pass
+ * @throws ImagickException
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
function consume_feed($xml, array $importer, array $contact, &$hub, $datedir = 0, $pass = 0)
{
return;
}
- $a = BaseObject::getApp();
-
$user = DBA::selectFirst('user', ['nickname'], ['uid' => $importer['uid']]);
// No user, no nickname, we quit