'WHERE `parent` = ? AND `storage` = ?';
$result = \OC_DB::executeAudited($sql, array($id, $this->getNumericStorageId()));
if ($row = $result->fetchRow()) {
- $result->closeCursor();
list($sum, $min, $unencryptedSum) = array_values($row);
$sum = 0 + $sum;
$min = 0 + $min;
if ($totalSize !== -1 and $unencryptedSum > 0) {
$totalSize = $unencryptedSum;
}
- } else {
- $result->closeCursor();
}
}
return $totalSize;
'WHERE `parent` = ? AND `storage` = ? AND `size` >= 0';
$result = \OC_DB::executeAudited($sql, array($id, $this->getNumericStorageId()));
if ($row = $result->fetchRow()) {
- $result->closeCursor();
list($sum, $unencryptedSum) = array_values($row);
$totalSize = 0 + $sum;
$unencryptedSize = 0 + $unencryptedSum;