Commit 1a188809 authored by merlinofchaos's avatar merlinofchaos

#166608: missing ->status setting caused access control on various node links to fail.

parent e09da08a
...@@ -874,6 +874,7 @@ function views_handler_node_edit($fieldinfo, $fielddata, $value, $data) { ...@@ -874,6 +874,7 @@ function views_handler_node_edit($fieldinfo, $fielddata, $value, $data) {
// try to build a fake node object // try to build a fake node object
$data->type = $data->node_type; $data->type = $data->node_type;
$data->uid = $data->node_uid; $data->uid = $data->node_uid;
$data->status = 1;
if (node_access('update', $data)) { if (node_access('update', $data)) {
$link_text = $fielddata['options'] ? $fielddata['options'] : t('Edit'); $link_text = $fielddata['options'] ? $fielddata['options'] : t('Edit');
return l($link_text, "node/$data->nid/edit"); return l($link_text, "node/$data->nid/edit");
...@@ -887,6 +888,7 @@ function views_handler_node_edit_destination($fieldinfo, $fielddata, $value, $da ...@@ -887,6 +888,7 @@ function views_handler_node_edit_destination($fieldinfo, $fielddata, $value, $da
// try to build a fake node object // try to build a fake node object
$data->type = $data->node_type; $data->type = $data->node_type;
$data->uid = $data->node_uid; $data->uid = $data->node_uid;
$data->status = 1;
if (node_access('update', $data)) { if (node_access('update', $data)) {
$link_text = $fielddata['options'] ? $fielddata['options'] : t('Edit'); $link_text = $fielddata['options'] ? $fielddata['options'] : t('Edit');
return l($link_text, "node/$data->nid/edit", NULL, drupal_get_destination()); return l($link_text, "node/$data->nid/edit", NULL, drupal_get_destination());
...@@ -900,6 +902,7 @@ function views_handler_node_delete($fieldinfo, $fielddata, $value, $data) { ...@@ -900,6 +902,7 @@ function views_handler_node_delete($fieldinfo, $fielddata, $value, $data) {
// try to build a fake node object // try to build a fake node object
$data->type = $data->node_type; $data->type = $data->node_type;
$data->uid = $data->node_uid; $data->uid = $data->node_uid;
$data->status = 1;
if (node_access('delete', $data)) { if (node_access('delete', $data)) {
$link_text = $fielddata['options'] ? $fielddata['options'] : t('Delete'); $link_text = $fielddata['options'] ? $fielddata['options'] : t('Delete');
return l($link_text, "node/$data->nid/delete"); return l($link_text, "node/$data->nid/delete");
...@@ -913,6 +916,7 @@ function views_handler_node_delete_destination($fieldinfo, $fielddata, $value, $ ...@@ -913,6 +916,7 @@ function views_handler_node_delete_destination($fieldinfo, $fielddata, $value, $
// try to build a fake node object // try to build a fake node object
$data->type = $data->node_type; $data->type = $data->node_type;
$data->uid = $data->node_uid; $data->uid = $data->node_uid;
$data->status = 1;
if (node_access('delete', $data)) { if (node_access('delete', $data)) {
$link_text = $fielddata['options'] ? $fielddata['options'] : t('Delete'); $link_text = $fielddata['options'] ? $fielddata['options'] : t('Delete');
return l($link_text, "node/$data->nid/delete", NULL, drupal_get_destination()); return l($link_text, "node/$data->nid/delete", NULL, drupal_get_destination());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment