Skip to content

Instantly share code, notes, and snippets.

View skomaroh's full-sized avatar

Evgeny skomaroh

  • Russia, Kaliningrad
View GitHub Profile
@skomaroh
skomaroh / file_debug.php
Created June 5, 2012 04:57 — forked from artofhuman/file_debug.php
Bitrix: DebugLog To File
function debug($var)
{
ob_start();
print_r($var);
$txt = ob_get_contents();
ob_clean();
file_put_contents($_SERVER['DOCUMENT_ROOT'] . '/bitrix/php_interface/debug.txt', $txt);
@skomaroh
skomaroh / bitrix-disposition-notification.php
Created June 5, 2012 04:56 — forked from kovalev-org/bitrix-disposition-notification.php
Bitrix: EventListener BeforePostingmail
<?
// регистрируем обработчики
AddEventHandler("subscribe", "BeforePostingSendMail", Array("MyClass", "BeforePostingSendMailHandler"));
class MyClass
{
// создаем обработчик события "BeforePostingSendMail"
/* если в теме рассылки будет команда [notify=some@body.ru], то на some@body.ru будет запрошено уведомление о прочтении писем */
function BeforePostingSendMailHandler($arFields)
{