]> git.mxchange.org Git - friendica.git/blobdiff - mod/profile_photo.php
Enable communication with Peertube
[friendica.git] / mod / profile_photo.php
index ad9f5ab66d997e754167db0dd3368eb3ccdf87df..d8e236a73787fc476df68fb993adeec1fa8cadfc 100644 (file)
@@ -16,6 +16,7 @@ use Friendica\Model\Photo;
 use Friendica\Model\Profile;
 use Friendica\Object\Image;
 use Friendica\Util\Security;
+use Friendica\Util\Strings;
 
 function profile_photo_init(App $a)
 {
@@ -151,7 +152,7 @@ function profile_photo_post(App $a)
        $maximagesize = Config::get('system', 'maximagesize');
 
        if (($maximagesize) && ($filesize > $maximagesize)) {
-               notice(L10n::t('Image exceeds size limit of %s', formatBytes($maximagesize)) . EOL);
+               notice(L10n::t('Image exceeds size limit of %s', Strings::formatBytes($maximagesize)) . EOL);
                @unlink($src);
                return;
        }
@@ -239,7 +240,7 @@ function profile_photo_content(App $a)
        );
 
        if (empty($imagecrop)) {
-               $tpl = get_markup_template('profile_photo.tpl');
+               $tpl = Renderer::getMarkupTemplate('profile_photo.tpl');
 
                $o = Renderer::replaceMacros($tpl,
                        [
@@ -257,7 +258,7 @@ function profile_photo_content(App $a)
                return $o;
        } else {
                $filename = $imagecrop['hash'] . '-' . $imagecrop['resolution'] . '.' . $imagecrop['ext'];
-               $tpl = get_markup_template("cropbody.tpl");
+               $tpl = Renderer::getMarkupTemplate("cropbody.tpl");
                $o = Renderer::replaceMacros($tpl,
                        [
                        '$filename'  => $filename,
@@ -319,7 +320,7 @@ function profile_photo_crop_ui_head(App $a, Image $image)
                }
        }
 
-       $a->page['htmlhead'] .= Renderer::replaceMacros(get_markup_template("crophead.tpl"), []);
+       $a->page['htmlhead'] .= Renderer::replaceMacros(Renderer::getMarkupTemplate("crophead.tpl"), []);
 
        $imagecrop = [
                'hash'       => $hash,