From 54343914d2b05a9963e48b9baa62445c31c2d6fc Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 20 Aug 2007 00:16:06 +0000 Subject: Make sure index.php is writable before deinstalling or reinstalling. --- packages/dashboard/dashboard.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/dashboard/dashboard.inc b/packages/dashboard/dashboard.inc index a9dcf95a..f6752f14 100644 --- a/packages/dashboard/dashboard.inc +++ b/packages/dashboard/dashboard.inc @@ -2,6 +2,7 @@ function dashboard_install() { global $g, $config; + mwexec("chmod ug+rw /usr/local/www/index.php"); if(!file_exists("/usr/local/www/index.php.before_dashboard")) { /* backup the pre-dashboard index.php file */ mwexec("cp /usr/local/www/index.php /usr/local/www/index.php.before_dashboard"); @@ -17,9 +18,9 @@ function dashboard_install() { function dashboard_deinstall() { global $g, $config; + mwexec("chmod ug+rw /usr/local/www/index.php"); if(file_exists("/usr/local/www/index.php.before_dashboard")) { /* restore the files prior to the dashboard package installation */ - mwexec("chmod ug+rw /usr/local/www/index.php"); mwexec("cp /usr/local/www/index.php.before_dashboard /usr/local/www/index.php"); mwexec("cp /usr/local/www/fbegin.inc.before_dashboard /usr/local/www/fbegin.inc"); } -- cgit v1.2.3