add rule support for attachment filename

This commit is contained in:
SJ
2013-11-11 11:34:00 +01:00
parent 2ca6e5a5c0
commit dc3da74311
18 changed files with 71 additions and 24 deletions

View File

@ -26,6 +26,7 @@ $_['text_archive_size'] = "Archivgröße";
$_['text_archived_messages'] = "Archivierte Nachrichten";
$_['text_archiving_rules'] = "Archivierungsregeln";
$_['text_attachment'] = "Anhang";
$_['text_attachment_name'] = "Anhangname";
$_['text_attachment_size'] = "Größe Anhang";
$_['text_attachment_type'] = "Typ Anhang";
$_['text_audit'] = "Revision";

View File

@ -27,6 +27,7 @@ $_['text_archive_size_before_compression'] = "Archive size before compression";
$_['text_archived_messages'] = "Archived messages";
$_['text_archiving_rules'] = "Archiving rules";
$_['text_attachment'] = "Attachment";
$_['text_attachment_name'] = "Attachment name";
$_['text_attachment_size'] = "Attachment size";
$_['text_attachment_type'] = "Attachment type";
$_['text_audit'] = "Audit";

View File

@ -26,6 +26,7 @@ $_['text_archive_size'] = "Tamaño de archivo";
$_['text_archived_messages'] = "Mensajes archivados";
$_['text_archiving_rules'] = "Reglas de archivado";
$_['text_attachment'] = "Adjunto";
$_['text_attachment_name'] = "Nombre de adjunto";
$_['text_attachment_size'] = "Tamaño de adjunto";
$_['text_attachment_type'] = "Tipo de adjunto";
$_['text_audit'] = "Auditar";

View File

@ -27,6 +27,7 @@ $_['text_archive_size_before_compression'] = "Arch
$_['text_archived_messages'] = "Archiv<EFBFBD>lt levelek";
$_['text_archiving_rules'] = "Archiv<EFBFBD>l<EFBFBD>si szab<61>lyok";
$_['text_attachment'] = "Mell<EFBFBD>klet";
$_['text_attachment_name'] = "Mell<EFBFBD>klet n<>v";
$_['text_attachment_size'] = "Mell<EFBFBD>klet m<>ret";
$_['text_attachment_type'] = "Mell<EFBFBD>klet t<>pus";
$_['text_audit'] = "Audit";

View File

@ -27,6 +27,7 @@ $_['text_archive_size_before_compression'] = "Archívum méret tömörítés né
$_['text_archived_messages'] = "Archivált levelek";
$_['text_archiving_rules'] = "Archiválási szabályok";
$_['text_attachment'] = "Melléklet";
$_['text_attachment_name'] = "Melléklet név";
$_['text_attachment_size'] = "Melléklet méret";
$_['text_attachment_type'] = "Melléklet típus";
$_['text_audit'] = "Audit";

View File

@ -25,6 +25,7 @@ $_['text_archive_size'] = "Tamanho do arquivo";
$_['text_archived_messages'] = "Mensagens arquivadas";
$_['text_archiving_rules'] = "Regras de não arquivamento";
$_['text_attachment'] = "Anexo";
$_['text_attachment_name'] = "Nome do anexo";
$_['text_attachment_size'] = "Tamanho do anexo";
$_['text_attachment_type'] = "Tipo de anexo";
$_['text_audit'] = "Auditoria";

View File

