Skip to content
This repository has been archived by the owner on Feb 10, 2019. It is now read-only.

Commit

Permalink
Added optional GET params array
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyco committed Mar 11, 2012
1 parent d86d991 commit b12540f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
20 changes: 14 additions & 6 deletions classes/kohana/controller/filebrowser.php
Expand Up @@ -513,19 +513,27 @@ public function action_thumb()
->body($image);
}

/**
* Optional GET params (like session_id etc)
*
* @var array
*/
protected $_optional_params = array();

public function after()
{
if ($this->auto_render)
{
$route = Route::get('wysiwyg/filebrowser');

$this->template->global_config = array
$this->template->global_config = Arr::merge($this->template->global_config, array
(
'root' => $this->_config['media_directory'].'/'.Kohana::$config->load('filebrowser.uploads_directory'),
'dirs_url' => $route->uri(array('action' => 'dirs')),
'files_url' => $route->uri(array('action' => $this->request->action())),
'move_url' => $route->uri(array('action' => 'move'))
);
'root' => $this->_config['media_directory'].'/'.Kohana::$config->load('filebrowser.uploads_directory'),
'dirs_url' => $route->uri(array('action' => 'dirs')),
'files_url' => $route->uri(array('action' => $this->request->action())),
'move_url' => $route->uri(array('action' => 'move')),
'params' => $this->_optional_params
));
}

parent::after();
Expand Down
4 changes: 2 additions & 2 deletions media/filebrowser/global.js
Expand Up @@ -49,8 +49,8 @@
zone: 'any',
events: 'closeFolderClick,openFolderClick'
},
targetSelector : "div",
containerClass : "contextMenu well",
targetSelector: "div",
containerClass: "contextMenu well",
listClass: "nav nav-list",
list: [
{
Expand Down

0 comments on commit b12540f

Please sign in to comment.