]> git.mxchange.org Git - friendica.git/blobdiff - include/oembed.php
Move Item and Conversation from Core to Object
[friendica.git] / include / oembed.php
index cb23517cdbabbfc17b44e502437143cd05e3cc8b..74ce90dd1ae530eb36035d17acd10c3c5559cba5 100755 (executable)
@@ -5,8 +5,11 @@
  */
 
 use Friendica\App;
+use Friendica\Core\Cache;
+use Friendica\Core\System;
 use Friendica\ParseUrl;
 use Friendica\Core\Config;
+use Friendica\Database\DBM;
 
 function oembed_replacecb($matches){
        $embedurl=$matches[1];
@@ -34,7 +37,7 @@ function oembed_fetch_url($embedurl, $no_rich_type = false){
        $r = q("SELECT * FROM `oembed` WHERE `url` = '%s'",
                dbesc(normalise_link($embedurl)));
 
-       if (dbm::is_result($r)) {
+       if (DBM::is_result($r)) {
                $txt = $r[0]["content"];
        } else {
                $txt = Cache::get($a->videowidth . $embedurl);
@@ -152,7 +155,7 @@ function oembed_format_object($j){
                                $th=120; $tw = $th*$tr;
                                $tpl=get_markup_template('oembed_video.tpl');
                                $ret.=replace_macros($tpl, array(
-                                       '$baseurl'     => App::get_baseurl(),
+                                       '$baseurl'     => System::baseUrl(),
                                        '$embedurl'    => $embedurl,
                                        '$escapedhtml' => base64_encode($jhtml),
                                        '$tw'          => $tw,
@@ -249,7 +252,7 @@ function oembed_iframe($src, $width, $height) {
        }
        $width = '100%';
 
-       $s = App::get_baseurl() . '/oembed/' . base64url_encode($src);
+       $s = System::baseUrl() . '/oembed/' . base64url_encode($src);
        return '<iframe onload="resizeIframe(this);" class="embed_rich" height="' . $height . '" width="' . $width . '" src="' . $s . '" allowfullscreen scrolling="no" frameborder="no">' . t('Embedded content') . '</iframe>';
 }