X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=index.php;h=b1e4f651e4872b1dbf8961a1064c3424fc29972a;hb=093857c582a68b39e0d65523d27f25ede7b7fed6;hp=51e30f57821ffd5c1053174759e6944ec63248f3;hpb=93b7e601156d88399b57ef9cd2962a22350270a8;p=quix0rs-gnu-social.git diff --git a/index.php b/index.php index 51e30f5782..b1e4f651e4 100644 --- a/index.php +++ b/index.php @@ -61,8 +61,14 @@ function getPath($req) } } +/** + * logs and then displays error messages + * + * @return void + */ function handleError($error) { +//error_log(print_r($error,1)); if ($error->getCode() == DB_DATAOBJECT_ERROR_NODATA) { return; } @@ -138,7 +144,7 @@ function checkMirror($action_obj, $args) function isLoginAction($action) { - static $loginActions = array('login', 'recoverpassword', 'api', 'doc', 'register'); + static $loginActions = array('login', 'recoverpassword', 'api', 'doc', 'register', 'publicxrds'); $login = null; @@ -234,6 +240,7 @@ function main() if (!$user && common_config('site', 'private') && !isLoginAction($action) && !preg_match('/rss$/', $action) + && !preg_match('/^Api/', $action) ) { common_redirect(common_local_url('login')); return;