/**
  * Main function, rendering the content of the rename form
  *
  * @return	void
  */
 function main()
 {
     global $LANG;
     $content = '';
     // Cleaning and checking target
     $this->folder = tx_dam::path_compileInfo($this->pObj->folder[0]);
     if (is_array($this->pObj->data) and $this->pObj->data['delete_confirmed']) {
         // Delete the folder/files and process DB update
         $error = tx_dam::process_deleteFolder($this->folder['dir_path_absolute']);
         if ($error) {
             $content .= $GLOBALS['SOBE']->getMessageBox($LANG->getLL('error'), htmlspecialchars($error), $this->pObj->buttonBack(0), 2);
         } else {
             $this->pObj->redirect(true);
         }
     } elseif ($this->folder['dir_accessable']) {
         $content .= $this->renderForm();
     } else {
         // this should have happen in index.php already
         $content .= $this->pObj->accessDeniedMessageBox(tx_dam_guiFunc::getFolderInfoBar($this->folder));
     }
     return $content;
 }