This file contains hidden or 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
//p.obj_header_insert.before( t.param.htmltable.header_cell.replace( '<!--ph-->', p.data.h[ i ].c.replace( /xxx"/g, '"' ) ) ); | |
// input-v4.js |
This file contains hidden or 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 | |
$id = $_GET['id']; | |
if ($res = $modx->getObject('modResource',intval($id))) { | |
if(intval($res->get('template')) == 2) | |
{ | |
$js =" | |
<script type='text/javascript'> | |
Ext.onReady(function () { | |
var tb = Ext.getCmp('modx-action-buttons'); | |
This file contains hidden or 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 | |
// Скрипт формирования уникального ключа формы | |
session_start(); | |
if($_SESSION["verify"]) | |
{ | |
unset($_SESSION["verify"]); | |
} | |
$_SESSION["verify"]=md5(uniqid(rand(),1)); |
This file contains hidden or 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
// Изменяем функцию сохранения контента в файл | |
public function onSave() | |
{ | |
if (!$this->checkEditor()) | |
return; | |
$fileName = post('file'); | |
// Format <p> delete | |
// Вторым параметро указываем те теги, которые разрешаем к допуску | |
$formattedContent = strip_tags(post("content"), '<a></a>'); |
This file contains hidden or 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
Установить Docker CE и docker-compose на систему, если у вас MacOS или Windows | |
вы можете скачать установщик с офф. сайта | |
https://www.docker.com/get-started | |
Если же у вас Linux проводим установку как указано здесь: | |
https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce | |
Далее устанавливаем docker-compose | |
https://www.digitalocean.com/community/tutorials/how-to-install-docker-compose-on-ubuntu-16-04 |
This file contains hidden or 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
mongorestore --gzip --db $DB_NAME --drop $PATH/ |
This file contains hidden or 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 | |
return $query->whereJsonContains('fields', ['sub-field' => 'value']) |
This file contains hidden or 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
docker-compose exec <your-php-container> docker-php-ext-install <extension1> <extension2> |
This file contains hidden or 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
1) Удаляем из vendor папку которую хотим назначить как рабочую | |
2) composer install --prefer-source | |
3) Добавляем эту папку в Settings -> VCS вместе с .git | |
4) Обновляем индексацию |
This file contains hidden or 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
(new ActionName()) | |
->canSee(function () { | |
return ! $this->resource->exists || ($this->field === 'some') === true; | |
}) | |
->canRun(function () { | |
return true; | |
}), |