public function resortDocuments(\DataContainer $dc)
  {
    if (!$this->Input->get('act'))
    {
      $db = \Database::getInstance();
      $stmt = "UPDATE tl_dms_documents doc, "
          . " (SELECT @rownum := @rownum + 1 ROWNUM, t.id ID "
          . " FROM "
          . " (SELECT @rownum := 0) r, "
          . " (SELECT * FROM tl_dms_documents ORDER BY pid, name, version_major, version_minor, version_patch) t) tsub "
          . "SET doc.sorting = (tsub.ROWNUM *64) "
          . "WHERE doc.id = tsub.ID";
      $db->prepare($stmt)->execute();
    }
  }