当前位置: 首页>>代码示例>>PHP>>正文


PHP CUserCounter::ClearByTag方法代码示例

本文整理汇总了PHP中CUserCounter::ClearByTag方法的典型用法代码示例。如果您正苦于以下问题:PHP CUserCounter::ClearByTag方法的具体用法?PHP CUserCounter::ClearByTag怎么用?PHP CUserCounter::ClearByTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CUserCounter的用法示例。


在下文中一共展示了CUserCounter::ClearByTag方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Update

 public static function Update($id, $arFields)
 {
     global $DB;
     $id = intval($id);
     if ($id <= 0) {
         throw new Exception("id");
     }
     self::ParseFields($arFields, $id);
     $strUpdate = $DB->PrepareUpdate("b_bp_task", $arFields);
     $strSql = "UPDATE b_bp_task SET " . "\t" . $strUpdate . ", " . "\tMODIFIED = " . $DB->CurrentTimeFunction() . " " . "WHERE ID = " . intval($id) . " ";
     $DB->Query($strSql, False, "File: " . __FILE__ . "<br>Line: " . __LINE__);
     if (is_set($arFields, "USERS")) {
         $DB->Query("DELETE FROM b_bp_task_user WHERE TASK_ID = " . intval($id) . " ");
         CUserCounter::ClearByTag($id, 'bp_tasks', '**');
         $ar = array();
         foreach ($arFields["USERS"] as $userId) {
             $userId = intval($userId);
             if (in_array($userId, $ar)) {
                 continue;
             }
             $DB->Query("INSERT INTO b_bp_task_user (USER_ID, TASK_ID) " . "VALUES (" . intval($userId) . ", " . intval($id) . ") ");
             CUserCounter::Increment($userId, 'bp_tasks', '**');
             $ar[] = $userId;
         }
     }
     $events = GetModuleEvents("bizproc", "OnTaskUpdate");
     while ($arEvent = $events->Fetch()) {
         ExecuteModuleEventEx($arEvent, array($id, $arFields));
     }
     return $id;
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:taskservice.php

示例2: DeleteByWorkflow

 public static function DeleteByWorkflow($workflowId)
 {
     global $DB;
     $workflowId = trim($workflowId);
     if (strlen($workflowId) <= 0) {
         throw new Exception("workflowId");
     }
     $dbRes = $DB->Query("SELECT ID " . "FROM b_bp_task " . "WHERE WORKFLOW_ID = '" . $DB->ForSql($workflowId) . "' ");
     while ($arRes = $dbRes->Fetch()) {
         $DB->Query("DELETE FROM b_bp_task_user " . "WHERE TASK_ID = " . intval($arRes["ID"]) . " ", true);
         CUserCounter::ClearByTag($arRes["ID"], 'bp_tasks', '**');
         $events = GetModuleEvents("bizproc", "OnTaskDelete");
         while ($arEvent = $events->Fetch()) {
             ExecuteModuleEventEx($arEvent, array(intval($arRes["ID"])));
         }
     }
     $DB->Query("DELETE FROM b_bp_task " . "WHERE WORKFLOW_ID = '" . $DB->ForSql($workflowId) . "' ", true);
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:18,代码来源:taskservice.php

示例3: ClearByTag

 public static function ClearByTag($tag, $code, $site_id = SITE_ID, $sendPull = true)
 {
     return CUserCounter::ClearByTag($tag, $code, $site_id, $sendPull);
 }
开发者ID:Satariall,项目名称:izurit,代码行数:4,代码来源:global_counter.php


注:本文中的CUserCounter::ClearByTag方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。