Fixed pdf export

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO
2018-10-06 15:02:32 +00:00
parent 47aa9e7cb0
commit 59c9a80964
3 changed files with 13 additions and 16 deletions

View File

@@ -27,7 +27,7 @@ class ModelMessageAttachment extends Model {
if($piler_id == '' || $attachment_id == '' || !preg_match("/^([0-9a-f]+)$/", $piler_id) || !preg_match("/^([0-9m]+)$/", $attachment_id)) { return $data; }
$cmd = DECRYPT_ATTACHMENT_BINARY . " -i $piler_id -a $attachment_id";
$cmd = DECRYPT_ATTACHMENT_BINARY . " $piler_id $attachment_id";
if(LOG_LEVEL >= DEBUG) { syslog(LOG_INFO, "attachment cmd: $cmd"); }

View File

@@ -324,14 +324,6 @@ class ModelSearchMessage extends Model {
}
public function NiceSize($size) {
if($size < 1000) return "1k";
if($size < 100000) return round($size/1000) . "k";
return sprintf("%.1f", $size/1000000) . "M";
}
public function get_piler_id_by_id($id = 0) {
$query = $this->db->query("SELECT `piler_id` FROM `" . TABLE_META . "` WHERE id=?", array($id));
if(isset($query->row['piler_id'])) { return $query->row['piler_id']; }