X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fstatusnet.php;h=beeb26cccdccb182777682be0b875d8c8035f2e1;hb=b34bbb0e8045008a0048829672af905385241735;hp=0c5807d7b984099e175c66ec8798d7ec84f40609;hpb=ec145b73fc91dd54695dd374c8a71a11e233b8c0;p=quix0rs-gnu-social.git diff --git a/lib/statusnet.php b/lib/statusnet.php index 0c5807d7b9..beeb26cccd 100644 --- a/lib/statusnet.php +++ b/lib/statusnet.php @@ -1,7 +1,7 @@ . + * */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET') && !defined('LACONICA')) { + exit(1); +} global $config, $_server, $_path; @@ -60,7 +63,7 @@ class StatusNet } } if (!class_exists($pluginclass)) { - throw new ServerException(500, "Plugin $name not found."); + throw new ServerException("Plugin $name not found.", 500); } } @@ -227,19 +230,19 @@ class StatusNet protected function loadConfigFile($conffile=null) { global $_server, $_path, $config; - + // From most general to most specific: // server-wide, then vhost-wide, then for a path, // finally for a dir (usually only need one of the last two). - + if (isset($conffile)) { $config_files = array($conffile); } else { $config_files = array('/etc/statusnet/statusnet.php', - '/etc/statusnet/laconica.php', - '/etc/laconica/laconica.php', - '/etc/statusnet/'.$_server.'.php', - '/etc/laconica/'.$_server.'.php'); + '/etc/statusnet/laconica.php', + '/etc/laconica/laconica.php', + '/etc/statusnet/'.$_server.'.php', + '/etc/laconica/'.$_server.'.php'); if (strlen($_path) > 0) { $config_files[] = '/etc/statusnet/'.$_server.'_'.$_path.'.php'; @@ -260,7 +263,7 @@ class StatusNet if (!self::$have_config) { throw new NoConfigException("No configuration file found.", - $config_files); + $config_files); } // Fixup for statusnet.ini