aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-06-30 01:15:18 -0700
committerFriendika <info@friendika.com>2011-06-30 01:15:18 -0700
commit994011ddb6cc1097214537160a10bf710aedc553 (patch)
treee4f88c8e8db8f78c1c5c3362919aa3ca32eb3b20 /include
parent3eb0b4be2a7e0f4d8f9a518114e1daa49f46b59b (diff)
downloadvolse-hubzilla-994011ddb6cc1097214537160a10bf710aedc553.tar.gz
volse-hubzilla-994011ddb6cc1097214537160a10bf710aedc553.tar.bz2
volse-hubzilla-994011ddb6cc1097214537160a10bf710aedc553.zip
load db configs (config,system) for all "executables"
Diffstat (limited to 'include')
-rw-r--r--include/directory.php24
-rw-r--r--include/expire.php4
-rw-r--r--include/notifier.php3
-rw-r--r--include/poller.php3
-rw-r--r--include/queue.php3
5 files changed, 27 insertions, 10 deletions
diff --git a/include/directory.php b/include/directory.php
index 2c9daa5ea..cae78adb4 100644
--- a/include/directory.php
+++ b/include/directory.php
@@ -2,18 +2,22 @@
require_once("boot.php");
function directory_run($argv, $argc){
- global $a, $db;
+ global $a, $db;
- if(is_null($a)){
- $a = new App;
- }
+ if(is_null($a)) {
+ $a = new App;
+ }
- if(is_null($db)){
- @include(".htconfig.php");
- require_once("dba.php");
- $db = new dba($db_host, $db_user, $db_pass, $db_data);
- unset($db_host, $db_user, $db_pass, $db_data);
- };
+ if(is_null($db)) {
+ @include(".htconfig.php");
+ require_once("dba.php");
+ $db = new dba($db_host, $db_user, $db_pass, $db_data);
+ unset($db_host, $db_user, $db_pass, $db_data);
+ };
+
+ load_config('config');
+ load_config('system');
+
if($argc != 2)
return;
diff --git a/include/expire.php b/include/expire.php
index cf3b7c8e2..64dbe2536 100644
--- a/include/expire.php
+++ b/include/expire.php
@@ -22,6 +22,10 @@ function expire_run($argv, $argc){
require_once('include/items.php');
require_once('include/Contact.php');
+ load_config('config');
+ load_config('system');
+
+
$a->set_baseurl(get_config('system','url'));
diff --git a/include/notifier.php b/include/notifier.php
index d9f903853..4b97311f6 100644
--- a/include/notifier.php
+++ b/include/notifier.php
@@ -20,6 +20,9 @@ function notifier_run($argv, $argc){
require_once('include/items.php');
require_once('include/bbcode.php');
+ load_config('config');
+ load_config('system');
+
load_hooks();
if($argc < 3)
diff --git a/include/poller.php b/include/poller.php
index 99517a7ee..4cab5a3b8 100644
--- a/include/poller.php
+++ b/include/poller.php
@@ -24,6 +24,9 @@ function poller_run($argv, $argc){
require_once('include/Contact.php');
require_once('include/email.php');
+ load_config('config');
+ load_config('system');
+
$a->set_baseurl(get_config('system','url'));
load_hooks();
diff --git a/include/queue.php b/include/queue.php
index cbda196da..fb65d5c25 100644
--- a/include/queue.php
+++ b/include/queue.php
@@ -22,6 +22,9 @@ function queue_run($argv, $argc){
require_once('include/items.php');
require_once('include/bbcode.php');
+ load_config('config');
+ load_config('system');
+
$a->set_baseurl(get_config('system','url'));
load_hooks();