diff options
author | benakamoorthi <benaka.moorthi@gmail.com> | 2012-06-03 14:41:01 +0400 |
---|---|---|
committer | benakamoorthi <benaka.moorthi@gmail.com> | 2012-06-03 14:41:01 +0400 |
commit | 64120e90a9d7bfedaf1b742174d60f98d44e05b9 (patch) | |
tree | d66c2ce030b6be41806342410c9f9a43c41a44b6 | |
parent | 6c88668ed795ef0fb33e25f0a9949967d4c54aa2 (diff) |
Refs #3178, surround first drop tables call in try-catch.
git-svn-id: http://dev.piwik.org/svn/trunk@6460 59fd770c-687e-43c8-a1e3-f5a4ff64c105
-rw-r--r-- | plugins/Installation/FormDatabaseSetup.php | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/plugins/Installation/FormDatabaseSetup.php b/plugins/Installation/FormDatabaseSetup.php index b6dbda3a37..e288fe0ea2 100644 --- a/plugins/Installation/FormDatabaseSetup.php +++ b/plugins/Installation/FormDatabaseSetup.php @@ -184,8 +184,22 @@ class Piwik_Installation_FormDatabaseSetup_Rule_checkUserPrivileges extends HTML $db = Zend_Registry::get('db'); - // try to drop tables before running privilege tests - $this->dropExtraTables($db); + try + { + // try to drop tables before running privilege tests + $this->dropExtraTables($db); + } + catch (Exception $ex) + { + if ($this->isAccessDenied($ex)) + { + return false; + } + else + { + throw $ex; + } + } // check each required privilege by running a query that uses it foreach (self::getRequiredPrivileges() as $privilegeType => $queries) |