diff options
author | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-03-19 18:52:54 +0100 |
---|---|---|
committer | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-03-19 18:52:54 +0100 |
commit | 6f13a35513b212de937c44522df17501360dd870 (patch) | |
tree | 7b4c278e1b782887e7661acc6508136b0bfeb597 /lib/db | |
parent | d44f457d2d08ed72354a39e0cb8c34c829e83ecb (diff) | |
download | nextcloud-server-6f13a35513b212de937c44522df17501360dd870.tar.gz nextcloud-server-6f13a35513b212de937c44522df17501360dd870.zip |
documentation added and trying to fix minor code issues
Diffstat (limited to 'lib/db')
-rw-r--r-- | lib/db/mdb2schemareader.php | 16 | ||||
-rw-r--r-- | lib/db/schema.php | 6 |
2 files changed, 19 insertions, 3 deletions
diff --git a/lib/db/mdb2schemareader.php b/lib/db/mdb2schemareader.php index 53eb849d86a..7a7efe551c1 100644 --- a/lib/db/mdb2schemareader.php +++ b/lib/db/mdb2schemareader.php @@ -11,6 +11,12 @@ class OC_DB_MDB2SchemaReader { static protected $DBTABLEPREFIX; static protected $platform; + /** + * @param $file + * @param $platform + * @return \Doctrine\DBAL\Schema\Schema + * @throws DomainException + */ public static function loadSchemaFromFile($file, $platform) { self::$DBNAME = OC_Config::getValue( "dbname", "owncloud" ); self::$DBTABLEPREFIX = OC_Config::getValue( "dbtableprefix", "oc_" ); @@ -38,6 +44,11 @@ class OC_DB_MDB2SchemaReader { return $schema; } + /** + * @param\Doctrine\DBAL\Schema\Schema $schema + * @param $xml + * @throws DomainException + */ private static function loadTable($schema, $xml) { foreach($xml->children() as $child) { switch($child->getName()) { @@ -60,6 +71,11 @@ class OC_DB_MDB2SchemaReader { } } + /** + * @param \Doctrine\DBAL\Schema\Table $table + * @param $xml + * @throws DomainException + */ private static function loadDeclaration($table, $xml) { foreach($xml->children() as $child) { switch($child->getName()) { diff --git a/lib/db/schema.php b/lib/db/schema.php index 8941881d4ea..37379f60663 100644 --- a/lib/db/schema.php +++ b/lib/db/schema.php @@ -101,19 +101,19 @@ class OC_DB_Schema { } /** - * @brief replaces the owncloud tables with a new set + * @brief replaces the ownCloud tables with a new set * @param $file string path to the MDB2 xml db export file */ public static function replaceDB( $conn, $file ) { $apps = OC_App::getAllApps(); self::beginTransaction(); // Delete the old tables - self::removeDBStructure( OC::$SERVERROOT . '/db_structure.xml' ); + self::removeDBStructure( $conn, OC::$SERVERROOT . '/db_structure.xml' ); foreach($apps as $app) { $path = OC_App::getAppPath($app).'/appinfo/database.xml'; if(file_exists($path)) { - self::removeDBStructure( $path ); + self::removeDBStructure( $conn, $path ); } } |