Permalink
Browse files

The hardcode limit of 1000 was breaking long pages display in Moodle.

I've changed it to a variable limit depending of the page lenght. Bug 3039.
(http://moodle.org/bugs/bug.php?op=show&bugid=3039)
  • Loading branch information...
1 parent 82ff36e commit a74f39abcb8846165ec17b4a11b6abfff9a72a91 stronk7 committed Jul 9, 2005
Showing with 2 additions and 2 deletions.
  1. +2 −2 mod/wiki/ewiki/plugins/moodle/f_fixhtml.php
@@ -54,7 +54,7 @@ function ewiki_html_tag_balancer(&$html) {
$len = strlen($html);
$done = "";
$pos = 0;
- $loop = 1000;
+ $loop = (int)$len / 3;
while (($pos < $len) && $loop--) {
#-- search next tag
@@ -169,4 +169,4 @@ function ewiki_html_tag_balancer(&$html) {
}
-?>
+?>

0 comments on commit a74f39a

Please sign in to comment.