mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 07:50:11 +01:00
minor fixes
This commit is contained in:
parent
453d20adc5
commit
7de23a3b1d
@ -19,8 +19,6 @@ class ControllerSearchLoad extends Controller {
|
|||||||
$this->load->model('search/message');
|
$this->load->model('search/message');
|
||||||
$this->load->model('user/user');
|
$this->load->model('user/user');
|
||||||
|
|
||||||
if($this->data['hits_to'] > $this->data['n']) { $this->data['hits_to'] = $this->data['n']; }
|
|
||||||
|
|
||||||
$this->data['terms'] = $this->model_search_search->get_search_terms();
|
$this->data['terms'] = $this->model_search_search->get_search_terms();
|
||||||
|
|
||||||
$this->render();
|
$this->render();
|
||||||
|
@ -224,7 +224,7 @@ class ModelSearchMessage extends Model {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($charset && !preg_match("/utf-8/i", $charset)){
|
if($charset && !preg_match("/utf-8/i", $charset)){
|
||||||
$s = iconv($charset, 'utf-8', $chunk);
|
$s = @iconv($charset, 'utf-8', $chunk);
|
||||||
if($s) { $chunk = $s; $s = ''; }
|
if($s) { $chunk = $s; $s = ''; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,6 +63,14 @@
|
|||||||
'target':document
|
'target':document
|
||||||
});
|
});
|
||||||
|
|
||||||
|
shortcut.add("Enter", function() {
|
||||||
|
var a=document.getElementById('ref'); if(a) a.value=''; load_search_results('<?php print SEARCH_HELPER_URL; ?>', assemble_search_term(count, ''), 0);
|
||||||
|
},{
|
||||||
|
'type':'keydown',
|
||||||
|
'propagate':true,
|
||||||
|
'target':document
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -13,11 +13,12 @@
|
|||||||
|
|
||||||
<?php foreach($terms as $term) {
|
<?php foreach($terms as $term) {
|
||||||
parse_str($term['term'], $s);
|
parse_str($term['term'], $s);
|
||||||
|
if(isset($s['search'])) {
|
||||||
?>
|
?>
|
||||||
<div class="resultrow">
|
<div class="resultrow">
|
||||||
<a href="#" onclick="javascript:load_search_results('<?php print SEARCH_HELPER_URL; ?>', '<?php print $term['term']; ?>', 0); var a=document.getElementById('_search'); var v=decodeURIComponent('<?php print urlencode($s['search']); ?>'); v = v.replace(/\+/g, ' '); a.value=v; "><?php print $s['search']; ?></a></br />
|
<a href="#" onclick="javascript:load_search_results('<?php print SEARCH_HELPER_URL; ?>', '<?php print $term['term']; ?>', 0); var a=document.getElementById('_search'); var v=decodeURIComponent('<?php print urlencode($s['search']); ?>'); v = v.replace(/\+/g, ' '); a.value=v; "><?php print $s['search']; ?></a></br />
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } } ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -25,6 +26,4 @@
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
//print_r($terms);
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user