function get_pagination_page_title() { switch (get_pagination_template()) { case 'garminzip': return tr('GarminZip_01') . ': Garmin ZIP'; case 'garminzip-ggz': return tr('GarminZip_01') . ': Garmin ' . tr('format_ggz_pict'); } }
} } // ======================================= // I don't know what code above doing (it's horrible and I don't have enough time to analyze this code), // so I just modify existing piece of code from other output search.*.inc.php file. // == Limak (28.01.2012) == $okapi_max_caches = get_max_caches_per_call(); //zippart param in request is used for split ZIP files if (!isset($_REQUEST['zippart'])) { $_REQUEST['zippart'] = 0; } $zippart = abs(intval($_REQUEST['zippart'])) + 0; $startat = ($zippart - 1) * $okapi_max_caches; // too much caches for one zip file - generate webpage instead if ($caches_count > $okapi_max_caches && ($zippart == 0 || $startat >= $caches_count)) { $tplname = get_pagination_template(); $tpl_subtitle = get_pagination_page_title(); // omfg :( tpl_set_var('zip_total_cache_count', $caches_count); tpl_set_var('zip_max_count', $okapi_max_caches); $links_content = ''; $forlimit = intval($caches_count / $okapi_max_caches) + 1; for ($i = 1; $i <= $forlimit; $i++) { $link_content = generate_link_content($options['queryid'], $sFilebasename, $i); $links_content .= $link_content; } tpl_set_var('zip_links', $links_content); tpl_BuildTemplate(); } else { // caches are less or equals then okapi_max_caches in one ZIP file limit - okey, return ZIP file // use 'LIMIT' only if it's needed