Skip to content

Commit

Permalink
Support Kohana 3.3.5
Browse files Browse the repository at this point in the history
Kohana 3.3.5 does not allow passing query params as part of the URL in Request::factory().

See kohana/core#627 (comment) for more details.
  • Loading branch information
hkdobrev committed Jul 20, 2016
1 parent b3a927b commit 10b8460
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion classes/Kohana/Jam/Form/Tart/General.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,15 @@ public function remoteselect($name, array $options = array(), array $attributes
$h('span', array('id' => $options['container'], 'class' => 'remoteselect-container'), function($h, $self) use ($current, $model, $options) {
if ($current)
{
$h->add(Request::factory(strtr($options['url'], array('{{model}}' => $model, '{{id}}' => Jam_Form::list_id($current))))->execute());
$url = strtr($options['url'], array('{{model}}' => $model, '{{id}}' => Jam_Form::list_id($current)));
$split_uri = explode('?', $url);
$uri = array_shift($split_uri);
$query = [];
if ($split_uri)
{
parse_str($split_uri[0], $query);
}
$h->add(Request::factory($uri)->query($query)->execute());
}
});

Expand Down

0 comments on commit 10b8460

Please sign in to comment.