diff options
author | matthieu_ <matthieu_@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2007-09-11 22:11:07 +0400 |
---|---|---|
committer | matthieu_ <matthieu_@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2007-09-11 22:11:07 +0400 |
commit | 80c7552f18ad73494011fe2ee069b0a82ba9bb80 (patch) | |
tree | fb6dc26512c545860817bb7f93ae391d8d2af760 /plugins/Referers/API.php | |
parent | a0bb7739aeefedb357dd1330fa17de3ddd96969f (diff) |
Ui, struggling with JS
Diffstat (limited to 'plugins/Referers/API.php')
-rw-r--r-- | plugins/Referers/API.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/Referers/API.php b/plugins/Referers/API.php index ba0116b650..bde0c697f5 100644 --- a/plugins/Referers/API.php +++ b/plugins/Referers/API.php @@ -88,6 +88,7 @@ class Piwik_Referers_API extends Piwik_Apiable $dataTable = $this->getDataTable('Referers_urlByWebsite',$idSite, $period, $date, $idSubtable); $dataTable->queueFilter('Piwik_DataTable_Filter_ColumnCallbackAddDetail', array( 'label', 'url', create_function('$label', 'return $label;')) ); $dataTable->queueFilter('Piwik_DataTable_Filter_ColumnCallbackReplace', array('label', 'Piwik_getPathFromUrl')); + $dataTable->queueFilter('Piwik_DataTable_Filter_ColumnCallbackReplace', array('label', 'Piwik_truncatePath')); return $dataTable; } @@ -153,6 +154,17 @@ function Piwik_getPathFromUrl($url) return $path; } +function Piwik_truncatePath( $path ) +{ + $limit = 27; + $path = htmlspecialchars_decode($path); + $len = strlen($path); + if($len > $limit) + { + $path = substr($path, 0, $limit-3) . "..."; + } + return htmlspecialchars($path); +} function Piwik_getSearchEngineUrlFromName($name) { |