use Friendica\Database\DBStructure;
use Friendica\DI;
use Friendica\Model\Item;
+use Friendica\Model\Post;
use Friendica\Module\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";
}