smarty.inc.php:

- assign(): additionally provide the unsanitized values as RAW_$key

PFAHandler.php:
- document 'html' field type (used for raw html), including a big warning

list.tpl:
- add handling to display raw html fields

This is a preparation to use the status markers with list.tpl without
introducing too big changes.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1775 a1433add-5e2c-0410-b055-b7f2511e0802
pull/2/head
Christian Boltz 9 years ago
parent 3a72203de4
commit 35fad174f7

@ -225,6 +225,7 @@ abstract class PFAHandler {
* available values for the "type" column:
* text one line of text
* *vtxt "virtual" line of text, coming from JOINs etc.
* html raw html (use carefully, won't get auto-escaped by smarty! Don't use with user input!)
* pass password (will be encrypted with pacrypt())
* b64p password (will be stored with base64_encode())
* num number

@ -17,6 +17,7 @@ class PFASmarty {
}
public function assign($key, $value, $sanitise = true) {
$this->template->assign("RAW_$key", $value);
if($sanitise == false) {
return $this->template->assign($key, $value);
}

@ -96,6 +96,8 @@
{elseif $field.type == 'txtl'}
{foreach key=key2 item=field2 from=$item.$key}{$field2}<br> {/foreach}
{elseif $field.type == 'html'}
{$RAW_items.{$item.{$msg.id_field}}.$key}
{else}
{$linktext}
{/if}

Loading…
Cancel
Save