]> git.mxchange.org Git - friendica.git/blobdiff - boot.php
Merge remote-tracking branch 'friendika/master'
[friendica.git] / boot.php
index 0bf92c99e17ad077c872c622c3ef82cb82345f83..956cb2ca64cfb31496d07421ef8ec9417b1641da 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -1,8 +1,8 @@
 <?php
 
-define ( 'FRIENDIKA_VERSION',      '2.2.1045' );
+define ( 'FRIENDIKA_VERSION',      '2.2.1055' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.21'    );
-define ( 'DB_UPDATE_VERSION',      1075      );
+define ( 'DB_UPDATE_VERSION',      1076      );
 
 define ( 'EOL',                    "<br />\r\n"     );
 define ( 'ATOM_TIME',              'Y-m-d\TH:i:s\Z' );
@@ -135,7 +135,7 @@ define ( 'NAMESPACE_POCO',            'http://portablecontacts.net/spec/1.0' );
 define ( 'NAMESPACE_FEED',            'http://schemas.google.com/g/2010#updates-from' );
 define ( 'NAMESPACE_OSTATUS',         'http://ostatus.org/schema/1.0' );
 define ( 'NAMESPACE_STATUSNET',       'http://status.net/schema/api/1/' );
-
+define ( 'NAMESPACE_ATOM1',           'http://www.w3.org/2005/Atom' );
 /**
  * activity stream defines
  */
@@ -270,7 +270,8 @@ class App {
 
                if(x($_SERVER,'SERVER_NAME')) {
                        $this->hostname = $_SERVER['SERVER_NAME'];
-
+                       if(x($_SERVER,'SERVER_PORT') && $_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443)
+                               $this->hostname .= ':' . $_SERVER['SERVER_PORT'];
                        /** 
                         * Figure out if we are running at the top of a domain
                         * or in a sub-directory and adjust accordingly
@@ -2957,3 +2958,15 @@ function return_bytes ($size_str) {
     }
 }}
 
+function generate_guid() {
+       $found = true;
+       do {
+               $guid = substr(random_string(),0,16);
+               $x = q("SELECT `uid` FROM `user` WHERE `guid` = '%s' LIMIT 1",
+                       dbesc($guid)
+               );
+               if(! count($x))
+                       $found = false;
+       } while ($found == true );
+       return $guid;
+}
\ No newline at end of file