View Issue Details

IDProjectCategoryView StatusLast Update
13464Bug reports[All Projects] RemoteControlpublic2018-03-15 13:41
ReporterErika3175Assigned Toolle 
PrioritynoneSeverityblock 
Status closedResolutionfixed 
Product Version3.1.x 
Target VersionFixed in Version3.5.x 
Summary13464: Invalid SQL in "mail_registered_participants" RemoteControl API method
DescriptionWhen using "mail_registered_participants" (with no third argument at least) RemoteControl API method, the resulting SQL is not valid for PostgreSQL databases.

It's currently resulting in : ...AND (emailstatus = "OK") ORDER BY tid
whereas it should be : ...AND (emailstatus = 'OK') ORDER BY tid

The second form should be fine at least with MySQL and PostgreSQL, and probably with other SQL-compliant databases...
Steps To Reproduceinclude_once 'vendor/autoload.php';

define( 'LS_BASEURL', 'https://localhost/limesurvey/'); // adjust this one to your actual LimeSurvey URL
define( 'LS_USER', 'rpcuser' );
define( 'LS_PASSWORD', 'mypassword' );

// the survey to process
$survey_id=99999;
try
{
    // instantiate a new client
    $myJSONRPCClient = new \org\jsonrpcphp\JsonRPCClient( LS_BASEURL.'/admin/remotecontrol' );

    // receive session key
    $sessionKey= $myJSONRPCClient->get_session_key( LS_USER, LS_PASSWORD );

    // call method
    $response = $myJSONRPCClient->mail_registered_participants( $sessionKey, $survey_id) ;

}
catch (Exception $e)
{
    echo $e->getMessage() ;
}

// release the session key
$myJSONRPCClient->release_session_key( $sessionKey );
Additional InformationFix can be done in application/helpers/remotecontrol/remotecontrol_handle.php at line 2339
TagsNo tags attached.
Complete LimeSurvey version number (& build)3.4.4
I will donate to the project if issue is resolvedNo
BrowserFirefox
Database & DB-VersionPostgreSQL 9.4.5
Operating System (Server)Linux
Webserver software & versionApache 2.4
PHP Version5.6

Activities

olle

olle

2018-03-12 10:37

administrator   ~47009

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=26719
olle

olle

2018-03-12 10:38

administrator   ~47010

Thanks for reporting!

Related Changesets

LimeSurvey: master 0d093781

2018-03-12 10:37:00

olle

Details Diff
Fixed issue 13464: Invalid SQL in "mail_registered_participants"
RemoteControl API method
mod - application/helpers/remotecontrol/remotecontrol_handle.php Diff File

Issue History

Date Modified Username Field Change
2018-03-09 13:53 Erika3175 New Issue
2018-03-12 10:37 olle Changeset attached => LimeSurvey master 0d093781
2018-03-12 10:37 olle Note Added: 47009
2018-03-12 10:37 olle Assigned To => olle
2018-03-12 10:37 olle Resolution open => fixed
2018-03-12 10:38 olle Status new => resolved
2018-03-12 10:38 olle Fixed in Version => 3.5.x
2018-03-12 10:38 olle Note Added: 47010
2018-03-15 13:41 olle Status resolved => closed