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;
}
// 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) {
killme();
}
-}
+