Skip to content

Commit

Permalink
dev: fixes for remote control
Browse files Browse the repository at this point in the history
  • Loading branch information
mennodekker committed Apr 1, 2013
1 parent 6346b32 commit f3ffba6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
6 changes: 1 addition & 5 deletions application/controllers/admin/remotecontrol.php
Expand Up @@ -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') {
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion application/libraries/BigData.php
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions application/libraries/LSjsonRPCServer.php
@@ -1,5 +1,6 @@
<?php
Yii::import('application.libraries.BigData', true);
Yii::import('application.libraries.jsonRPCServer', true);
class LSjsonRPCServer extends jsonRPCServer
{
/**
Expand Down

0 comments on commit f3ffba6

Please sign in to comment.