Example #1
0
 /**
  * Initialize, or re-initialize, GNU social global configuration
  * and plugins.
  *
  * If switching site configurations during script execution, be
  * careful when working with leftover objects -- global settings
  * affect many things and they may not behave as you expected.
  *
  * @param $server optional web server hostname for picking config
  * @param $path optional URL path for picking config
  * @param $conffile optional configuration file path
  *
  * @throws NoConfigException if config file can't be found
  */
 public static function init($server = null, $path = null, $conffile = null)
 {
     Router::clear();
     self::initDefaults($server, $path);
     self::loadConfigFile($conffile);
     $sprofile = common_config('site', 'profile');
     if (!empty($sprofile)) {
         self::loadSiteProfile($sprofile);
     }
     // Load settings from database; note we need autoload for this
     Config::loadSettings();
     self::initPlugins();
 }
Example #2
0
 /**
  * Initialize, or re-initialize, StatusNet global configuration
  * and plugins.
  *
  * If switching site configurations during script execution, be
  * careful when working with leftover objects -- global settings
  * affect many things and they may not behave as you expected.
  *
  * @param $server optional web server hostname for picking config
  * @param $path optional URL path for picking config
  * @param $conffile optional configuration file path
  *
  * @throws NoConfigException if config file can't be found
  */
 public static function init($server = null, $path = null, $conffile = null)
 {
     Router::clear();
     StatusNet::initDefaults($server, $path);
     StatusNet::loadConfigFile($conffile);
     // Load settings from database; note we need autoload for this
     Config::loadSettings();
     self::initPlugins();
 }