mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 00:34:05 +02:00
ConfigDiff: more context, fix diff with empty
fixes #12262 fixes #12263
This commit is contained in:
parent
ce1c6f3099
commit
7655ad451a
@ -22,10 +22,20 @@ class ConfigDiff
|
|||||||
{
|
{
|
||||||
require_once dirname(__DIR__) . '/vendor/php-diff/lib/Diff.php';
|
require_once dirname(__DIR__) . '/vendor/php-diff/lib/Diff.php';
|
||||||
|
|
||||||
$this->a = explode("\n", (string) $a);
|
if (empty($a)) {
|
||||||
$this->b = explode("\n", (string) $b);
|
$this->a = array();
|
||||||
|
} else {
|
||||||
|
$this->a = explode("\n", (string) $a);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($b)) {
|
||||||
|
$this->b = array();
|
||||||
|
} else {
|
||||||
|
$this->b = explode("\n", (string) $b);
|
||||||
|
}
|
||||||
|
|
||||||
$options = array(
|
$options = array(
|
||||||
|
'context' => 5,
|
||||||
// 'ignoreWhitespace' => true,
|
// 'ignoreWhitespace' => true,
|
||||||
// 'ignoreCase' => true,
|
// 'ignoreCase' => true,
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user