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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
my $file = $ARGV[0] or die('Must pass an apache access logfile'); | |
open IN, "<$file" or die("Can't open $file"); |
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
DO WTF YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Alexey Silin <pinkoblomingo@gmail.com> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WTF YOU WANT TO PUBLIC LICENSE |
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
// Internal recursive views data mapping function | |
private function mapViewsDataRecurse(&$response, &$view, $key, $filter_fields) { | |
if (is_array($response)) { | |
foreach($response as $field => $definition) { | |
if (!empty($filter_fields) && !in_array($field, $filter_fields)) { | |
unset($response[$field]); | |
} | |
elseif ($definition['#type'] == 'group') { | |
$response[$field] = $this->mapViewsDataRecurse($response[$field]['#content'], &$view, $key, $fields); | |
} |