當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。