]> git.mxchange.org Git - friendica.git/blobdiff - mod/viewsrc.php
Update Addon functions and calls
[friendica.git] / mod / viewsrc.php
index 1203d18fc9dc2597bf2c1d6a64ce59e9a35c318c..a607498442b547c3aab5e416238425fa7662bfae 100644 (file)
@@ -1,9 +1,11 @@
 <?php
 
-if(! function_exists('viewsrc_content')) {
-function viewsrc_content(&$a) {
+use Friendica\App;
+use Friendica\Database\DBM;
 
-       if(! local_user()) {
+function viewsrc_content(App $a) {
+
+       if (! local_user()) {
                notice( t('Access denied.') . EOL);
                return;
        }
@@ -24,7 +26,7 @@ function viewsrc_content(&$a) {
                dbesc($item_id)
        );
 
-       if(count($r))
+       if (DBM::is_result($r))
                if(is_ajax()) {
                        echo str_replace("\n",'<br />',$r[0]['body']);
                        killme();
@@ -33,4 +35,4 @@ function viewsrc_content(&$a) {
                }
        return $o;
 }
-}
+