summaryrefslogtreecommitdiff
path: root/program/include/rcube_result_index.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-12-07 09:29:56 +0000
committeralecpl <alec@alec.pl>2011-12-07 09:29:56 +0000
commit889665f57517cb1182de74568a239a669b22bece (patch)
tree6266f8918ba44ac8342d12d605fefb76c2796468 /program/include/rcube_result_index.php
parent0706075d85e3a59e8a1f5ba2187701a278ecf88a (diff)
- Cleanup + perf. improvement (substr_count() is really fast!)
Diffstat (limited to 'program/include/rcube_result_index.php')
-rw-r--r--program/include/rcube_result_index.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/program/include/rcube_result_index.php b/program/include/rcube_result_index.php
index 4decaf9e8..e1e6056f5 100644
--- a/program/include/rcube_result_index.php
+++ b/program/include/rcube_result_index.php
@@ -157,9 +157,9 @@ class rcube_result_index
$this->meta['count'] = 0;
$this->meta['length'] = 0;
}
- else
- // @TODO: check performance substr_count() vs. explode()
+ else {
$this->meta['count'] = 1 + substr_count($this->raw_data, self::SEPARATOR_ELEMENT);
+ }
return $this->meta['count'];
}
@@ -185,7 +185,6 @@ class rcube_result_index
public function max()
{
if (!isset($this->meta['max'])) {
- // @TODO: do it by parsing raw_data?
$this->meta['max'] = (int) @max($this->get());
}
@@ -201,7 +200,6 @@ class rcube_result_index
public function min()
{
if (!isset($this->meta['min'])) {
- // @TODO: do it by parsing raw_data?
$this->meta['min'] = (int) @min($this->get());
}