summaryrefslogtreecommitdiff
path: root/backend/php
authorGiulio Cesare Solaroli <giulio.cesare@clipperz.com>2011-10-04 23:23:06 (UTC)
committer Giulio Cesare Solaroli <giulio.cesare@clipperz.com>2011-10-04 23:23:06 (UTC)
commitbf22713a7251a2b32700a67456a086a283dbe33a (patch) (unidiff)
treea56970d0131dace77edc68b122effe04db78f213 /backend/php
parentd6f7343c97ab28c88ade2b4e4edf0ac29f7c5117 (diff)
downloadclipperz-bf22713a7251a2b32700a67456a086a283dbe33a.zip
clipperz-bf22713a7251a2b32700a67456a086a283dbe33a.tar.gz
clipperz-bf22713a7251a2b32700a67456a086a283dbe33a.tar.bz2
Fixed code indentation
Diffstat (limited to 'backend/php') (more/less context) (ignore whitespace changes)
-rw-r--r--backend/php/src/index.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/backend/php/src/index.php b/backend/php/src/index.php
index 35752f4..58c10a9 100644
--- a/backend/php/src/index.php
+++ b/backend/php/src/index.php
@@ -702,46 +702,46 @@ error_log("message");
702 updateUserCredentials($parameters["parameters"]["credentials"], $user); 702 updateUserCredentials($parameters["parameters"]["credentials"], $user);
703 updateUserData($parameters["parameters"]["user"], $user); 703 updateUserData($parameters["parameters"]["user"], $user);
704 704
705 $otpList = $parameters["parameters"]["oneTimePasswords"]; 705 $otpList = $parameters["parameters"]["oneTimePasswords"];
706 foreach($otpList as $otpReference=>$otpData) { 706 foreach($otpList as $otpReference=>$otpData) {
707 $otpList = $otp->GetList(array(array("reference", "=", $otpReference))); 707 $otpList = $otp->GetList(array(array("reference", "=", $otpReference)));
708 $currentOtp = $otpList[0]; 708 $currentOtp = $otpList[0];
709 $currentOtp->data = $otpData; 709 $currentOtp->data = $otpData;
710 $currentOtp->Save(); 710 $currentOtp->Save();
711 } 711 }
712 712
713 $user->Save(); 713 $user->Save();
714 714
715 $result["lock"] = $user->lock; 715 $result["lock"] = $user->lock;
716 $result["result"] = "done"; 716 $result["result"] = "done";
717 717
718 //============================================================= 718 //=============================================================
719 } else if ($message == "echo") { 719 } else if ($message == "echo") {
720 $result["result"] = $parameters; 720 $result["result"] = $parameters;
721 } 721 }
722 722
723 //============================================================= 723 //=============================================================
724 } else if (isset($_SESSION['K'])) { 724 } else if (isset($_SESSION['K'])) {
725 $result["error"] = "Wrong shared secret!"; 725 $result["error"] = "Wrong shared secret!";
726 } else { 726 } else {
727 $result["result"] = "EXCEPTION"; 727 $result["result"] = "EXCEPTION";
728 $result["message"] = "Trying to communicate without an active connection"; 728 $result["message"] = "Trying to communicate without an active connection";
729 } 729 }
730 break; 730 break;
731 731
732 case "logout": 732 case "logout":
733error_log("logout"); 733error_log("logout");
734 session_destroy(); 734 session_destroy();
735 break; 735 break;
736 736
737 default: 737 default:
738error_log("default"); 738error_log("default");
739 $result["result"] = $parameters; 739 $result["result"] = $parameters;
740 break; 740 break;
741 } 741 }
742 742
743 session_write_close(); 743 session_write_close();
744 744
745 echo(json_encode($result)); 745 echo(json_encode($result));
746error_log("result: ".json_encode($result)); 746error_log("result: ".json_encode($result));
747?> 747?>