Announcement

Collapse
No announcement yet.

Huge posts seem to kill rebuild searchindex

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    I haven't had a chance to test it yet -- it might not be a PHP/PCRE bug, but just that it turns into a very slow regex in some cases.

    Comment


    • #32
      Can those of you who are having problems try these replacement regexes?

      In includes/functions.php, find:

      Code:
        // simple links
        $find[] = '#\[(email|url)=("?)((?(2)[^"]|[^\]\[])+)\\2\]\\3\[/\\1\]#si';
        $replace[] = '\3';
        // named links
        $find[] = '#\[(email|url)=("?)((?(2)[^"]|[^\]\[])+)\\2\]([^\]^\[]+)\[/\\1\]#si';
        $replace[] = '\4 (\3)';
      Replace these with:

      Code:
      // simple links
      $find[] = '#\[(email|url)=("??)(.+)\\2\]\\3\[/\\1\]#siU';
      $replace[] = '\3';
      // named links
      $find[] = '#\[(email|url)=("??)(.+)\\2\](.+)\[/\\1\]#siU';
      $replace[] = '\4 (\3)';

      Comment


      • #33
        Works both in the test-script and on my local test-board and seems to alter the links, as it is intended to.

        btw: why ("??) and not ("?)? Typo? Alias for {0,2}?
        Hints & Tips:
        [[vB3] More Spiders / Indexers / Archives for vB3 - list]|[List of one-time-emails to ban]


        http://sfx-images.mozilla.org/affili...efox_80x15.png

        Comment


        • #34
          Originally posted by Stadler
          btw: why ("??) and not ("?)? Typo? Alias for {0,2}?
          The code is correct. It makes the "? greedy. Or in this case, prefer to match a tag with a " if it can. Otherwise you have problems with stripping URLs like .../file.php?arg[arr]=val, even when your URL tags have quotes around them.

          These changes will now appear in the next release.

          Comment


          • #35
            aah, right. I forgot that. Well, I've never used it for the ? quantifier.
            Hints & Tips:
            [[vB3] More Spiders / Indexers / Archives for vB3 - list]|[List of one-time-emails to ban]


            http://sfx-images.mozilla.org/affili...efox_80x15.png

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...
            X