]> git.mxchange.org Git - friendica.git/blobdiff - mod/viewsrc.php
Normalize App parameter declaration (mod folder, 3 out of 3)
[friendica.git] / mod / viewsrc.php
index 1203d18fc9dc2597bf2c1d6a64ce59e9a35c318c..a3f0affb531971cfc1eb63e06fd02d073ce34b74 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
-if(! function_exists('viewsrc_content')) {
-function viewsrc_content(&$a) {
 
-       if(! local_user()) {
+function viewsrc_content(App $a) {
+
+       if (! local_user()) {
                notice( t('Access denied.') . EOL);
                return;
        }
@@ -24,7 +24,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 +33,4 @@ function viewsrc_content(&$a) {
                }
        return $o;
 }
-}
+