Including multiple excerpts from the same page
- Status
- Open
- Subject
- Including multiple excerpts from the same page
- Version
- 2.x
3.x
4.x - Feature
- Wiki Plugin (extends basic syntax)
- Resolution status
- New
- Submitted by
- Nowell VanHoesen
- Lastmod by
- Nowell VanHoesen
- Rating
- Description
Found an bug where including multiple excerpts from the same page would only display the first excerpt. Any subsequent includes would display empty text.
On attempts after the initial one the get_page_info() function is not called.
- Solution
Made the following changes to lines 49 thru 67 of wikiplugin_include.php
original wikiplugin_include.phpCopy to clipboardif ( isset($included_pages[$page]) ) { if ( $included_pages[$page]>=$max_times ) { return "Too many includes\n"; } $included_pages[$page]++; } else { $included_pages[$page] = 1; // only evaluate permission the first time round // evaluate if object or system permissions enables user to see the included page $data = $tikilib->get_page_info($page); $perms = $tikilib->get_perm_object($page, 'wiki page', $data, false); if ($perms['tiki_p_view'] != 'y') { $included_pages[$page] = $max_times; // I think is safer to show nothing instead of a message saying that a page can't be accessed // $text="<b>User $user has no permission to access $page</b><br />"; $text=""; return($text); } }modified wikiplugin_include.phpCopy to clipboardif ( isset($included_pages[$page]) ) { if ( $included_pages[$page]>=$max_times ) { return "<b>Too many includes</b>\n"; } $included_pages[$page]++; } else { $included_pages[$page] = 1; // only evaluate permission the first time round // evaluate if object or system permissions enables user to see the included page } $data = $tikilib->get_page_info($page); $perms = $tikilib->get_perm_object($page, 'wiki page', $data, false); if ($perms['tiki_p_view'] != 'y') { $included_pages[$page] = $max_times; // I think is safer to show nothing instead of a message saying that a page can't be accessed // $text="<b>User $user has no permission to access $page</b><br />"; $text="<b>Sorry, you don't have permission to access $page</b><br />\n"; return($text); }- Priority
- 25
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 2934
- Created
- Thursday 17 December, 2009 16:05:15 UTC
by Nowell VanHoesen - LastModif
- Thursday 17 December, 2009 16:05:15 UTC