Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter
Support for Vanilla Forums Cloud product

In this Discussion

Follow Us


Cancel link on Discussion pages

edited November 2010 in Questions
Not too sure if this is a bug or not, but if I start a new discussion or edit a discussion, the cancel link brings me back to a random page that doesn't exist. The culprit is this code in /post/discussion.php:

$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;
}
}
}
I am not too sure how to modify it so that it either returns you to the proper category and/or the proper discussion.
Tagged:

Comments

Sign In or Register to comment.