Changeset 14998

Show
Ignore:
Timestamp:
02/13/08 15:25:50 (1 year ago)
Author:
w_i
Message:

Backported [14997]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/MidCOM_2_8/midcom.helper.search/config/manifest.inc

    r14253 r14998  
    11  'name' => 'midcom.helper.search', 
    2   'version' => '1.0.4beta7', 
     2  'version' => '1.0.4beta8', 
    33  'state' => 'beta', 
    44  'purecode' => false, 
  • branches/MidCOM_2_8/midcom.helper.search/style/advanced_form.php

    r14775 r14998  
    2222        && $node[MIDCOM_NAV_COMPONENT] != 'midcom.helper.search') 
    2323    { 
    24         $i18n = $_MIDCOM->get_service('i18n'); 
    25         $l10n = $i18n->get_l10n($node[MIDCOM_NAV_COMPONENT]); 
     24        $i18n =& $_MIDCOM->get_service('i18n'); 
     25        $l10n =& $i18n->get_l10n($node[MIDCOM_NAV_COMPONENT]); 
    2626        $components[$node[MIDCOM_NAV_COMPONENT]] = $l10n->get($node[MIDCOM_NAV_COMPONENT]); 
    2727    } 
     
    4848 
    4949?> 
    50 <form method='GET' name='midcom_helper_search_form' action='&(prefix);result.html' class='midcom.helper.search'> 
     50<form method='get' name='midcom_helper_search_form' action='&(prefix);result/' class='midcom.helper.search'> 
    5151<input type='hidden' name='type' value='advanced' /> 
    5252<input type='hidden' name='page' value='1' /> 
     
    6464foreach ($topics as $url => $name) 
    6565{ 
    66     $selected = ($data['topic'] == $url) ? ' selected' : ''; 
     66    $selected = ($data['request_topic'] == $url) ? ' selected' : ''; 
    6767?> 
    6868                <option&(selected); value='&(url);'>&(name:h);</option> 
  • branches/MidCOM_2_8/midcom.helper.search/style/basic_form.php

    r14252 r14998  
    44$query = htmlspecialchars($data['query'], ENT_QUOTES); 
    55?> 
    6 <form method='get' name='midcom_helper_search_form' action='&(prefix);result.html' class='midcom.helper.search'> 
     6<form method='get' name='midcom_helper_search_form' action='&(prefix);result/' class='midcom.helper.search'> 
    77<label for="midcom_helper_search_query"> 
    88<?php echo $data['l10n']->get('query');?>: 
     
    1515 
    1616<p> 
    17   <a href="&(prefix);advanced.html"><?php echo $data['l10n']->get('advanced search');?></a> 
     17  <a href="&(prefix);advanced/"><?php echo $data['l10n']->get('advanced search');?></a> 
    1818</p> 
  • branches/MidCOM_2_8/midcom.helper.search/style/result_nav.php

    r14775 r14998  
    1313    if ($data['type'] == 'advanced') 
    1414    { 
    15         if (   isset($data['topic']) 
    16             && is_string($data['topic'])) 
    17         { 
    18             $querystring .= '&topic=' . urlencode($data['topic']); 
    19         } 
     15        $querystring .= '&topic=' . urlencode($data['topic']); 
    2016        $querystring .= '&component=' . urlencode($data['component']); 
    2117        $querystring .= '&lastmodified=' . urlencode($data['lastmodified']); 
     
    2723    { 
    2824        $page = urlencode($data['page'] - 1); 
    29         $url = "{$prefix}result.html?{$querystring}&page={$page}"; 
     25        $url = "{$prefix}result/?{$querystring}&page={$page}"; 
    3026        $desc = $data['l10n']->get('previous page'); 
    3127        echo "<a href='{$url}'>&lArr; {$desc}</a>&nbsp;&nbsp;&nbsp;"; 
     
    4137        { 
    4238            $page = urlencode($i); 
    43             $url = "{$prefix}result.html?{$querystring}&page={$page}"; 
     39            $url = "{$prefix}result/?{$querystring}&page={$page}"; 
    4440            echo "<a href='{$url}'>${i}</a> "; 
    4541        } 
     
    4945    { 
    5046        $page = urlencode($data['page'] + 1); 
    51         $url = "{$prefix}result.html?{$querystring}&page={$page}"; 
     47        $url = "{$prefix}result/?{$querystring}&page={$page}"; 
    5248        $desc = $data['l10n']->get('next page'); 
    5349        echo "&nbsp;&nbsp;&nbsp;<a href='{$url}'>{$desc} &rArr;</a>"; 
  • branches/MidCOM_2_8/midcom.helper.search/viewer.php

    r14775 r14998  
    6565                'type'  => 'application/opensearchdescription+xml', 
    6666                'title' => $this->_topic->extra, 
    67                 'href'  => $_MIDCOM->get_context_data(MIDCOM_CONTEXT_ANCHORPREFIX) . 'opensearch.xml', 
     67                'href'  => $_MIDCOM->get_host_name() . $_MIDCOM->get_context_data(MIDCOM_CONTEXT_ANCHORPREFIX) . 'opensearch.xml', 
    6868            ) 
    6969        ); 
     
    7979     * @param mixed $handler_id The ID of the handler. 
    8080     * @param Array $args The argument list. 
    81      * @param mixed $data The local request data.  
    82      * @return bool Indicating success. 
     81     * @param mixed &$data The local request data.  
     82     * @return boolean Indicating success. 
    8383     */ 
    8484    function _handler_searchform($handler_id, $args, &$data) 
     
    111111     *  
    112112     * @param mixed $handler_id The ID of the handler. 
    113      * @param mixed $data The local request data.  
     113     * @param mixed &$data The local request data.  
    114114     */ 
    115115    function _show_searchform($handler_id, &$data) 
     
    121121     * Appends language to search terms 
    122122     * 
    123      * @param $final_query reference to the query string to be passed on to the indexer. 
     123     * @param string &$final_query reference to the query string to be passed on to the indexer. 
    124124     */ 
    125125    function add_multilang_terms(&$final_query) 
     
    134134     * Expand arrays of custom rules to end of query 
    135135     * 
    136      * @param $final_query reference to the query string to be passed on to the indexer. 
    137      * @param $terms array or string to append 
     136     * @param string &$final_query reference to the query string to be passed on to the indexer. 
     137     * @param mixed $terms array or string to append 
    138138     */ 
    139139    function append_terms_recursive(&$final_query, $terms) 
     
    164164     * @param mixed $handler_id The ID of the handler. 
    165165     * @param Array $args The argument list. 
    166      * @param mixed $data The local request data.  
    167      * @return bool Indicating success. 
     166     * @param mixed &$data The local request data.  
     167     * @return boolean Indicating success. 
    168168     */ 
    169169    function _handler_result($handler_id, $args, &$data) 
     
    321321     *  
    322322     * @param mixed $handler_id The ID of the handler. 
    323      * @param mixed $data The local request data. 
     323     * @param mixed &$data The local request data. 
    324324     */ 
    325325    function _show_result($handler_id, &$data) 
     
    340340     * @param mixed $handler_id The ID of the handler. 
    341341     * @param Array $args The argument list. 
    342      * @param mixed $data The local request data.  
    343      * @return bool Indicating success. 
     342     * @param mixed &$data The local request data.  
     343     * @return boolean Indicating success. 
    344344     */ 
    345345    function _handler_opensearchdescription($handler_id, $args, &$data) 
     
    355355     *  
    356356     * @param mixed $handler_id The ID of the handler. 
    357      * @param mixed $data The local request data. 
     357     * @param mixed &$data The local request data. 
    358358     */ 
    359359    function _show_opensearchdescription($handler_id, &$data)