]> git.mxchange.org Git - friendica.git/blobdiff - include/items.php
Merge pull request #3373 from strk/expire-login-later
[friendica.git] / include / items.php
index aed25f11ef5f561010f7f9e68a3c25f924121258..2500e08d54ad78c5407d3a9405b7bc6631ab324e 100644 (file)
@@ -1169,7 +1169,7 @@ function item_body_set_hashtags(&$item) {
                        "#$2", $item["body"]);
 
        foreach ($tags as $tag) {
-               if ((strpos($tag, '#') !== 0) || (strpos($tag, '[url=')) {
+               if ((strpos($tag, '#') !== 0) || (strpos($tag, '[url='))) {
                        continue;
                }
 
@@ -1293,7 +1293,7 @@ function tag_deliver($uid, $item_id) {
         */
        $dlink = normalise_link(App::get_baseurl() . '/u/' . $u[0]['nickname']);
 
-       $cnt = preg_match_all('/[\@\!]\[url\=(.*?)\](.*?)\[\/url\]/ism', $item['body'], $matches,PREG_SET_ORDER);
+       $cnt = preg_match_all('/[\@\!]\[url\=(.*?)\](.*?)\[\/url\]/ism', $item['body'], $matches, PREG_SET_ORDER);
        if ($cnt) {
                foreach ($matches as $mtch) {
                        if (link_compare($link, $mtch[1]) || link_compare($dlink, $mtch[1])) {
@@ -1399,7 +1399,7 @@ function tgroup_check($uid, $item) {
         */
        $dlink = normalise_link(App::get_baseurl() . '/u/' . $u[0]['nickname']);
 
-       $cnt = preg_match_all('/[\@\!]\[url\=(.*?)\](.*?)\[\/url\]/ism', $item['body'], $matches,PREG_SET_ORDER);
+       $cnt = preg_match_all('/[\@\!]\[url\=(.*?)\](.*?)\[\/url\]/ism', $item['body'], $matches, PREG_SET_ORDER);
        if ($cnt) {
                foreach ($matches as $mtch) {
                        if (link_compare($link, $mtch[1]) || link_compare($dlink, $mtch[1])) {
@@ -1785,8 +1785,8 @@ function fix_private_photos($s, $uid, $item = null, $cid = 0) {
                        $x = strpos($i, '-');
 
                        if ($x) {
-                               $res = substr($i, $x+1);
-                               $i = substr($i,0, $x);
+                               $res = substr($i, $x + 1);
+                               $i = substr($i, 0, $x);
                                $r = q("SELECT * FROM `photo` WHERE `resource-id` = '%s' AND `scale` = %d AND `uid` = %d",
                                        dbesc($i),
                                        intval($res),
@@ -2119,7 +2119,7 @@ function drop_item($id, $interactive = true) {
                // clean up categories and tags so they don't end up as orphans
 
                $matches = false;
-               $cnt = preg_match_all('/<(.*?)>/', $item['file'], $matches,PREG_SET_ORDER);
+               $cnt = preg_match_all('/<(.*?)>/', $item['file'], $matches, PREG_SET_ORDER);
                if ($cnt) {
                        foreach ($matches as $mtch) {
                                file_tag_unsave_file($item['uid'], $item['id'], $mtch[1],true);
@@ -2128,7 +2128,7 @@ function drop_item($id, $interactive = true) {
 
                $matches = false;
 
-               $cnt = preg_match_all('/\[(.*?)\]/', $item['file'], $matches,PREG_SET_ORDER);
+               $cnt = preg_match_all('/\[(.*?)\]/', $item['file'], $matches, PREG_SET_ORDER);
                if ($cnt) {
                        foreach ($matches as $mtch) {
                                file_tag_unsave_file($item['uid'], $item['id'], $mtch[1],false);
@@ -2198,7 +2198,7 @@ function drop_item($id, $interactive = true) {
                foreach ($r as $row) {
                        if ($parentid != "") {
                                $parentid .= ", ";
-                       ]
+                       }
 
                        $parentid .= $row["id"];
                }
@@ -2323,8 +2323,8 @@ function posted_dates($uid, $wall) {
        }
 
        // Set the start and end date to the beginning of the month
-       $dnow = substr($dnow, 0, 8).'01';
-       $dthen = substr($dthen, 0, 8).'01';
+       $dnow = substr($dnow, 0, 8) . '01';
+       $dthen = substr($dthen, 0, 8) . '01';
 
        $ret = array();
        /*
@@ -2333,7 +2333,7 @@ function posted_dates($uid, $wall) {
         */
        while (substr($dnow, 0, 7) >= substr($dthen, 0, 7)) {
                $dstart = substr($dnow, 0, 8) . '01';
-               $dend = substr($dnow, 0, 8) . get_dim(intval($dnow),intval(substr($dnow,5)));
+               $dend = substr($dnow, 0, 8) . get_dim(intval($dnow), intval(substr($dnow, 5)));
                $start_month = datetime_convert('', '', $dstart, 'Y-m-d');
                $end_month = datetime_convert('', '', $dend, 'Y-m-d');
                $str = day_translate(datetime_convert('', '', $dnow, 'F Y'));