Skip to content
Browse files

Merge pull request #12 from ecsos/master

Fixes erroneous code in FindQuery_AND and adds option to not verify peer SSL for curl
  • Loading branch information...
2 parents db91342 + 203a1aa commit 954939fc66dbe9265340516633667113eba1a1b4 @yodarunamok committed May 8, 2012
Showing with 5 additions and 3 deletions.
  1. +4 −3 FX.php
  2. +1 −0 datasource_classes/RetrieveFM7Data.class.php
View
7 FX.php
@@ -62,14 +62,15 @@ class FX {
var $dataPortSuffix;
var $urlScheme;
var $useSSLProtocol = false;
+ var $verifyPeer = true;
var $database = "";
var $layout = ""; // the layout to be accessed for FM databases. For SQL, the table to be accessed.
var $responseLayout = "";
var $groupSize;
var $currentSkip = 0;
var $defaultOperator = 'bw';
- var $findquerynumber = 1; // added by Nick Salonen
- var $findquerystring = ''; // added by Nick Salonen
+ var $findquerynumber = 1;
+ var $findquerystring = '';
var $dataParams = array();
var $sortParams = array();
var $actionArray = array(
@@ -681,7 +682,7 @@ function FindQuery_AND($namevaluepair = array(), $fieldnames = array(), $queryst
foreach($qnumlist as $num)
{
// make sure that the query data is not already in this section ex: (q2,q2) is illegal
- if (strpos($findquerypiece, array('q'.$num.')', 'q'.$num.',')) === false)
+ if (strpos($findquerypiece, 'q'.$num.')') == false && strpos($findquerypiece, 'q'.$num.',') === false)
{
$newquerystring .= ',q'.$num;
}
View
1 datasource_classes/RetrieveFM7Data.class.php
@@ -155,6 +155,7 @@ function doQuery ($action) {
curl_setopt($curlHandle, CURLOPT_PORT, $this->FX->dataPort);
curl_setopt($curlHandle, CURLOPT_HEADER, 0);
curl_setopt($curlHandle, CURLOPT_POST, 1);
+ if ($this->FX->verifyPeer == false) curl_setopt($curlHandle, CURLOPT_SSL_VERIFYPEER,false);
curl_setopt($curlHandle, CURLOPT_POSTFIELDS, $this->dataURLParams);
if ($this->FX->DBPassword != '' || $this->FX->DBUser != 'FX') {
curl_setopt($curlHandle, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);

0 comments on commit 954939f

Please sign in to comment.
Something went wrong with that request. Please try again.