forked from friendica/friendica-addons
Merge pull request #481 from MrPetovan/bug/4156-move-oembed-to-src
Move oembed to src
This commit is contained in:
commit
2cbf89c0f5
|
@ -46,6 +46,7 @@ require_once 'library/twitteroauth.php';
|
||||||
require_once 'include/enotify.php';
|
require_once 'include/enotify.php';
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
|
use Friendica\Content\OEmbed;
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
use Friendica\Model\GContact;
|
use Friendica\Model\GContact;
|
||||||
|
@ -1629,7 +1630,6 @@ function statusnet_complete_conversation(App $a, $uid, $self, $create_user, $nic
|
||||||
|
|
||||||
function statusnet_convertmsg(App $a, $body, $no_tags = false)
|
function statusnet_convertmsg(App $a, $body, $no_tags = false)
|
||||||
{
|
{
|
||||||
require_once "include/oembed.php";
|
|
||||||
require_once "include/items.php";
|
require_once "include/items.php";
|
||||||
require_once "include/network.php";
|
require_once "include/network.php";
|
||||||
|
|
||||||
|
@ -1653,7 +1653,7 @@ function statusnet_convertmsg(App $a, $body, $no_tags = false)
|
||||||
|
|
||||||
logger("statusnet_convertmsg: fetching data for " . $expanded_url, LOGGER_DEBUG);
|
logger("statusnet_convertmsg: fetching data for " . $expanded_url, LOGGER_DEBUG);
|
||||||
|
|
||||||
$oembed_data = oembed_fetch_url($expanded_url, true);
|
$oembed_data = OEmbed::fetchURL($expanded_url, true);
|
||||||
|
|
||||||
logger("statusnet_convertmsg: fetching data: done", LOGGER_DEBUG);
|
logger("statusnet_convertmsg: fetching data: done", LOGGER_DEBUG);
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
|
use Friendica\Content\OEmbed;
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
use Friendica\Core\Worker;
|
use Friendica\Core\Worker;
|
||||||
|
@ -1172,7 +1173,6 @@ function twitter_fetchuser(App $a, $uid, $screen_name = "", $user_id = "")
|
||||||
|
|
||||||
function twitter_expand_entities(App $a, $body, $item, $no_tags = false, $picture)
|
function twitter_expand_entities(App $a, $body, $item, $no_tags = false, $picture)
|
||||||
{
|
{
|
||||||
require_once "include/oembed.php";
|
|
||||||
require_once "include/network.php";
|
require_once "include/network.php";
|
||||||
|
|
||||||
$tags = "";
|
$tags = "";
|
||||||
|
@ -1191,7 +1191,7 @@ function twitter_expand_entities(App $a, $body, $item, $no_tags = false, $pictur
|
||||||
if ($url->url && $url->expanded_url && $url->display_url) {
|
if ($url->url && $url->expanded_url && $url->display_url) {
|
||||||
$expanded_url = original_url($url->expanded_url);
|
$expanded_url = original_url($url->expanded_url);
|
||||||
|
|
||||||
$oembed_data = oembed_fetch_url($expanded_url);
|
$oembed_data = OEmbed::fetchURL($expanded_url);
|
||||||
|
|
||||||
// Quickfix: Workaround for URL with "[" and "]" in it
|
// Quickfix: Workaround for URL with "[" and "]" in it
|
||||||
if (strpos($expanded_url, "[") || strpos($expanded_url, "]")) {
|
if (strpos($expanded_url, "[") || strpos($expanded_url, "]")) {
|
||||||
|
|
Loading…
Reference in a new issue