Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
app->table->tag->getAll($application->id, null, null, 'items DESC', null, $params->get('count', 10), true); if (count($tags)) { // init vars $min_count = $tags[count($tags)-1]->items; $max_count = $tags[0]->items; $font_span = ($max_count - $min_count) / 100; $font_class_span = (self::MAX_FONT_WEIGHT - self::MIN_FONT_WEIGHT) / 100; $menu_item = $params->get('menu_item', 0); $itemid = $menu_item ? '&Itemid='.$menu_item : ''; // attach font size, href foreach ($tags as $tag) { $tag->weight = $font_span ? round(self::MIN_FONT_WEIGHT + (($tag->items - $min_count) / $font_span) * $font_class_span) : 1; $tag->href = $menu_item ? sprintf('index.php?option=com_zoo&task=tag&tag=%s&app_id=%d%s', $tag->name, $application->id, $itemid) : $this->app->route->tag($application->id, $tag->name); } $this->orderTags($tags, $params->get('order')); } return $tags; } public function orderTags(&$tags, $order) { switch ($order) { case 'alpha': usort($tags, create_function('$a, $b', 'return strcmp($a->name, $b->name);')); break; case 'ralpha': usort($tags, create_function('$a, $b', 'return strcmp($b->name, $a->name);')); break; case 'acount': krsort($tags); $tags = array_merge($tags); break; case 'ocount': $this->_count_sort($tags); break; case 'icount': krsort($tags); $this->_count_sort($tags); break; case 'random': shuffle($tags); break; } } protected function _count_sort(&$tags) { $tags = array_merge($tags); $sorted_tags = array(); $count = count($tags); $prefix = 1; $add = $count & 1 ? 1 : 0; for ($i = 0; $i < $count; $i++) { $sorted_tags[(int) (($count + $add + ($prefix * $i)) / 2)] = $tags[$i]; $prefix *= -1; } ksort($sorted_tags); $tags = $sorted_tags; } }