X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Flike.php;h=1f6a233f3dc26599f8a37152ea71f0fef276952b;hb=3cea176ef238c8d30b0fd74ca86bb73bb00d8bc5;hp=ef483a1f9eed3ca264086edc3d37d77b3380504d;hpb=4d21671f75e35e7c2880467dddc0936e8c718d8c;p=friendica.git diff --git a/mod/like.php b/mod/like.php index ef483a1f9e..1f6a233f3d 100755 --- a/mod/like.php +++ b/mod/like.php @@ -5,8 +5,7 @@ require_once('include/bbcode.php'); require_once('include/items.php'); require_once('include/like.php'); -if(! function_exists('like_content')) { -function like_content(&$a) { +function like_content(App $a) { if(! local_user() && ! remote_user()) { return false; } @@ -25,15 +24,15 @@ function like_content(&$a) { // See if we've been passed a return path to redirect to $return_path = ((x($_REQUEST,'return')) ? $_REQUEST['return'] : ''); - like_content_return($a->get_baseurl(), $return_path); + like_content_return(App::get_baseurl(), $return_path); killme(); // NOTREACHED // return; // NOTREACHED } -} + // Decide how to return. If we were called with a 'return' argument, // then redirect back to the calling page. If not, just quietly end -if(! function_exists('like_content_return')) { + function like_content_return($baseurl, $return_path) { if($return_path) { @@ -46,4 +45,4 @@ function like_content_return($baseurl, $return_path) { killme(); } -} +