Merge pull request #482 from nlegoff/fix_admin_fields

[3.8] Fix admin fields application
This commit is contained in:
Romain Neutron
2013-07-11 04:00:18 -07:00
11 changed files with 84 additions and 57 deletions

View File

@@ -970,8 +970,9 @@ class databox_field implements cache_cacheableInterface
$row = $stmt->fetch(PDO::FETCH_ASSOC);
$stmt->closeCursor();
if ($row)
$sorter = (int) $row['sorter'];
if ($row) {
$sorter = max(1, (int) $row['sorter']);
}
$sql = "INSERT INTO metadatas_structure
(`id`, `name`, `src`, `readonly`, `indexable`, `type`, `tbranch`,