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.

Forum Module /

Discuss the Forum Module.

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

Forum Trunk API Changes

Go to End

19 Posts   6038 Views


Community Member, 56 Posts

14 May 2010 at 1:16pm

Edited: 15/05/2010 12:32am

Hey Kalileo drye,

I was having the same trouble with subnested urls but wrote this fix;

	public function getForumThread() {
		if(preg_match('/(?!(show)(\/).*)([0-9].*)(?!(?).*)/', $_SERVER['REQUEST_URI'], $id))
			return DataObject::get_by_id("ForumThread", $id[0]);
			return false;

Im sure there's probably a cleaner way of doing it using SS functions -but it seems to work ok as a fix for 2.4


Community Member, 127 Posts

15 May 2010 at 12:27am

Hi Matt, it wasn't me who has seen this problem, it was "drye" - but thanks anyway!


Community Member, 49 Posts

15 May 2010 at 12:31am


Thank you for the fix. I've not tried it yet, but will very soon. I wonder if Will is working on a fix as well or if he would be willing to incorporate this fix into the code base.

Thanks again!

Go to Top