[Pkg-owncloud-commits] [owncloud] 49/153: Use a variable for the DBMS tyoe we are converting to.

David Prévot taffit at moszumanska.debian.org
Tue May 27 03:05:34 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 9823d54bb8b88adeae9d976c57dc3f366a3d4f3b
Author: Andreas Fischer <bantu at owncloud.com>
Date:   Tue Apr 15 17:05:31 2014 +0200

    Use a variable for the DBMS tyoe we are converting to.
---
 core/command/db/converttype.php | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/core/command/db/converttype.php b/core/command/db/converttype.php
index 3b40576..cb6c700 100644
--- a/core/command/db/converttype.php
+++ b/core/command/db/converttype.php
@@ -109,10 +109,11 @@ class ConvertType extends Command {
 	}
 
 	protected function execute(InputInterface $input, OutputInterface $output) {
-		if ($input->getArgument('type') === $this->config->getValue('dbtype', '')) {
+		$type = $input->getArgument('type');
+		if ($type === $this->config->getValue('dbtype', '')) {
 			$output->writeln(sprintf(
 				'<error>Can not convert from %1$s to %1$s.</error>',
-				$input->getArgument('type')
+				$type
 			));
 			return 1;
 		}
@@ -121,14 +122,14 @@ class ConvertType extends Command {
 		$toDB = $this->getToDBConnection($input, $output);
 
 		if ($input->getOption('clear-schema')) {
-			if ($input->getArgument('type') === 'oci') {
+			if ($type === 'oci') {
 				// Doctrine unconditionally tries (at least in version 2.3)
 				// to drop sequence triggers when dropping a table, even though
 				// such triggers may not exist. This results in errors like
 				// "ORA-04080: trigger 'OC_STORAGES_AI_PK' does not exist".
 				$output->writeln(sprintf(
 					'<error>The --clear-schema option is not supported when converting to Oracle (oci).</error>',
-					$input->getArgument('type')
+					$type
 				));
 				return 1;
 			}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list