]> git.mxchange.org Git - friendica.git/blobdiff - boot.php
Merge branch '3.4.2'
[friendica.git] / boot.php
index ce02ca8b0dba57d213014cfc344923e3cce4f76d..dcf6c65b1eb3c47375c1baa0b3df95d575aa5112 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -17,9 +17,9 @@ require_once('include/dbstructure.php');
 
 define ( 'FRIENDICA_PLATFORM',     'Friendica');
 define ( 'FRIENDICA_CODENAME',     'Lily of the valley');
-define ( 'FRIENDICA_VERSION',      '3.4.1' );
+define ( 'FRIENDICA_VERSION',      '3.4.2' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.23'    );
-define ( 'DB_UPDATE_VERSION',      1187      );
+define ( 'DB_UPDATE_VERSION',      1188      );
 define ( 'EOL',                    "<br />\r\n"     );
 define ( 'ATOM_TIME',              'Y-m-d\TH:i:s\Z' );
 
@@ -84,6 +84,15 @@ define ( 'LOGGER_DEBUG',           2 );
 define ( 'LOGGER_DATA',            3 );
 define ( 'LOGGER_ALL',             4 );
 
+/**
+ * cache levels
+ */
+
+define ( 'CACHE_MONTH',            0 );
+define ( 'CACHE_WEEK',             1 );
+define ( 'CACHE_DAY',              2 );
+define ( 'CACHE_HOUR',             3 );
+
 /**
  * registration policies
  */
@@ -1708,6 +1717,15 @@ function random_digits($digits) {
        return $rn;
 }
 
+function get_server() {
+       $server = get_config("system", "directory");
+
+       if ($server == "")
+               $server = "http://dir.friendi.ca";
+
+       return($server);
+}
+
 function get_cachefile($file, $writemode = true) {
        $cache = get_itemcachepath();
 
@@ -1793,7 +1811,11 @@ function get_lockpath() {
 
        if ($temppath != "") {
                $lockpath = $temppath."/lock";
-               mkdir($lockpath);
+
+               if (!is_dir($lockpath))
+                       mkdir($lockpath);
+               elseif (!is_writable($lockpath))
+                       $lockpath = $temppath;
 
                if (is_dir($lockpath) AND is_writable($lockpath)) {
                        set_config("system", "lockpath", $lockpath);