rename() public method

Rename the article type. This will move the entire table in the database and update ArticleTypeMetadata. Usually, one wants to just rename the Display Name, which is done via SetDisplayName
public rename ( $p_newName )
$p_newName
Example #1
0
    	if (!$old_articleType->exists()) {
		    $correct = false;
		    $errorMsgs[] = getGS('The article type $1 does not exist.', '<B>'.htmlspecialchars($f_oldName).'</B>');
		}
    }

	if ($correct) {
		$articleType = new ArticleType($f_name);
		if ($articleType->exists()) {
			$correct = false;
			$errorMsgs[] = getGS('The article type $1 already exists.', '<B>'. htmlspecialchars($f_name). '</B>');
		}
	}

    if ($correct) {
    	$old_articleType->rename($f_name);
    	camp_html_goto_page("/$ADMIN/article_types/");
	}
}

$crumbs = array();
$crumbs[] = array(getGS("Configure"), "");
$crumbs[] = array(getGS("Article Types"), "/$ADMIN/article_types/");
$crumbs[] = array(getGS("Rename article type '$1'", $f_oldName), "");

echo camp_html_breadcrumbs($crumbs);

?>
<P>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="8" class="message_box">
<TR>