X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=boot.php;h=7dfaa021ee7743cb35df845166e938fa741b5c2e;hb=ff15ea099310bab5cdcaa724274f3ef22301fcb4;hp=1d7135b296c7a5879cf233e20dfeabf5255e27f1;hpb=d2b28206ceb093f908f131980f9a02adbce327d2;p=friendica.git
diff --git a/boot.php b/boot.php
index 1d7135b296..7dfaa021ee 100644
--- a/boot.php
+++ b/boot.php
@@ -2,9 +2,9 @@
set_time_limit(0);
-define ( 'FRIENDIKA_VERSION', '2.1.940' );
-define ( 'DFRN_PROTOCOL_VERSION', '2.2' );
-define ( 'DB_UPDATE_VERSION', 1046 );
+define ( 'FRIENDIKA_VERSION', '2.1.946' );
+define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
+define ( 'DB_UPDATE_VERSION', 1048 );
define ( 'EOL', "
\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
@@ -73,6 +73,18 @@ define ( 'PAGE_SOAPBOX', 1 );
define ( 'PAGE_COMMUNITY', 2 );
define ( 'PAGE_FREELOVE', 3 );
+/**
+ * Network and protocol family types
+ */
+
+define ( 'NETWORK_DFRN', 'dfrn'); // Friendika, Mistpark, other DFRN implementations
+define ( 'NETWORK_OSTATUS', 'stat'); // status.net, identi.ca, GNU-social, other OStatus implementations
+define ( 'NETWORK_FEED', 'feed'); // RSS/Atom feeds with no known "post/notify" protocol
+define ( 'NETWORK_DIASPORA', 'dspr'); // Diaspora
+define ( 'NETWORK_MAIL', 'mail'); // IMAP/POP
+define ( 'NETWORK_FACEBOOK', 'face'); // Facebook API
+
+
/**
* Maximum number of "people who like (or don't like) this" that we will list by name
*/
@@ -437,15 +449,18 @@ function check_config(&$a) {
load_config('system');
- if(! x($_SERVER,'SERVER_NAME'))
- return;
-
$build = get_config('system','build');
if(! x($build))
$build = set_config('system','build',DB_UPDATE_VERSION);
$url = get_config('system','url');
- if(! x($url))
+
+ // if the url isn't set or the stored url is radically different
+ // than the currently visited url, store the current value accordingly.
+ // "Radically different" ignores common variations such as http vs https
+ // and www.example.com vs example.com.
+
+ if((! x($url)) || (! link_compare($url,$a->get_baseurl())))
$url = set_config('system','url',$a->get_baseurl());
if($build != DB_UPDATE_VERSION) {
@@ -2298,9 +2313,9 @@ function profile_sidebar($profile) {
$pubkey = ((x($profile,'pubkey') == 1) ? '