diff options
Diffstat (limited to 'lib/setup.php')
-rw-r--r-- | lib/setup.php | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/lib/setup.php b/lib/setup.php index cfaf7288663..0c049841b2a 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -205,7 +205,8 @@ class OC_Setup { } $oldUser=OC_Config::getValue('dbuser', false); - $query="SELECT user FROM mysql.user WHERE user='$dbuser'"; //this should be enough to check for admin rights in mysql + //this should be enough to check for admin rights in mysql + $query="SELECT user FROM mysql.user WHERE user='$dbuser'"; if(mysql_query($query, $connection)) { //use the admin login data for the new database user @@ -235,7 +236,8 @@ class OC_Setup { } //fill the database if needed - $query="select count(*) from information_schema.tables where table_schema='$dbname' AND table_name = '{$dbtableprefix}users';"; + $query="select count(*) from information_schema.tables' + .' where table_schema='$dbname' AND table_name = '{$dbtableprefix}users';"; $result = mysql_query($query, $connection); if($result) { $row=mysql_fetch_row($result); @@ -257,7 +259,8 @@ class OC_Setup { echo($entry); } $query="GRANT ALL PRIVILEGES ON `$name` . * TO '$user'"; - $result = mysql_query($query, $connection); //this query will fail if there aren't the right permissons, ignore the error + //this query will fail if there aren't the right permissons, ignore the error + $result = mysql_query($query, $connection); } private static function createDBUser($name, $password, $connection) { @@ -407,7 +410,8 @@ class OC_Setup { } } - private static function setupOCIDatabase($dbhost, $dbuser, $dbpass, $dbname, $dbtableprefix, $dbtablespace, $username) { + private static function setupOCIDatabase($dbhost, $dbuser, $dbpass, $dbname, $dbtableprefix, $dbtablespace, + $username) { $l = self::getTrans(); $e_host = addslashes($dbhost); $e_dbname = addslashes($dbname); @@ -424,7 +428,8 @@ class OC_Setup { } //check for roles creation rights in oracle - $query="SELECT count(*) FROM user_role_privs, role_sys_privs WHERE user_role_privs.granted_role = role_sys_privs.role AND privilege = 'CREATE ROLE'"; + $query="SELECT count(*) FROM user_role_privs, role_sys_privs' + .' WHERE user_role_privs.granted_role = role_sys_privs.role AND privilege = 'CREATE ROLE'"; $stmt = oci_parse($connection, $query); if (!$stmt) { $entry = $l->t('DB Error: "%s"', array(oci_last_error($connection))) . '<br />'; @@ -641,8 +646,10 @@ class OC_Setup { header("Location: ".OC::$WEBROOT.'/'); } else { - $error = $l->t('Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken.'); - $hint = $l->t('Please double check the <a href=\'%s\'>installation guides</a>.', 'http://doc.owncloud.org/server/5.0/admin_manual/installation.html'); + $error = $l->t('Your web server is not yet properly setup to allow files' + .' synchronization because the WebDAV interface seems to be broken.'); + $hint = $l->t('Please double check the <a href=\'%s\'>installation guides</a>.', + 'http://doc.owncloud.org/server/5.0/admin_manual/installation.html'); $tmpl = new OC_Template('', 'error', 'guest'); $tmpl->assign('errors', array(1 => array('error' => $error, 'hint' => $hint)), false); |