Ticket #2223: 2223_3.patch

File 2223_3.patch, 2.2 KB (added by Artur Formella, 16 years ago)
  • FCKeditorParser.body.php

     
    309309                $text = preg_replace("/\[\[([^|\[\]]*?)\]\]/", "[[RTENOTITLE$1|$1]]", $text);   //#2223: [[()]] =>      [[RTENOTITLE%1|%1]]
    310310                $text = preg_replace("/\[\[:(.*?)\]\]/", "[[RTECOLON$1]]", $text);      //change ':' => 'RTECOLON' in links
    311311                $text = parent::replaceInternalLinks($text);
     312                for($i=0; $i<count($this->mLinkHolders['dbkeys']);$i++)
     313                        if (substr($this->mLinkHolders['dbkeys'][$i], 0, 10) == "RTENOTITLE")
     314                        {
     315                                $this->mLinkHolders['dbkeys'][$i] = "RTENOTITLE".$this->mLinkHolders['texts'][$i];
     316                                $this->mLinkHolders['titles'][$i]->mPrefixedText = $this->mLinkHolders['dbkeys'][$i];
     317                }
     318
    312319                $text = preg_replace("/<strong class=\"selflink\">(.*?)<\/strong>/", "<a href=\"".$this->mTitle->mDbkeyform."\" class=\"selflink\">$1</a>", $text);                             // #2075
    313320                $text = preg_replace("/\[\[RTENOTITLE(.*?)\|/", "[[", $text);                           // remove unused RTENOTITLE
    314321
  • mw12/FCKeditorParser_OldPP.body.php

     
    310310                $text = preg_replace("/\[\[([^|\[\]]*?)\]\]/", "[[RTENOTITLE$1|$1]]", $text);   //#2223: [[()]] =>      [[RTENOTITLE%1|%1]]
    311311                $text = preg_replace("/\[\[:(.*?)\]\]/", "[[RTECOLON$1]]", $text);      //change ':' => 'RTECOLON' in links
    312312                $text = parent::replaceInternalLinks($text);
     313                for($i=0; $i<count($this->mLinkHolders['dbkeys']);$i++)
     314                        if (substr($this->mLinkHolders['dbkeys'][$i], 0, 10) == "RTENOTITLE")
     315                        {
     316                                $this->mLinkHolders['dbkeys'][$i] = "RTENOTITLE".$this->mLinkHolders['texts'][$i];
     317                                $this->mLinkHolders['titles'][$i]->mPrefixedText = $this->mLinkHolders['dbkeys'][$i];
     318                }
     319
    313320                $text = preg_replace("/<strong class=\"selflink\">(.*?)<\/strong>/", "<a href=\"".$this->mTitle->mDbkeyform."\" class=\"selflink\">$1</a>", $text);                             // #2075
    314321                $text = preg_replace("/\[\[RTENOTITLE(.*?)\|/", "[[", $text);                           // remove unused RTENOTITLE
    315322
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy