Changeset 14998
- Timestamp:
- 02/13/08 15:25:50 (1 year ago)
- Files:
-
- branches/MidCOM_2_8/midcom.helper.search/config/manifest.inc (modified) (1 diff)
- branches/MidCOM_2_8/midcom.helper.search/style/advanced_form.php (modified) (3 diffs)
- branches/MidCOM_2_8/midcom.helper.search/style/basic_form.php (modified) (2 diffs)
- branches/MidCOM_2_8/midcom.helper.search/style/result_nav.php (modified) (4 diffs)
- branches/MidCOM_2_8/midcom.helper.search/viewer.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/MidCOM_2_8/midcom.helper.search/config/manifest.inc
r14253 r14998 1 1 'name' => 'midcom.helper.search', 2 'version' => '1.0.4beta 7',2 'version' => '1.0.4beta8', 3 3 'state' => 'beta', 4 4 'purecode' => false, branches/MidCOM_2_8/midcom.helper.search/style/advanced_form.php
r14775 r14998 22 22 && $node[MIDCOM_NAV_COMPONENT] != 'midcom.helper.search') 23 23 { 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]); 26 26 $components[$node[MIDCOM_NAV_COMPONENT]] = $l10n->get($node[MIDCOM_NAV_COMPONENT]); 27 27 } … … 48 48 49 49 ?> 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'> 51 51 <input type='hidden' name='type' value='advanced' /> 52 52 <input type='hidden' name='page' value='1' /> … … 64 64 foreach ($topics as $url => $name) 65 65 { 66 $selected = ($data[' topic'] == $url) ? ' selected' : '';66 $selected = ($data['request_topic'] == $url) ? ' selected' : ''; 67 67 ?> 68 68 <option&(selected); value='&(url);'>&(name:h);</option> branches/MidCOM_2_8/midcom.helper.search/style/basic_form.php
r14252 r14998 4 4 $query = htmlspecialchars($data['query'], ENT_QUOTES); 5 5 ?> 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'> 7 7 <label for="midcom_helper_search_query"> 8 8 <?php echo $data['l10n']->get('query');?>: … … 15 15 16 16 <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> 18 18 </p> branches/MidCOM_2_8/midcom.helper.search/style/result_nav.php
r14775 r14998 13 13 if ($data['type'] == 'advanced') 14 14 { 15 if ( isset($data['topic']) 16 && is_string($data['topic'])) 17 { 18 $querystring .= '&topic=' . urlencode($data['topic']); 19 } 15 $querystring .= '&topic=' . urlencode($data['topic']); 20 16 $querystring .= '&component=' . urlencode($data['component']); 21 17 $querystring .= '&lastmodified=' . urlencode($data['lastmodified']); … … 27 23 { 28 24 $page = urlencode($data['page'] - 1); 29 $url = "{$prefix}result .html?{$querystring}&page={$page}";25 $url = "{$prefix}result/?{$querystring}&page={$page}"; 30 26 $desc = $data['l10n']->get('previous page'); 31 27 echo "<a href='{$url}'>⇐ {$desc}</a> "; … … 41 37 { 42 38 $page = urlencode($i); 43 $url = "{$prefix}result .html?{$querystring}&page={$page}";39 $url = "{$prefix}result/?{$querystring}&page={$page}"; 44 40 echo "<a href='{$url}'>${i}</a> "; 45 41 } … … 49 45 { 50 46 $page = urlencode($data['page'] + 1); 51 $url = "{$prefix}result .html?{$querystring}&page={$page}";47 $url = "{$prefix}result/?{$querystring}&page={$page}"; 52 48 $desc = $data['l10n']->get('next page'); 53 49 echo " <a href='{$url}'>{$desc} ⇒</a>"; branches/MidCOM_2_8/midcom.helper.search/viewer.php
r14775 r14998 65 65 'type' => 'application/opensearchdescription+xml', 66 66 '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', 68 68 ) 69 69 ); … … 79 79 * @param mixed $handler_id The ID of the handler. 80 80 * @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. 83 83 */ 84 84 function _handler_searchform($handler_id, $args, &$data) … … 111 111 * 112 112 * @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. 114 114 */ 115 115 function _show_searchform($handler_id, &$data) … … 121 121 * Appends language to search terms 122 122 * 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. 124 124 */ 125 125 function add_multilang_terms(&$final_query) … … 134 134 * Expand arrays of custom rules to end of query 135 135 * 136 * @param $final_query reference to the query string to be passed on to the indexer.137 * @param $terms array or string to append136 * @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 138 138 */ 139 139 function append_terms_recursive(&$final_query, $terms) … … 164 164 * @param mixed $handler_id The ID of the handler. 165 165 * @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. 168 168 */ 169 169 function _handler_result($handler_id, $args, &$data) … … 321 321 * 322 322 * @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. 324 324 */ 325 325 function _show_result($handler_id, &$data) … … 340 340 * @param mixed $handler_id The ID of the handler. 341 341 * @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. 344 344 */ 345 345 function _handler_opensearchdescription($handler_id, $args, &$data) … … 355 355 * 356 356 * @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. 358 358 */ 359 359 function _show_opensearchdescription($handler_id, &$data)
