The branch, master has been updated
via ec18488499312fb3d4a3678f52c8aed77a35662c (commit)
via 49a3bf45b7cbe158ed3d6fe3956870c61ca1f0aa (commit)
via 7d9bdc4754177450d96dd327b91f3fe1d00e68ae (commit)
from 1faec011d012ba37af49965a87840c071f75a4d1 (commit)
- Log -----------------------------------------------------------------
commit ec18488499312fb3d4a3678f52c8aed77a35662c
Author: Michal ÄŒihaÅ™ <mcihar(a)novell.com>
Date: Wed Jul 21 13:20:58 2010 +0200
Fix documentation.
commit 49a3bf45b7cbe158ed3d6fe3956870c61ca1f0aa
Author: Michal ÄŒihaÅ™ <mcihar(a)novell.com>
Date: Wed Jul 21 13:20:29 2010 +0200
Coding style.
commit 7d9bdc4754177450d96dd327b91f3fe1d00e68ae
Author: Michal ÄŒihaÅ™ <mcihar(a)novell.com>
Date: Wed Jul 21 13:19:19 2010 +0200
Make sure sqlvalidator_error is always defined.
-----------------------------------------------------------------------
Summary of changes:
libraries/sqlvalidator.class.php | 21 +++++++++++++++++++--
libraries/sqlvalidator.lib.php | 4 ++--
2 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/libraries/sqlvalidator.class.php b/libraries/sqlvalidator.class.php
index 0f9a6f3..0a70158 100644
--- a/libraries/sqlvalidator.class.php
+++ b/libraries/sqlvalidator.class.php
@@ -34,11 +34,13 @@ if (! defined('PHPMYADMIN')) {
* Load SOAP client.
*/
if (class_exists('SOAPClient')) {
+ $GLOBALS['sqlvalidator_error'] = false;
$GLOBALS['sqlvalidator_soap'] = 'PHP';
} else {
@include_once 'SOAP/Client.php';
if (class_exists('SOAP_Client')) {
$GLOBALS['sqlvalidator_soap'] = 'PEAR';
+ $GLOBALS['sqlvalidator_error'] = false;
} else {
$GLOBALS['sqlvalidator_soap'] = 'NONE';
$GLOBALS['sqlvalidator_error'] = TRUE;
@@ -121,7 +123,17 @@ if (!$GLOBALS['sqlvalidator_error']) {
$connection_technology, $connection_technology_version,
$interactive)
{
- $use_array = array("a_userName" => $username, "a_password" => $password, "a_callingProgram" => $calling_program, "a_callingProgramVersion" => $calling_program_version, "a_targetDbms" => $target_dbms, "a_targetDbmsVersion" => $target_dbms_version, "a_connectionTechnology" => $connection_technology, "a_connectionTechnologyVersion" => $connection_technology_version, "a_interactive" => $interactive);
+ $use_array = array(
+ "a_userName" => $username,
+ "a_password" => $password,
+ "a_callingProgram" => $calling_program,
+ "a_callingProgramVersion" => $calling_program_version,
+ "a_targetDbms" => $target_dbms,
+ "a_targetDbmsVersion" => $target_dbms_version,
+ "a_connectionTechnology" => $connection_technology,
+ "a_connectionTechnologyVersion" => $connection_technology_version,
+ "a_interactive" => $interactive,
+ );
if ($GLOBALS['sqlvalidator_soap'] == 'PHP') {
$ret = $obj->__soapCall("openSession", $use_array);
} else {
@@ -153,7 +165,12 @@ if (!$GLOBALS['sqlvalidator_error']) {
*/
function _validateSQL($obj, $session, $sql, $method)
{
- $use_array = array("a_sessionId" => $session->sessionId, "a_sessionKey" => $session->sessionKey, "a_SQL" => $sql, "a_resultType" => $this->output_type);
+ $use_array = array(
+ "a_sessionId" => $session->sessionId,
+ "a_sessionKey" => $session->sessionKey,
+ "a_SQL" => $sql,
+ "a_resultType" => $this->output_type,
+ );
if ($GLOBALS['sqlvalidator_soap'] == 'PHP') {
$res = $obj->__soapCall("validateSQL", $use_array);
} else {
diff --git a/libraries/sqlvalidator.lib.php b/libraries/sqlvalidator.lib.php
index 2e965f8..aaa79c0 100644
--- a/libraries/sqlvalidator.lib.php
+++ b/libraries/sqlvalidator.lib.php
@@ -22,8 +22,8 @@
* run this: "pear install Mail_Mime Net_DIME SOAP"
*
* Enable the SQL Validator options in the configuration file
- * $cfg['SQLQuery']['Validate'] = TRUE;
- * $cfg['SQLValidator']['use'] = FALSE;
+ * $cfg['SQLQuery']['Validate'] = true;
+ * $cfg['SQLValidator']['use'] = true;
*
* Also set a username and password if you have a private one
*
hooks/post-receive
--
phpMyAdmin