Changeset 1788
- Timestamp:
- 04/30/2011 03:24:46 PM (2 years ago)
- Files:
-
- 1 modified
-
trunk/formatters/wakka.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/formatters/wakka.php
r1784 r1788 758 758 $output .= $wakka->FormOpen("grabcode"); 759 759 // build form 760 $output .= '<input type="submit" class="grabcode" name="save" value="'. T_("Grab").'" title="'.rtrim(sprintf(T_("Download %s"), $valid_filename)).'" />';760 $output .= '<input type="submit" class="grabcode" name="save" value="'.GRABCODE_BUTTON.'" title="'.rtrim(sprintf(GRABCODE_BUTTON_TITLE, $valid_filename)).'" />'; 761 761 $output .= '<input type="hidden" name="filename" value="'.urlencode($valid_filename).'" />'; 762 762 $output .= '<input type="hidden" name="code" value="'.urlencode($code).'" />'; … … 776 776 return ""; 777 777 778 // Case 1: Deprecated...(first part is a URL followed by 778 // Case 1: Interwiki link followed by | separator 779 if(preg_match("/^([A-ZÄÖÜ][A-Za-zÄÖÜßäöü]+[:].*?)\s*\|\s*(.*?)$/s", $contents, $matches)) 780 { 781 $url = $matches[1]; 782 $text = $matches[2]; 783 } 784 785 // Case 2: Deprecated...(interwiki link followed by 786 // whitespace separator) 787 else if(preg_match("/^([A-ZÄÖÜ][A-Za-zÄÖÜßäöü]+[:]\S*)\s+(.*)$/s", $contents, $matches)) 788 { 789 $url = $matches[1]; 790 $text = $matches[2]; 791 } 792 793 // Case 3: Deprecated...(first part is a URL followed by 779 794 // one or more whitespaces) 780 if (preg_match("/^((http|https|ftp|news|irc|gopher):\/\/([^\|\\s\"<>]+))\s+([^\|]+)$/s", $contents, $matches)) # recognize forced links across lines795 else if (preg_match("/^((http|https|ftp|news|irc|gopher):\/\/([^\|\\s\"<>]+))\s+([^\|]+)$/s", $contents, $matches)) # recognize forced links across lines 781 796 { 782 797 if (!isset($matches[1])) $matches[1] = ''; #38 … … 786 801 } 787 802 788 // Case 2: Deprecated...(first part is a string803 // Case 4: Deprecated...(first part is a string 789 804 // followed by one or more whitespaces) 790 805 else if(preg_match("/^(.*?)\s+([^|]+)$/s", $contents, $matches) && … … 795 810 } 796 811 797 // Case 3: If no "|" exists in $contents, assume the match812 // Case 5: If no "|" exists in $contents, assume the match 798 813 // refers to an internal page 799 814 else if(preg_match("/^([^\|]+)$/s", $contents, $matches)) … … 803 818 } 804 819 805 // Case 4: If a "|" symbol exists, assume two parts, a URL and820 // Case 6: If a "|" symbol exists, assume two parts, a URL and 806 821 // text 807 822 else if(preg_match("/^(.*?)\s*\|\s*(.*?)$/s", $contents, $matches)) … … 985 1000 } 986 1001 // interwiki links! 1002 // Deprecated; use forced links with | separator instead 987 1003 elseif (preg_match("/^[A-ZÄÖÜ][A-Za-zÄÖÜßäöü]+[:]\S*$/s", $thing)) 988 1004 { … … 1101 1117 # action 1102 1118 "\{\{.*?\}\}|". 1103 # InterWiki link 1119 # InterWiki link (deprecated, as pagenames may now contain spaces) 1120 # Use forced links with a | separator instead 1104 1121 "\b[A-ZÄÖÜ][A-Za-zÄÖÜßäöü]+[:](?![=_])\S*\b|". 1105 1122 # CamelWords