X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=boot.php;h=28467006da4c03f538511a33cb0bf688eb3559d9;hb=5ec4a4e6deb5d28cbfab54093f8b4180912738d4;hp=d5adbd7cf17de729924fd538bee2034619e1db8f;hpb=48ffa880f099b19052f18e399bf6af50780a24b0;p=friendica.git
diff --git a/boot.php b/boot.php
index d5adbd7cf1..28467006da 100644
--- a/boot.php
+++ b/boot.php
@@ -5,15 +5,16 @@ require_once('include/network.php');
require_once('include/plugin.php');
require_once('include/text.php');
require_once("include/pgettext.php");
+require_once('include/nav.php');
-define ( 'FRIENDIKA_VERSION', '2.2.1065' );
+define ( 'FRIENDIKA_VERSION', '2.2.1083' );
define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
-define ( 'DB_UPDATE_VERSION', 1078 );
+define ( 'DB_UPDATE_VERSION', 1082 );
define ( 'EOL', "
\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
-define ( 'DOWN_ARROW', '⇩' );
+
/**
*
@@ -610,12 +611,12 @@ function check_config(&$a) {
}}
-function get_guid() {
- $exists = true;
+function get_guid($size=16) {
+ $exists = true; // assume by default that we don't have a unique guid
do {
- $s = random_string(16);
+ $s = random_string($size);
$r = q("select id from guid where guid = '%s' limit 1", dbesc($s));
- if(! results($r))
+ if(! count($r))
$exists = false;
} while($exists);
q("insert into guid ( guid ) values ( '%s' ) ", dbesc($s));
@@ -803,8 +804,12 @@ function profile_load(&$a, $nickname, $profile = 0) {
if(! (x($a->page,'aside')))
$a->page['aside'] = '';
- $a->page['aside'] .= profile_sidebar($a->profile);
- $a->page['aside'] .= contact_block();
+ $block = (((get_config('system','block_public')) && (! local_user()) && (! remote_user())) ? true : false);
+
+ $a->page['aside'] .= profile_sidebar($a->profile, $block);
+
+ if(! $block)
+ $a->page['aside'] .= contact_block();
return;
}}
@@ -827,7 +832,7 @@ function profile_load(&$a, $nickname, $profile = 0) {
if(! function_exists('profile_sidebar')) {
-function profile_sidebar($profile) {
+function profile_sidebar($profile, $block = 0) {
$a = get_app();
@@ -846,10 +851,9 @@ function profile_sidebar($profile) {
$tabs = '';
- $photo = '