delete() публичный Метод

Delete the publication and all of its aliases.
public delete ( ) : boolean
Результат boolean
Пример #1
0
if (count($sectionsRemaining) > 0) {
    $errorMsgs[] = getGS('There are $1 section(s) left.', count($sectionsRemaining));
    $doDelete = false;
}
$articlesRemaining = Article::GetNumUniqueArticles($Pub);
if ($articlesRemaining > 0) {
    $errorMsgs[] = getGS('There are $1 article(s) left.', $articlesRemaining);
    $doDelete = false;
}
$subscriptionsRemaining = Subscription::GetNumSubscriptions($Pub);
if ($subscriptionsRemaining > 0) {
    $errorMsgs[] = getGS('There are $1 subscription(s) left.', $subscriptionsRemaining);
    $doDelete = false;
}
if ($doDelete) {
    $publicationObj->delete();
    camp_html_goto_page("/{$ADMIN}/pub");
} else {
    $errorMsgs[] = getGS('The publication $1 could not be deleted.', '<B>' . htmlspecialchars($publicationObj->getName()) . '</B>');
}
echo camp_html_content_top(getGS("Deleting publication"), array("Pub" => $publicationObj));
?>
<P>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="8" class="message_box">
<TR>
	<TD COLSPAN="2">
		<B> <?php 
putGS("Deleting publication");
?>
 </B>
		<HR NOSHADE SIZE="1" COLOR="BLACK">