mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-07 23:41:59 +01:00
minor gui fixes
This commit is contained in:
parent
97800b32fa
commit
4fefb6c33f
@ -57,9 +57,16 @@ class ModelSearchMessage extends Model {
|
||||
|
||||
pclose($handle);
|
||||
|
||||
/* TODO: decode only if it's a base64 encoded attachment */
|
||||
/* check if it's a base64 encoded stuff */
|
||||
|
||||
return base64_decode(preg_replace("/\s/", "", $data));
|
||||
$s = substr($data, 0, 4096);
|
||||
$s = preg_replace("/(\r|\n)/", "", $s);
|
||||
|
||||
if(!preg_replace("/\s/", $s)) {
|
||||
return base64_decode(preg_replace("/\s/", "", $data));
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
|
@ -759,6 +759,9 @@ class ModelSearchSearch extends Model {
|
||||
public function add_search_term($term = '') {
|
||||
if($term == '') { return 0; }
|
||||
|
||||
parse_str($term, $s);
|
||||
if(!isset($s['search']) || $s['search'] == '') { return 0; }
|
||||
|
||||
if($this->update_search_term($term) == 0) {
|
||||
AUDIT(ACTION_SAVE_SEARCH, '', '', '', $term);
|
||||
$query = $this->db->query("INSERT INTO " . TABLE_SEARCH . " (email, ts, term) VALUES(?,?,?)", array($_SESSION['email'], time(), $term));
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
<?php foreach($terms as $term) {
|
||||
parse_str($term['term'], $s);
|
||||
if(isset($s['search'])) {
|
||||
if(isset($s['search']) && $s['search']) {
|
||||
?>
|
||||
<div class="resultrow">
|
||||
<a href="#" onclick="Piler.load_search_results_for_saved_query('<?php print urldecode($term['term']); ?>');"><?php print $s['search']; ?></a></br />
|
||||
|
Loading…
Reference in New Issue
Block a user