diff -r dc08c70ca550 -r e2cb5f1432c8 includes/functions.php --- a/includes/functions.php Sun Dec 02 15:27:21 2007 -0500 +++ b/includes/functions.php Sun Dec 02 16:00:10 2007 -0500 @@ -560,94 +560,6 @@ * Prints out the categorization box found on most regular pages. Doesn't take or return anything, but assumes that the page information is already set in $paths. */ - /* -function show_category_info() -{ - global $db, $session, $paths, $template, $plugins; // Common objects - dc_here('functions: showing category info'); - // if($template->no_headers && !strpos($_SERVER['REQUEST_URI'], 'ajax.php')) return ''; - if ( $paths->namespace == 'Category' ) - { - $q = $db->sql_query('SELECT page_id,namespace FROM '.table_prefix.'categories WHERE category_id=\''.$paths->cpage['urlname_nons'].'\' AND namespace=\'Category\' ORDER BY page_id;'); - if(!$q) $db->_die('The category information could not be selected.'); - $ticker = -1; - echo '

Subcategories

'; - if($db->numrows() < 1) echo '

There are no subcategories in this category.

'; - echo ''; - while($row = $db->fetchrow()) - { - $ticker++; - if ( $ticker == 3 ) - { - $ticker = 0; - } - if ( $ticker == 0 ) - { - echo ''; - } - echo ''; - if ( $ticker == 2 ) - { - echo ''; - } - } - $db->free_result(); - if($ticker) echo ''; - echo '
' . htmlspecialchars($paths->pages[$paths->nslist[$row['namespace']].$row['page_id']]['name']) . '
'; - - $q = $db->sql_query('SELECT page_id,namespace FROM '.table_prefix.'categories WHERE category_id=\''.$paths->cpage['urlname_nons'].'\' AND namespace!=\'Category\' ORDER BY page_id;'); - if ( !$q ) - { - $db->_die('The category information could not be selected.'); - } - $ticker = -1; - echo '

Pages

'; - if ( $db->numrows() < 1 ) - { - echo '

There are no pages in this category.

'; - } - echo ''; - while($row = $db->fetchrow()) - { - $ticker += ( $ticker == 3 ) ? -3 : 1; - if ( $ticker == 0 ) - { - echo ''; - } - echo ''; - if ( $ticker == 2 ) - { - echo ''; - } - } - $db->free_result(); - if($ticker) echo ''; - echo '
'.htmlspecialchars($paths->pages[$paths->nslist[$row['namespace']].$row['page_id']]['name']).'


'; - } - $q = $db->sql_query('SELECT category_id FROM '.table_prefix.'categories WHERE page_id=\''.$paths->cpage['urlname_nons'].'\' AND namespace=\''.$paths->namespace.'\''); - if(!$q) $db->_die('The error seems to have occurred during selection of category data.'); - if($db->numrows() > 0) { - echo '
Categories: '; - $i=0; - while($r = $db->fetchrow()) - { - if($i>0) echo ', '; - $i++; - echo ''.$paths->pages[$paths->nslist['Category'].$r['category_id']]['name'].''; - } - if( ( $paths->wiki_mode && !$paths->page_protected ) || ( $session->get_permissions('edit_cat') && $session->get_permissions('even_when_protected') ) ) echo ' [ edit categorization ]
'; - } - else - { - echo '
Categories: '; - echo '(Uncategorized)'; - if( ( $paths->wiki_mode && !$paths->page_protected ) || ( $session->get_permissions('edit_cat') && $session->get_permissions('even_when_protected') ) ) echo ' [ edit categorization ]
'; - else echo ''; - } - $db->free_result(); -} -*/ - function show_category_info() { global $db, $session, $paths, $template, $plugins; // Common objects @@ -2801,7 +2713,7 @@ /** * Aggressively and hopefully non-destructively optimizes a blob of HTML. * @param string HTML to process - * @return string much snaller HTML + * @return string much smaller HTML */ function aggressive_optimize_html($html)