]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/common.php
Update copyright dates in files modified in 2009
[quix0rs-gnu-social.git] / lib / common.php
index 629fee25b269b65721e2ee8022b141b2984a5abc..a4da2515783aedbd26b5a496b7d4af9ca71d4666 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  * Laconica - a distributed open-source microblogging tool
- * Copyright (C) 2008, Controlez-Vous, Inc.
+ * Copyright (C) 2008, 2009, Control Yourself, Inc.
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
@@ -55,13 +55,25 @@ require_once(INSTALLDIR.'/lib/language.php');
 require_once(INSTALLDIR.'/lib/event.php');
 require_once(INSTALLDIR.'/lib/plugin.php');
 
+function _sn_to_path($sn)
+{
+    $past_root = substr($sn, 1);
+    $last_slash = strrpos($past_root, '/');
+    if ($last_slash > 0) {
+        $p = substr($past_root, 0, $last_slash);
+    } else {
+        $p = '';
+    }
+    return $p;
+}
+
 // try to figure out where we are
 
 $_server = array_key_exists('SERVER_NAME', $_SERVER) ?
   strtolower($_SERVER['SERVER_NAME']) :
   null;
 $_path = array_key_exists('SCRIPT_NAME', $_SERVER) ?
-  substr($_SERVER['SCRIPT_NAME'], 1, strrpos($_SERVER['SCRIPT_NAME'], '/') - 1) :
+  _sn_to_path($_SERVER['SCRIPT_NAME']) :
   null;
 
 // default configuration, overwritten in config.php
@@ -79,7 +91,7 @@ $config =
                     'textcolor' => '#000000',
                     'linkcolor' => '#002E6E',
                     'backgroundimage' => null,
-                    'tile' => true),
+                    'disposition' => 1),
               'path' => $_path,
               'logfile' => null,
               'logo' => null,
@@ -213,9 +225,11 @@ $config =
         'file_quota' => 5000000,
         'user_quota' => 50000000,
         'monthly_quota' => 15000000,
+        'uploads' => true,
         ),
         'group' =>
         array('maxaliases' => 3),
+        'oohembed' => array('endpoint' => 'http://oohembed.com/oohembed/')
         );
 
 $config['db'] = &PEAR::getStaticProperty('DB_DataObject','options');