]> git.mxchange.org Git - friendica.git/commitdiff
Added an option to configure the hostname manually. And there was a problem when...
authorMichael Vogel <icarus@dabo.de>
Sun, 11 Aug 2013 19:19:26 +0000 (21:19 +0200)
committerMichael Vogel <icarus@dabo.de>
Sun, 11 Aug 2013 19:19:26 +0000 (21:19 +0200)
include/cli_startup.php
include/config.php
include/cronhooks.php
include/delivery.php
include/expire.php
include/gprobe.php
include/notifier.php
include/onepoll.php
include/poller.php
include/queue.php
index.php

index e069ec2c989c3a333cd21d7a401dc04f3ee168a7..236fd14427b3a4d608b14922fdf714e4755c457e 100644 (file)
@@ -24,8 +24,11 @@ function cli_startup() {
        load_config('config');
        load_config('system');
 
+       if ($hostname =  get_config('system', 'hostname'))
+               $a->set_hostname($hostname);
+
        $a->set_baseurl(get_config('system','url'));
 
        load_hooks();
 
-}
\ No newline at end of file
+}
index 4f44de24fc1da801ea753e410cf88a317baba9da..ce30d2d192ce12be96b17a5d7d7b893f52e934d4 100644 (file)
@@ -77,7 +77,8 @@ function get_config($family, $key, $instore = false) {
                                return false;
                        else
                                return $val;
-               } else
+               }
+                       // else
                        //logger("APC: cache miss for value ".$family."|".$key, LOGGER_DEBUG);
 
 
@@ -207,7 +208,7 @@ function get_pconfig($uid,$family, $key, $instore = false) {
                                return false;
                        else
                                return $val;
-               } else
+               } // else
                        //logger("APC: cache miss for value ".$family."|".$key, LOGGER_DEBUG);
 
 
index 15d49fe5474b32101c60ff5ba90b58c383f1ac39..096e10b718bd8ea51ff338f1b7a0bfa3e952c824 100644 (file)
@@ -24,6 +24,9 @@ function cronhooks_run(&$argv, &$argc){
        load_config('config');
        load_config('system');
 
+       if ($hostname =  get_config('system', 'hostname'))
+               $a->set_hostname($hostname);
+
        $lockpath = get_config('system','lockpath');
        if ($lockpath != '') {
                $pidfile = new pidfile($lockpath, 'cron.lck');
index d89cded9eb10ed7ecf082d25f0dbef8989109e45..515f286e0fc59db568fcd6227b5af74c4d02224a 100644 (file)
@@ -27,6 +27,9 @@ function delivery_run(&$argv, &$argc){
        load_config('config');
        load_config('system');
 
+       if ($hostname =  get_config('system', 'hostname'))
+               $a->set_hostname($hostname);
+
        load_hooks();
 
        if($argc < 3)
index 4c6fb7a19dd3e1bd37f79cda4eccd38299615a6c..fe1007efd58b006e5e53ae0ebc1639f59b4ce4ed 100644 (file)
@@ -25,6 +25,8 @@ function expire_run(&$argv, &$argc){
        load_config('config');
        load_config('system');
 
+       if ($hostname =  get_config('system', 'hostname'))
+               $a->set_hostname($hostname);
 
        $a->set_baseurl(get_config('system','url'));
 
index 0cf32e95fe9311f04cffeeb1cd5089eb3cb5d119..00a8e562af07f950b73a73b6265ebf332fa803a1 100644 (file)
@@ -24,6 +24,9 @@ function gprobe_run(&$argv, &$argc){
        load_config('config');
        load_config('system');
 
+       if ($hostname =  get_config('system', 'hostname'))
+               $a->set_hostname($hostname);
+
        $a->set_baseurl(get_config('system','url'));
 
        load_hooks();
index a3286355ddabb371578c990abbae967dda6764de..a90e180623ace698fbc12737fa00e3b78eca1bea 100644 (file)
@@ -65,6 +65,9 @@ function notifier_run(&$argv, &$argc){
        load_config('config');
        load_config('system');
 
+       if ($hostname =  get_config('system', 'hostname'))
+               $a->set_hostname($hostname);
+
        load_hooks();
 
        if($argc < 3)
index f38f6b4c61d88fbf54528267d3940e52f64530d5..737f70a28673701831c5dcf5390d3760f06b05f7 100644 (file)
@@ -37,6 +37,9 @@ function onepoll_run(&$argv, &$argc){
        load_config('config');
        load_config('system');
 
+       if ($hostname =  get_config('system', 'hostname'))
+               $a->set_hostname($hostname);
+
        $a->set_baseurl(get_config('system','url'));
 
        load_hooks();
index e927430ea9e7ef6ab2831a2b35869c85d7fb7503..0bbead189109062495c8640b9b9e0e9f3b1e8c6d 100644 (file)
@@ -30,6 +30,9 @@ function poller_run(&$argv, &$argc){
        load_config('config');
        load_config('system');
 
+       if ($hostname =  get_config('system', 'hostname'))
+               $a->set_hostname($hostname);
+
        $maxsysload = intval(get_config('system','maxloadavg'));
        if($maxsysload < 1)
                $maxsysload = 50;
index 64cccad21efe4f796a50e39b480da75415da7d12..f277b3fbd4ec4a8f08c4c1b2f1f53db07c128070 100644 (file)
@@ -25,6 +25,9 @@ function queue_run(&$argv, &$argc){
        load_config('config');
        load_config('system');
 
+       if ($hostname =  get_config('system', 'hostname'))
+               $a->set_hostname($hostname);
+
        $a->set_baseurl(get_config('system','url'));
 
        load_hooks();
index 6b6e873ea6b1987a20206b5bdcbabd2cdda9bccc..67c0c495cf9316994d77926214bc7021da605786 100644 (file)
--- a/index.php
+++ b/index.php
@@ -53,6 +53,9 @@ if(!$install) {
        load_config('config');
        load_config('system');
 
+       if ($hostname =  get_config('system', 'hostname'))
+               $a->set_hostname($hostname);
+
        require_once("include/session.php");
        load_hooks();
        call_hooks('init_1');