]> git.mxchange.org Git - friendica.git/commitdiff
Merge remote-tracking branch 'upstream/develop' into 1501-central-item-storage
authorMichael Vogel <icarus@dabo.de>
Sun, 1 Feb 2015 12:28:32 +0000 (13:28 +0100)
committerMichael Vogel <icarus@dabo.de>
Sun, 1 Feb 2015 12:28:32 +0000 (13:28 +0100)
1  2 
boot.php
mod/display.php

diff --combined boot.php
index e9e0fd360a622c38b17950c38de9c363d036e394,4ff0e4fbea5e2110923a39cfa5895a396256b922..dd6bc6ac5d6f6c58b9fcb7ca28a0c7898dcde193
+++ b/boot.php
@@@ -16,7 -16,7 +16,7 @@@ require_once('include/dbstructure.php')
  
  define ( 'FRIENDICA_PLATFORM',     'Friendica');
  define ( 'FRIENDICA_CODENAME',     'Ginger');
- define ( 'FRIENDICA_VERSION',      '3.3.2' );
+ define ( 'FRIENDICA_VERSION',      '3.3.3-RC' );
  define ( 'DFRN_PROTOCOL_VERSION',  '2.23'    );
  define ( 'DB_UPDATE_VERSION',      1178      );
  define ( 'EOL',                    "<br />\r\n"     );
@@@ -1405,11 -1405,11 +1405,11 @@@ if(! function_exists('get_max_import_si
  if(! function_exists('profile_load')) {
        function profile_load(&$a, $nickname, $profile = 0, $profiledata = array()) {
  
 -              $user = q("select uid from user where nickname = '%s' limit 1",
 +              $user = q("SELECT `uid` FROM `user` WHERE `nickname` = '%s' LIMIT 1",
                        dbesc($nickname)
                );
  
 -              if(! ($user && count($user))) {
 +              if(!$user && count($user) && !count($profiledata)) {
                        logger('profile error: ' . $a->query_string, LOGGER_DEBUG);
                        notice( t('Requested account is not available.') . EOL );
                        $a->error = 404;
                                        intval($profile_int)
                        );
                }
 -              if((! $r) && (!  count($r))) {
 +              if((!$r) && (!count($r))) {
                        $r = q("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `contact`.`avatar-date` AS picdate, `user`.* FROM `profile`
                                        INNER JOIN `contact` on `contact`.`uid` = `profile`.`uid` INNER JOIN `user` ON `profile`.`uid` = `user`.`uid`
                                        WHERE `user`.`nickname` = '%s' AND `profile`.`is-default` = 1 and `contact`.`self` = 1 LIMIT 1",
                        );
                }
  
 -              if(($r === false) || (! count($r))) {
 +              if(($r === false) || (!count($r)) && !count($profiledata)) {
                        logger('profile error: ' . $a->query_string, LOGGER_DEBUG);
                        notice( t('Requested profile is not available.') . EOL );
                        $a->error = 404;
  
                // fetch user tags if this isn't the default profile
  
 -              if(! $r[0]['is-default']) {
 +              if(!$r[0]['is-default']) {
                        $x = q("select `pub_keywords` from `profile` where uid = %d and `is-default` = 1 limit 1",
                                        intval($r[0]['profile_uid'])
                        );
diff --combined mod/display.php
index 217e0685be63c166c004f965eeb5fc9bbc1f7d86,374de6caccfaddaa5557a4a4cbc07cd6bfee3d6d..f483977cd4f847aebc639bbe93a4f85a499b921d
@@@ -41,18 -41,6 +41,18 @@@ function display_init(&$a) 
                                $itemuid = $r[0]["uid"];
                        }
                }
 +
 +              // Is it an item with uid=0?
 +              if ($nick == "") {
 +                      $r = q("SELECT `item`.`id`, `item`.`parent`, `item`.`author-name`,
 +                              `item`.`author-link`, `item`.`author-avatar`, `item`.`network`, `item`.`uid`, `item`.`body`
 +                              FROM `item` WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0
 +                                      AND `item`.`allow_cid` = ''  AND `item`.`allow_gid` = ''
 +                                      AND `item`.`deny_cid`  = '' AND `item`.`deny_gid`  = ''
 +                                      AND `item`.`private` = 0 AND `item`.`uid` = 0
 +                                      AND `item`.`guid` = '%s'", $a->argv[1]);
 +                              //      AND `item`.`private` = 0 AND `item`.`wall` = 1
 +              }
                if (count($r)) {
                        if ($r[0]["id"] != $r[0]["parent"])
                                $r = q("SELECT `id`, `author-name`, `author-link`, `author-avatar`, `network`, `body`, `uid` FROM `item`
@@@ -106,8 -94,8 +106,8 @@@ function display_fetchauthor($a, $item
                normalise_link($profiledata["url"]), $item["uid"]);
        if (count($r)) {
                $profiledata["photo"] = proxy_url($r[0]["photo"]);
-               $profiledata["address"] = bbcode($r[0]["location"]);
-               $profiledata["about"] = bbcode($r[0]["about"]);
+               $profiledata["address"] = proxy_parse_html(bbcode($r[0]["location"]));
+               $profiledata["about"] = proxy_parse_html(bbcode($r[0]["about"]));
                if ($r[0]["nick"] != "")
                        $profiledata["nickname"] = $r[0]["nick"];
        }
                if ($profiledata["photo"] == "")
                        $profiledata["photo"] = proxy_url($r[0]["avatar"]);
                if ($profiledata["address"] == "")
-                       $profiledata["address"] = bbcode($r[0]["location"]);
+                       $profiledata["address"] = proxy_parse_html(bbcode($r[0]["location"]));
                if ($profiledata["about"] == "")
-                       $profiledata["about"] = bbcode($r[0]["about"]);
+                       $profiledata["about"] = proxy_parse_html(bbcode($r[0]["about"]));
                if (($profiledata["nickname"] == "") AND ($r[0]["nick"] != ""))
                        $profiledata["nickname"] = $r[0]["nick"];
        }
                        $r = q("SELECT `avatar`, `nick`, `location`, `about` FROM `unique_contacts` WHERE `url` = '%s'", normalise_link($profiledata["url"]));
                        if (count($r)) {
                                $profiledata["photo"] = proxy_url($r[0]["avatar"]);
-                               $profiledata["address"] = bbcode($r[0]["location"]);
-                               $profiledata["about"] = bbcode($r[0]["about"]);
+                               $profiledata["address"] = proxy_parse_html(bbcode($r[0]["location"]));
+                               $profiledata["about"] = proxy_parse_html(bbcode($r[0]["about"]));
                                if ($r[0]["nick"] != "")
                                        $profiledata["nickname"] = $r[0]["nick"];
                        }
@@@ -264,18 -252,6 +264,18 @@@ function display_content(&$a, $update 
                                        $nick = $r[0]["nickname"];
                                }
                        }
 +                      if ($nick == "") {
 +                              $r = q("SELECT `item`.`id` FROM `item`
 +                                      WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0
 +                                              AND `item`.`allow_cid` = ''  AND `item`.`allow_gid` = ''
 +                                              AND `item`.`deny_cid`  = '' AND `item`.`deny_gid`  = ''
 +                                              AND `item`.`private` = 0  AND `item`.`uid` = 0
 +                                              AND `item`.`guid` = '%s'", $a->argv[1]);
 +                                      //      AND `item`.`private` = 0 AND `item`.`wall` = 1
 +                              if (count($r)) {
 +                                      $item_id = $r[0]["id"];
 +                              }
 +                      }
                }
        }