Revision e988813d
Added by Jim Pingle almost 15 years ago
etc/inc/upgrade_config.inc | ||
---|---|---|
857 | 857 |
$pool['type'] = 'server'; |
858 | 858 |
$pool['behaviour'] = 'balance'; |
859 | 859 |
$pool['name'] = "{$vs_a[$i]['name']}-sitedown"; |
860 |
$pool['desc'] = "Sitedown pool for VS: {$vs_a[$i]['name']}"; |
|
860 |
$pool['descr'] = "Sitedown pool for VS: {$vs_a[$i]['name']}";
|
|
861 | 861 |
$pool['port'] = $pools[$vs_a[$i]['pool']]['port']; |
862 | 862 |
$pool['servers'] = array(); |
863 | 863 |
$pool['servers'][] = $vs_a[$i]['sitedown']; |
... | ... | |
1649 | 1649 |
foreach($lbpool_arr as $lbpool) { |
1650 | 1650 |
if($lbpool['type'] == "gateway") { |
1651 | 1651 |
$gateway_group['name'] = $lbpool['name']; |
1652 |
$gateway_group['descr'] = $lbpool['desc']; |
|
1652 |
$gateway_group['descr'] = $lbpool['descr'];
|
|
1653 | 1653 |
$gateway_group['trigger'] = "down"; |
1654 | 1654 |
$gateway_group['item'] = array(); |
1655 | 1655 |
$i = 0; |
... | ... | |
2225 | 2225 |
} |
2226 | 2226 |
} |
2227 | 2227 |
} |
2228 |
|
|
2229 |
function desc_to_descr(& $section) { |
|
2230 |
if (is_array($section)) { |
|
2231 |
foreach($section as & $item) { |
|
2232 |
if (!empty($item['desc'])) { |
|
2233 |
$item['descr'] = $item['desc']; |
|
2234 |
unset($item['desc']); |
|
2235 |
} |
|
2236 |
} |
|
2237 |
} |
|
2238 |
} |
|
2239 |
|
|
2240 |
function upgrade_072_to_073() { |
|
2241 |
global $config; |
|
2242 |
desc_to_descr($config['load_balancer']['monitor_type']); |
|
2243 |
desc_to_descr($config['load_balancer']['lbpool']); |
|
2244 |
desc_to_descr($config['load_balancer']['lbaction']); |
|
2245 |
desc_to_descr($config['load_balancer']['lbprotocol']); |
|
2246 |
desc_to_descr($config['load_balancer']['virtual_server']); |
|
2247 |
} |
|
2228 | 2248 |
?> |
Also available in: Unified diff
desc to descr in Load Balancer config, so they gain CDATA protection and standardize field names. Ticket #320.