function attach_info($err = '') { // global $vars,$_attach_messages; foreach (array('refer', 'file', 'age') as $var) { ${$var} = array_key_exists($var, $this->root->vars) ? $this->root->vars[$var] : ''; } $obj = new XpWikiAttachFile($this->xpwiki, $refer, $file, $age); return $obj->getstatus() ? $obj->info($err) : array('msg' => $this->root->_attach_messages['err_notfound']); }