} elseif ($task == 'remove_action' && $user->user_exists) { $action_id = isset($_POST['action_id']) ? (int) $_POST['action_id'] : 0; $result = he_wall::remove_action($user->user_info['user_id'], $action_id); } elseif ($task == 'like_action') { $action_id = isset($_POST['action_id']) ? (int) $_POST['action_id'] : 0; $result = he_wall::like_action($user->user_info['user_id'], $action_id); if ($result['like']) { he_wall::new_like_notify($action_id); } } elseif ($task == 'add_comment') { $action_id = isset($_POST['action_id']) ? (int) $_POST['action_id'] : 0; $text = isset($_POST['text']) ? trim($_POST['text']) : ''; if (strlen($text) > 1000) { $result = array('result' => 0, 'message' => SE_Language::get(690706058)); } elseif ($comment_id = he_wall::add_comment($user->user_info['user_id'], $action_id, $text)) { $comment_info = he_wall::get_comment($comment_id); $comment_info['text'] = he_wall_format_text($comment_info['text']); he_wall::new_comment_notify($action_id); $result = array('result' => 1, 'comment_info' => $comment_info); } else { $result = array('result' => 0, 'message' => 'Error'); } } elseif ($task == 'delete_comment') { $comment_id = isset($_POST['comment_id']) ? (int) $_POST['comment_id'] : 0; $result = he_wall::delete_comment($comment_id, $user->user_info['user_id']); } elseif ($task == 'show_more') { $last_action_id = isset($_POST['last_action_id']) ? (int) $_POST['last_action_id'] : false; $result = he_wall_actions_display($wall_object, $wall_object_id, false, $last_action_id); } elseif ($task == 'post_action') { $first_action_id = isset($_POST['first_action_id']) ? (int) $_POST['first_action_id'] : false; $action_privacy_level = isset($_POST['action_privacy_level']) ? (int) $_POST['action_privacy_level'] : 63;