/**
  * View document page action
  *
  * @param void
  * @return void
  */
 function view()
 {
     if ($this->active_document->isNew()) {
         $this->httpError(HTTP_ERR_NOT_FOUND);
     }
     // if
     if (!$this->active_document->canView($this->logged_user)) {
         $this->httpError(HTTP_ERR_FORBIDDEN);
     }
     // if
     if ($this->active_document->getType() == 'file') {
         // Fix problem with non-ASCII characters in IE
         $filename = $this->active_document->getName();
         if (isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) {
             $filename = urlencode($filename);
         }
         // if
         download_file($this->active_document->getFilePath(), $this->active_document->getMimeType(), $filename, true);
         die;
     } else {
         if ($this->active_document->getVisibility() <= VISIBILITY_PRIVATE) {
             $this->wireframe->addPageMessage(lang('<strong>Private</strong> - only members with: :roles roles can see this document.', array('roles' => who_can_see_private_objects(true, lang(' or ')))), 'private');
         }
         // if
     }
     // if
 }