-<?php /** @file */
+<?php
/**
- *
* Poke, prod, finger, or otherwise do unspeakable things to somebody - who must be a connection in your address book
* This function can be invoked with the required arguments (verb and cid and private and possibly parent) silently via ajax or
* other web request. You must be logged in and connected to a profile.
*
* private creates a private conversation with the recipient. Otherwise your profile's default post privacy is used.
*
+ * @file mod/poke.php
*/
+use Friendica\App;
+
require_once('include/security.php');
require_once('include/bbcode.php');
require_once('include/items.php');
-
function poke_init(App $a) {
if (! local_user()) {
$target = $r[0];
- if ($parent) {
+ if($parent) {
$r = q("SELECT `uri`, `private`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid`
FROM `item` WHERE `id` = %d AND `parent` = %d AND `uid` = %d LIMIT 1",
intval($parent),
$arr['object'] .= '</link></object>' . "\n";
$item_id = item_store($arr);
- if ($item_id) {
+ if($item_id) {
//q("UPDATE `item` SET `plink` = '%s' WHERE `uid` = %d AND `id` = %d",
// dbesc(App::get_baseurl() . '/display/' . $poster['nickname'] . '/' . $item_id),
// intval($uid),
$name = '';
$id = '';
- if (intval($_GET['c'])) {
+ if(intval($_GET['c'])) {
$r = q("SELECT `id`,`name` FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
intval($_GET['c']),
intval(local_user())
$verbs = get_poke_verbs();
$shortlist = array();
- foreach ($verbs as $k => $v) {
- if ($v[1] !== 'NOTRANSLATION') {
+ foreach($verbs as $k => $v)
+ if($v[1] !== 'NOTRANSLATION')
$shortlist[] = array($k,$v[1]);
- }
- }
$tpl = get_markup_template('poke_content.tpl');