]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
fixed bug where a null passed as 2nd parameter to elgg_view_layout() prevented backwa...
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 26 Jan 2011 03:35:47 +0000 (03:35 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 26 Jan 2011 03:35:47 +0000 (03:35 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7936 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/views.php

index aafec07f3e40fc86e838514879d166da184e3670..6256d3a8da98939365838c4dd4b49f1767fca578 100644 (file)
@@ -371,7 +371,7 @@ function elgg_view($view, $vars = array(), $bypass = false, $debug = false, $vie
        }
 
        if (!is_array($vars)) {
-               elgg_log('Vars in views must be an array!', 'ERROR');
+               elgg_log("Vars in views must be an array: $view", 'ERROR');
                $vars = array();
        }
 
@@ -630,13 +630,20 @@ function page_draw($title, $body, $sidebar = "") {
  *  - widgets                 A widget canvas.
  *
  * The layout views take the form layout/shells/$layout_name
- * See the individual layouts for what options are supported. The two most
+ * See the individual layouts for what options are supported. The three most
  * common layouts have these parameters:
  * one_column
  *     content => string
- * one_column_with_sidebar
+ * one_sidebar
  *     content => string
  *     sidebar => string (optional)
+ * content
+ *     content => string
+ *     sidebar => string (optional)
+ *     buttons => string (override the default add button)
+ *     title   => string (override the default title)
+ *     filter_context => string (selected content filter)
+ *     See the content layout view for more parameters
  *
  * @param string $layout The name of the view in layout/shells/.
  * @param array  $vars   Associative array of parameters for the layout view
@@ -645,7 +652,7 @@ function page_draw($title, $body, $sidebar = "") {
  */
 function elgg_view_layout($layout_name, $vars = array()) {
 
-       if (is_string($vars)) {
+       if (is_string($vars) || $vars === null) {
                elgg_deprecated_notice("The use of unlimited optional string arguments in elgg_view_layout() was deprecated in favor of an options array", 1.8);
                $arg = 1;
                $param_array = array();