route.class.php (fogproject-1.5.7) | : | route.class.php (fogproject-1.5.8) | ||
---|---|---|---|---|
skipping to change at line 641 | skipping to change at line 641 | |||
continue; | continue; | |||
} | } | |||
$class->set($key, $val); | $class->set($key, $val); | |||
unset($key); | unset($key); | |||
} | } | |||
switch ($classname) { | switch ($classname) { | |||
case 'host': | case 'host': | |||
if (isset($vars->macs)) { | if (isset($vars->macs)) { | |||
$macsToAdd = array_diff( | $macsToAdd = array_diff( | |||
(array)$vars->macs, | (array)$vars->macs, | |||
$class->get('macs') | $class->getMyMacs() | |||
); | ); | |||
$primac = array_shift($macsToAdd); | $primac = array_shift($macsToAdd); | |||
$macsToRem = array_diff( | $macsToRem = array_diff( | |||
$class->get('macs'), | $class->getMyMacs(), | |||
$vars->macs | (array)$vars->macs | |||
); | ); | |||
$class | $class | |||
->removeAddMAC($macsToRem) | ->removeAddMAC($macsToRem) | |||
->addPriMAC($primac) | ->addPriMAC($primac) | |||
->addAddMAC($macsToAdd); | ->addAddMAC($macsToAdd); | |||
} | } | |||
if (isset($vars->snapins)) { | if (isset($vars->snapins)) { | |||
$snapinsToAdd = array_diff( | $snapinsToAdd = array_diff( | |||
(array)$vars->snapins, | (array)$vars->snapins, | |||
$class->get('snapins') | $class->get('snapins') | |||
skipping to change at line 1308 | skipping to change at line 1308 | |||
); | ); | |||
break; | break; | |||
case 'storagenode': | case 'storagenode': | |||
$extra = array(); | $extra = array(); | |||
if ($item == 'all') { | if ($item == 'all') { | |||
$extra = array( | $extra = array( | |||
'logfiles' => ( | 'logfiles' => ( | |||
$class->get('online') ? | $class->get('online') ? | |||
$class->get('logfiles') : | $class->get('logfiles') : | |||
[] | [] | |||
), | ), | |||
'snapinfiles' => ( | 'snapinfiles' => ( | |||
$class->get('online') ? | $class->get('online') ? | |||
$class->get('snapinfiles') : | $class->get('snapinfiles') : | |||
[] | [] | |||
), | ), | |||
'images' => ( | 'images' => ( | |||
$class->get('online') ? | $class->get('online') ? | |||
$class->get('images') : | $class->get('images') : | |||
[] | [] | |||
) | ) | |||
); | ); | |||
} elseif (!empty($item)) { | } elseif (!empty($item)) { | |||
$extra = array( | $extra = array( | |||
"$item" => ( | "$item" => ( | |||
$class->get('online') ? | $class->get('online') ? | |||
$class->get($item) : | $class->get($item) : | |||
[] | [] | |||
) | ) | |||
); | ); | |||
} | } | |||
$data = FOGCore::fastmerge( | $data = FOGCore::fastmerge( | |||
$class->get(), | $class->get(), | |||
$extra, | $extra, | |||
array( | array( | |||
'storagegroup' => self::getter( | 'storagegroup' => self::getter( | |||
'storagegroup', | 'storagegroup', | |||
$class->get('storagegroup') | $class->get('storagegroup') | |||
), | ), | |||
End of changes. 4 change blocks. | ||||
5 lines changed or deleted | 5 lines changed or added |