Ejemplo n.º 1
0
 public static function Delete($Entity)
 {
     $notifyEmail = new \Bitrix\Idea\NotifyEmail();
     if ($Entity == 'AI' || $Entity == 'A') {
         $notifyEmail->deleteCategory('');
     } else {
         if (substr($Entity, 0, strlen(self::SUBSCRIBE_IDEA_COMMENT)) == self::SUBSCRIBE_IDEA_COMMENT) {
             $notifyEmail->deleteIdea(substr($Entity, strlen(self::SUBSCRIBE_IDEA_COMMENT)));
         } else {
             if (strlen(intval($Entity)) == strlen($Entity)) {
                 $notifyEmail->deleteIdea($Entity);
             }
         }
     }
     return true;
 }
Ejemplo n.º 2
0
 */
$arParams['NAME_TEMPLATE'] = empty($arParams['NAME_TEMPLATE']) ? CSite::GetNameFormat() : $arParams["NAME_TEMPLATE"];
$arParams['ACTION'] = array_key_exists("ACTION", $_REQUEST) && check_bitrix_sessid() ? $_REQUEST["ACTION"] : (array_key_exists('ACTION', $arParams) ? $arParams["ACTION"] : false);
//ACTION PROCESSING
if ($arParams['ACTION']) {
    switch ($arParams['ACTION']) {
        case "ADD":
            break;
        case "DELETE":
            if (array_key_exists("ID", $_REQUEST)) {
                CIdeaManagment::getInstance()->Notification()->getEmailNotify()->Delete($_REQUEST["ID"]);
            } else {
                if (array_key_exists("ENTITY_TYPE", $_REQUEST)) {
                    $notifyEmail = new \Bitrix\Idea\NotifyEmail();
                    if ($_REQUEST["ENTITY_TYPE"] == \Bitrix\Idea\NotifyEmailTable::ENTITY_TYPE_CATEGORY) {
                        $notifyEmail->deleteCategory($_REQUEST["ENTITY_CODE"]);
                    } else {
                        $notifyEmail->deleteIdea($_REQUEST["ENTITY_CODE"]);
                    }
                }
            }
            LocalRedirect($APPLICATION->GetCurPageParam("", array("ACTION", "ID", "ENTITY_TYPE", "ENTITY_CODE", "sessid")));
            break;
    }
}
$arResult = array("USER_ID" => $USER->GetID(), "IDEA" => array(), "SUBSCRIBE" => array(), "IDEA_STATUS" => array(), "GRID" => array());
//Get Idea subscribtion
if ($arResult["USER_ID"] > 0) {
    //InitGrid
    $GridOptions = new CGridOptions($arResult["GRID_ID"]);
    //Grid Sort