more cssification of diff rendering, some " -> ' in diff engine
[lhc/web/wiklou.git] / includes / SpecialAllpages.php
index e418756..ccac741 100644 (file)
@@ -52,7 +52,7 @@ function indexShowToplevel()
        # There's got to be a cleaner way to do this!
        for( $i = 1; $i < $sections; $i++ ) {
                $from = $i * $indexMaxperpage;
-               $sql = "SELECT cur_title $fromwhere $order LIMIT $from,2";
+               $sql = "SELECT cur_title $fromwhere $order ".wfLimitResult(2,$from);
                $res = wfQuery( $sql, DB_READ, $fname );
        
                $s = wfFetchObject( $res );
@@ -66,7 +66,7 @@ function indexShowToplevel()
        }
        
        $from = $i * $indexMaxperpage;
-       $sql = "SELECT cur_title $fromwhere $order LIMIT " . ($count-1) . ",1";
+       $sql = "SELECT cur_title $fromwhere $order ".wfLimitResult(1,$count-1);
        $res = wfQuery( $sql, DB_READ, $fname );
        $s = wfFetchObject( $res );
        $outpoint = $s->cur_title;
@@ -112,7 +112,7 @@ LIMIT {$indexMaxperpage}";
 # FIXME: Dynamic column widths, backlink to main list,
 # side links to next and previous
        $n = 0;
-       $out = "<table border=\"0\">\n<tr>";
+       $out = "<table border=\"0\">\n";
        while( $s = wfFetchObject( $res ) ) {
                $t = Title::makeTitle( 0, $s->cur_title );
                if( $t ) {
@@ -120,10 +120,13 @@ LIMIT {$indexMaxperpage}";
                } else {
                        $link = "[[" . htmlspecialchars( $s->cur_title ) . "]]";
                }
+               if( $n == 0 ) {
+                       $out .= "<tr>\n";
+               }
                $out .= "<td width=\"33%\">$link</td>";
                $n = ++$n % 3;
                if( $n == 0 ) {
-                       $out .= "</tr>\n<tr>";
+                       $out .= "</tr>\n";
                }
        }
        if( $n != 0 ) {