plugins/CategoryList.php
changeset 1 eaeb479c52c9
parent 0 70fa9fdd6f25
child 2 125e913485a2
equal deleted inserted replaced
0:70fa9fdd6f25 1:eaeb479c52c9
   111       if ( empty($row['is_subcategory']) )
   111       if ( empty($row['is_subcategory']) )
   112         break;
   112         break;
   113       
   113       
   114       $have_subcats = true;
   114       $have_subcats = true;
   115       
   115       
   116       $ticker++;
       
   117       if ( $ticker == 3 )
   116       if ( $ticker == 3 )
   118       {
   117       {
   119         $ticker = 0;
   118         $ticker = 0;
   120         $html = '</tr><tr>';
   119         $html .= '</tr><tr>';
   121         $class = ( $class == 'row1' ) ? 'row2' : 'row1';
   120         $class = ( $class == 'row1' ) ? 'row2' : 'row1';
   122       }
   121       }
       
   122       $ticker++;
       
   123       
   123       $inner = '<a href="' . makeUrlNS($row['namespace'], $row['page_id'], false, true) . '">' . htmlspecialchars($row['name']) . '</a>';
   124       $inner = '<a href="' . makeUrlNS($row['namespace'], $row['page_id'], false, true) . '">' . htmlspecialchars($row['name']) . '</a>';
   124       $html .= '<td style="width: 33.3%;" class="' . $class . '">' . $inner . '</td>';
   125       $html .= '<td style="width: 33.3%;" class="' . $class . '">' . $inner . '</td>';
   125     }
   126     }
   126     if ( !$have_subcats )
   127     if ( !$have_subcats )
   127     {
   128     {
   158       if ( !$row )
   159       if ( !$row )
   159         break;
   160         break;
   160       
   161       
   161       $have_pages = true;
   162       $have_pages = true;
   162       
   163       
   163       $ticker++;
       
   164       if ( $ticker == 3 )
   164       if ( $ticker == 3 )
   165       {
   165       {
   166         $ticker = 0;
   166         $ticker = 0;
   167         $html = '</tr><tr>';
   167         $html .= '</tr><tr>';
   168         $class = ( $class == 'row1' ) ? 'row2' : 'row1';
   168         $class = ( $class == 'row1' ) ? 'row2' : 'row1';
   169       }
   169       }
       
   170       $ticker++;
       
   171       
   170       $inner = '<a href="' . makeUrlNS($row['namespace'], $row['page_id'], false, true) . '">' . htmlspecialchars($row['name']) . '</a>';
   172       $inner = '<a href="' . makeUrlNS($row['namespace'], $row['page_id'], false, true) . '">' . htmlspecialchars($row['name']) . '</a>';
   171       $html .= '<td style="width: 33.3%;" class="' . $class . '">' . $inner . '</td>';
   173       $html .= '<td style="width: 33.3%;" class="' . $class . '">' . $inner . '</td>';
   172     }
   174     }
   173     while ( $row = $db->fetchrow() );
   175     while ( $row = $db->fetchrow() );
   174     
   176