Make WordPress Core


Ignore:
Timestamp:
04/20/2004 10:56:47 PM (20 years ago)
Author:
saxmatt
Message:

Changed to superglobals, and eliminated $use_cache (since we always do).

File:
1 edited

Legend:

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

    r1088 r1108  
    9999function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_file = '') {
    100100    global $id, $post, $more, $single, $withcomments, $page, $pages, $multipage, $numpages;
    101     global $HTTP_SERVER_VARS, $preview, $cookiehash;
     101    global $preview, $cookiehash;
    102102    global $pagenow;
    103103    $output = '';
     
    113113        $file = $more_file;
    114114    } else {
    115         $file = $pagenow; //$HTTP_SERVER_VARS['PHP_SELF'];
     115        $file = $pagenow; //$_SERVER['PHP_SELF'];
    116116    }
    117117    $content = $pages[$page-1];
     
    344344
    345345function next_posts($max_page = 0) { // original by cfactor at cooltux.org
    346     global $HTTP_SERVER_VARS, $p, $paged, $what_to_show, $pagenow;
     346    global $p, $paged, $what_to_show, $pagenow;
    347347    global $querystring_start, $querystring_equal, $querystring_separator;
    348348    if (empty($p) && ($what_to_show == 'paged')) {
    349         $qstr = $HTTP_SERVER_VARS['QUERY_STRING'];
     349        $qstr = $_SERVER['QUERY_STRING'];
    350350        if (!empty($qstr)) {
    351351            $qstr = preg_replace('/&paged=\d{0,}/', '', $qstr);
    352352            $qstr = preg_replace('/paged=\d{0,}/', '', $qstr);
    353         } elseif (stristr($HTTP_SERVER_VARS['REQUEST_URI'], $HTTP_SERVER_VARS['SCRIPT_NAME'] )) {
    354             if ('' != $qstr = str_replace($HTTP_SERVER_VARS['SCRIPT_NAME'], '',
    355                                             $HTTP_SERVER_VARS['REQUEST_URI']) ) {
     353        } elseif (stristr($_SERVER['REQUEST_URI'], $_SERVER['SCRIPT_NAME'] )) {
     354            if ('' != $qstr = str_replace($_SERVER['SCRIPT_NAME'], '',
     355                                            $_SERVER['REQUEST_URI']) ) {
    356356                $qstr = preg_replace('/^\//', '', $qstr);
    357357                $qstr = preg_replace('/paged\/\d{0,}\//', '', $qstr);
     
    397397
    398398function previous_posts() { // original by cfactor at cooltux.org
    399     global $HTTP_SERVER_VARS, $p, $paged, $what_to_show, $pagenow;
     399    global $_SERVER, $p, $paged, $what_to_show, $pagenow;
    400400    global $querystring_start, $querystring_equal, $querystring_separator;
    401401    if (empty($p) && ($what_to_show == 'paged')) {
    402         $qstr = $HTTP_SERVER_VARS['QUERY_STRING'];
     402        $qstr = $_SERVER['QUERY_STRING'];
    403403        if (!empty($qstr)) {
    404404            $qstr = preg_replace('/&paged=\d{0,}/', '', $qstr);
    405405            $qstr = preg_replace('/paged=\d{0,}/', '', $qstr);
    406         } elseif (stristr($HTTP_SERVER_VARS['REQUEST_URI'], $HTTP_SERVER_VARS['SCRIPT_NAME'] )) {
    407             if ('' != $qstr = str_replace($HTTP_SERVER_VARS['SCRIPT_NAME'], '',
    408                                             $HTTP_SERVER_VARS['REQUEST_URI']) ) {
     406        } elseif (stristr($_SERVER['REQUEST_URI'], $_SERVER['SCRIPT_NAME'] )) {
     407            if ('' != $qstr = str_replace($_SERVER['SCRIPT_NAME'], '',
     408                                            $_SERVER['REQUEST_URI']) ) {
    409409                $qstr = preg_replace('/^\//', '', $qstr);
    410410                $qstr = preg_replace("/paged\/\d{0,}\//", '', $qstr);
Note: See TracChangeset for help on using the changeset viewer.