Choose imap folder based on if gui user is in To: or From:

Change-Id: I584ff43f9ce5b3f4822b59a5e9ca2cbef3ba4ff3
Signed-off-by: SJ <sj@acts.hu>
This commit is contained in:
SJ
2016-12-24 21:19:33 +01:00
parent a59e322c2c
commit f7c6abfbe3
4 changed files with 32 additions and 7 deletions

View File

@ -445,6 +445,13 @@ class ModelSearchMessage extends Model {
}
public function get_metadata_by_id($id = 0) {
$query = $this->db->query("SELECT * FROM `" . TABLE_META . "` WHERE id=?", array($id));
if(isset($query->row['piler_id'])) { return $query->row; }
return '';
}
public function fix_subject($s = '') {
if($s == '') { $s = 'nosubject'; }
return preg_replace("/^\-{1,}/", "", preg_replace("/\W{1,}/", "-", $s));