Changeset 2394
- Timestamp:
- 2008-08-29 17:21:56 (4 months ago)
- Location:
- MediaWiki/trunk
- Files:
-
- 4 modified
-
FCKeditorParser.body.php (modified) (1 diff)
-
mw12/FCKeditorParser_OldPP.body.php (modified) (1 diff)
-
plugins/mediawiki/dialogs/link.html (modified) (3 diffs)
-
plugins/mediawiki/fckplugin.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
MediaWiki/trunk/FCKeditorParser.body.php
r2388 r2394 307 307 308 308 function replaceInternalLinks( $text ) { 309 $text = preg_replace("/\[\[([^|\[\]]*?)\]\]/", "[[RTENOTITLE$1|$1]]", $text); //#2223: [[()]] => [[RTENOTITLE%1|%1]] 309 310 $text = preg_replace("/\[\[:(.*?)\]\]/", "[[RTECOLON$1]]", $text); //change ':' => 'RTECOLON' in links 310 return parent::replaceInternalLinks($text); 311 $text = parent::replaceInternalLinks($text); 312 $text = preg_replace("/\[\[RTENOTITLE(.*?)\|/", "[[", $text); // remove unused RTENOTITLE 313 314 return $text; 311 315 } 312 316 -
MediaWiki/trunk/mw12/FCKeditorParser_OldPP.body.php
r2388 r2394 308 308 309 309 function replaceInternalLinks( $text ) { 310 $text = preg_replace("/\[\[([^|\[\]]*?)\]\]/", "[[RTENOTITLE$1|$1]]", $text); //#2223: [[()]] => [[RTENOTITLE%1|%1]] 310 311 $text = preg_replace("/\[\[:(.*?)\]\]/", "[[RTECOLON$1]]", $text); //change ':' => 'RTECOLON' in links 311 return parent::replaceInternalLinks($text); 312 $text = parent::replaceInternalLinks($text); 313 $text = preg_replace("/\[\[RTENOTITLE(.*?)\|/", "[[", $text); // remove unused RTENOTITLE 314 315 return $text; 312 316 } 313 317 -
MediaWiki/trunk/plugins/mediawiki/dialogs/link.html
r2388 r2394 70 70 sHRef = oLink.getAttribute( 'href' , 2 ) || '' ; 71 71 72 if (sHRef.toLowerCase().StartsWith( 'rtenotitle' ) ) 73 { 74 sHRef = sHRef.substring(10); 75 bLinkEqualsName = true; 76 } 77 72 78 if ( sHRef == oLink.innerHTML ) 73 79 bLinkEqualsName = true ; … … 181 187 { 182 188 var sUri = GetE('txtUrl').value ; 189 var realUri = sUri; 190 if ( bLinkEqualsName ) { 191 sUri = 'RTENOTITLE'+ sUri; 192 } 183 193 if (sUri.StartsWith( ':' ) ) 184 194 sUri = sUri.replace(/:/, "rtecolon"); … … 216 226 217 227 if ( bLinkEqualsName ) 218 oLink.innerHTML = sUri ;228 oLink.innerHTML = realUri ; 219 229 else 220 230 oLink.innerHTML = sInnerHtml ; // Set (or restore) the innerHTML -
MediaWiki/trunk/plugins/mediawiki/fckplugin.js
r2388 r2394 345 345 case 'a' : 346 346 347 var pipeline = true; 347 348 // Get the actual Link href. 348 349 var href = htmlNode.getAttribute( '_fcksavedurl' ) ; … … 366 367 stringBuilder.push( isWikiUrl ? '[[' : '[' ) ; 367 368 } 369 //#2223 370 if (href.toLowerCase().StartsWith( 'rtenotitle' )) 371 { 372 href = href.substring(10); 373 if ( htmlNode.innerHTML == href ) pipeline = false; 374 } 368 375 if (href.toLowerCase().StartsWith( 'rtecolon' )) //change 'rtecolon=' => ':' in links 369 376 { … … 372 379 } 373 380 stringBuilder.push( href ) ; 374 if ( htmlNode.innerHTML != '[n]' && (!isWikiUrl || href != htmlNode.innerHTML || !href.toLowerCase().StartsWith("category:")))381 if ( pipeline && htmlNode.innerHTML != '[n]' && (!isWikiUrl || href != htmlNode.innerHTML || !href.toLowerCase().StartsWith("category:"))) 375 382 { 376 383 stringBuilder.push( isWikiUrl? '|' : ' ' ) ;