X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FCategoryViewer.php;h=a98f792416f2138527300935a7b3491806b0d1ca;hb=e6fb2a2c556379197dd63943f91f8fc9997c9632;hp=f9020b751c2f51c448eeb9d34421fc7faa3e61a6;hpb=6bc4c21ed1914abe31507fa132909e7f947e6075;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/CategoryViewer.php b/includes/CategoryViewer.php index f9020b751c..a98f792416 100644 --- a/includes/CategoryViewer.php +++ b/includes/CategoryViewer.php @@ -249,7 +249,7 @@ class CategoryViewer extends ContextSource { $link = Linker::link( $title ); if ( $isRedirect ) { // This seems kind of pointless given 'mw-redirect' class, - // but keeping for back-compatiability with user css. + // but keeping for back-compatibility with user css. $link = '' . $link . ''; } $this->articles[] = $link; @@ -392,7 +392,7 @@ class CategoryViewer extends ContextSource { $r = ''; # @todo FIXME: Here and in the other two sections: we don't need to bother - # with this rigamarole if the entire category contents fit on one page + # with this rigmarole if the entire category contents fit on one page # and have already been retrieved. We can just use $rescnt in that # case and save a query and some logic. $dbcnt = $this->cat->getPageCount() - $this->cat->getSubcatCount() @@ -526,7 +526,10 @@ class CategoryViewer extends ContextSource { $first = true; foreach ( $colContents as $char => $articles ) { - $ret .= '

' . htmlspecialchars( $char ); + # Change space to non-breaking space to keep headers aligned + $h3char = $char === ' ' ? ' ' : htmlspecialchars( $char ); + + $ret .= '

' . $h3char; if ( $first && $char === $prevchar ) { # We're continuing a previous chunk at the top of a new # column, so add " cont." after the letter. @@ -574,7 +577,7 @@ class CategoryViewer extends ContextSource { * Create paging links, as a helper method to getSectionPagingLinks(). * * @param string $first The 'until' parameter for the generated URL - * @param string $last The 'from' parameter for the genererated URL + * @param string $last The 'from' parameter for the generated URL * @param string $type A prefix for parameters, 'page' or 'subcat' or * 'file' * @return String HTML