Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattpiwik <matthieu.aubry@gmail.com>2009-05-05 02:55:35 +0400
committermattpiwik <matthieu.aubry@gmail.com>2009-05-05 02:55:35 +0400
commit26aebfe0aeb030c12d5c88e56bb1cdfb11222264 (patch)
tree155a924d3e86b7869c89022e3fbf19ca7be2ce2f /core/DataTable/Filter/Sort.php
parentfbb965095e4e854ca725a27ba34deb1f7d078b18 (diff)
- ADDED search field below data tables is now using the regular expression syntax. For example, a search for "google|yahoo" would match all rows containing "google" or "yahoo". All search strings containing any of the special characters from this list: . \ + * ? [ ^ ] $ ( ) { } = ! < > | must be escaped with a back slash, eg. if you want to search for keywords containing "piwik!" you would search for "piwik\!".
- ADDED new configuration option: default number of rows returned in API responses "API_datatable_default_limit = 50" - REMOVED the automatic generic filters. The limit and sort and safe decode are applied by each module when necessary. - removed exact match filter. Now all searches are using regular expressions syntax. Exact match can be done using ^exact search here$ - fixed notice when natural sort on a non existing column - fixed CSV export for datatable_array - clarified code for plotting multiple lines in an evolution chart - FIXED #624 Added icon "save as image" below all graphs (next to the Export icon) - moved all JS functions into the piwikHelper static class - added example in ExampleUI plugin to plot only visits from google and yahoo! in 4 lines of code - added message when flash is disabled and graph not showing, linking to piwik faq. - added expressInstall.swf feature git-svn-id: http://dev.piwik.org/svn/trunk@1085 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/DataTable/Filter/Sort.php')
-rw-r--r--core/DataTable/Filter/Sort.php18
1 files changed, 14 insertions, 4 deletions
diff --git a/core/DataTable/Filter/Sort.php b/core/DataTable/Filter/Sort.php
index 0b80a322d8..5c066cbe54 100644
--- a/core/DataTable/Filter/Sort.php
+++ b/core/DataTable/Filter/Sort.php
@@ -76,10 +76,20 @@ class Piwik_DataTable_Filter_Sort extends Piwik_DataTable_Filter
function naturalSort($a, $b)
{
- return $this->sign * strnatcasecmp(
- $a->c[Piwik_DataTable_Row::COLUMNS][$this->columnToSort],
- $b->c[Piwik_DataTable_Row::COLUMNS][$this->columnToSort]
- );
+ return !isset($a->c[Piwik_DataTable_Row::COLUMNS][$this->columnToSort])
+ && !isset($b->c[Piwik_DataTable_Row::COLUMNS][$this->columnToSort] )
+ ? 0
+ : (!isset($a->c[Piwik_DataTable_Row::COLUMNS][$this->columnToSort])
+ ? 1
+ : (!isset($b->c[Piwik_DataTable_Row::COLUMNS][$this->columnToSort] )
+ ? -1
+ : $this->sign * strnatcasecmp(
+ $a->c[Piwik_DataTable_Row::COLUMNS][$this->columnToSort],
+ $b->c[Piwik_DataTable_Row::COLUMNS][$this->columnToSort]
+ )
+ )
+ )
+ ;
}
function sortString($a, $b)