aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/views.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-26 03:35:47 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-26 03:35:47 +0000
commit144619a16cae74db232ac738d217bb8c36731b6d (patch)
tree3cb50c46fe91c01505511438719ddb21f9642e41 /engine/lib/views.php
parent16e883b67a6c3481dd5bfca6d8016cd36349c59b (diff)
downloadelgg-144619a16cae74db232ac738d217bb8c36731b6d.tar.gz
elgg-144619a16cae74db232ac738d217bb8c36731b6d.tar.bz2
fixed bug where a null passed as 2nd parameter to elgg_view_layout() prevented backward compatibility
git-svn-id: http://code.elgg.org/elgg/trunk@7936 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/views.php')
-rw-r--r--engine/lib/views.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/engine/lib/views.php b/engine/lib/views.php
index aafec07f3..6256d3a8d 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -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();