]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Settings/UserExport.php
Merge pull request #9963 from mexon/mat/support-cid-scheme
[friendica.git] / src / Module / Settings / UserExport.php
index a07116785fc85f8f9d8dcc30a8ae17ae052f0e47..2b668182e42148bf6a060b87dfdc8e3cded6e29d 100644 (file)
@@ -28,6 +28,7 @@ use Friendica\Database\DBA;
 use Friendica\Database\DBStructure;
 use Friendica\DI;
 use Friendica\Model\Item;
+use Friendica\Model\Post;
 use Friendica\Module\BaseSettings;
 
 /**
@@ -241,11 +242,11 @@ class UserExport extends BaseSettings
                self::exportAccount($a);
                echo "\n";
 
-               $total = DBA::count('item', ['uid' => local_user()]);
+               $total = Post::count(['uid' => local_user()]);
                // chunk the output to avoid exhausting memory
 
                for ($x = 0; $x < $total; $x += 500) {
-                       $items = Item::selectToArray(Item::ITEM_FIELDLIST, ['uid' => local_user()], ['limit' => [$x, 500]]);
+                       $items = Post::selectToArray(Item::ITEM_FIELDLIST, ['uid' => local_user()], ['limit' => [$x, 500]]);
                        $output = ['item' => $items];
                        echo json_encode($output, JSON_PARTIAL_OUTPUT_ON_ERROR). "\n";
                }