libraries/sqlvalidator.class.php3: Removed dependency on overload extension, Started to fix bug #644709
This commit is contained in:
@@ -5,8 +5,13 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2002-01-13 Robin Johnson <robbat2@users.sourceforge.net>
|
||||||
|
* libraries/sqlvalidator.class.php3:
|
||||||
|
- Removed dependency on overload extension
|
||||||
|
- Started to fix bug #644709
|
||||||
|
|
||||||
2002-01-12 Robin Johnson <robbat2@users.sourceforge.net>
|
2002-01-12 Robin Johnson <robbat2@users.sourceforge.net>
|
||||||
* read_dump.php3, sql.php3,libraries/common.lib.php3,
|
* read_dump.php3, sql.php3, libraries/common.lib.php3,
|
||||||
libraries/sqlparser.lib.php3:
|
libraries/sqlparser.lib.php3:
|
||||||
- Fixed bug #641765, see mailing list post
|
- Fixed bug #641765, see mailing list post
|
||||||
|
|
||||||
|
@@ -2,16 +2,14 @@
|
|||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
// vim: expandtab sw=4 ts=4 sts=4:
|
// vim: expandtab sw=4 ts=4 sts=4:
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHP interface to MimerSQL Validator
|
* PHP interface to MimerSQL Validator
|
||||||
*
|
*
|
||||||
* Copyright 2002 Robin Johnson <robbat2@users.sourceforge.net>
|
* Copyright 2002, 2003 Robin Johnson <robbat2@users.sourceforge.net>
|
||||||
* http://www.orbis-terrarum.net/?l=people.robbat2
|
* http://www.orbis-terrarum.net/?l=people.robbat2
|
||||||
*
|
*
|
||||||
* All data is transported over HTTP-SOAP
|
* All data is transported over HTTP-SOAP
|
||||||
* And uses the PEAR SOAP Module
|
* And uses the PEAR SOAP Module
|
||||||
* You also need the PHP overload module!
|
|
||||||
*
|
*
|
||||||
* Install instructions for PEAR SOAP
|
* Install instructions for PEAR SOAP
|
||||||
* Make sure you have a really recent PHP with PEAR support
|
* Make sure you have a really recent PHP with PEAR support
|
||||||
@@ -22,6 +20,9 @@
|
|||||||
* phpMyAdmin CVS tree as
|
* phpMyAdmin CVS tree as
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
*
|
||||||
|
* This code that also used to depend on the PHP overload module, but that has been
|
||||||
|
* removed now.
|
||||||
|
*
|
||||||
* @access public
|
* @access public
|
||||||
*
|
*
|
||||||
* @author Robin Johnson <robbat2@users.sourceforge.net>
|
* @author Robin Johnson <robbat2@users.sourceforge.net>
|
||||||
@@ -29,7 +30,6 @@
|
|||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
if (!defined('PMA_SQL_VALIDATOR_CLASS_INCLUDED')) {
|
if (!defined('PMA_SQL_VALIDATOR_CLASS_INCLUDED')) {
|
||||||
define('PMA_SQL_VALIDATOR_CLASS_INCLUDED', 1);
|
define('PMA_SQL_VALIDATOR_CLASS_INCLUDED', 1);
|
||||||
|
|
||||||
@@ -37,10 +37,8 @@ if (!defined('PMA_SQL_VALIDATOR_CLASS_INCLUDED')) {
|
|||||||
|
|
||||||
if (!function_exists('class_exists') || !class_exists('SOAP_Client')) {
|
if (!function_exists('class_exists') || !class_exists('SOAP_Client')) {
|
||||||
$GLOBALS['sqlvalidator_error'] = TRUE;
|
$GLOBALS['sqlvalidator_error'] = TRUE;
|
||||||
}
|
} else {
|
||||||
else {
|
// Ok, we have SOAP Support, so let's use it!
|
||||||
|
|
||||||
// Ok, so we have SOAP Support, so let's use it!
|
|
||||||
|
|
||||||
class PMA_SQLValidator {
|
class PMA_SQLValidator {
|
||||||
|
|
||||||
@@ -107,11 +105,14 @@ if (!defined('PMA_SQL_VALIDATOR_CLASS_INCLUDED')) {
|
|||||||
$connection_technology, $connection_technology_version,
|
$connection_technology, $connection_technology_version,
|
||||||
$interactive)
|
$interactive)
|
||||||
{
|
{
|
||||||
$ret = $obj->openSession($username, $password,
|
$ret = $obj->call("openSession",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));
|
||||||
|
|
||||||
|
// This is the old version that needed the overload extension
|
||||||
|
/* $ret = $obj->openSession($username, $password,
|
||||||
$calling_program, $calling_program_version,
|
$calling_program, $calling_program_version,
|
||||||
$target_dbms, $target_dbms_version,
|
$target_dbms, $target_dbms_version,
|
||||||
$connection_technology, $connection_technology_version,
|
$connection_technology, $connection_technology_version,
|
||||||
$interactive);
|
$interactive); */
|
||||||
|
|
||||||
return $ret;
|
return $ret;
|
||||||
} // end of the "_openSession()" function
|
} // end of the "_openSession()" function
|
||||||
@@ -131,7 +132,11 @@ if (!defined('PMA_SQL_VALIDATOR_CLASS_INCLUDED')) {
|
|||||||
*/
|
*/
|
||||||
function _validateSQL($obj, $session, $sql, $method)
|
function _validateSQL($obj, $session, $sql, $method)
|
||||||
{
|
{
|
||||||
$res = $obj->validateSQL($session->sessionId, $session->sessionKey, $sql, $this->output_type);
|
|
||||||
|
$res = $obj->call("validateSQL",array("a_sessionId" => $session->sessionId, "a_sessionKey" => $session->sessionKey, "a_SQL" => $sql, "a_resultType" => $this->output_type));
|
||||||
|
|
||||||
|
// This is the old version that needed the overload extension
|
||||||
|
// $res = $obj->validateSQL($session->sessionId, $session->sessionKey, $sql, $this->output_type);
|
||||||
return $res;
|
return $res;
|
||||||
} // end of the "validateSQL()" function
|
} // end of the "validateSQL()" function
|
||||||
|
|
||||||
@@ -325,7 +330,9 @@ if (!defined('PMA_SQL_VALIDATOR_CLASS_INCLUDED')) {
|
|||||||
*/
|
*/
|
||||||
function startService()
|
function startService()
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->service_link = $this->_openService($this->url . '/' . $this->service_name . $this->wsdl);
|
$this->service_link = $this->_openService($this->url . '/' . $this->service_name . $this->wsdl);
|
||||||
|
|
||||||
} // end of the "startService()" function
|
} // end of the "startService()" function
|
||||||
|
|
||||||
|
|
||||||
@@ -392,6 +399,7 @@ if (!defined('PMA_SQL_VALIDATOR_CLASS_INCLUDED')) {
|
|||||||
{
|
{
|
||||||
$res = $this->_validate($sql);
|
$res = $this->_validate($sql);
|
||||||
return $res->data;
|
return $res->data;
|
||||||
|
|
||||||
} // end of the "validationString()" function
|
} // end of the "validationString()" function
|
||||||
} // end class PMA_SQLValidator
|
} // end class PMA_SQLValidator
|
||||||
} // end else
|
} // end else
|
||||||
|
Reference in New Issue
Block a user