Author: sevein
Date: Thu Jul  5 13:45:58 2012
New Revision: 11857

Log:
Update render_title helper to return plain text if necessary

Modified:
   trunk/lib/helper/QubitHelper.php

Modified: trunk/lib/helper/QubitHelper.php
==============================================================================
--- trunk/lib/helper/QubitHelper.php    Thu Jul  5 13:41:46 2012        (r11856)
+++ trunk/lib/helper/QubitHelper.php    Thu Jul  5 13:45:58 2012        (r11857)
@@ -99,7 +99,7 @@
   }
 }
 
-function render_title($value)
+function render_title($value, $html = true)
 {
   // TODO Workaround for PHP bug, http://bugs.php.net/bug.php?id=47522
   // method_exists is very slow if a string is passed (class lookup), use 
is_object
@@ -113,7 +113,7 @@
     return (string) $value;
   }
 
-  return '<em>'.sfContext::getInstance()->i18n->__('Untitled').'</em>';
+  return ($html ? '<em>' : 
'').sfContext::getInstance()->i18n->__('Untitled').($html ? '</em>' : '');
 }
 
 function render_value($value)

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to