Use updated get_memory var names

Backport to 2.1
This commit is contained in:
Phil Davis 2013-09-02 04:12:47 -07:00
parent d613b9d522
commit 0c3a7a05f9

View File

@ -51,13 +51,14 @@ function set_networking_interfaces_ports() {
$fp = fopen('php://stdin', 'r');
$memory = get_memory();
$avail = $memory[1];
$physmem = $memory[0];
$realmem = $memory[1];
if($avail < $g['minimum_ram_warning']) {
if($physmem < $g['minimum_ram_warning']) {
echo "\n\n\n";
echo gettext("DANGER! WARNING! ACHTUNG!") . "\n\n";
printf(gettext("%s requires *AT LEAST* %s RAM to function correctly.%s"), $g['product_name'], $g['minimum_ram_warning_text'], "\n");
printf(gettext("Only (%s) MB RAM has been detected.%s"), $avail, "\n");
printf(gettext("Only (%s) MB RAM has been detected, with (%s) available to %s.%s"), $realmem, $physmem, $g['product_name'], "\n");
echo "\n" . gettext("Press ENTER to continue.") . " ";
fgets($fp);
echo "\n";