]> git.mxchange.org Git - friendica.git/blobdiff - mod/mood.php
The old database function is now replaced with a wrapper
[friendica.git] / mod / mood.php
index ec318f85fd8e95bcc376d614dbb3a80514bb3ecc..c4d93b6de2fe4c645b087cdf0cac073b8e3411a7 100644 (file)
@@ -1,11 +1,13 @@
 <?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(&$a) {
+function mood_init(App $a) {
 
        if (! local_user()) {
                return;
@@ -60,7 +62,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);
@@ -92,7 +94,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(App::get_baseurl() . '/display/' . $poster['nickname'] . '/' . $item_id),
+                       dbesc(System::baseUrl() . '/display/' . $poster['nickname'] . '/' . $item_id),
                        intval($uid),
                        intval($item_id)
                );
@@ -109,7 +111,7 @@ function mood_init(&$a) {
 
 
 
-function mood_content(&$a) {
+function mood_content(App $a) {
 
        if (! local_user()) {
                notice( t('Permission denied.') . EOL);