|
@@ 5325-5350 (lines=26) @@
|
| 5322 |
|
// Parameters : |
| 5323 |
|
// Return Values : |
| 5324 |
|
// -------------------------------------------------------------------------------- |
| 5325 |
|
function privDisableMagicQuotes() |
| 5326 |
|
{ |
| 5327 |
|
$v_result=1; |
| 5328 |
|
|
| 5329 |
|
// ----- Look if function exists |
| 5330 |
|
if ( (!function_exists("get_magic_quotes_runtime")) |
| 5331 |
|
|| (!function_exists("set_magic_quotes_runtime"))) { |
| 5332 |
|
return $v_result; |
| 5333 |
|
} |
| 5334 |
|
|
| 5335 |
|
// ----- Look if already done |
| 5336 |
|
if ($this->magic_quotes_status != -1) { |
| 5337 |
|
return $v_result; |
| 5338 |
|
} |
| 5339 |
|
|
| 5340 |
|
// ----- Get and memorize the magic_quote value |
| 5341 |
|
$this->magic_quotes_status = @get_magic_quotes_runtime(); |
| 5342 |
|
|
| 5343 |
|
// ----- Disable magic_quotes |
| 5344 |
|
if ($this->magic_quotes_status == 1) { |
| 5345 |
|
@set_magic_quotes_runtime(0); |
| 5346 |
|
} |
| 5347 |
|
|
| 5348 |
|
// ----- Return |
| 5349 |
|
return $v_result; |
| 5350 |
|
} |
| 5351 |
|
// -------------------------------------------------------------------------------- |
| 5352 |
|
|
| 5353 |
|
// -------------------------------------------------------------------------------- |
|
@@ 5359-5381 (lines=23) @@
|
| 5356 |
|
// Parameters : |
| 5357 |
|
// Return Values : |
| 5358 |
|
// -------------------------------------------------------------------------------- |
| 5359 |
|
function privSwapBackMagicQuotes() |
| 5360 |
|
{ |
| 5361 |
|
$v_result=1; |
| 5362 |
|
|
| 5363 |
|
// ----- Look if function exists |
| 5364 |
|
if ( (!function_exists("get_magic_quotes_runtime")) |
| 5365 |
|
|| (!function_exists("set_magic_quotes_runtime"))) { |
| 5366 |
|
return $v_result; |
| 5367 |
|
} |
| 5368 |
|
|
| 5369 |
|
// ----- Look if something to do |
| 5370 |
|
if ($this->magic_quotes_status != -1) { |
| 5371 |
|
return $v_result; |
| 5372 |
|
} |
| 5373 |
|
|
| 5374 |
|
// ----- Swap back magic_quotes |
| 5375 |
|
if ($this->magic_quotes_status == 1) { |
| 5376 |
|
@set_magic_quotes_runtime($this->magic_quotes_status); |
| 5377 |
|
} |
| 5378 |
|
|
| 5379 |
|
// ----- Return |
| 5380 |
|
return $v_result; |
| 5381 |
|
} |
| 5382 |
|
// -------------------------------------------------------------------------------- |
| 5383 |
|
|
| 5384 |
|
} |