From c1d248dbd316360b6210c7f6ffdb3a3c96a26fe7 Mon Sep 17 00:00:00 2001 From: jacob Date: Fri, 18 Feb 2011 17:12:32 +0000 Subject: [PATCH] Added the soulmate for a lonely opening brace. --- api.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/api.php b/api.php index 663214e..e854c68 100644 --- a/api.php +++ b/api.php @@ -927,14 +927,18 @@ switch($request[0]) { */ case 'view': if($u=user_load($_SESSION['users_id'])) { - $p=getProject(getRegistrationsId($_SESSION['users_id'])); - if(is_array($p)) { - $ret['status'] = 'ok'; - $ret['project'] = $p; - } - else { + $p=getProject(getRegistrationsId($_SESSION['users_id'])); + if(is_array($p)) { + $ret['status'] = 'ok'; + $ret['project'] = $p; + } + else { + $ret['status'] = 'error'; + $ret['error'] = 'no project'; + } + }else{ $ret['status'] = 'error'; - $ret['error'] = 'no project'; + $ret['error'] = 'unabe to load current user'; } break;