]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #5268 adds warning for wrapping views
authorcash <cash.costello@gmail.com>
Thu, 21 Mar 2013 23:47:08 +0000 (19:47 -0400)
committercash <cash.costello@gmail.com>
Thu, 21 Mar 2013 23:47:08 +0000 (19:47 -0400)
mod/developers/languages/en.php
mod/developers/start.php

index 856efe008e555e7349ef26e6b35e12d0c133c984..266b5406e096154c11060e5a696eb83a2ad8447a 100644 (file)
@@ -28,7 +28,8 @@ $english = array(
        'developers:label:show_strings' => "Show raw translation strings",
        'developers:help:show_strings' => "This displays the translation strings used by elgg_echo().",
        'developers:label:wrap_views' => "Wrap views",
-       'developers:help:wrap_views' => "This wraps almost every view with HTML comments. Useful for finding the view creating particular HTML.",
+       'developers:help:wrap_views' => "This wraps almost every view with HTML comments. Useful for finding the view creating particular HTML.
+                                                                       This can break non-HTML views in the default viewtype. See developers_wrap_views() for details.",
        'developers:label:log_events' => "Log events and plugin hooks",
        'developers:help:log_events' => "Write events and plugin hooks to the log. Warning: there are many of these per page.",
 
index 413a8ed9b6c28f57a7f5a1255c4e3c165679590d..94d0f652c1a3a91515f6d3bbbd0da8a9fb0c4de3 100644 (file)
@@ -89,6 +89,15 @@ function developers_clear_strings() {
 
 /**
  * Post-process a view to add wrapper comments to it
+ * 
+ * 1. Only process views served with the 'default' viewtype.
+ * 2. Does not wrap views that begin with js/ or css/ as they are not HTML.
+ * 3. Does not wrap views that are images (start with icon/). Is this still true?
+ * 4. Does not wrap input and output views (why?).
+ * 5. Does not wrap html head or the primary page shells
+ * 
+ * @warning this will break views in the default viewtype that return non-HTML data
+ * that do not match the above restrictions.
  */
 function developers_wrap_views($hook, $type, $result, $params) {
        if (elgg_get_viewtype() != "default") {