aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/default/forms/login.php2
-rw-r--r--views/default/input/button.php2
-rw-r--r--views/default/output/access.php2
-rw-r--r--views/default/page/components/gallery.php1
-rw-r--r--views/default/page/components/list.php8
-rw-r--r--views/default/page/components/module.php2
-rw-r--r--views/default/page/layouts/one_column.php4
-rw-r--r--views/default/page/layouts/widgets.php8
8 files changed, 18 insertions, 11 deletions
diff --git a/views/default/forms/login.php b/views/default/forms/login.php
index 9536bb439..6f6cc9906 100644
--- a/views/default/forms/login.php
+++ b/views/default/forms/login.php
@@ -31,7 +31,7 @@
<?php echo elgg_view('input/submit', array('value' => elgg_echo('login'))); ?>
<?php
- if ($vars['returntoreferer']) {
+ if (isset($vars['returntoreferer'])) {
echo elgg_view('input/hidden', array('name' => 'returntoreferer', 'value' => 'true'));
}
?>
diff --git a/views/default/input/button.php b/views/default/input/button.php
index c21989919..9957fdc54 100644
--- a/views/default/input/button.php
+++ b/views/default/input/button.php
@@ -33,7 +33,7 @@ switch ($vars['type']) {
}
// blank src if trying to access an offsite image. @todo why?
-if (strpos($vars['src'], elgg_get_site_url()) === false) {
+if (isset($vars['src']) && strpos($vars['src'], elgg_get_site_url()) === false) {
$vars['src'] = "";
}
?>
diff --git a/views/default/output/access.php b/views/default/output/access.php
index f312608d5..811948323 100644
--- a/views/default/output/access.php
+++ b/views/default/output/access.php
@@ -20,7 +20,7 @@ if (isset($vars['entity']) && elgg_instanceof($vars['entity'])) {
// we decided to show that the item is in a group, rather than its actual access level
// not required. Group ACLs are prepended with "Group: " when written.
//$access_id_string = elgg_echo('groups:group') . $container->name;
- $membership = $is_group->membership;
+ $membership = $container->membership;
if ($membership == ACCESS_PUBLIC) {
$access_class .= ' elgg-access-group-open';
diff --git a/views/default/page/components/gallery.php b/views/default/page/components/gallery.php
index f03eb1109..149ceeaf8 100644
--- a/views/default/page/components/gallery.php
+++ b/views/default/page/components/gallery.php
@@ -39,6 +39,7 @@ if (isset($vars['item_class'])) {
$item_class = "$item_class {$vars['item_class']}";
}
+$nav = '';
if ($pagination && $count) {
$nav .= elgg_view('navigation/pagination', array(
'offset' => $offset,
diff --git a/views/default/page/components/list.php b/views/default/page/components/list.php
index c83fa0966..c0db50bc5 100644
--- a/views/default/page/components/list.php
+++ b/views/default/page/components/list.php
@@ -17,10 +17,10 @@
*/
$items = $vars['items'];
-$offset = $vars['offset'];
-$limit = $vars['limit'];
-$count = $vars['count'];
-$base_url = $vars['base_url'];
+$offset = elgg_extract('offset', $vars);
+$limit = elgg_extract('limit', $vars);
+$count = elgg_extract('count', $vars);
+$base_url = elgg_extract('base_url', $vars, '');
$pagination = elgg_extract('pagination', $vars, true);
$offset_key = elgg_extract('offset_key', $vars, 'offset');
$position = elgg_extract('position', $vars, 'after');
diff --git a/views/default/page/components/module.php b/views/default/page/components/module.php
index 0a2f1c35a..7e1eaff20 100644
--- a/views/default/page/components/module.php
+++ b/views/default/page/components/module.php
@@ -28,7 +28,7 @@ if (isset($vars['id'])) {
$id = "id=\"{$vars['id']}\"";
}
-if ($vars['header']) {
+if (isset($vars['header'])) {
$header = "<div class=\"elgg-head\">$header</div>";
} elseif ($title) {
$header = "<div class=\"elgg-head\"><h3>$title</h3></div>";
diff --git a/views/default/page/layouts/one_column.php b/views/default/page/layouts/one_column.php
index 7546a4cdf..491d5b459 100644
--- a/views/default/page/layouts/one_column.php
+++ b/views/default/page/layouts/one_column.php
@@ -30,7 +30,9 @@ $nav = elgg_extract('nav', $vars, elgg_view('navigation/breadcrumbs'));
echo $vars['content'];
// @deprecated 1.8
- echo $vars['area1'];
+ if (isset($vars['area1'])) {
+ echo $vars['area1'];
+ }
?>
</div>
</div> \ No newline at end of file
diff --git a/views/default/page/layouts/widgets.php b/views/default/page/layouts/widgets.php
index b2c54e854..e3819cc20 100644
--- a/views/default/page/layouts/widgets.php
+++ b/views/default/page/layouts/widgets.php
@@ -39,10 +39,14 @@ echo $vars['content'];
$widget_class = "elgg-col-1of{$num_columns}";
for ($column_index = 1; $column_index <= $num_columns; $column_index++) {
- $column_widgets = $widgets[$column_index];
+ if (isset($widgets[$column_index])) {
+ $column_widgets = $widgets[$column_index];
+ } else {
+ $column_widgets = array();
+ }
echo "<div class=\"$widget_class elgg-widgets\" id=\"elgg-widget-col-$column_index\">";
- if (is_array($column_widgets) && sizeof($column_widgets) > 0) {
+ if (sizeof($column_widgets) > 0) {
foreach ($column_widgets as $widget) {
if (array_key_exists($widget->handler, $widget_types)) {
echo elgg_view_entity($widget, array('show_access' => $show_access));