/**
  * 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 ($this->folder['dir_accessable']) {
         if (is_array($this->pObj->data) and $this->pObj->data['new_name']) {
             $newFolderName = tx_dam::file_makeCleanName($this->pObj->data['new_name'], true);
             $error = tx_dam::process_renameFolder($this->folder['dir_path_absolute'], $newFolderName);
             if ($error) {
                 $content .= $GLOBALS['SOBE']->getMessageBox($LANG->getLL('error'), htmlspecialchars($error), $this->pObj->buttonBack(0), 2);
             } else {
                 $this->pObj->redirect(true);
             }
         } else {
             $content .= $this->renderForm();
         }
     } else {
         // this should have happen in index.php already
         $content .= $this->pObj->accessDeniedMessageBox(tx_dam_guiFunc::getFolderInfoBar($this->folder));
     }
     return $content;
 }