當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CBlog::Delete方法代碼示例

本文整理匯總了PHP中CBlog::Delete方法的典型用法代碼示例。如果您正苦於以下問題:PHP CBlog::Delete方法的具體用法?PHP CBlog::Delete怎麽用?PHP CBlog::Delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CBlog的用法示例。


在下文中一共展示了CBlog::Delete方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: OnGroupDelete

 public static function OnGroupDelete($ID)
 {
     $ID = IntVal($ID);
     if ($ID <= 0) {
         return false;
     }
     $arBlog = CBlog::GetBySocNetGroupID($ID);
     if (!empty($arBlog)) {
         CBlog::Delete($arBlog["ID"]);
     }
 }
開發者ID:rasuldev,項目名稱:torino,代碼行數:11,代碼來源:sonet.php

示例2: array

     $dbResultList = CBlog::GetList(array($by => $order), $arFilter, false, false, array("ID"));
     while ($arResult = $dbResultList->Fetch()) {
         $arID[] = $arResult['ID'];
     }
 }
 foreach ($arID as $ID) {
     if (strlen($ID) <= 0) {
         continue;
     }
     switch ($_REQUEST['action']) {
         case "delete":
             @set_time_limit(0);
             $dbBlog = CBlog::GetList(array(), array("ID" => $ID), false, false, array("ID", "GROUP_SITE_ID", "GROUP_ID"));
             $arBlogOld = $dbBlog->Fetch();
             $DB->StartTransaction();
             if (!CBlog::Delete($ID)) {
                 $DB->Rollback();
                 if ($ex = $APPLICATION->GetException()) {
                     $lAdmin->AddGroupError($ex->GetString(), $ID);
                 } else {
                     $lAdmin->AddGroupError(GetMessage("BLB_DELETE_ERROR"), $ID);
                 }
             }
             $DB->Commit();
             if (!empty($arBlogOld)) {
                 BXClearCache(True, "/" . $arBlogOld["GROUP_SITE_ID"] . "/blog/");
                 BXClearCache(True, "/" . SITE_ID . "/blog/last_messages/");
                 BXClearCache(True, "/" . SITE_ID . "/blog/commented_posts/");
                 BXClearCache(True, "/" . SITE_ID . "/blog/popular_posts/");
                 BXClearCache(True, "/" . SITE_ID . "/blog/last_comments/");
                 BXClearCache(True, "/" . SITE_ID . "/blog/popular_blogs/");
開發者ID:k-kalashnikov,項目名稱:geekcon_new,代碼行數:31,代碼來源:blog.php

示例3: elseif

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
} elseif (!CModule::IncludeModule("blog")) {
    return;
}
$SocNetGroupID = false;
$db_blog_group = CBlogGroup::GetList(array("ID" => "ASC"), array("SITE_ID" => WIZARD_SITE_ID, "NAME" => "[" . WIZARD_SITE_ID . "] " . GetMessage("BLOG_DEMO_GROUP_SOCNET")));
if ($res_blog_group = $db_blog_group->Fetch()) {
    $SocNetGroupID = $res_blog_group["ID"];
    if (WIZARD_INSTALL_DEMO_DATA) {
        $db_blog = CBlog::GetList(array(), array("GROUP_ID" => $res_blog_group["ID"]), false, false, array("ID"));
        if ($res_blog = $db_blog->Fetch()) {
            do {
                CBlog::Delete($res_blog["ID"]);
            } while ($res_blog = $db_blog->Fetch());
        }
        if (CModule::IncludeModule("socialnetwork")) {
            $db_log = CSocNetLog::GetList(array("ID" => "DESC"), array("SITE_ID" => WIZARD_SITE_ID, "EVENT_ID" => array("blog", "blog_post", "blog_comment")), false, false, array("ID"));
            while ($arLog = $db_log->Fetch()) {
                CSocNetLog::Delete($arLog["ID"]);
            }
        }
        BXClearCache(True, "/" . WIZARD_SITE_ID . "/blog/");
    } else {
        CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/_index.php", array("BLOG_GROUP_ID" => $SocNetGroupID));
        CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/index.php", array("BLOG_GROUP_ID" => $SocNetGroupID));
        CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/people/user.php", array("BLOG_GROUP_ID" => $SocNetGroupID));
        CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/groups/group.php", array("BLOG_GROUP_ID" => $SocNetGroupID));
        CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/blogs/index.php", array("BLOG_GROUP_ID" => $SocNetGroupID));
開發者ID:webgksupport,項目名稱:alpina,代碼行數:31,代碼來源:index.php


注:本文中的CBlog::Delete方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。