<?php
+use Friendica\App;
+use Friendica\Core\System;
+
require_once('include/security.php');
require_once('include/bbcode.php');
require_once('include/items.php');
+function mood_init(App $a) {
-function mood_init(&$a) {
-
- if(! local_user())
+ if (! local_user()) {
return;
+ }
$uid = local_user();
$verb = notags(trim($_GET['verb']));
intval($parent),
intval($uid)
);
- if(dbm::is_result($r)) {
+ if (dbm::is_result($r)) {
$parent_uri = $r[0]['uri'];
$private = $r[0]['private'];
$allow_cid = $r[0]['allow_cid'];
$uri = item_new_uri($a->get_hostname(),$uid);
- $action = sprintf( t('%1$s is currently %2$s'), '[url=' . $poster['url'] . ']' . $poster['name'] . '[/url]' , $verbs[$verb]);
+ $action = sprintf( t('%1$s is currently %2$s'), '[url=' . $poster['url'] . ']' . $poster['name'] . '[/url]' , $verbs[$verb]);
$arr = array();
$arr['guid'] = get_guid(32);
$item_id = item_store($arr);
if($item_id) {
q("UPDATE `item` SET `plink` = '%s' WHERE `uid` = %d AND `id` = %d",
- dbesc($a->get_baseurl() . '/display/' . $poster['nickname'] . '/' . $item_id),
+ dbesc(System::baseUrl() . '/display/' . $poster['nickname'] . '/' . $item_id),
intval($uid),
intval($item_id)
);
-function mood_content(&$a) {
+function mood_content(App $a) {
- if(! local_user()) {
+ if (! local_user()) {
notice( t('Permission denied.') . EOL);
return;
}