Needs review
Project:
Workspace
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
6 Aug 2008 at 17:05 UTC
Updated:
9 Apr 2011 at 23:05 UTC
Jump to comment: Most recent file
Could there be an additional setting for workspace which lets the admin control where the user ends up after a delete is executed for an entry in the workspace?
I was trying out your WONDERFUL module, but was a bit distracted by laddering back down the menu to get to my workspace items when I needed to delete 6 practice pages.
I was expecting to return to the workspace page after the delete completed, not to the main page of the website.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 292017-return-to-workspace.patch | 1.05 KB | dezofie |
Comments
Comment #1
6174604 commentedYes, please make this come true :) I (We) need that too.
Comment #2
dezofie commentedHi guys,
I did this request, it will redirect to workspace page if node is deleted.
Note: this is my first patch! if somebody have suggestion or comment, let me know! thanks :)
Comment #3
luthien commentedhello, your patch failed.
Replace:
with:
drupal_goto('node/' . $nid . '/delete', 'destination=workspace/' . $user->uid);thanks for the patch!
Comment #4
diego.pasc commentedBasically the patch is correct but fails just because dezofie used single quotes instead of double quotes in his patch.
Remember:
(assuming for example $row->nid=123):
'node/$row->nid/edit' -------> litterally print: node/$row->nid/edit
"node/$row->nid/edit" -------> print: node/123/edit
So replace:
$may_edit ? l(t('edit'), 'node/$row->nid/edit', array('query' => 'destination=workspace/$user->uid')) : '',
drupal_goto('node/$nid/delete', 'destination=workspace/$user->uid');
with:
$may_edit ? l(t('edit'), "node/$row->nid/edit", array('query' => "destination=workspace/$user->uid")) : '',
drupal_goto("node/$nid/delete", "destination=workspace/$user->uid");