heavy code cleanup in the webui

This commit is contained in:
SJ
2013-02-11 20:24:19 +01:00
parent 5286bc7d1c
commit 5535a64de4
76 changed files with 1914 additions and 3744 deletions

View File

@ -493,9 +493,12 @@ class ModelSearchSearch extends Model {
foreach($query->rows as $m) {
$m['shortfrom'] = make_short_string($m['from'], MAX_CGI_FROM_SUBJ_LEN);
$m['from'] = escape_gt_lt_quote_symbols($m['from']);
isset($srcpt[$m['id']]) ? $m['shortto'] = $srcpt[$m['id']] : $m['shortto'] = '';
isset($rcpt[$m['id']]) ? $m['to'] = $rcpt[$m['id']] : $m['to'] = '';
$m['to'] = escape_gt_lt_quote_symbols($m['to']);
$m['shortto'] = $srcpt[$m['id']];
$m['to'] = $rcpt[$m['id']];
if($m['subject'] == "") { $m['subject'] = "<" . $lang->data['text_no_subject'] . ">"; }
@ -516,6 +519,9 @@ class ModelSearchSearch extends Model {
if(isset($tag[$m['id']])) { $m['tag'] = $tag[$m['id']]; } else { $m['tag'] = ''; }
if(isset($note[$m['id']])) { $m['note'] = $note[$m['id']]; } else { $m['note'] = ''; }
$m['note'] = strip_tags(urldecode($m['note']));
$m['tag'] = strip_tags(urldecode($m['tag']));
array_push($messages, $m);
}
}
@ -570,7 +576,7 @@ class ModelSearchSearch extends Model {
$query = $this->db->query("SELECT `from`, `to` FROM " . VIEW_MESSAGES . " WHERE id=?", array($id));
if(isset($query->row)) {
if(isset($query->row['from'])) {
foreach ($domains as $domain) {
if(preg_match("/\@$domain$/", $query->row['from'])) { array_push($addr, $query->row['from']); }
}