Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Director::history($pagesBack=1)


Go to End


1457 Views

Avatar
xmedeko

Community Member, 94 Posts

15 July 2007 at 3:59pm

Edited: 15/07/2007 9:32pm

Is that method working? I suggest something like
[code php]
$history = Session::get('history');
if (!$history) {
return null;
}
return $history[sizeof($history)] - $pagesBack - 1;
}

Anyway, it's used only once in Security.php. Even Director::redirectBack() do not use it. So, is it necessary to have this? Because the session grows larger and larger, when somebody surf the pages.