Code Duplication    Length = 23-26 lines in 2 locations

app/Vendor/PHPExcel/PHPExcel/Shared/PCLZip/pclzip.lib.php 2 locations

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