Index: branches/REL1_18/phase3/skins/common/shared.css |
— | — | @@ -792,6 +792,20 @@ |
793 | 793 | right: 10px; |
794 | 794 | background-position: 0% 100%; |
795 | 795 | } |
| 796 | +/* Table Sorting */ |
| 797 | +table.sortable th.headerSort { |
| 798 | + background-image: url(images/sort_both.gif); |
| 799 | + cursor: pointer; |
| 800 | + background-repeat: no-repeat; |
| 801 | + background-position: center right; |
| 802 | + padding-right: 21px; |
| 803 | +} |
| 804 | +table.sortable th.headerSortUp { |
| 805 | + background-image: url(images/sort_up.gif); |
| 806 | +} |
| 807 | +table.sortable th.headerSortDown { |
| 808 | + background-image: url(images/sort_down.gif); |
| 809 | +} |
796 | 810 | |
797 | 811 | /* LTR content in RTL layout */ |
798 | 812 | .ltr { |
Index: branches/REL1_18/phase3/includes/Title.php |
— | — | @@ -3881,7 +3881,7 @@ |
3882 | 3882 | return $this->mDbkeyform == ''; |
3883 | 3883 | case NS_MEDIAWIKI: |
3884 | 3884 | // known system message |
3885 | | - return $this->getDefaultMessageText() !== false; |
| 3885 | + return $this->hasSourceText() !== false; |
3886 | 3886 | default: |
3887 | 3887 | return false; |
3888 | 3888 | } |
— | — | @@ -3911,8 +3911,13 @@ |
3912 | 3912 | |
3913 | 3913 | if ( $this->mNamespace == NS_MEDIAWIKI ) { |
3914 | 3914 | // If the page doesn't exist but is a known system message, default |
3915 | | - // message content will be displayed, same for language subpages |
3916 | | - return $this->getDefaultMessageText() !== false; |
| 3915 | + // message content will be displayed, same for language subpages- |
| 3916 | + // Use always content language to avoid loading hundreds of languages |
| 3917 | + // to get the link color. |
| 3918 | + global $wgContLang; |
| 3919 | + list( $name, $lang ) = MessageCache::singleton()->figureMessage( $wgContLang->lcfirst( $this->getText() ) ); |
| 3920 | + $message = wfMessage( $name )->inLanguage( $wgContLang )->useDatabase( false ); |
| 3921 | + return $message->exists(); |
3917 | 3922 | } |
3918 | 3923 | |
3919 | 3924 | return false; |
Property changes on: branches/REL1_18/phase3/includes/Title.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
3920 | 3925 | Merged /trunk/phase3/includes/Title.php:r97815,98069 |
Index: branches/REL1_18/phase3/includes/SkinTemplate.php |
— | — | @@ -1540,6 +1540,134 @@ |
1541 | 1541 | return $personal_tools; |
1542 | 1542 | } |
1543 | 1543 | |
| 1544 | + function getSidebar( $options = array() ) { |
| 1545 | + // Force the rendering of the following portals |
| 1546 | + $sidebar = $this->data['sidebar']; |
| 1547 | + if ( !isset( $sidebar['SEARCH'] ) ) { |
| 1548 | + $sidebar['SEARCH'] = true; |
| 1549 | + } |
| 1550 | + if ( !isset( $sidebar['TOOLBOX'] ) ) { |
| 1551 | + $sidebar['TOOLBOX'] = true; |
| 1552 | + } |
| 1553 | + if ( !isset( $sidebar['LANGUAGES'] ) ) { |
| 1554 | + $sidebar['LANGUAGES'] = true; |
| 1555 | + } |
| 1556 | + |
| 1557 | + if ( !isset( $options['search'] ) || $options['search'] !== true ) { |
| 1558 | + unset( $sidebar['SEARCH'] ); |
| 1559 | + } |
| 1560 | + if ( isset( $options['toolbox'] ) && $options['toolbox'] === false ) { |
| 1561 | + unset( $sidebar['TOOLBOX'] ); |
| 1562 | + } |
| 1563 | + if ( isset( $options['languages'] ) && $options['languages'] === false ) { |
| 1564 | + unset( $sidebar['LANGUAGES'] ); |
| 1565 | + } |
| 1566 | + |
| 1567 | + $boxes = array(); |
| 1568 | + foreach ( $sidebar as $boxName => $content ) { |
| 1569 | + if ( $content === false ) { |
| 1570 | + continue; |
| 1571 | + } |
| 1572 | + switch ( $boxName ) { |
| 1573 | + case 'SEARCH': |
| 1574 | + // Search is a special case, skins should custom implement this |
| 1575 | + $boxes[$boxName] = array( |
| 1576 | + 'id' => "p-search", |
| 1577 | + 'header' => wfMessage( 'search' )->text(), |
| 1578 | + 'generated' => false, |
| 1579 | + 'content' => true, |
| 1580 | + ); |
| 1581 | + break; |
| 1582 | + case 'TOOLBOX': |
| 1583 | + $msgObj = wfMessage( 'toolbox' ); |
| 1584 | + $boxes[$boxName] = array( |
| 1585 | + 'id' => "p-tb", |
| 1586 | + 'header' => $msgObj->exists() ? $msgObj->text() : 'toolbox', |
| 1587 | + 'generated' => false, |
| 1588 | + 'content' => $this->getToolbox(), |
| 1589 | + ); |
| 1590 | + break; |
| 1591 | + case 'LANGUAGES': |
| 1592 | + if ( $this->data['language_urls'] ) { |
| 1593 | + $msgObj = wfMessage( 'otherlanguages' ); |
| 1594 | + $boxes[$boxName] = array( |
| 1595 | + 'id' => "p-lang", |
| 1596 | + 'header' => $msgObj->exists() ? $msgObj->text() : 'otherlanguages', |
| 1597 | + 'generated' => false, |
| 1598 | + 'content' => $this->data['language_urls'], |
| 1599 | + ); |
| 1600 | + } |
| 1601 | + break; |
| 1602 | + default: |
| 1603 | + $msgObj = wfMessage( $boxName ); |
| 1604 | + $boxes[$boxName] = array( |
| 1605 | + 'id' => "p-$boxName", |
| 1606 | + 'header' => $msgObj->exists() ? $msgObj->text() : $boxName, |
| 1607 | + 'generated' => true, |
| 1608 | + 'content' => $content, |
| 1609 | + ); |
| 1610 | + break; |
| 1611 | + } |
| 1612 | + } |
| 1613 | + |
| 1614 | + // HACK: Compatibility with extensions still using SkinTemplateToolboxEnd |
| 1615 | + $hookContents = null; |
| 1616 | + if ( isset( $boxes['TOOLBOX'] ) ) { |
| 1617 | + ob_start(); |
| 1618 | + // We pass an extra 'true' at the end so extensions using BaseTemplateToolbox |
| 1619 | + // can abort and avoid outputting double toolbox links |
| 1620 | + wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this, true ) ); |
| 1621 | + $hookContents = ob_get_contents(); |
| 1622 | + ob_end_clean(); |
| 1623 | + if ( !trim( $hookContents ) ) { |
| 1624 | + $hookContents = null; |
| 1625 | + } |
| 1626 | + } |
| 1627 | + // END hack |
| 1628 | + |
| 1629 | + if ( isset( $options['htmlOnly'] ) && $options['htmlOnly'] === true ) { |
| 1630 | + foreach ( $boxes as $boxName => $box ) { |
| 1631 | + if ( is_array( $box['content'] ) ) { |
| 1632 | + $content = "<ul>"; |
| 1633 | + foreach ( $box['content'] as $key => $val ) { |
| 1634 | + $content .= "\n " . $this->makeListItem( $key, $val ); |
| 1635 | + } |
| 1636 | + // HACK, shove the toolbox end onto the toolbox if we're rendering itself |
| 1637 | + if ( $hookContents ) { |
| 1638 | + $content .= "\n $hookContents"; |
| 1639 | + } |
| 1640 | + // END hack |
| 1641 | + $content .= "\n</ul>\n"; |
| 1642 | + $boxes[$boxName]['content'] = $content; |
| 1643 | + } |
| 1644 | + } |
| 1645 | + } else { |
| 1646 | + if ( $hookContents ) { |
| 1647 | + $boxes['TOOLBOXEND'] = array( |
| 1648 | + 'id' => "p-toolboxend", |
| 1649 | + 'header' => $boxes['TOOLBOX']['header'], |
| 1650 | + 'generated' => false, |
| 1651 | + 'content' => "<ul>{$hookContents}</ul>", |
| 1652 | + ); |
| 1653 | + // HACK: Make sure that TOOLBOXEND is sorted next to TOOLBOX |
| 1654 | + $boxes2 = array(); |
| 1655 | + foreach ( $boxes as $key => $box ) { |
| 1656 | + if ( $key === 'TOOLBOXEND' ) { |
| 1657 | + continue; |
| 1658 | + } |
| 1659 | + $boxes2[$key] = $box; |
| 1660 | + if ( $key === 'TOOLBOX' ) { |
| 1661 | + $boxes2['TOOLBOXEND'] = $boxes['TOOLBOXEND']; |
| 1662 | + } |
| 1663 | + } |
| 1664 | + $boxes = $boxes2; |
| 1665 | + // END hack |
| 1666 | + } |
| 1667 | + } |
| 1668 | + |
| 1669 | + return $boxes; |
| 1670 | + } |
| 1671 | + |
1544 | 1672 | /** |
1545 | 1673 | * Makes a link, usually used by makeListItem to generate a link for an item |
1546 | 1674 | * in a list used in navigation lists, portlets, portals, sidebars, etc... |
Index: branches/REL1_18/phase3/includes/specials/SpecialBlock.php |
— | — | @@ -640,7 +640,7 @@ |
641 | 641 | if( !$status ) { |
642 | 642 | # Show form unless the user is already aware of this... |
643 | 643 | if( !$data['Confirm'] || ( array_key_exists( 'PreviousTarget', $data ) |
644 | | - && $data['PreviousTarget'] !== $block->getTarget() ) ) |
| 644 | + && $data['PreviousTarget'] !== $target ) ) |
645 | 645 | { |
646 | 646 | return array( array( 'ipb_already_blocked', $block->getTarget() ) ); |
647 | 647 | # Otherwise, try to update the block... |
Property changes on: branches/REL1_18/phase3/includes/specials/SpecialBlock.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
648 | 648 | Merged /trunk/phase3/includes/specials/SpecialBlock.php:r98298 |
Property changes on: branches/REL1_18/phase3/includes/specials |
___________________________________________________________________ |
Modified: svn:mergeinfo |
649 | 649 | Merged /trunk/phase3/includes/specials:r98298 |
Property changes on: branches/REL1_18/phase3/includes |
___________________________________________________________________ |
Modified: svn:mergeinfo |
650 | 650 | Merged /trunk/phase3/includes:r97815,98069,98210,98212,98298 |
Property changes on: branches/REL1_18/phase3 |
___________________________________________________________________ |
Modified: svn:mergeinfo |
651 | 651 | Merged /trunk/phase3:r97815,98069,98210,98212,98298 |