Index: trunk/extensions/ProofreadPage/ProofreadPage_body.php |
— | — | @@ -702,6 +702,8 @@ |
703 | 703 | $from = array_key_exists( 'from', $args ) ? $args['from'] : null; |
704 | 704 | $to = array_key_exists( 'to', $args ) ? $args['to'] : null; |
705 | 705 | $header = array_key_exists( 'header', $args ) ? $args['header'] : null; |
| 706 | + $tosection = array_key_exists( 'tosection', $args ) ? $args['tosection'] : null; |
| 707 | + $fromsection = array_key_exists( 'fromsection', $args ) ? $args['fromsection'] : null; |
706 | 708 | |
707 | 709 | // abort if the tag is on an index page |
708 | 710 | if ( preg_match( "/^$index_namespace:(.*?)(\/([0-9]*)|)$/", $parser->Title()->getPrefixedText() ) ) { |
— | — | @@ -839,10 +841,15 @@ |
840 | 842 | if( !$is_q0 ) { |
841 | 843 | $out .= '<span>{{:MediaWiki:Proofreadpage_pagenum_template|page=' . $text . "|num=$pagenum}}</span>"; |
842 | 844 | } |
843 | | - if( $page == $from_page && $args['fromsection'] ) { |
844 | | - $out .= '{{#lst:' . $text . '|' . $args['fromsection'] . '}}'; |
845 | | - } elseif( $page == $to_page && $args['tosection'] ) { |
846 | | - $out .= '{{#lst:' . $text . '|' . $args['tosection'] . '}}'; |
| 845 | + if( $page == $from_page && $fromsection !== null ) { |
| 846 | + $ts = ''; |
| 847 | + // Check if it is single page transclusion |
| 848 | + if ( $page == $to_page && $tosection !== null ) { |
| 849 | + $ts = $tosection; |
| 850 | + } |
| 851 | + $out .= '{{#lst:' . $text . '|' . $fromsection . '|' . $ts .'}}'; |
| 852 | + } elseif( $page == $to_page && $tosection != null ) { |
| 853 | + $out .= '{{#lst:' . $text . '||' . $tosection . '}}'; |
847 | 854 | } else { |
848 | 855 | $out .= '{{:' . $text . '}}'; |
849 | 856 | } |