]> git.mxchange.org Git - friendica.git/blobdiff - mod/mood.php
missing linebreaks and a small typo
[friendica.git] / mod / mood.php
index 805c4c45f50e1768738bdfaf57a24188f78925bd..c4d93b6de2fe4c645b087cdf0cac073b8e3411a7 100644 (file)
@@ -1,10 +1,12 @@
 <?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) {
 
        if (! local_user()) {
@@ -14,12 +16,12 @@ function mood_init(App $a) {
        $uid = local_user();
        $verb = notags(trim($_GET['verb']));
 
-       if (! $verb)
+       if(! $verb)
                return;
 
        $verbs = get_mood_verbs();
 
-       if (! in_array($verb,$verbs))
+       if(! in_array($verb,$verbs))
                return;
 
        $activity = ACTIVITY_MOOD . '#' . urlencode($verb);
@@ -30,7 +32,7 @@ function mood_init(App $a) {
        logger('mood: verb ' . $verb, LOGGER_DEBUG);
 
 
-       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),
@@ -90,9 +92,9 @@ function mood_init(App $a) {
        $arr['body']          = $action;
 
        $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),
+                       dbesc(System::baseUrl() . '/display/' . $poster['nickname'] . '/' . $item_id),
                        intval($uid),
                        intval($item_id)
                );
@@ -123,11 +125,9 @@ function mood_content(App $a) {
        $verbs = get_mood_verbs();
 
        $shortlist = array();
-       foreach ($verbs as $k => $v) {
-               if ($v !== 'NOTRANSLATION') {
+       foreach($verbs as $k => $v)
+               if($v !== 'NOTRANSLATION')
                        $shortlist[] = array($k,$v);
-               }
-       }
 
 
        $tpl = get_markup_template('mood_content.tpl');