]> git.mxchange.org Git - friendica.git/blobdiff - mod/mood.php
The first queries are replaced with the new functions. More to come ...
[friendica.git] / mod / mood.php
index c64dd0d9efbe2ae3baa68618d8c0c774115ea9a4..c693e7cdc980872949842a11634544ee60ee143b 100644 (file)
@@ -1,14 +1,16 @@
 <?php
 
+use Friendica\App;
+
 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']));
@@ -59,7 +61,7 @@ function mood_init(&$a) {
 
        $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);
@@ -91,7 +93,7 @@ function mood_init(&$a) {
        $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(App::get_baseurl() . '/display/' . $poster['nickname'] . '/' . $item_id),
                        intval($uid),
                        intval($item_id)
                );
@@ -108,9 +110,9 @@ function mood_init(&$a) {
 
 
 
-function mood_content(&$a) {
+function mood_content(App $a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL);
                return;
        }