当前位置: 首页>>代码示例>>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;未经允许,请勿转载。