SimplePortal
Development => Bugs => Fixed or Bogus Bugs => Topic started by: Nick on August 26, 2010, 09:01:37 AM
-
When a user has created a "Board News" block and they have more than one page to cycle through they may find the following error (Unless it was just me?). When they click let's say page 2 to go to the next page of news the addon to the link is;
?sa=news;start=0
I found that i already had a "?" after my index.php so it created a duplicate so it was
??sa=news;start=0
and didn't work. A simple edit in /Sources/PortalBlocks.php by doing the following will fix this;
Find
$clean_url = preg_replace('~(;|\?)?sa=news;start=\d+~', '', $_SERVER['REQUEST_URL']);
$current_url = $clean_url . (strpos($clean_url, '?') !== false ? ';' : '?');
$page_index = constructPageIndex($current_url . '?sa=news', $start, $limit, $per_page);
Replace
$clean_url = preg_replace('sa=news;start=\d+~', '', $_SERVER['REQUEST_URL']);
$current_url = $clean_url . (strpos($clean_url, '?') !== false ? ';' : '?');
$page_index = constructPageIndex($current_url . 'sa=news', $start, $limit, $per_page);
-
Thanks for your interast. But I'm faster than you 8):
http://simpleportal.net/index.php?issue=374.0
-
Damn :P Ok i'm still taking credit for it though :D