static function replaceFile() { $result = false; // cancel action if (get('cancel-replace-file')) { go(showurl('files')); return false; } // submit action if (get('replace-file')) { $result = data::replaceFile(); if (success($result)) { go(showurl('files')); } } return $result; }