mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-12 23:37:02 +02:00
download eml name reflects the subject
This commit is contained in:
@ -748,6 +748,19 @@ class ModelSearchMessage extends Model {
|
||||
}
|
||||
|
||||
|
||||
public function get_subject_id_by_id($id = 0) {
|
||||
$query = $this->db->query("SELECT `subject` FROM `" . TABLE_META . "` WHERE id=?", array($id));
|
||||
if(isset($query->row['subject'])) { return $query->row['subject']; }
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
public function fix_subject($s = '') {
|
||||
if($s == '') { $s = 'nosubject'; }
|
||||
return preg_replace("/^\-{1,}/", "", preg_replace("/\W{1,}/", "-", $s));
|
||||
}
|
||||
|
||||
|
||||
public function get_attachment_by_id($id = 0) {
|
||||
if($id <= 0) { return array(); }
|
||||
|
||||
|
Reference in New Issue
Block a user