uploadfile)) $this->filename = $this->uploadfile; return parent::save($check_notify); } function fill_in_additional_detail_fields(){ global $theme; global $current_language; global $timedate; global $app_list_strings; $this->uploadfile = $this->filename; $mod_strings = return_module_language($current_language, $this->object_name); global $img_name; global $img_name_bare; if (!$this->file_ext) { $img_name = SugarThemeRegistry::current()->getImageURL(strtolower($this->file_ext)."_image_inline.gif"); $img_name_bare = strtolower($this->file_ext)."_image_inline"; } //set default file name. if (!empty ($img_name) && file_exists($img_name)) { $img_name = $img_name_bare; } else { $img_name = "def_image_inline"; //todo change the default image. } $this->file_url_noimage = basename(UploadFile :: get_url($this->filename, $this->id)); if(!empty($this->status_id)) { $this->status = $app_list_strings['document_status_dom'][$this->status_id]; } } // need to override to have a name field created for this class function retrieve($id = -1, $encode=true) { $ret_val = parent::retrieve($id, $encode); $this->_create_proper_name_field(); return $ret_val; } function _create_proper_name_field() { global $locale; $this->name = $this->document_name; } } ?>