It looks like you're new here. If you want to get involved, click one of these buttons!
I am not too sure how to modify it so that it either returns you to the proper category and/or the proper discussion.
$CancelUrl = '/vanilla/discussions';
if (C('Vanilla.Categories.Use') && $this->CategoryID > 0 && $this->CategoryData->NumRows() > 0) {
foreach ($this->CategoryData->Result() as $Cat) {
if ($Cat->CategoryID == $this->CategoryID) {
$CancelUrl = '/vanilla/discussions/0/'.$Cat->CategoryID.'/'.Gdn_Format::Url($Cat->Name);
break;
}
}
}
Comments
Developer at Vanilla Forums, Inc. [GitHub, Twitter]
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •