]> source.dussan.org Git - nextcloud-server.git/commitdiff
one if less
authorJörn Friedrich Dreyer <jfd@butonic.de>
Thu, 27 Jun 2013 11:13:49 +0000 (13:13 +0200)
committerJörn Friedrich Dreyer <jfd@butonic.de>
Thu, 27 Jun 2013 11:13:49 +0000 (13:13 +0200)
lib/db.php

index 984c2bcf14994e7b072cfe63a789d63d105c545c..fecc622d96359a3e699ba525c445603a2c1e8ee3 100644 (file)
@@ -326,6 +326,7 @@ class OC_DB {
         * @param string $query Query string
         * @param int $limit
         * @param int $offset
+        * @param bool $isManipulation
         * @return MDB2_Statement_Common prepared SQL query
         *
         * SQL query via MDB2 prepare(), needs to be execute()'d!
@@ -393,11 +394,7 @@ class OC_DB {
                                throw new DatabaseException($e->getMessage(), $query);
                        }
                        // differentiate between query and manipulation
-                       if ($isManipulation) {
-                               $result=new PDOStatementWrapper($result, true);
-                       } else {
-                               $result=new PDOStatementWrapper($result, false);
-                       }
+                       $result = new PDOStatementWrapper($result, $isManipulation);
                }
                if ((is_null($limit) || $limit == -1) and self::$cachingEnabled ) {
                        $type = OC_Config::getValue( "dbtype", "sqlite" );