This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Запрос ссылки на backup у пользователя | |
read -p "Введите ссылку на backup: " backup_link | |
# Скачивание файлов по ссылке, пока они существуют | |
counter=1 # Счетчик для итерации по файлам | |
wget -N "${backup_link}" | |
while : | |
do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Thelh\Utils; | |
class IblockCacheAgent | |
{ | |
public static function agent($lastTimesteampOnRunAgent = 0) | |
{ | |
\Bitrix\Main\Loader::includeModule('iblock'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git read-tree -m -u COMMIT_JASH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Bitrix\Sale\Services\Base; | |
use Bitrix\Sale\Internals\CollectableEntity; | |
use Bitrix\Sale\Internals\Entity; | |
use Bitrix\Sale\Order; | |
/** | |
* Класс для проверки на присутствии свойства (список) в одном из товаров в корзине | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
use \Bitrix\Main\Loader; | |
use \Bitrix\Iblock\Iblock; | |
Loader::includeModule("iblock"); | |
$result = []; | |
$iblockId = 1; | |
$iblockProjects = \Bitrix\Iblock\Iblock::wakeUp($iblockId); | |
$iblockProjectsEntity = $iblockProjects->getEntityDataClass(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// $eventManager->addEventHandler("main", "OnUserTypeBuildList", ['PropStringDesc', "getUserTypeDescription"]); | |
class PropStringDesc extends \CUserTypeString | |
{ | |
public function getUserTypeDescription() | |
{ | |
return [ | |
'USER_TYPE_ID' => 'PropStringDesc', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
use Bitrix\Main\Loader; | |
Loader::includeModule("iblock"); | |
Loader::includeModule("sale"); | |
function fputcsvNew($csv_arr, $delimiter = ';', $enclosure = '"') { | |
if (!is_array($csv_arr)) { | |
return(false); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const appHeight = () => { | |
const doc = document.documentElement | |
doc.style.setProperty('--max-height-app', `calc(${window.innerHeight}px)`); | |
} | |
appHeight() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// В script.js компонента bitrix:catalog.smart.filter | |
// Вместо | |
//if (modef.style.display === 'none') | |
//{ | |
// modef.style.display = 'inline-block'; | |
//} | |
// Пишем. Это ajax запрос к сформированной ссылке. А дальше вытягиваем, что нужно | |
$.get( | |
BX.util.htmlspecialcharsback(result.FILTER_AJAX_URL), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var isDeviceIos = navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPhone/i); | |
var historyScrollBack = (historyTab) => { | |
if (history.state && historyTab.hasOwnProperty('lastScroll')) { | |
window.scrollTo(0, historyTab.lastScroll); | |
} | |
}; | |
// Возрват к позиции при нажатии кнопки назад (Запись) | |
window.addEventListener((isDeviceIos ? "pagehide" : "beforeunload"), function (e) { |
NewerOlder