<?php

/**
 * [BEGIN_COT_EXT]
 * Hooks=projects.edit.update.done
 * [END_COT_EXT]
 */

defined('COT_CODE') or die('Wrong URL');

if($id > 0) {
  require_once cot_incfile('mavatars', 'plug');

  $remove_files = cot_import('remove_files', 'P', 'ARR');

	$mavatar = new mavatar('projects', '', $id, 'edit');
	$mavatar->update($remove_files);
	$mavatar->upload('fileInput');
}