 
 
 (defn files_rel-delete [files-rel-field {file-id :id} {rel-id :id}]
-  (delete files_rel (where (and (= :files_id file-id)
-                                (= files-rel-field rel-id)))))
+  (kc/delete files_rel (kc/where (and (= :files_id file-id)
+                                      (= files-rel-field rel-id)))))
 
 (defn files_rel-select-files-by-* [row files-rel-field]
   ((com-defn-pred-rows-by-rel? :id :id files_rel :files_id files-rel-field)

  ([] (webrole-list false))
  ([with-webrolesgroup]
   (if with-webrolesgroup
     (select webrole (with webrolesgroup))
     (select webrole))))


;; END entity webrole

(declare files)

(defn files-resize-all-images [{:keys [ws] :or {ws []}}]
  (doseq [{path :path} (kc/select files
                                  (kc/fields :path)
                                  (kc/where {:content_type [in ["image/gif"
                                                                "image/jpeg"
                                                                "image/pjpeg"
                                                                "image/png"
                                                                ;;"image/svg+xml"
                                                                ;;"image/tiff"
                                                                ]]}))
          :let [path (clojure.string/replace-first path #"/image/" "/")
                file-src (new java.io.File (str @files-root-directory "/" path))]]
    (do
