From 8927968849003b7255aa120694b247df709cc6e8 Mon Sep 17 00:00:00 2001 From: saxmatt Date: Thu, 26 Feb 2004 16:15:48 +0000 Subject: [PATCH] Removed global $siteurl and $blogfilename, use get_settings. Syntax fix for wp-db. git-svn-id: http://svn.automattic.com/wordpress/trunk@945 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- index-smarty.php | 2 +- index.php | 12 +++--- wp-admin/auth.php | 12 +++--- wp-admin/index.php | 4 +- wp-admin/install.php | 2 +- wp-admin/link-add.php | 2 +- wp-admin/menu.php | 5 ++- wp-admin/options-permalink.php | 2 +- wp-admin/post.php | 22 +++++------ wp-admin/profile.php | 7 ++-- wp-admin/templates.php | 4 +- wp-admin/users.php | 2 +- wp-blog-header.php | 4 +- wp-comments-popup.php | 4 +- wp-comments.php | 2 +- wp-includes/functions.php | 43 +++++++++++---------- wp-includes/template-functions-category.php | 18 ++++----- wp-includes/template-functions-comment.php | 12 +++--- wp-includes/template-functions-general.php | 34 ++++++++-------- wp-includes/template-functions-links.php | 31 +++++++-------- wp-includes/template-functions-post.php | 12 +++--- wp-includes/vars.php | 2 +- wp-includes/wp-db.php | 4 +- wp-login.php | 12 +++--- wp-register.php | 2 +- wp-settings.php | 4 +- wp.php | 2 +- 27 files changed, 131 insertions(+), 131 deletions(-) diff --git a/index-smarty.php b/index-smarty.php index a2fff474b6..7b07936161 100644 --- a/index-smarty.php +++ b/index-smarty.php @@ -15,7 +15,7 @@ require_once('wp-blog-header.php'); define( 'NODISPLAY', false ); -$wpsmarty->assign( 'siteurl', $siteurl ); +$wpsmarty->assign( 'siteurl', get_settings('siteurl') ); $wpsmarty->assign( 'b2_version', $wp_version ); if($posts) diff --git a/index.php b/index.php index cfba1a2595..0a0a734749 100644 --- a/index.php +++ b/index.php @@ -15,10 +15,10 @@ require('wp-blog-header.php'); - + @@ -32,7 +32,7 @@ require('wp-blog-header.php');
-

+

