Author: sevein
Date: Tue Jul 24 11:49:09 2012
New Revision: 11969

Log:
Add helper to make visibility checking easier

Modified:
   trunk/lib/helper/QubitHelper.php

Modified: trunk/lib/helper/QubitHelper.php
==============================================================================
--- trunk/lib/helper/QubitHelper.php    Tue Jul 24 00:02:12 2012        (r11968)
+++ trunk/lib/helper/QubitHelper.php    Tue Jul 24 11:49:09 2012        (r11969)
@@ -157,3 +157,8 @@
 
   return round(($val / pow(1024, $i)), 1).' '.$units[$i];
 }
+
+function check_field_visibility($fieldName)
+{
+  return sfContext::getInstance()->user->isAuthenticated() || 
sfConfig::get($fieldName, false);
+}

-- 
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