Make WordPress Core


Ignore:
Timestamp:
02/26/2004 04:15:48 PM (22 years ago)
Author:
saxmatt
Message:

Removed global $siteurl and $blogfilename, use get_settings. Syntax fix for wp-db.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/template-functions-category.php

    r893 r945  
    1717
    1818function get_category_link($echo = false, $category_id, $category_nicename) {
    19     global $wpdb, $tablecategories, $post, $querystring_start, $querystring_equal, $siteurl, $blogfilename, $cache_categories;
     19    global $wpdb, $tablecategories, $post, $querystring_start, $querystring_equal, $cache_categories;
    2020    $cat_ID = $category_id;
    2121    $permalink_structure = get_settings('permalink_structure');
    2222   
    2323    if ('' == $permalink_structure) {
    24         $file = "$siteurl/$blogfilename";
     24        $file = get_settings('siteurl') . '/' . get_settings('blogfilename');
    2525        $link = $file.$querystring_start.'cat'.$querystring_equal.$cat_ID;
    2626    } else {
     
    2828        // Get any static stuff from the front
    2929        $front = substr($permalink_structure, 0, strpos($permalink_structure, '%'));
    30         $link = $siteurl . $front . 'category/';
     30        $link = get_settings('siteurl') . $front . 'category/';
    3131        if ($parent=$cache_categories[$category_id]->category_parent) $link .= get_category_parents($parent, FALSE, '/', TRUE);
    3232        $link .= $category_nicename . '/';
     
    3838
    3939function get_category_rss_link($echo = false, $category_id, $category_nicename) {
    40        global $querystring_start, $querystring_equal, $siteurl;
     40       global $querystring_start, $querystring_equal;
    4141       $cat_ID = $category_id;
    4242       $permalink_structure = get_settings('permalink_structure');
    4343
    4444       if ('' == $permalink_structure) {
    45                $file = "$siteurl/wp-rss2.php";
     45               $file = get_settings('siteurl') . '/wp-rss2.php';
    4646        $link = $file . $querystring_start . 'cat' . $querystring_equal . $category_id;
    4747       } else {
     
    186186        $selected=0, $hide=0) {
    187187    global $tablecategories, $tableposts, $tablepost2cat, $wpdb;
    188     global $pagenow, $siteurl, $blogfilename;
     188    global $pagenow;
    189189    global $querystring_start, $querystring_equal, $querystring_separator;
    190     if (($file == 'blah') || ($file == '')) $file = "$siteurl/$blogfilename";
     190    if (($file == 'blah') || ($file == '')) $file = get_settings('siteurl') . '/' . get_settings('blogfilename');
    191191    if (!$selected) $selected=$cat;
    192192    $sort_column = 'cat_'.$sort_column;
     
    253253function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0, $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=FALSE, $child_of=0, $categories=0, $recurse=0) {
    254254    global $tablecategories, $tableposts, $tablepost2cat, $wpdb;
    255     global $pagenow, $siteurl, $blogfilename;
     255    global $pagenow;
    256256    global $querystring_start, $querystring_equal, $querystring_separator;
    257257    // Optiondates now works
    258258    if ('' == $file) {
    259         $file = "$siteurl/$blogfilename";
     259        $file = "$siteurl/" . get_settings('blogfilename');
    260260    }
    261261    if (intval($categories)==0){
Note: See TracChangeset for help on using the changeset viewer.