Skip to content

Instantly share code, notes, and snippets.

Thomas Jakobi Jako

Block or report user

Report or block Jako

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Jako
Jako / gist:c9ea82324c62c90c15ade95254ac57e1
Created Nov 16, 2016
Recursive download with curl and open_basedir
View gist:c9ea82324c62c90c15ade95254ac57e1
/**
* Load data from URL with curl
*
* @param $url
* @return mixed
*/
public function loadData($url)
{
$curloptHeader = false;
@Jako
Jako / Revolution-Integrators-Guide.md
Last active Jan 26, 2017
Revolution Integrators Guide
View Revolution-Integrators-Guide.md

Few rules

  • Don't merge own PRs
  • Don't do direct changes (submit a PR instead)

GitHub repository setup

  • Clone your fork
  • Add modxcms/revolution as a remote (git remote add upstream git@github.com:modxcms/revolution.git)
  • Update .git/config and add fetch = +refs/pull/*/head:refs/remotes/upstream/pr/* in section [remote "upstream"]
@Jako
Jako / resolve.access_permissions.php
Created Nov 20, 2016
Access permissions resolver for MODX packages
View resolve.access_permissions.php
<?php
/**
* Resolve access permissions
*
* @package sample
* @subpackage build
*
* @var mixed $object
* @var array $options
*/
View gist:8ba13f097b36e94fe315f505d3003d8b
<?php
/**
* RedirectByValue
*
* Copyright 2016 by Thomas Jakobi <thomas.jakobi@partout.info>
*
* Description:
* This FormIt Hook redirects to different targets on base of the
* formItRedirectByValue property. The property has to contain a json encoded
* object of fieldnames, values, redirects and redirect parameters. Only a
@Jako
Jako / gist:1967614434a98e52a063
Created Nov 9, 2014
Replaces line 308 in core/components/formit/model/formit/fihooks.class.php
View gist:1967614434a98e52a063
if (!is_numeric($this->formit->config['redirectTo']) &&
isset($fields[$this->formit->config['redirectTo']]) &&
is_numeric($fields[$this->formit->config['redirectTo']])
) {
$url = $this->modx->makeUrl($fields[$this->formit->config['redirectTo']],$contextKey,$redirectParams,'full');
} else {
$url = $this->modx->makeUrl($this->formit->config['redirectTo'],$contextKey,$redirectParams,'full');
}
You can’t perform that action at this time.