|
@@ 524-526 (lines=3) @@
|
| 521 |
|
} |
| 522 |
|
|
| 523 |
|
// Remove url_base parsing and put current url base |
| 524 |
|
if (preg_match('/define\(\'__SAMSON_BASE__\',\s*([^;]+)/i', $index_php, $matches)) { |
| 525 |
|
$index_php = str_replace($matches[0], 'define(\'__SAMSON_BASE__\',\'' . __SAMSON_BASE__ . '\');', $index_php); |
| 526 |
|
} |
| 527 |
|
|
| 528 |
|
// Set global constant to specify supported PHP version |
| 529 |
|
if (preg_match('/define\s*\(\'__SAMSON_PHP_OLD[^;]+/', $index_php, $matches)) { |
|
@@ 529-531 (lines=3) @@
|
| 526 |
|
} |
| 527 |
|
|
| 528 |
|
// Set global constant to specify supported PHP version |
| 529 |
|
if (preg_match('/define\s*\(\'__SAMSON_PHP_OLD[^;]+/', $index_php, $matches)) { |
| 530 |
|
$index_php = str_replace($matches[0], 'define(\'__SAMSON_PHP_OLD\',\'' . ($this->view_mode == 2) . '\');', $index_php); |
| 531 |
|
} |
| 532 |
|
|
| 533 |
|
$index_php = $this->removeBlankLines($index_php); |
| 534 |
|
$index_php = preg_replace('/(declare *\( *strict_types *= *1 *\) *;)/i', ' ', $index_php); |