Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDI-1440 Removed deprecated get/set magic_quotes methods #122

Merged
merged 1 commit into from
Nov 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/adodb5/adodb-csvlib.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ function csv2rs($url,&$err,$timeout=0, $rsclass='ADORecordSet_array')
//var_dump($arr);
if (!is_array($arr)) {
$err = "Recordset had unexpected EOF (in serialized recordset)";
if (get_magic_quotes_runtime()) $err .= ". Magic Quotes Runtime should be disabled!";
return $false;
}
$rs = new $rsclass();
Expand Down
2 changes: 1 addition & 1 deletion src/adodb5/adodb-perf.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ function UI($pollsecs=5)

// magic quotes

if (isset($_GET['sql']) && get_magic_quotes_gpc()) {
if (isset($_GET['sql'])) {
$_GET['sql'] = $_GET['sql'] = str_replace(array("\\'",'\"'),array("'",'"'),$_GET['sql']);
}

Expand Down
10 changes: 0 additions & 10 deletions src/adodb5/adodb-xmlschema.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -1253,12 +1253,6 @@ class adoSchema {
*/
var $objectPrefix = '';

/**
* @var long Original Magic Quotes Runtime value
* @access private
*/
var $mgq;

/**
* @var long System debug
* @access private
Expand Down Expand Up @@ -1303,9 +1297,6 @@ class adoSchema {
*/
function __construct( &$db ) {
// Initialize the environment
$this->mgq = get_magic_quotes_runtime();
set_magic_quotes_runtime(0);

$this->db = $db;
$this->debug = $this->db->debug;
$this->dict = NewDataDictionary( $this->db );
Expand Down Expand Up @@ -2193,7 +2184,6 @@ function getSQL( $format = NULL, $sqlArray = NULL ) {
* @deprecated adoSchema now cleans up automatically.
*/
function Destroy() {
set_magic_quotes_runtime( $this->mgq );
unset( $this );
}
}
Expand Down
10 changes: 0 additions & 10 deletions src/adodb5/adodb-xmlschema03.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -1352,12 +1352,6 @@ class adoSchema {
*/
var $objectPrefix = '';

/**
* @var long Original Magic Quotes Runtime value
* @access private
*/
var $mgq;

/**
* @var long System debug
* @access private
Expand Down Expand Up @@ -1407,9 +1401,6 @@ class adoSchema {
*/
function __construct( &$db ) {
// Initialize the environment
$this->mgq = get_magic_quotes_runtime();
set_magic_quotes_runtime(0);

$this->db = $db;
$this->debug = $this->db->debug;
$this->dict = NewDataDictionary( $this->db );
Expand Down Expand Up @@ -2374,7 +2365,6 @@ function getSQL( $format = NULL, $sqlArray = NULL ) {
* @deprecated adoSchema now cleans up automatically.
*/
function Destroy() {
set_magic_quotes_runtime( $this->mgq );
unset( $this );
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/adodb5/adodb.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ function Quote($s)
*/
function QMagic($s)
{
return $this->qstr($s,get_magic_quotes_gpc());
return $this->qstr($s);
}

function q(&$s)
Expand Down Expand Up @@ -1798,7 +1798,7 @@ function CacheExecute($secs2cache,$sql=false,$inputarr=false)
if (!$rs) {
// no cached rs found
if ($this->debug) {
if (get_magic_quotes_runtime() && !$this->memCache) {
if (!$this->memCache) {
ADOConnection::outp("Please disable magic_quotes_runtime - it corrupts cache files :(");
}
if ($this->debug !== -1) ADOConnection::outp( " $md5file cache failure: $err (see sql below)");
Expand Down