X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=boot.php;h=e897f19aa12b21151bf8eb0d1f61e536da0fd8e1;hb=1861dc1fae549a0ee2b6287d4f7dc7f8797f5070;hp=3d1d884e308750c40bffbfffc7426d7b160368e3;hpb=639204c2ec29ccd74fbc2cb1eb597cca86e84f27;p=friendica.git
diff --git a/boot.php b/boot.php
index 3d1d884e30..e897f19aa1 100644
--- a/boot.php
+++ b/boot.php
@@ -7,13 +7,13 @@ require_once('include/text.php');
require_once("include/pgettext.php");
-define ( 'FRIENDIKA_VERSION', '2.2.1061' );
+define ( 'FRIENDIKA_VERSION', '2.2.1083' );
define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
-define ( 'DB_UPDATE_VERSION', 1077 );
+define ( 'DB_UPDATE_VERSION', 1082 );
define ( 'EOL', "
\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
-define ( 'DOWN_ARROW', '⇩' );
+
/**
*
@@ -55,13 +55,12 @@ define ( 'REGISTER_OPEN', 2 );
/**
* relationship types
- * When used in contact records, this indicates that 'uid' has
- * this relationship with contact['name']
*/
-define ( 'REL_VIP', 1); // other person is 'following' us
-define ( 'REL_FAN', 2); // we are 'following' other person
-define ( 'REL_BUD', 3); // mutual relationship
+define ( 'CONTACT_IS_FOLLOWER', 1);
+define ( 'CONTACT_IS_SHARING', 2);
+define ( 'CONTACT_IS_FRIEND', 3);
+
/**
* Hook array order
@@ -76,10 +75,10 @@ define ( 'HOOK_FUNCTION', 2);
* page/profile types
*
* PAGE_NORMAL is a typical personal profile account
- * PAGE_SOAPBOX automatically approves all friend requests as REL_FAN, (readonly)
- * PAGE_COMMUNITY automatically approves all friend requests as REL_FAN, but with
+ * PAGE_SOAPBOX automatically approves all friend requests as CONTACT_IS_SHARING, (readonly)
+ * PAGE_COMMUNITY automatically approves all friend requests as CONTACT_IS_SHARING, but with
* write access to wall and comments (no email and not included in page owner's ACL lists)
- * PAGE_FREELOVE automatically approves all friend requests as full friends (REL_BUD).
+ * PAGE_FREELOVE automatically approves all friend requests as full friends (CONTACT_IS_FRIEND).
*
*/
@@ -283,7 +282,12 @@ class App {
$this->path = $path;
}
- set_include_path("include/$this->hostname" . PATH_SEPARATOR . 'include' . PATH_SEPARATOR . '.' );
+ set_include_path(
+ "include/$this->hostname" . PATH_SEPARATOR
+ . 'include' . PATH_SEPARATOR
+ . 'library' . PATH_SEPARATOR
+ . 'library/phpsec' . PATH_SEPARATOR
+ . '.' );
if((x($_SERVER,'QUERY_STRING')) && substr($_SERVER['QUERY_STRING'],0,2) === "q=")
$this->query_string = substr($_SERVER['QUERY_STRING'],2);
@@ -320,13 +324,12 @@ class App {
/**
* Special handling for the webfinger/lrdd host XRD file
- * Just spit out the contents and exit.
*/
if($this->cmd === '.well-known/host-meta') {
- require_once('include/hostxrd.php');
- hostxrd();
- // NOTREACHED
+ $this->argc = 1;
+ $this->argv = array('hostxrd');
+ $this->module = 'hostxrd';
}
/**
@@ -607,6 +610,18 @@ function check_config(&$a) {
}}
+function get_guid($size=16) {
+ $exists = true; // assume by default that we don't have a unique guid
+ do {
+ $s = random_string($size);
+ $r = q("select id from guid where guid = '%s' limit 1", dbesc($s));
+ if(! count($r))
+ $exists = false;
+ } while($exists);
+ q("insert into guid ( guid ) values ( '%s' ) ", dbesc($s));
+ return $s;
+}
+
// wrapper for adding a login box. If $register == true provide a registration
// link. This will most always depend on the value of $a->config['register_policy'].
@@ -788,8 +803,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;
}}
@@ -812,7 +831,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();
@@ -831,10 +850,9 @@ function profile_sidebar($profile) {
$tabs = '';
- $photo = '