summaryrefslogtreecommitdiff
path: root/lib/common.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-08-24 16:55:49 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-08-24 16:55:49 -0400
commitff87732053bae38879988ba7d002a294998ccb4e (patch)
treeccccfe7fc8976baf1f0cd4438a57bf817dc4052c /lib/common.php
parent27aeba01dd366f15f7847267b7518fb873987ddb (diff)
parentf3cdc7f272e409d391979d3e6c58dd63573530c0 (diff)
Merge branch '0.8.x' into testing
Conflicts: actions/twitterauthorization.php lib/oauthclient.php lib/twitter.php lib/twitterapi.php lib/twitteroauthclient.php scripts/twitterstatusfetcher.php
Diffstat (limited to 'lib/common.php')
-rw-r--r--lib/common.php20
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/common.php b/lib/common.php
index 5d6956d9b..8d79b2666 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -47,6 +47,9 @@ require_once('PEAR.php');
require_once('DB/DataObject.php');
require_once('DB/DataObject/Cast.php'); # for dates
+if (!function_exists('gettext')) {
+ require_once("php-gettext/gettext.inc");
+}
require_once(INSTALLDIR.'/lib/language.php');
// This gets included before the config file, so that admin code and plugins
@@ -82,7 +85,7 @@ if (isset($server)) {
if (isset($path)) {
$_path = $path;
} else {
- $_path = array_key_exists('SCRIPT_NAME', $_SERVER) ?
+ $_path = (array_key_exists('SERVER_NAME', $_SERVER) && array_key_exists('SCRIPT_NAME', $_SERVER)) ?
_sn_to_path($_SERVER['SCRIPT_NAME']) :
null;
}
@@ -109,6 +112,7 @@ $config =
'broughtbyurl' => null,
'closed' => false,
'inviteonly' => false,
+ 'openidonly' => false,
'private' => false,
'ssl' => 'never',
'sslserver' => null,
@@ -169,6 +173,8 @@ $config =
'host' => null, # only set if != server
'debug' => false, # print extra debug info
'public' => array()), # JIDs of users who want to receive the public stream
+ 'openid' =>
+ array('enabled' => true),
'invite' =>
array('enabled' => true),
'sphinx' =>
@@ -183,6 +189,12 @@ $config =
array('piddir' => '/var/run',
'user' => false,
'group' => false),
+ 'emailpost' =>
+ array('enabled' => true),
+ 'sms' =>
+ array('enabled' => true),
+ 'twitter' =>
+ array('enabled' => true),
'twitterbridge' =>
array('enabled' => false),
'integration' =>
@@ -364,6 +376,12 @@ if ($_db_name != 'laconica' && !array_key_exists('ini_'.$_db_name, $config['db']
$config['db']['ini_'.$_db_name] = INSTALLDIR.'/classes/laconica.ini';
}
+// Ignore openidonly if OpenID is disabled
+
+if (!$config['openid']['enabled']) {
+ $config['site']['openidonly'] = false;
+}
+
// XXX: how many of these could be auto-loaded on use?
require_once 'Validate.php';