@@ -76,7 +76,7 @@ require('wp-blog-header.php');
  • Other:
  • Meta: diff --git a/wp-admin/auth.php b/wp-admin/auth.php index 4b423d3080..d2ae1b4777 100644 --- a/wp-admin/auth.php +++ b/wp-admin/auth.php @@ -4,12 +4,12 @@ require_once('../wp-config.php'); /* Checking login & pass in the database */ function veriflog() { - global $HTTP_COOKIE_VARS,$cookiehash; + global $cookiehash; global $tableusers, $wpdb; - if (!empty($HTTP_COOKIE_VARS["wordpressuser_".$cookiehash])) { - $user_login = $HTTP_COOKIE_VARS["wordpressuser_".$cookiehash]; - $user_pass_md5 = $HTTP_COOKIE_VARS["wordpresspass_".$cookiehash]; + if (!empty($_COOKIE['wordpressuser_' . $cookiehash])) { + $user_login = $_COOKIE['wordpressuser_' . $cookiehash]; + $user_pass_md5 = $_COOKIE['wordpresspass_' . $cookiehash]; } else { return false; } @@ -37,10 +37,10 @@ if ( !veriflog() ) { header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Cache-Control: no-cache, must-revalidate'); header('Pragma: no-cache'); - if (!empty($HTTP_COOKIE_VARS["wordpressuser_".$cookiehash])) { + if (!empty($_COOKIE['wordpressuser_' . $cookiehash])) { $error="Error: wrong login or password."; } - $redir = "Location: $siteurl/wp-login.php?redirect_to=" . urlencode($HTTP_SERVER_VARS["REQUEST_URI"]); + $redir = 'Location: ' . get_settings('siteurl') . '/wp-login.php?redirect_to=' . urlencode($_SERVER['REQUEST_URI']); header($redir); exit(); } diff --git a/wp-admin/index.php b/wp-admin/index.php index 177c37b651..85011a3cb7 100644 --- a/wp-admin/index.php +++ b/wp-admin/index.php @@ -6,9 +6,9 @@ require_once('auth.php'); get_currentuserinfo(); if (0 == $user_level) { - $redirect_to = $siteurl . '/wp-admin/profile.php'; + $redirect_to = get_settings('siteurl') . '/wp-admin/profile.php'; } else { - $redirect_to = $siteurl . '/wp-admin/post.php'; + $redirect_to = get_settings('siteurl') . '/wp-admin/post.php'; } header ("Location: $redirect_to"); ?> \ No newline at end of file diff --git a/wp-admin/install.php b/wp-admin/install.php index 4678562e4a..7442ed78a1 100644 --- a/wp-admin/install.php +++ b/wp-admin/install.php @@ -676,7 +676,7 @@ $guessurl = str_replace('/wp-admin/install.php?step=2', '', 'http://' . $HTTP_HO query($query); diff --git a/wp-admin/link-add.php b/wp-admin/link-add.php index 405bcdd43a..8106ff9431 100644 --- a/wp-admin/link-add.php +++ b/wp-admin/link-add.php @@ -237,7 +237,7 @@ No
  • -

    You can drag Link This to your toolbar and when you click it a window will pop up that will allow you to add whatever site you're on to your links! Right now this only works on Mozilla or Netscape, but we're working on it.

    +

    You can drag Link This to your toolbar and when you click it a window will pop up that will allow you to add whatever site you're on to your links! Right now this only works on Mozilla or Netscape, but we're working on it.

    -
  • " title="View your site">View site
  • -
  • Logout ()
  • +
  • View site
  • +
  • Logout ()
  • diff --git a/wp-admin/options-permalink.php b/wp-admin/options-permalink.php index ed5f79ab4e..915cf31bb6 100644 --- a/wp-admin/options-permalink.php +++ b/wp-admin/options-permalink.php @@ -96,7 +96,7 @@ default: ?>

    Using the permalink structure value you currently have, , these are the mod_rewrite rules you should have in your .htaccess file.

    \n"; echo "

    Are you sure you want to do that?

    \n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo ""; echo "  "; - echo "\n"; + echo "\n"; echo "\n"; echo "
    \n"; @@ -514,7 +514,7 @@ switch($action) { if (($HTTP_SERVER_VARS['HTTP_REFERER'] != "") && (false == $noredir)) { header('Location: ' . $HTTP_SERVER_VARS['HTTP_REFERER']); } else { - header('Location: '.$siteurl.'/wp-admin/edit.php?p='.$p.'&c=1#comments'); + header('Location: '. get_settings('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments'); } break; @@ -542,7 +542,7 @@ switch($action) { if (($HTTP_SERVER_VARS['HTTP_REFERER'] != "") && (false == $noredir)) { header('Location: ' . $HTTP_SERVER_VARS['HTTP_REFERER']); } else { - header('Location: '.$siteurl.'/wp-admin/edit.php?p='.$p.'&c=1#comments'); + header('Location: '. get_settings('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments'); } break; @@ -567,7 +567,7 @@ switch($action) { echo "
    \n"; echo "

    Comment has been approved.

    \n"; - echo "
    \n"; + echo "\n"; echo "\n"; echo "\n"; echo ""; @@ -602,7 +602,7 @@ switch($action) { if (($HTTP_SERVER_VARS['HTTP_REFERER'] != "") && (false == $noredir)) { header('Location: ' . $HTTP_SERVER_VARS['HTTP_REFERER']); } else { - header('Location: '.$siteurl.'/wp-admin/edit.php?p='.$p.'&c=1#comments'); + header('Location: '. get_settings('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments'); } break; @@ -706,12 +706,12 @@ $bookmarklet_height= ($use_trackback) ? 460 : 420; if ($is_NS4 || $is_gecko) { ?> - Press It + Press It - - Press it + Press it -