install/upgrade required PEAR packages on install/upgrade of EGroupware package

This commit is contained in:
Ralf Becker 2011-06-30 20:59:57 +00:00
parent 99c18003a4
commit 25b81ce4da

View File

@ -560,15 +560,19 @@ function check_install_pear_packages()
$need_upgrade[] = $package; $need_upgrade[] = $package;
} }
} }
if (($to_install || $need_upgrade) && getmyuid()) if (($to_install || $need_upgrade))
{
if (getmyuid())
{ {
echo "You need to run as user root to be able to install/upgrade required PEAR packages!\n"; echo "You need to run as user root to be able to install/upgrade required PEAR packages!\n";
} }
else else
{ {
echo "Install/upgrade required PEAR packages:\n";
if ($to_install) system($config['pear'].' install '.implode(' ',$to_install)); if ($to_install) system($config['pear'].' install '.implode(' ',$to_install));
if ($need_upgrade) system($config['pear'].' upgrade '.implode(' ',$need_upgrade)); if ($need_upgrade) system($config['pear'].' upgrade '.implode(' ',$need_upgrade));
} }
} }
}
function lang() {} // required to be able to include */setup/setup.inc.php files function lang() {} // required to be able to include */setup/setup.inc.php files