Index: trunk/phase3/includes/CategoryPage.php |
— | — | @@ -95,12 +95,23 @@ |
96 | 96 | $this->doCategoryQuery(); |
97 | 97 | $this->finaliseCategoryState(); |
98 | 98 | |
99 | | - $r = $this->getCategoryTop() . |
100 | | - $this->getSubcategorySection() . |
| 99 | + $r = $this->getSubcategorySection() . |
101 | 100 | $this->getPagesSection() . |
102 | | - $this->getImageSection() . |
103 | | - $this->getCategoryBottom(); |
| 101 | + $this->getImageSection(); |
104 | 102 | |
| 103 | + if( $r == '' ) { |
| 104 | + // If there is no category content to display, only |
| 105 | + // show the top part of the navigation links. |
| 106 | + // FIXME: cannot be completely suppressed because it |
| 107 | + // is unknown if 'until' or 'from' makes this |
| 108 | + // give 0 results. |
| 109 | + $r = $r . $this->getCategoryTop(); |
| 110 | + } else { |
| 111 | + $r = $this->getCategoryTop() . |
| 112 | + $r . |
| 113 | + $this->getCategoryBottom(); |
| 114 | + } |
| 115 | + |
105 | 116 | // Give a proper message if category is empty |
106 | 117 | if ( $r == '' ) { |
107 | 118 | $r = wfMsgExt( 'category-empty', array( 'parse' ) ); |