SF.net SVN: postfixadmin:[1775] trunk
Brought to you by:
christian_boltz,
gingerdog
From: <chr...@us...> - 2015-04-06 21:10:01
|
Revision: 1775 http://sourceforge.net/p/postfixadmin/code/1775 Author: christian_boltz Date: 2015-04-06 21:09:54 +0000 (Mon, 06 Apr 2015) Log Message: ----------- 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. Modified Paths: -------------- trunk/model/PFAHandler.php trunk/smarty.inc.php trunk/templates/list.tpl Modified: trunk/model/PFAHandler.php =================================================================== --- trunk/model/PFAHandler.php 2015-04-06 20:35:19 UTC (rev 1774) +++ trunk/model/PFAHandler.php 2015-04-06 21:09:54 UTC (rev 1775) @@ -225,6 +225,7 @@ * 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 Modified: trunk/smarty.inc.php =================================================================== --- trunk/smarty.inc.php 2015-04-06 20:35:19 UTC (rev 1774) +++ trunk/smarty.inc.php 2015-04-06 21:09:54 UTC (rev 1775) @@ -17,6 +17,7 @@ } public function assign($key, $value, $sanitise = true) { + $this->template->assign("RAW_$key", $value); if($sanitise == false) { return $this->template->assign($key, $value); } Modified: trunk/templates/list.tpl =================================================================== --- trunk/templates/list.tpl 2015-04-06 20:35:19 UTC (rev 1774) +++ trunk/templates/list.tpl 2015-04-06 21:09:54 UTC (rev 1775) @@ -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} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |