]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix type of numeric columns
authorJörn Friedrich Dreyer <jfd@butonic.de>
Wed, 26 Jun 2013 18:03:24 +0000 (20:03 +0200)
committerJörn Friedrich Dreyer <jfd@butonic.de>
Wed, 26 Jun 2013 18:03:24 +0000 (20:03 +0200)
lib/public/share.php

index d1000e7bb9f47e1925874e03826d92d95de31d1f..a98cfda20895eac30088a324edb9d85faa305b23 100644 (file)
@@ -963,6 +963,30 @@ class Share {
                $switchedItems = array();
                $mounts = array();
                while ($row = $result->fetchRow()) {
+                       if (isset($row['id'])) {
+                               $row['id']=(int)$row['id'];
+                       }
+                       if (isset($row['share_type'])) {
+                               $row['share_type']=(int)$row['share_type'];
+                       }
+                       if (isset($row['parent'])) {
+                               $row['parent']=(int)$row['parent'];
+                       }
+                       if (isset($row['file_parent'])) {
+                               $row['file_parent']=(int)$row['file_parent'];
+                       }
+                       if (isset($row['file_source'])) {
+                               $row['file_source']=(int)$row['file_source'];
+                       }
+                       if (isset($row['permissions'])) {
+                               $row['permissions']=(int)$row['permissions'];
+                       }
+                       if (isset($row['storage'])) {
+                               $row['storage']=(int)$row['storage'];
+                       }
+                       if (isset($row['stime'])) {
+                               $row['stime']=(int)$row['stime'];
+                       }
                        // Filter out duplicate group shares for users with unique targets
                        if ($row['share_type'] == self::$shareTypeGroupUserUnique && isset($items[$row['parent']])) {
                                $row['share_type'] = self::SHARE_TYPE_GROUP;