4 use Friendica\Core\System;
6 require_once 'include/security.php';
7 require_once 'include/bbcode.php';
8 require_once 'include/items.php';
9 require_once 'include/like.php';
11 function like_content(App $a) {
12 if (!local_user() && !remote_user()) {
17 $verb = notags(trim($_GET['verb']));
23 $item_id = (($a->argc > 1) ? notags(trim($a->argv[1])) : 0);
25 $r = do_like($item_id, $verb);
30 // See if we've been passed a return path to redirect to
31 $return_path = ((x($_REQUEST,'return')) ? $_REQUEST['return'] : '');
33 like_content_return(System::baseUrl(), $return_path);
34 killme(); // NOTREACHED
38 // Decide how to return. If we were called with a 'return' argument,
39 // then redirect back to the calling page. If not, just quietly end
41 function like_content_return($baseurl, $return_path) {
43 $rand = '_=' . time();
44 if (strpos($return_path, '?')) {
50 goaway($baseurl . "/" . $return_path . $rand);