From f3ffba6b990cfffba8355c298e958e8be3906468 Mon Sep 17 00:00:00 2001 From: Menno Dekker Date: Mon, 1 Apr 2013 12:32:15 +0200 Subject: [PATCH] dev: fixes for remote control --- application/controllers/admin/remotecontrol.php | 6 +----- application/libraries/BigData.php | 2 +- application/libraries/LSjsonRPCServer.php | 1 + 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/application/controllers/admin/remotecontrol.php b/application/controllers/admin/remotecontrol.php index d0d8483aaa9..9ca3fe42d40 100644 --- a/application/controllers/admin/remotecontrol.php +++ b/application/controllers/admin/remotecontrol.php @@ -85,7 +85,7 @@ public function run() public function test() { $RPCType=Yii::app()->getConfig("RPCInterface"); - $serverUrl = Yii::app()->getBaseUrl(true).'/'.dirname(Yii::app()->request->getPathInfo()); + $serverUrl = App()->createAbsoluteUrl('/admin/remotecontrol'); $sFileToImport=dirname(Yii::app()->basePath).DIRECTORY_SEPARATOR.'docs'.DIRECTORY_SEPARATOR.'demosurveys'.DIRECTORY_SEPARATOR.'limesurvey2_sample_survey_english.lss'; if ($RPCType == 'xml') { @@ -2362,14 +2362,10 @@ public function export_responses($sSessionKey, $iSurveyID, $sDocumentType, $sLan */ protected function _doLogin($sUsername, $sPassword) { - if (Failed_login_attempts::model()->isLockedOut()) - return false; - $identity = new UserIdentity(sanitize_user($sUsername), $sPassword); if (!$identity->authenticate()) { - Failed_login_attempts::model()->addAttempt(); return false; } else diff --git a/application/libraries/BigData.php b/application/libraries/BigData.php index 3dae14a7907..6a1b3ae7d7e 100644 --- a/application/libraries/BigData.php +++ b/application/libraries/BigData.php @@ -17,7 +17,7 @@ class BigData { * @param array $json * @param int $options Same flags used in JSON_ENCODE. */ - public static function json_echo($json, $options) + public static function json_echo($json, $options = 0) { // Scan array for any streams. $hasStream = array_reduce($json, array('BigData', 'hasStream'), false); diff --git a/application/libraries/LSjsonRPCServer.php b/application/libraries/LSjsonRPCServer.php index 88a33232202..196bee8e4f9 100644 --- a/application/libraries/LSjsonRPCServer.php +++ b/application/libraries/LSjsonRPCServer.php @@ -1,5 +1,6 @@