@ -26,7 +26,7 @@ class ModelPolicyArchiving extends Model {
public function add_new_rule($data = array()) {
$query = $this->db->query("INSERT INTO " . TABLE_ARCHIVING_RULE . " (`from`,`to`,`subject`,`_size`,`size`,`attachment_type`,`_attachment_size`,`attachment_size`,`spam`) VALUES(?,?,?,?,?,?,?,?,?)", array($data['from'], $data['to'], $data['subject'], $data['_size'], $data['size'], $data['attachment_type'], $data['_attachment_size'], $data['attachment_size'], $data['spam']));
$query = $this->db->query("INSERT INTO " . TABLE_ARCHIVING_RULE . " (`from`,`to`,`subject`,`_size`,`size`,`attachment_name`,`attachment_type`,`_attachment_size`,`attachment_size`,`spam`) VALUES(?,?,?,?,?,?,?,?,?,?)", array($data['from'], $data['to'], $data['subject'], $data['_size'], $data['size'], $data['attachment_name'], $data['attachment_type'], $data['_attachment_size'], $data['attachment_size'], $data['spam']));
return $this->db->countAffected();
}

View File

@ -30,7 +30,7 @@ class ModelPolicyRetention extends Model {
if(isset($data['domain'])) { $domain = $data['domain']; }
$query = $this->db->query("INSERT INTO " . TABLE_RETENTION_RULE . " (`domain`,`from`,`to`,`subject`,`_size`,`size`,`attachment_type`,`_attachment_size`,`attachment_size`,`spam`,`days`) VALUES(?,?,?,?,?,?,?,?,?,?,?)", array($domain, $data['from'], $data['to'], $data['subject'], $data['_size'], $data['size'], $data['attachment_type'], $data['_attachment_size'], $data['attachment_size'], $data['spam'], $data['days']) );
$query = $this->db->query("INSERT INTO " . TABLE_RETENTION_RULE . " (`domain`,`from`,`to`,`subject`,`_size`,`size`,`attachment_name`,`attachment_type`,`_attachment_size`,`attachment_size`,`spam`,`days`) VALUES(?,?,?,?,?,?,?,?,?,?,?,?)", array($domain, $data['from'], $data['to'], $data['subject'], $data['_size'], $data['size'], $data['attachment_name'], $data['attachment_type'], $data['_attachment_size'], $data['attachment_size'], $data['spam'], $data['days']) );
return $this->db->countAffected();
}

View File

@ -36,7 +36,13 @@
</select>
<input type="text" class="ruletext" name="size" />
</div>
</div>
</div>
<div class="control-group">
<label class="control-label" for="attachment_name"><?php print $text_attachment_name; ?>:</label>
<div class="controls">
<input type="text" class="text" name="attachment_name" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="attachment_type"><?php print $text_attachment_type; ?>:</label>
<div class="controls">
@ -85,6 +91,7 @@
<th><?php print $text_subject; ?></th>
<th><?php print $text_spam; ?></th>
<th><?php print $text_size; ?></th>
<th><?php print $text_attachment_name; ?></th>
<th><?php print $text_attachment_type; ?></th>
<th><?php print $text_attachment_size; ?></th>
<th>&nbsp;</th>
@ -97,6 +104,7 @@
<td><?php print $rule['subject']; ?></td>
<td><?php if($rule['spam'] == -1) { print "-"; } else if($rule['spam'] == 0) { print $text_not_spam; } else { print $text_spam; } ?></td>
<td><?php if($rule['size'] > 0) { print $rule['_size']; ?> <?php print $rule['size']; } ?></td>
<td><?php print $rule['attachment_name']; ?></td>
<td><?php print $rule['attachment_type']; ?></td>
<td><?php if($rule['attachment_size'] > 0) { print $rule['_attachment_size']; ?> <?php print $rule['attachment_size']; } ?></td>
<td><a href="index.php?route=policy/removearchiving&amp;id=<?php print $rule['id']; ?>"><?php print $text_remove; ?></a></td>

View File

@ -46,7 +46,13 @@
</select>
<input type="text" class="ruletext" name="size" />
</div>
</div>
</div>
<div class="control-group">
<label class="control-label" for="attachment_name"><?php print $text_attachment_name; ?>:</label>
<div class="controls">
<input type="text" class="text" name="attachment_name" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="attachment_type"><?php print $text_attachment_type; ?>:</label>
<div class="controls">
@ -100,6 +106,7 @@
<th><?php print $text_subject; ?></th>
<th><?php print $text_spam; ?></th>
<th><?php print $text_size; ?></th>
<th><?php print $text_attachment_name; ?></th>
<th><?php print $text_attachment_type; ?></th>
<th><?php print $text_attachment_size; ?></th>
<th><?php print $text_days; ?></th>
@ -119,6 +126,7 @@
<td><?php print $rule['subject']; ?></td>
<td><?php if($rule['spam'] == -1) { print "-"; } else if($rule['spam'] == 0) { print $text_not_spam; } else { print $text_spam; } ?></td>
<td><?php if($rule['size'] > 0) { print $rule['_size']; ?> <?php print $rule['size']; } ?></td>
<td><?php print $rule['attachment_name']; ?></td>
<td><?php print $rule['attachment_type']; ?></td>
<td><?php if($rule['attachment_size'] > 0) { print $rule['_attachment_size']; ?> <?php print $rule['attachment_size']; } ?></td>
<td><?php print $rule['days']; ?></td>

View File

@ -34,6 +34,10 @@
<input type="text" name="size" class="input-medium span4" />
</div>
</div>
<div class="row">
<div class="domaincell"><?php print $text_attachment_name; ?>:</div>
<div class="domaincell"><input type="text" name="attachment_name" class="input-medium span5" /></div>
</div>
<div class="row">
<div class="domaincell"><?php print $text_attachment_type; ?>:</div>
<div class="domaincell"><input type="text" name="attachment_type" class="input-medium span5" /></div>
@ -85,6 +89,7 @@
<div class="domaincell"><?php print $text_subject; ?></div>
<div class="domaincell"><?php print $text_spam; ?></div>
<div class="domaincell"><?php print $text_size; ?></div>
<div class="domaincell"><?php print $text_attachment_name; ?></div>
<div class="domaincell"><?php print $text_attachment_type; ?></div>
<div class="domaincell"><?php print $text_attachment_size; ?></div>
<div class="domaincell">&nbsp;</div>
@ -97,6 +102,7 @@
<div class="domaincell"><?php print $rule['subject']; ?></div>
<div class="domaincell"><?php if($rule['spam'] == -1) { print "-"; } else if($rule['spam'] == 0) { print $text_not_spam; } else { print $text_spam; } ?></div>
<div class="domaincell"><?php if($rule['size'] > 0) { print $rule['_size']; ?> <?php print $rule['size']; } ?></div>
<div class="domaincell"><?php print $rule['attachment_name']; ?></div>
<div class="domaincell"><?php print $rule['attachment_type']; ?></div>
<div class="domaincell"><?php if($rule['attachment_size'] > 0) { print $rule['_attachment_size']; ?> <?php print $rule['attachment_size']; } ?></div>
<div class="domaincell"><a href="index.php?route=policy/removearchiving&amp;confirmed=1&amp;id=<?php print $rule['id']; ?>" onclick="if(confirm('<?php print $text_remove_rule; ?>: ' + '#<?php print $rule['id']; ?>')) return true; return false;"><?php print $text_remove; ?></a></div>

View File

@ -40,6 +40,10 @@
<input type="text" name="size" class="input-medium span4" />
</div>
</div>
<div class="row">
<div class="domaincell"><?php print $text_attachment_name; ?>:</div>
<div class="domaincell"><input type="text" name="attachment_name" class="input-medium span5" /></div>
</div>
<div class="row">
<div class="domaincell"><?php print $text_attachment_type; ?>:</div>
<div class="domaincell"><input type="text" name="attachment_type" class="input-medium span5" /></div>
@ -98,6 +102,7 @@
<div class="domaincell"><?php print $text_subject; ?></div>
<div class="domaincell"><?php print $text_spam; ?></div>
<div class="domaincell"><?php print $text_size; ?></div>
<div class="domaincell"><?php print $text_attachment_name; ?></div>
<div class="domaincell"><?php print $text_attachment_type; ?></div>
<div class="domaincell"><?php print $text_attachment_size; ?></div>
<div class="domaincell"><?php print $text_days; ?></div>
@ -117,6 +122,7 @@
<div class="domaincell"><?php print $rule['subject']; ?></div>
<div class="domaincell"><?php if($rule['spam'] == -1) { print "-"; } else if($rule['spam'] == 0) { print $text_not_spam; } else { print $text_spam; } ?></div>
<div class="domaincell"><?php if($rule['size'] > 0) { print $rule['_size']; ?> <?php print $rule['size']; } ?></div>
<div class="domaincell"><?php print $rule['attachment_name']; ?></div>
<div class="domaincell"><?php print $rule['attachment_type']; ?></div>
<div class="domaincell"><?php if($rule['attachment_size'] > 0) { print $rule['_attachment_size']; ?> <?php print $rule['attachment_size']; } ?></div>
<div class="domaincell"><?php print $rule['days']; ?></div>