Skip to content

Commit

Permalink
Automatically add script files to outgoing HordeCore requests
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Oct 10, 2013
1 parent fde4629 commit 7e435ac
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion framework/Core/lib/Horde/Core/Ajax/Response/HordeCore.php
Expand Up @@ -77,10 +77,12 @@ public function send()
*/
protected function _jsonData()
{
global $notification, $page_output;

$ob = new stdClass;
$ob->response = $this->data;

$stack = $GLOBALS['notification']->notify(array(
$stack = $notification->notify(array(
'listeners' => array('status', 'audio'),
'raw' => true
));
Expand All @@ -89,6 +91,11 @@ protected function _jsonData()
$ob->msgs = $stack;
}

foreach ($page_output->hsl as $val) {
$this->jsfiles[] = strval($val->url);
}
$page_output->hsl->clear();

if (!empty($this->jsfiles)) {
$ob->jsfiles = array_unique($this->jsfiles);
}
Expand Down

0 comments on commit 7e435ac

Please sign in to comment.