Changed to superglobals, and eliminated $use_cache (since we always do).
git-svn-id: http://svn.automattic.com/wordpress/trunk@1108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e27e90a7b6
commit
10c6b7ea9c
|
@ -10,7 +10,6 @@ function gethelp_link($this_file, $helptag) {
|
||||||
return $s;
|
return $s;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($use_cache)) $use_cache=1;
|
|
||||||
if (!isset($blogID)) $blog_ID=1;
|
if (!isset($blogID)) $blog_ID=1;
|
||||||
if (!isset($debug)) $debug=0;
|
if (!isset($debug)) $debug=0;
|
||||||
timer_start();
|
timer_start();
|
||||||
|
@ -37,14 +36,14 @@ $wpvarstoreset = array('profile','standalone','redirect','redirect_url','a','pop
|
||||||
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
||||||
$wpvar = $wpvarstoreset[$i];
|
$wpvar = $wpvarstoreset[$i];
|
||||||
if (!isset($$wpvar)) {
|
if (!isset($$wpvar)) {
|
||||||
if (empty($HTTP_POST_VARS["$wpvar"])) {
|
if (empty($_POST["$wpvar"])) {
|
||||||
if (empty($HTTP_GET_VARS["$wpvar"])) {
|
if (empty($_GET["$wpvar"])) {
|
||||||
$$wpvar = '';
|
$$wpvar = '';
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_GET_VARS["$wpvar"];
|
$$wpvar = $_GET["$wpvar"];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_POST_VARS["$wpvar"];
|
$$wpvar = $_POST["$wpvar"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,23 +14,23 @@ function add_magic_quotes($array) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!get_magic_quotes_gpc()) {
|
if (!get_magic_quotes_gpc()) {
|
||||||
$HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS);
|
$_GET = add_magic_quotes($_GET);
|
||||||
$HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS);
|
$_POST = add_magic_quotes($_POST);
|
||||||
$HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
|
$_COOKIE = add_magic_quotes($_COOKIE);
|
||||||
}
|
}
|
||||||
|
|
||||||
$wpvarstoreset = array('action','standalone','cat');
|
$wpvarstoreset = array('action','standalone','cat');
|
||||||
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
||||||
$wpvar = $wpvarstoreset[$i];
|
$wpvar = $wpvarstoreset[$i];
|
||||||
if (!isset($$wpvar)) {
|
if (!isset($$wpvar)) {
|
||||||
if (empty($HTTP_POST_VARS["$wpvar"])) {
|
if (empty($_POST["$wpvar"])) {
|
||||||
if (empty($HTTP_GET_VARS["$wpvar"])) {
|
if (empty($_GET["$wpvar"])) {
|
||||||
$$wpvar = '';
|
$$wpvar = '';
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_GET_VARS["$wpvar"];
|
$$wpvar = $_GET["$wpvar"];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_POST_VARS["$wpvar"];
|
$$wpvar = $_POST["$wpvar"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,10 +45,10 @@ case 'addcat':
|
||||||
if ($user_level < 3)
|
if ($user_level < 3)
|
||||||
die ('Cheatin’ uh?');
|
die ('Cheatin’ uh?');
|
||||||
|
|
||||||
$cat_name= addslashes(stripslashes(stripslashes($HTTP_POST_VARS['cat_name'])));
|
$cat_name= addslashes(stripslashes(stripslashes($_POST['cat_name'])));
|
||||||
$category_nicename = sanitize_title($cat_name);
|
$category_nicename = sanitize_title($cat_name);
|
||||||
$category_description = addslashes(stripslashes(stripslashes($HTTP_POST_VARS['category_description'])));
|
$category_description = addslashes(stripslashes(stripslashes($_POST['category_description'])));
|
||||||
$cat = intval($HTTP_POST_VARS['cat']);
|
$cat = intval($_POST['cat']);
|
||||||
|
|
||||||
$wpdb->query("INSERT INTO $tablecategories (cat_ID, cat_name, category_nicename, category_description, category_parent) VALUES ('0', '$cat_name', '$category_nicename', '$category_description', '$cat')");
|
$wpdb->query("INSERT INTO $tablecategories (cat_ID, cat_name, category_nicename, category_description, category_parent) VALUES ('0', '$cat_name', '$category_nicename', '$category_description', '$cat')");
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ case 'Delete':
|
||||||
$standalone = 1;
|
$standalone = 1;
|
||||||
require_once('admin-header.php');
|
require_once('admin-header.php');
|
||||||
|
|
||||||
$cat_ID = intval($HTTP_GET_VARS["cat_ID"]);
|
$cat_ID = intval($_GET["cat_ID"]);
|
||||||
$cat_name = get_catname($cat_ID);
|
$cat_name = get_catname($cat_ID);
|
||||||
$cat_name = addslashes($cat_name);
|
$cat_name = addslashes($cat_name);
|
||||||
$category = $wpdb->get_row("SELECT * FROM $tablecategories WHERE cat_ID = " . $cat_ID);
|
$category = $wpdb->get_row("SELECT * FROM $tablecategories WHERE cat_ID = " . $cat_ID);
|
||||||
|
@ -84,7 +84,7 @@ break;
|
||||||
case 'edit':
|
case 'edit':
|
||||||
|
|
||||||
require_once ('admin-header.php');
|
require_once ('admin-header.php');
|
||||||
$category = $wpdb->get_row("SELECT * FROM $tablecategories WHERE cat_ID = " . $HTTP_GET_VARS['cat_ID']);
|
$category = $wpdb->get_row("SELECT * FROM $tablecategories WHERE cat_ID = " . $_GET['cat_ID']);
|
||||||
$cat_name = stripslashes($category->cat_name);
|
$cat_name = stripslashes($category->cat_name);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ case 'edit':
|
||||||
<h2>Edit Category</h2>
|
<h2>Edit Category</h2>
|
||||||
<form name="editcat" action="categories.php" method="post">
|
<form name="editcat" action="categories.php" method="post">
|
||||||
<input type="hidden" name="action" value="editedcat" />
|
<input type="hidden" name="action" value="editedcat" />
|
||||||
<input type="hidden" name="cat_ID" value="<?php echo $HTTP_GET_VARS['cat_ID'] ?>" />
|
<input type="hidden" name="cat_ID" value="<?php echo $_GET['cat_ID'] ?>" />
|
||||||
<p>Category name:<br />
|
<p>Category name:<br />
|
||||||
<input type="text" name="cat_name" value="<?php echo $cat_name; ?>" /></p>
|
<input type="text" name="cat_name" value="<?php echo $cat_name; ?>" /></p>
|
||||||
<p>Category parent:<br />
|
<p>Category parent:<br />
|
||||||
|
@ -119,10 +119,10 @@ case 'editedcat':
|
||||||
if ($user_level < 3)
|
if ($user_level < 3)
|
||||||
die ('Cheatin’ uh?');
|
die ('Cheatin’ uh?');
|
||||||
|
|
||||||
$cat_name = addslashes(stripslashes(stripslashes($HTTP_POST_VARS['cat_name'])));
|
$cat_name = addslashes(stripslashes(stripslashes($_POST['cat_name'])));
|
||||||
$cat_ID = addslashes($HTTP_POST_VARS['cat_ID']);
|
$cat_ID = addslashes($_POST['cat_ID']);
|
||||||
$category_nicename = sanitize_title($cat_name);
|
$category_nicename = sanitize_title($cat_name);
|
||||||
$category_description = $HTTP_POST_VARS['category_description'];
|
$category_description = $_POST['category_description'];
|
||||||
|
|
||||||
$wpdb->query("UPDATE $tablecategories SET cat_name = '$cat_name', category_nicename = '$category_nicename', category_description = '$category_description', category_parent = $cat WHERE cat_ID = $cat_ID");
|
$wpdb->query("UPDATE $tablecategories SET cat_name = '$cat_name', category_nicename = '$category_nicename', category_description = '$category_description', category_parent = $cat WHERE cat_ID = $cat_ID");
|
||||||
|
|
||||||
|
|
|
@ -166,7 +166,7 @@ if ('publish' != $post_status || 0 == $post_ID) {
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<input name="referredby" type="hidden" id="referredby" value="<?php echo $HTTP_SERVER_VARS['HTTP_REFERER']; ?>" />
|
<input name="referredby" type="hidden" id="referredby" value="<?php echo $_SERVER['HTTP_REFERER']; ?>" />
|
||||||
</p>
|
</p>
|
||||||
<?php
|
<?php
|
||||||
if ('' != $pinged) {
|
if ('' != $pinged) {
|
||||||
|
|
|
@ -71,7 +71,7 @@ edCanvas = document.getElementById('content');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<p class="submit"><input type="submit" name="submit" value="<?php echo $submitbutton_text ?>" style="font-weight: bold;" tabindex="6" />
|
<p class="submit"><input type="submit" name="submit" value="<?php echo $submitbutton_text ?>" style="font-weight: bold;" tabindex="6" />
|
||||||
<input name="referredby" type="hidden" id="referredby" value="<?php echo $HTTP_SERVER_VARS['HTTP_REFERER']; ?>" />
|
<input name="referredby" type="hidden" id="referredby" value="<?php echo $_SERVER['HTTP_REFERER']; ?>" />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,7 @@ edCanvas = document.getElementById('content');
|
||||||
<?php if ('bookmarklet' != $mode) {
|
<?php if ('bookmarklet' != $mode) {
|
||||||
echo '<input name="advanced" type="submit" id="advancededit" tabindex="7" value="' . __('Advanced Editing »') . '" />';
|
echo '<input name="advanced" type="submit" id="advancededit" tabindex="7" value="' . __('Advanced Editing »') . '" />';
|
||||||
} ?>
|
} ?>
|
||||||
<input name="referredby" type="hidden" id="referredby" value="<?php echo $HTTP_SERVER_VARS['HTTP_REFERER']; ?>" />
|
<input name="referredby" type="hidden" id="referredby" value="<?php echo $_SERVER['HTTP_REFERER']; ?>" />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
if (!file_exists('../wp-config.php')) die("There doesn't seem to be a wp-config.php file. Double check that you updated wp-config.sample.php with the proper database connection information and renamed it to wp-config.php.");
|
if (!file_exists('../wp-config.php')) die("There doesn't seem to be a wp-config.php file. Double check that you updated wp-config.sample.php with the proper database connection information and renamed it to wp-config.php.");
|
||||||
require_once('../wp-config.php');
|
require_once('../wp-config.php');
|
||||||
require('upgrade-functions.php');
|
require('upgrade-functions.php');
|
||||||
$step = $HTTP_GET_VARS['step'];
|
$step = $_GET['step'];
|
||||||
if (!$step) $step = 0;
|
if (!$step) $step = 0;
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
|
@ -4,14 +4,14 @@ $wpvarstoreset = array('action');
|
||||||
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
||||||
$wpvar = $wpvarstoreset[$i];
|
$wpvar = $wpvarstoreset[$i];
|
||||||
if (!isset($$wpvar)) {
|
if (!isset($$wpvar)) {
|
||||||
if (empty($HTTP_POST_VARS["$wpvar"])) {
|
if (empty($_POST["$wpvar"])) {
|
||||||
if (empty($HTTP_GET_VARS["$wpvar"])) {
|
if (empty($_GET["$wpvar"])) {
|
||||||
$$wpvar = '';
|
$$wpvar = '';
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_GET_VARS["$wpvar"];
|
$$wpvar = $_GET["$wpvar"];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_POST_VARS["$wpvar"];
|
$$wpvar = $_POST["$wpvar"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,14 +12,14 @@ $wpvarstoreset = array('action', 'gmpath', 'archivespath');
|
||||||
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
||||||
$wpvar = $wpvarstoreset[$i];
|
$wpvar = $wpvarstoreset[$i];
|
||||||
if (!isset($$wpvar)) {
|
if (!isset($$wpvar)) {
|
||||||
if (empty($HTTP_POST_VARS["$wpvar"])) {
|
if (empty($_POST["$wpvar"])) {
|
||||||
if (empty($HTTP_GET_VARS["$wpvar"])) {
|
if (empty($_GET["$wpvar"])) {
|
||||||
$$wpvar = '';
|
$$wpvar = '';
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_GET_VARS["$wpvar"];
|
$$wpvar = $_GET["$wpvar"];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_POST_VARS["$wpvar"];
|
$$wpvar = $_POST["$wpvar"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ define('MTEXPORT', '');
|
||||||
if (!file_exists('../wp-config.php')) die("There doesn't seem to be a wp-config.php file. You must install WordPress before you import any entries.");
|
if (!file_exists('../wp-config.php')) die("There doesn't seem to be a wp-config.php file. You must install WordPress before you import any entries.");
|
||||||
require('../wp-config.php');
|
require('../wp-config.php');
|
||||||
|
|
||||||
$step = $HTTP_GET_VARS['step'];
|
$step = $_GET['step'];
|
||||||
if (!$step) $step = 0;
|
if (!$step) $step = 0;
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
|
@ -11,7 +11,7 @@ if (!file_exists('../wp-config.php')) die("There doesn't seem to be a wp-config.
|
||||||
require('../wp-config.php');
|
require('../wp-config.php');
|
||||||
require('upgrade-functions.php');
|
require('upgrade-functions.php');
|
||||||
|
|
||||||
$step = $HTTP_GET_VARS['step'];
|
$step = $_GET['step'];
|
||||||
if (!$step) $step = 0;
|
if (!$step) $step = 0;
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
|
@ -10,7 +10,7 @@ $configFile = file('../wp-config-sample.php');
|
||||||
|
|
||||||
if (!is_writable('../')) die("Sorry, I can't write to the directory. You'll have to either change the permissions on your WordPress directory or create your wp-config.php manually.");
|
if (!is_writable('../')) die("Sorry, I can't write to the directory. You'll have to either change the permissions on your WordPress directory or create your wp-config.php manually.");
|
||||||
|
|
||||||
$step = $HTTP_GET_VARS['step'];
|
$step = $_GET['step'];
|
||||||
if (!$step) $step = 0;
|
if (!$step) $step = 0;
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
@ -104,11 +104,11 @@ switch($step) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
$dbname = $HTTP_POST_VARS['dbname'];
|
$dbname = $_POST['dbname'];
|
||||||
$uname = $HTTP_POST_VARS['uname'];
|
$uname = $_POST['uname'];
|
||||||
$passwrd = $HTTP_POST_VARS['pwd'];
|
$passwrd = $_POST['pwd'];
|
||||||
$dbhost = $HTTP_POST_VARS['dbhost'];
|
$dbhost = $_POST['dbhost'];
|
||||||
$prefix = $HTTP_POST_VARS['prefix'];
|
$prefix = $_POST['prefix'];
|
||||||
if (empty($prefix)) $prefix = 'wp_';
|
if (empty($prefix)) $prefix = 'wp_';
|
||||||
|
|
||||||
// Test the db connection.
|
// Test the db connection.
|
||||||
|
|
|
@ -4,7 +4,7 @@ if (!file_exists('../wp-config.php')) die("There doesn't seem to be a wp-config.
|
||||||
require_once('../wp-config.php');
|
require_once('../wp-config.php');
|
||||||
require('upgrade-functions.php');
|
require('upgrade-functions.php');
|
||||||
|
|
||||||
$step = $HTTP_GET_VARS['step'];
|
$step = $_GET['step'];
|
||||||
if (!$step) $step = 0;
|
if (!$step) $step = 0;
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
|
@ -32,9 +32,9 @@ function add_magic_quotes($array) {
|
||||||
return $array;
|
return $array;
|
||||||
}
|
}
|
||||||
if (!get_magic_quotes_gpc()) {
|
if (!get_magic_quotes_gpc()) {
|
||||||
$HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS);
|
$_GET = add_magic_quotes($_GET);
|
||||||
$HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS);
|
$_POST = add_magic_quotes($_POST);
|
||||||
$HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
|
$_COOKIE = add_magic_quotes($_COOKIE);
|
||||||
}
|
}
|
||||||
|
|
||||||
$wpvarstoreset = array('action','standalone','cat_id', 'linkurl', 'name', 'image',
|
$wpvarstoreset = array('action','standalone','cat_id', 'linkurl', 'name', 'image',
|
||||||
|
@ -44,19 +44,19 @@ $wpvarstoreset = array('action','standalone','cat_id', 'linkurl', 'name', 'image
|
||||||
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
||||||
$wpvar = $wpvarstoreset[$i];
|
$wpvar = $wpvarstoreset[$i];
|
||||||
if (!isset($$wpvar)) {
|
if (!isset($$wpvar)) {
|
||||||
if (empty($HTTP_POST_VARS["$wpvar"])) {
|
if (empty($_POST["$wpvar"])) {
|
||||||
if (empty($HTTP_GET_VARS["$wpvar"])) {
|
if (empty($_GET["$wpvar"])) {
|
||||||
$$wpvar = '';
|
$$wpvar = '';
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_GET_VARS["$wpvar"];
|
$$wpvar = $_GET["$wpvar"];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_POST_VARS["$wpvar"];
|
$$wpvar = $_POST["$wpvar"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$link_url = stripslashes($HTTP_GET_VARS['linkurl']);
|
$link_url = stripslashes($_GET['linkurl']);
|
||||||
$link_name = htmlentities(stripslashes(urldecode($HTTP_GET_VARS['name'])));
|
$link_name = htmlentities(stripslashes(urldecode($_GET['name'])));
|
||||||
|
|
||||||
require('admin-header.php');
|
require('admin-header.php');
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -8,7 +8,7 @@ $parent_file = 'link-manager.php';
|
||||||
$title = 'Import Blogroll';
|
$title = 'Import Blogroll';
|
||||||
$this_file = 'link-import.php';
|
$this_file = 'link-import.php';
|
||||||
|
|
||||||
$step = $HTTP_POST_VARS['step'];
|
$step = $_POST['step'];
|
||||||
if (!$step) $step = 0;
|
if (!$step) $step = 0;
|
||||||
?>
|
?>
|
||||||
<?php
|
<?php
|
||||||
|
@ -88,12 +88,12 @@ switch ($step) {
|
||||||
|
|
||||||
<h2>Importing...</h2>
|
<h2>Importing...</h2>
|
||||||
<?php
|
<?php
|
||||||
$cat_id = $HTTP_POST_VARS['cat_id'];
|
$cat_id = $_POST['cat_id'];
|
||||||
if (($cat_id == '') || ($cat_id == 0)) {
|
if (($cat_id == '') || ($cat_id == 0)) {
|
||||||
$cat_id = 1;
|
$cat_id = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$opml_url = $HTTP_POST_VARS['opml_url'];
|
$opml_url = $_POST['opml_url'];
|
||||||
if (isset($opml_url) && $opml_url != '') {
|
if (isset($opml_url) && $opml_url != '') {
|
||||||
$blogrolling = true;
|
$blogrolling = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,9 +47,9 @@ function add_magic_quotes($array) {
|
||||||
return $array;
|
return $array;
|
||||||
}
|
}
|
||||||
if (!get_magic_quotes_gpc()) {
|
if (!get_magic_quotes_gpc()) {
|
||||||
$HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS);
|
$_GET = add_magic_quotes($_GET);
|
||||||
$HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS);
|
$_POST = add_magic_quotes($_POST);
|
||||||
$HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
|
$_COOKIE = add_magic_quotes($_COOKIE);
|
||||||
}
|
}
|
||||||
|
|
||||||
$wpvarstoreset = array('action','standalone','cat_id', 'linkurl', 'name', 'image',
|
$wpvarstoreset = array('action','standalone','cat_id', 'linkurl', 'name', 'image',
|
||||||
|
@ -60,20 +60,20 @@ $wpvarstoreset = array('action','standalone','cat_id', 'linkurl', 'name', 'image
|
||||||
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
||||||
$wpvar = $wpvarstoreset[$i];
|
$wpvar = $wpvarstoreset[$i];
|
||||||
if (!isset($$wpvar)) {
|
if (!isset($$wpvar)) {
|
||||||
if (empty($HTTP_POST_VARS["$wpvar"])) {
|
if (empty($_POST["$wpvar"])) {
|
||||||
if (empty($HTTP_GET_VARS["$wpvar"])) {
|
if (empty($_GET["$wpvar"])) {
|
||||||
$$wpvar = '';
|
$$wpvar = '';
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_GET_VARS["$wpvar"];
|
$$wpvar = $_GET["$wpvar"];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_POST_VARS["$wpvar"];
|
$$wpvar = $_POST["$wpvar"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$links_show_cat_id = $HTTP_COOKIE_VARS['links_show_cat_id_' . $cookiehash];
|
$links_show_cat_id = $_COOKIE['links_show_cat_id_' . $cookiehash];
|
||||||
$links_show_order = $HTTP_COOKIE_VARS['links_show_order_' . $cookiehash];
|
$links_show_order = $_COOKIE['links_show_order_' . $cookiehash];
|
||||||
|
|
||||||
if (!empty($action2)) {
|
if (!empty($action2)) {
|
||||||
$action = $action2;
|
$action = $action2;
|
||||||
|
@ -175,17 +175,17 @@ switch ($action) {
|
||||||
$standalone = 1;
|
$standalone = 1;
|
||||||
include_once('admin-header.php');
|
include_once('admin-header.php');
|
||||||
|
|
||||||
$link_url = $HTTP_POST_VARS['linkurl'];
|
$link_url = $_POST['linkurl'];
|
||||||
$link_name = $HTTP_POST_VARS['name'];
|
$link_name = $_POST['name'];
|
||||||
$link_image = $HTTP_POST_VARS['image'];
|
$link_image = $_POST['image'];
|
||||||
$link_target = $HTTP_POST_VARS['target'];
|
$link_target = $_POST['target'];
|
||||||
$link_category = $HTTP_POST_VARS['category'];
|
$link_category = $_POST['category'];
|
||||||
$link_description = $HTTP_POST_VARS['description'];
|
$link_description = $_POST['description'];
|
||||||
$link_visible = $HTTP_POST_VARS['visible'];
|
$link_visible = $_POST['visible'];
|
||||||
$link_rating = $HTTP_POST_VARS['rating'];
|
$link_rating = $_POST['rating'];
|
||||||
$link_rel = $HTTP_POST_VARS['rel'];
|
$link_rel = $_POST['rel'];
|
||||||
$link_notes = $HTTP_POST_VARS['notes'];
|
$link_notes = $_POST['notes'];
|
||||||
$link_rss_uri = $HTTP_POST_VARS['rss_uri'];
|
$link_rss_uri = $_POST['rss_uri'];
|
||||||
$auto_toggle = get_autotoggle($link_category);
|
$auto_toggle = get_autotoggle($link_category);
|
||||||
|
|
||||||
if ($user_level < get_settings('links_minadminlevel'))
|
if ($user_level < get_settings('links_minadminlevel'))
|
||||||
|
@ -202,7 +202,7 @@ switch ($action) {
|
||||||
. addslashes($link_image) . "', '$link_target', $link_category, '"
|
. addslashes($link_image) . "', '$link_target', $link_category, '"
|
||||||
. addslashes($link_description) . "', '$link_visible', $user_ID, $link_rating, '" . addslashes($link_rel) . "', '" . addslashes($link_notes) . "', '$link_rss_uri')");
|
. addslashes($link_description) . "', '$link_visible', $user_ID, $link_rating, '" . addslashes($link_rel) . "', '" . addslashes($link_notes) . "', '$link_rss_uri')");
|
||||||
|
|
||||||
header('Location: ' . $HTTP_SERVER_VARS['HTTP_REFERER']);
|
header('Location: ' . $_SERVER['HTTP_REFERER']);
|
||||||
break;
|
break;
|
||||||
} // end Add
|
} // end Add
|
||||||
|
|
||||||
|
@ -222,18 +222,18 @@ switch ($action) {
|
||||||
$standalone = 1;
|
$standalone = 1;
|
||||||
include_once('admin-header.php');
|
include_once('admin-header.php');
|
||||||
|
|
||||||
$link_id = $HTTP_POST_VARS['link_id'];
|
$link_id = $_POST['link_id'];
|
||||||
$link_url = $HTTP_POST_VARS['linkurl'];
|
$link_url = $_POST['linkurl'];
|
||||||
$link_name = $HTTP_POST_VARS['name'];
|
$link_name = $_POST['name'];
|
||||||
$link_image = $HTTP_POST_VARS['image'];
|
$link_image = $_POST['image'];
|
||||||
$link_target = $HTTP_POST_VARS['target'];
|
$link_target = $_POST['target'];
|
||||||
$link_category = $HTTP_POST_VARS['category'];
|
$link_category = $_POST['category'];
|
||||||
$link_description = $HTTP_POST_VARS['description'];
|
$link_description = $_POST['description'];
|
||||||
$link_visible = $HTTP_POST_VARS['visible'];
|
$link_visible = $_POST['visible'];
|
||||||
$link_rating = $HTTP_POST_VARS['rating'];
|
$link_rating = $_POST['rating'];
|
||||||
$link_rel = $HTTP_POST_VARS['rel'];
|
$link_rel = $_POST['rel'];
|
||||||
$link_notes = $HTTP_POST_VARS['notes'];
|
$link_notes = $_POST['notes'];
|
||||||
$link_rss_uri = $HTTP_POST_VARS['rss_uri'];
|
$link_rss_uri = $_POST['rss_uri'];
|
||||||
$auto_toggle = get_autotoggle($link_category);
|
$auto_toggle = get_autotoggle($link_category);
|
||||||
|
|
||||||
if ($user_level < get_settings('links_minadminlevel'))
|
if ($user_level < get_settings('links_minadminlevel'))
|
||||||
|
@ -265,7 +265,7 @@ switch ($action) {
|
||||||
$standalone = 1;
|
$standalone = 1;
|
||||||
include_once('admin-header.php');
|
include_once('admin-header.php');
|
||||||
|
|
||||||
$link_id = $HTTP_GET_VARS["link_id"];
|
$link_id = $_GET["link_id"];
|
||||||
|
|
||||||
if ($user_level < get_settings('links_minadminlevel'))
|
if ($user_level < get_settings('links_minadminlevel'))
|
||||||
die ("Cheatin' uh ?");
|
die ("Cheatin' uh ?");
|
||||||
|
@ -525,8 +525,8 @@ No</label></td>
|
||||||
} // end Show
|
} // end Show
|
||||||
case "popup":
|
case "popup":
|
||||||
{
|
{
|
||||||
$link_url = stripslashes($HTTP_GET_VARS["linkurl"]);
|
$link_url = stripslashes($_GET["linkurl"]);
|
||||||
$link_name = stripslashes($HTTP_GET_VARS["name"]);
|
$link_name = stripslashes($_GET["name"]);
|
||||||
//break; fall through
|
//break; fall through
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -15,30 +15,30 @@ function add_magic_quotes($array) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!get_magic_quotes_gpc()) {
|
if (!get_magic_quotes_gpc()) {
|
||||||
$HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS);
|
$_GET = add_magic_quotes($_GET);
|
||||||
$HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS);
|
$_POST = add_magic_quotes($_POST);
|
||||||
$HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
|
$_COOKIE = add_magic_quotes($_COOKIE);
|
||||||
}
|
}
|
||||||
|
|
||||||
$wpvarstoreset = array('action','item_ignored','item_deleted','item_approved');
|
$wpvarstoreset = array('action','item_ignored','item_deleted','item_approved');
|
||||||
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
||||||
$wpvar = $wpvarstoreset[$i];
|
$wpvar = $wpvarstoreset[$i];
|
||||||
if (!isset($$wpvar)) {
|
if (!isset($$wpvar)) {
|
||||||
if (empty($HTTP_POST_VARS["$wpvar"])) {
|
if (empty($_POST["$wpvar"])) {
|
||||||
if (empty($HTTP_GET_VARS["$wpvar"])) {
|
if (empty($_GET["$wpvar"])) {
|
||||||
$$wpvar = '';
|
$$wpvar = '';
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_GET_VARS["$wpvar"];
|
$$wpvar = $_GET["$wpvar"];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_POST_VARS["$wpvar"];
|
$$wpvar = $_POST["$wpvar"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$comment = array();
|
$comment = array();
|
||||||
if (isset($HTTP_POST_VARS["comment"])) {
|
if (isset($_POST["comment"])) {
|
||||||
foreach ($HTTP_POST_VARS["comment"] as $k => $v) {
|
foreach ($_POST["comment"] as $k => $v) {
|
||||||
$comment[intval($k)] = $v;
|
$comment[intval($k)] = $v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,23 +14,23 @@ function add_magic_quotes($array) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!get_magic_quotes_gpc()) {
|
if (!get_magic_quotes_gpc()) {
|
||||||
$HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS);
|
$_GET = add_magic_quotes($_GET);
|
||||||
$HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS);
|
$_POST = add_magic_quotes($_POST);
|
||||||
$HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
|
$_COOKIE = add_magic_quotes($_COOKIE);
|
||||||
}
|
}
|
||||||
|
|
||||||
$wpvarstoreset = array('action','standalone', 'option_group_id');
|
$wpvarstoreset = array('action','standalone', 'option_group_id');
|
||||||
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
||||||
$wpvar = $wpvarstoreset[$i];
|
$wpvar = $wpvarstoreset[$i];
|
||||||
if (!isset($$wpvar)) {
|
if (!isset($$wpvar)) {
|
||||||
if (empty($HTTP_POST_VARS["$wpvar"])) {
|
if (empty($_POST["$wpvar"])) {
|
||||||
if (empty($HTTP_GET_VARS["$wpvar"])) {
|
if (empty($_GET["$wpvar"])) {
|
||||||
$$wpvar = '';
|
$$wpvar = '';
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_GET_VARS["$wpvar"];
|
$$wpvar = $_GET["$wpvar"];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_POST_VARS["$wpvar"];
|
$$wpvar = $_POST["$wpvar"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,23 +13,23 @@ function add_magic_quotes($array) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!get_magic_quotes_gpc()) {
|
if (!get_magic_quotes_gpc()) {
|
||||||
$HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS);
|
$_GET = add_magic_quotes($_GET);
|
||||||
$HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS);
|
$_POST = add_magic_quotes($_POST);
|
||||||
$HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
|
$_COOKIE = add_magic_quotes($_COOKIE);
|
||||||
}
|
}
|
||||||
|
|
||||||
$wpvarstoreset = array('action','standalone', 'option_group_id');
|
$wpvarstoreset = array('action','standalone', 'option_group_id');
|
||||||
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
||||||
$wpvar = $wpvarstoreset[$i];
|
$wpvar = $wpvarstoreset[$i];
|
||||||
if (!isset($$wpvar)) {
|
if (!isset($$wpvar)) {
|
||||||
if (empty($HTTP_POST_VARS["$wpvar"])) {
|
if (empty($_POST["$wpvar"])) {
|
||||||
if (empty($HTTP_GET_VARS["$wpvar"])) {
|
if (empty($_GET["$wpvar"])) {
|
||||||
$$wpvar = '';
|
$$wpvar = '';
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_GET_VARS["$wpvar"];
|
$$wpvar = $_GET["$wpvar"];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_POST_VARS["$wpvar"];
|
$$wpvar = $_POST["$wpvar"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,23 +14,23 @@ function add_magic_quotes($array) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!get_magic_quotes_gpc()) {
|
if (!get_magic_quotes_gpc()) {
|
||||||
$HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS);
|
$_GET = add_magic_quotes($_GET);
|
||||||
$HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS);
|
$_POST = add_magic_quotes($_POST);
|
||||||
$HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
|
$_COOKIE = add_magic_quotes($_COOKIE);
|
||||||
}
|
}
|
||||||
|
|
||||||
$wpvarstoreset = array('action','standalone', 'option_group_id');
|
$wpvarstoreset = array('action','standalone', 'option_group_id');
|
||||||
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
||||||
$wpvar = $wpvarstoreset[$i];
|
$wpvar = $wpvarstoreset[$i];
|
||||||
if (!isset($$wpvar)) {
|
if (!isset($$wpvar)) {
|
||||||
if (empty($HTTP_POST_VARS["$wpvar"])) {
|
if (empty($_POST["$wpvar"])) {
|
||||||
if (empty($HTTP_GET_VARS["$wpvar"])) {
|
if (empty($_GET["$wpvar"])) {
|
||||||
$$wpvar = '';
|
$$wpvar = '';
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_GET_VARS["$wpvar"];
|
$$wpvar = $_GET["$wpvar"];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_POST_VARS["$wpvar"];
|
$$wpvar = $_POST["$wpvar"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,32 +14,32 @@ function add_magic_quotes($array) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!get_magic_quotes_gpc()) {
|
if (!get_magic_quotes_gpc()) {
|
||||||
$HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS);
|
$_GET = add_magic_quotes($_GET);
|
||||||
$HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS);
|
$_POST = add_magic_quotes($_POST);
|
||||||
$HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
|
$_COOKIE = add_magic_quotes($_COOKIE);
|
||||||
}
|
}
|
||||||
|
|
||||||
$wpvarstoreset = array('action','standalone', 'option_group_id');
|
$wpvarstoreset = array('action','standalone', 'option_group_id');
|
||||||
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
||||||
$wpvar = $wpvarstoreset[$i];
|
$wpvar = $wpvarstoreset[$i];
|
||||||
if (!isset($$wpvar)) {
|
if (!isset($$wpvar)) {
|
||||||
if (empty($HTTP_POST_VARS["$wpvar"])) {
|
if (empty($_POST["$wpvar"])) {
|
||||||
if (empty($HTTP_GET_VARS["$wpvar"])) {
|
if (empty($_GET["$wpvar"])) {
|
||||||
$$wpvar = '';
|
$$wpvar = '';
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_GET_VARS["$wpvar"];
|
$$wpvar = $_GET["$wpvar"];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_POST_VARS["$wpvar"];
|
$$wpvar = $_POST["$wpvar"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once('optionhandler.php');
|
require_once('optionhandler.php');
|
||||||
|
|
||||||
if ($HTTP_POST_VARS['Submit'] == 'Update') {
|
if ($_POST['Submit'] == 'Update') {
|
||||||
update_option('permalink_structure', $HTTP_POST_VARS['permalink_structure']);
|
update_option('permalink_structure', $_POST['permalink_structure']);
|
||||||
$permalink_structure = $HTTP_POST_VARS['permalink_structure'];
|
$permalink_structure = $_POST['permalink_structure'];
|
||||||
} else {
|
} else {
|
||||||
$permalink_structure = get_settings('permalink_structure');
|
$permalink_structure = get_settings('permalink_structure');
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,23 +14,23 @@ function add_magic_quotes($array) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!get_magic_quotes_gpc()) {
|
if (!get_magic_quotes_gpc()) {
|
||||||
$HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS);
|
$_GET = add_magic_quotes($_GET);
|
||||||
$HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS);
|
$_POST = add_magic_quotes($_POST);
|
||||||
$HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
|
$_COOKIE = add_magic_quotes($_COOKIE);
|
||||||
}
|
}
|
||||||
|
|
||||||
$wpvarstoreset = array('action','standalone', 'option_group_id');
|
$wpvarstoreset = array('action','standalone', 'option_group_id');
|
||||||
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
||||||
$wpvar = $wpvarstoreset[$i];
|
$wpvar = $wpvarstoreset[$i];
|
||||||
if (!isset($$wpvar)) {
|
if (!isset($$wpvar)) {
|
||||||
if (empty($HTTP_POST_VARS["$wpvar"])) {
|
if (empty($_POST["$wpvar"])) {
|
||||||
if (empty($HTTP_GET_VARS["$wpvar"])) {
|
if (empty($_GET["$wpvar"])) {
|
||||||
$$wpvar = '';
|
$$wpvar = '';
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_GET_VARS["$wpvar"];
|
$$wpvar = $_GET["$wpvar"];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_POST_VARS["$wpvar"];
|
$$wpvar = $_POST["$wpvar"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,23 +14,23 @@ function add_magic_quotes($array) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!get_magic_quotes_gpc()) {
|
if (!get_magic_quotes_gpc()) {
|
||||||
$HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS);
|
$_GET = add_magic_quotes($_GET);
|
||||||
$HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS);
|
$_POST = add_magic_quotes($_POST);
|
||||||
$HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
|
$_COOKIE = add_magic_quotes($_COOKIE);
|
||||||
}
|
}
|
||||||
|
|
||||||
$wpvarstoreset = array('action','standalone', 'option_group_id');
|
$wpvarstoreset = array('action','standalone', 'option_group_id');
|
||||||
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
||||||
$wpvar = $wpvarstoreset[$i];
|
$wpvar = $wpvarstoreset[$i];
|
||||||
if (!isset($$wpvar)) {
|
if (!isset($$wpvar)) {
|
||||||
if (empty($HTTP_POST_VARS["$wpvar"])) {
|
if (empty($_POST["$wpvar"])) {
|
||||||
if (empty($HTTP_GET_VARS["$wpvar"])) {
|
if (empty($_GET["$wpvar"])) {
|
||||||
$$wpvar = '';
|
$$wpvar = '';
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_GET_VARS["$wpvar"];
|
$$wpvar = $_GET["$wpvar"];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_POST_VARS["$wpvar"];
|
$$wpvar = $_POST["$wpvar"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,23 +15,23 @@ function add_magic_quotes($array) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!get_magic_quotes_gpc()) {
|
if (!get_magic_quotes_gpc()) {
|
||||||
$HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS);
|
$_GET = add_magic_quotes($_GET);
|
||||||
$HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS);
|
$_POST = add_magic_quotes($_POST);
|
||||||
$HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
|
$_COOKIE = add_magic_quotes($_COOKIE);
|
||||||
}
|
}
|
||||||
|
|
||||||
$wpvarstoreset = array('action','standalone', 'option_group_id');
|
$wpvarstoreset = array('action','standalone', 'option_group_id');
|
||||||
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
||||||
$wpvar = $wpvarstoreset[$i];
|
$wpvar = $wpvarstoreset[$i];
|
||||||
if (!isset($$wpvar)) {
|
if (!isset($$wpvar)) {
|
||||||
if (empty($HTTP_POST_VARS["$wpvar"])) {
|
if (empty($_POST["$wpvar"])) {
|
||||||
if (empty($HTTP_GET_VARS["$wpvar"])) {
|
if (empty($_GET["$wpvar"])) {
|
||||||
$$wpvar = '';
|
$$wpvar = '';
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_GET_VARS["$wpvar"];
|
$$wpvar = $_GET["$wpvar"];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_POST_VARS["$wpvar"];
|
$$wpvar = $_POST["$wpvar"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,9 +15,9 @@ function add_magic_quotes($array) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!get_magic_quotes_gpc()) {
|
if (!get_magic_quotes_gpc()) {
|
||||||
$HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS);
|
$_GET = add_magic_quotes($_GET);
|
||||||
$HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS);
|
$_POST = add_magic_quotes($_POST);
|
||||||
$HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
|
$_COOKIE = add_magic_quotes($_COOKIE);
|
||||||
}
|
}
|
||||||
|
|
||||||
$wpvarstoreset = array('action', 'safe_mode', 'withcomments', 'posts', 'poststart', 'postend', 'content', 'edited_post_title', 'comment_error', 'profile', 'trackback_url', 'excerpt', 'showcomments', 'commentstart', 'commentend', 'commentorder');
|
$wpvarstoreset = array('action', 'safe_mode', 'withcomments', 'posts', 'poststart', 'postend', 'content', 'edited_post_title', 'comment_error', 'profile', 'trackback_url', 'excerpt', 'showcomments', 'commentstart', 'commentend', 'commentorder');
|
||||||
|
@ -25,14 +25,14 @@ $wpvarstoreset = array('action', 'safe_mode', 'withcomments', 'posts', 'poststar
|
||||||
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
||||||
$wpvar = $wpvarstoreset[$i];
|
$wpvar = $wpvarstoreset[$i];
|
||||||
if (!isset($$wpvar)) {
|
if (!isset($$wpvar)) {
|
||||||
if (empty($HTTP_POST_VARS["$wpvar"])) {
|
if (empty($_POST["$wpvar"])) {
|
||||||
if (empty($HTTP_GET_VARS["$wpvar"])) {
|
if (empty($_GET["$wpvar"])) {
|
||||||
$$wpvar = '';
|
$$wpvar = '';
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_GET_VARS["$wpvar"];
|
$$wpvar = $_GET["$wpvar"];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_POST_VARS["$wpvar"];
|
$$wpvar = $_POST["$wpvar"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,43 +58,43 @@ switch($action) {
|
||||||
$standalone = 1;
|
$standalone = 1;
|
||||||
require_once('admin-header.php');
|
require_once('admin-header.php');
|
||||||
|
|
||||||
$post_pingback = intval($HTTP_POST_VARS['post_pingback']);
|
$post_pingback = intval($_POST['post_pingback']);
|
||||||
$content = balanceTags($HTTP_POST_VARS['content']);
|
$content = balanceTags($_POST['content']);
|
||||||
$content = format_to_post($content);
|
$content = format_to_post($content);
|
||||||
$excerpt = balanceTags($HTTP_POST_VARS['excerpt']);
|
$excerpt = balanceTags($_POST['excerpt']);
|
||||||
$excerpt = format_to_post($excerpt);
|
$excerpt = format_to_post($excerpt);
|
||||||
$post_title = addslashes($HTTP_POST_VARS['post_title']);
|
$post_title = addslashes($_POST['post_title']);
|
||||||
$post_categories = $HTTP_POST_VARS['post_category'];
|
$post_categories = $_POST['post_category'];
|
||||||
if(get_settings('use_geo_positions')) {
|
if(get_settings('use_geo_positions')) {
|
||||||
$latstr = $HTTP_POST_VARS['post_latf'];
|
$latstr = $_POST['post_latf'];
|
||||||
$lonstr = $HTTP_POST_VARS['post_lonf'];
|
$lonstr = $_POST['post_lonf'];
|
||||||
if((strlen($latstr) > 2) && (strlen($lonstr) > 2 ) ) {
|
if((strlen($latstr) > 2) && (strlen($lonstr) > 2 ) ) {
|
||||||
$post_latf = floatval($HTTP_POST_VARS['post_latf']);
|
$post_latf = floatval($_POST['post_latf']);
|
||||||
$post_lonf = floatval($HTTP_POST_VARS['post_lonf']);
|
$post_lonf = floatval($_POST['post_lonf']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$post_status = $HTTP_POST_VARS['post_status'];
|
$post_status = $_POST['post_status'];
|
||||||
if (empty($post_status)) $post_status = get_settings('default_post_status');
|
if (empty($post_status)) $post_status = get_settings('default_post_status');
|
||||||
$comment_status = $HTTP_POST_VARS['comment_status'];
|
$comment_status = $_POST['comment_status'];
|
||||||
if (empty($comment_status)) $comment_status = get_settings('default_comment_status');
|
if (empty($comment_status)) $comment_status = get_settings('default_comment_status');
|
||||||
$ping_status = $HTTP_POST_VARS['ping_status'];
|
$ping_status = $_POST['ping_status'];
|
||||||
if (empty($ping_status)) $ping_status = get_settings('default_ping_status');
|
if (empty($ping_status)) $ping_status = get_settings('default_ping_status');
|
||||||
$post_password = addslashes(stripslashes($HTTP_POST_VARS['post_password']));
|
$post_password = addslashes(stripslashes($_POST['post_password']));
|
||||||
$post_name = sanitize_title($post_title);
|
$post_name = sanitize_title($post_title);
|
||||||
$trackback = $HTTP_POST_VARS['trackback_url'];
|
$trackback = $_POST['trackback_url'];
|
||||||
// Format trackbacks
|
// Format trackbacks
|
||||||
$trackback = preg_replace('|\s+|', '\n', $trackback);
|
$trackback = preg_replace('|\s+|', '\n', $trackback);
|
||||||
|
|
||||||
if ($user_level == 0)
|
if ($user_level == 0)
|
||||||
die (__('Cheatin’ uh?'));
|
die (__('Cheatin’ uh?'));
|
||||||
|
|
||||||
if (($user_level > 4) && (!empty($HTTP_POST_VARS['edit_date']))) {
|
if (($user_level > 4) && (!empty($_POST['edit_date']))) {
|
||||||
$aa = $HTTP_POST_VARS['aa'];
|
$aa = $_POST['aa'];
|
||||||
$mm = $HTTP_POST_VARS['mm'];
|
$mm = $_POST['mm'];
|
||||||
$jj = $HTTP_POST_VARS['jj'];
|
$jj = $_POST['jj'];
|
||||||
$hh = $HTTP_POST_VARS['hh'];
|
$hh = $_POST['hh'];
|
||||||
$mn = $HTTP_POST_VARS['mn'];
|
$mn = $_POST['mn'];
|
||||||
$ss = $HTTP_POST_VARS['ss'];
|
$ss = $_POST['ss'];
|
||||||
$jj = ($jj > 31) ? 31 : $jj;
|
$jj = ($jj > 31) ? 31 : $jj;
|
||||||
$hh = ($hh > 23) ? $hh - 24 : $hh;
|
$hh = ($hh > 23) ? $hh - 24 : $hh;
|
||||||
$mn = ($mn > 59) ? $mn - 60 : $mn;
|
$mn = ($mn > 59) ? $mn - 60 : $mn;
|
||||||
|
@ -106,8 +106,8 @@ switch($action) {
|
||||||
$now_gmt = current_time('mysql', 1);
|
$now_gmt = current_time('mysql', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($HTTP_POST_VARS['mode'])) {
|
if (!empty($_POST['mode'])) {
|
||||||
switch($HTTP_POST_VARS['mode']) {
|
switch($_POST['mode']) {
|
||||||
case 'bookmarklet':
|
case 'bookmarklet':
|
||||||
$location = 'bookmarklet.php?a=b';
|
$location = 'bookmarklet.php?a=b';
|
||||||
break;
|
break;
|
||||||
|
@ -123,10 +123,10 @@ switch($action) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// What to do based on which button they pressed
|
// What to do based on which button they pressed
|
||||||
if ('' != $HTTP_POST_VARS['saveasdraft']) $post_status = 'draft';
|
if ('' != $_POST['saveasdraft']) $post_status = 'draft';
|
||||||
if ('' != $HTTP_POST_VARS['saveasprivate']) $post_status = 'private';
|
if ('' != $_POST['saveasprivate']) $post_status = 'private';
|
||||||
if ('' != $HTTP_POST_VARS['publish']) $post_status = 'publish';
|
if ('' != $_POST['publish']) $post_status = 'publish';
|
||||||
if ('' != $HTTP_POST_VARS['advanced']) $post_status = 'draft';
|
if ('' != $_POST['advanced']) $post_status = 'draft';
|
||||||
|
|
||||||
|
|
||||||
if((get_settings('use_geo_positions')) && (strlen($latstr) > 2) && (strlen($lonstr) > 2) ) {
|
if((get_settings('use_geo_positions')) && (strlen($latstr) > 2) && (strlen($lonstr) > 2) ) {
|
||||||
|
@ -147,7 +147,7 @@ switch($action) {
|
||||||
|
|
||||||
$post_ID = $wpdb->get_var("SELECT ID FROM $tableposts ORDER BY ID DESC LIMIT 1");
|
$post_ID = $wpdb->get_var("SELECT ID FROM $tableposts ORDER BY ID DESC LIMIT 1");
|
||||||
|
|
||||||
if ('' != $HTTP_POST_VARS['advanced'])
|
if ('' != $_POST['advanced'])
|
||||||
$location = "post.php?action=edit&post=$post_ID";
|
$location = "post.php?action=edit&post=$post_ID";
|
||||||
|
|
||||||
|
|
||||||
|
@ -219,7 +219,7 @@ switch($action) {
|
||||||
$standalone = 0;
|
$standalone = 0;
|
||||||
require_once('admin-header.php');
|
require_once('admin-header.php');
|
||||||
|
|
||||||
$post = $HTTP_GET_VARS['post'];
|
$post = $_GET['post'];
|
||||||
if ($user_level > 0) {
|
if ($user_level > 0) {
|
||||||
$postdata = get_postdata($post);
|
$postdata = get_postdata($post);
|
||||||
$authordata = get_userdata($postdata['Author_ID']);
|
$authordata = get_userdata($postdata['Author_ID']);
|
||||||
|
@ -277,18 +277,18 @@ When you’re promoted, just reload this page and you’ll be able to bl
|
||||||
if (!isset($blog_ID)) {
|
if (!isset($blog_ID)) {
|
||||||
$blog_ID = 1;
|
$blog_ID = 1;
|
||||||
}
|
}
|
||||||
$post_ID = $HTTP_POST_VARS['post_ID'];
|
$post_ID = $_POST['post_ID'];
|
||||||
$post_categories = $HTTP_POST_VARS['post_category'];
|
$post_categories = $_POST['post_category'];
|
||||||
if (!$post_categories) $post_categories[] = 1;
|
if (!$post_categories) $post_categories[] = 1;
|
||||||
$post_autobr = intval($HTTP_POST_VARS['post_autobr']);
|
$post_autobr = intval($_POST['post_autobr']);
|
||||||
$content = balanceTags($HTTP_POST_VARS['content']);
|
$content = balanceTags($_POST['content']);
|
||||||
$content = format_to_post($content);
|
$content = format_to_post($content);
|
||||||
$excerpt = balanceTags($HTTP_POST_VARS['excerpt']);
|
$excerpt = balanceTags($_POST['excerpt']);
|
||||||
$excerpt = format_to_post($excerpt);
|
$excerpt = format_to_post($excerpt);
|
||||||
$post_title = addslashes($HTTP_POST_VARS['post_title']);
|
$post_title = addslashes($_POST['post_title']);
|
||||||
if(get_settings('use_geo_positions')) {
|
if(get_settings('use_geo_positions')) {
|
||||||
$latf = floatval($HTTP_POST_VARS["post_latf"]);
|
$latf = floatval($_POST["post_latf"]);
|
||||||
$lonf = floatval($HTTP_POST_VARS["post_lonf"]);
|
$lonf = floatval($_POST["post_lonf"]);
|
||||||
$latlonaddition = "";
|
$latlonaddition = "";
|
||||||
if( ($latf != null) && ($latf <= 90 ) && ($latf >= -90) && ($lonf != null) && ($lonf <= 360) && ($lonf >= -360) ) {
|
if( ($latf != null) && ($latf <= 90 ) && ($latf >= -90) && ($lonf != null) && ($lonf <= 360) && ($lonf >= -360) ) {
|
||||||
pingGeoUrl($post_ID);
|
pingGeoUrl($post_ID);
|
||||||
|
@ -297,28 +297,28 @@ When you’re promoted, just reload this page and you’ll be able to bl
|
||||||
$latlonaddition = " post_lat=null, post_lon=null, ";
|
$latlonaddition = " post_lat=null, post_lon=null, ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$prev_status = $HTTP_POST_VARS['prev_status'];
|
$prev_status = $_POST['prev_status'];
|
||||||
$post_status = $HTTP_POST_VARS['post_status'];
|
$post_status = $_POST['post_status'];
|
||||||
$comment_status = $HTTP_POST_VARS['comment_status'];
|
$comment_status = $_POST['comment_status'];
|
||||||
if (empty($comment_status)) $comment_status = get_settings('default_comment_status');
|
if (empty($comment_status)) $comment_status = get_settings('default_comment_status');
|
||||||
$ping_status = $HTTP_POST_VARS['ping_status'];
|
$ping_status = $_POST['ping_status'];
|
||||||
if (empty($ping_status)) $ping_status = get_settings('default_ping_status');
|
if (empty($ping_status)) $ping_status = get_settings('default_ping_status');
|
||||||
$post_password = addslashes($HTTP_POST_VARS['post_password']);
|
$post_password = addslashes($_POST['post_password']);
|
||||||
$post_name = sanitize_title($_POST['post_name']);
|
$post_name = sanitize_title($_POST['post_name']);
|
||||||
if (empty($post_name)) $post_name = sanitize_title($post_title);
|
if (empty($post_name)) $post_name = sanitize_title($post_title);
|
||||||
$trackback = $HTTP_POST_VARS['trackback_url'];
|
$trackback = $_POST['trackback_url'];
|
||||||
// Format trackbacks
|
// Format trackbacks
|
||||||
$trackback = preg_replace('|\s+|', '\n', $trackback);
|
$trackback = preg_replace('|\s+|', '\n', $trackback);
|
||||||
|
|
||||||
if ('' != $HTTP_POST_VARS['publish']) $post_status = 'publish';
|
if ('' != $_POST['publish']) $post_status = 'publish';
|
||||||
|
|
||||||
if (($user_level > 4) && (!empty($HTTP_POST_VARS['edit_date']))) {
|
if (($user_level > 4) && (!empty($_POST['edit_date']))) {
|
||||||
$aa = $HTTP_POST_VARS['aa'];
|
$aa = $_POST['aa'];
|
||||||
$mm = $HTTP_POST_VARS['mm'];
|
$mm = $_POST['mm'];
|
||||||
$jj = $HTTP_POST_VARS['jj'];
|
$jj = $_POST['jj'];
|
||||||
$hh = $HTTP_POST_VARS['hh'];
|
$hh = $_POST['hh'];
|
||||||
$mn = $HTTP_POST_VARS['mn'];
|
$mn = $_POST['mn'];
|
||||||
$ss = $HTTP_POST_VARS['ss'];
|
$ss = $_POST['ss'];
|
||||||
$jj = ($jj > 31) ? 31 : $jj;
|
$jj = ($jj > 31) ? 31 : $jj;
|
||||||
$hh = ($hh > 23) ? $hh - 24 : $hh;
|
$hh = ($hh > 23) ? $hh - 24 : $hh;
|
||||||
$mn = ($mn > 59) ? $mn - 60 : $mn;
|
$mn = ($mn > 59) ? $mn - 60 : $mn;
|
||||||
|
@ -399,8 +399,8 @@ When you’re promoted, just reload this page and you’ll be able to bl
|
||||||
|
|
||||||
add_meta($post_ID);
|
add_meta($post_ID);
|
||||||
|
|
||||||
if ($HTTP_POST_VARS['save']) {
|
if ($_POST['save']) {
|
||||||
$location = $HTTP_SERVER_VARS['HTTP_REFERER'];
|
$location = $_SERVER['HTTP_REFERER'];
|
||||||
} else {
|
} else {
|
||||||
$location = 'post.php';
|
$location = 'post.php';
|
||||||
}
|
}
|
||||||
|
@ -416,7 +416,7 @@ When you’re promoted, just reload this page and you’ll be able to bl
|
||||||
if ($user_level == 0)
|
if ($user_level == 0)
|
||||||
die ('Cheatin’ uh?');
|
die ('Cheatin’ uh?');
|
||||||
|
|
||||||
$post_id = intval($HTTP_GET_VARS['post']);
|
$post_id = intval($_GET['post']);
|
||||||
$postdata = get_postdata($post_id) or die(sprintf(__('Oops, no post with this ID. <a href="%s">Go back</a>!'), 'post.php'));
|
$postdata = get_postdata($post_id) or die(sprintf(__('Oops, no post with this ID. <a href="%s">Go back</a>!'), 'post.php'));
|
||||||
$authordata = get_userdata($postdata['Author_ID']);
|
$authordata = get_userdata($postdata['Author_ID']);
|
||||||
|
|
||||||
|
@ -444,7 +444,7 @@ When you’re promoted, just reload this page and you’ll be able to bl
|
||||||
sleep($sleep_after_edit);
|
sleep($sleep_after_edit);
|
||||||
}
|
}
|
||||||
|
|
||||||
$sendback = $HTTP_SERVER_VARS['HTTP_REFERER'];
|
$sendback = $_SERVER['HTTP_REFERER'];
|
||||||
if (strstr($sendback, 'post.php')) $sendback = get_settings('siteurl') .'/wp-admin/post.php';
|
if (strstr($sendback, 'post.php')) $sendback = get_settings('siteurl') .'/wp-admin/post.php';
|
||||||
header ('Location: ' . $sendback);
|
header ('Location: ' . $sendback);
|
||||||
do_action('delete_post', $post_ID);
|
do_action('delete_post', $post_ID);
|
||||||
|
@ -462,7 +462,7 @@ When you’re promoted, just reload this page and you’ll be able to bl
|
||||||
die (__('Cheatin’ uh?'));
|
die (__('Cheatin’ uh?'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$comment = $HTTP_GET_VARS['comment'];
|
$comment = $_GET['comment'];
|
||||||
$commentdata = get_commentdata($comment, 1, true) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'javascript:history.go(-1)'));
|
$commentdata = get_commentdata($comment, 1, true) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'javascript:history.go(-1)'));
|
||||||
$content = $commentdata['comment_content'];
|
$content = $commentdata['comment_content'];
|
||||||
$content = format_to_edit($content);
|
$content = format_to_edit($content);
|
||||||
|
@ -479,8 +479,8 @@ When you’re promoted, just reload this page and you’ll be able to bl
|
||||||
if ($user_level == 0)
|
if ($user_level == 0)
|
||||||
die (__('Cheatin’ uh?'));
|
die (__('Cheatin’ uh?'));
|
||||||
|
|
||||||
$comment = $HTTP_GET_VARS['comment'];
|
$comment = $_GET['comment'];
|
||||||
$p = $HTTP_GET_VARS['p'];
|
$p = $_GET['p'];
|
||||||
$commentdata = get_commentdata($comment, 1, true) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php'));
|
$commentdata = get_commentdata($comment, 1, true) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php'));
|
||||||
|
|
||||||
echo "<div class=\"wrap\">\n";
|
echo "<div class=\"wrap\">\n";
|
||||||
|
@ -515,9 +515,9 @@ When you’re promoted, just reload this page and you’ll be able to bl
|
||||||
die (__('Cheatin’ uh?'));
|
die (__('Cheatin’ uh?'));
|
||||||
|
|
||||||
|
|
||||||
$comment = $HTTP_GET_VARS['comment'];
|
$comment = $_GET['comment'];
|
||||||
$p = $HTTP_GET_VARS['p'];
|
$p = $_GET['p'];
|
||||||
if (isset($HTTP_GET_VARS['noredir'])) {
|
if (isset($_GET['noredir'])) {
|
||||||
$noredir = true;
|
$noredir = true;
|
||||||
} else {
|
} else {
|
||||||
$noredir = false;
|
$noredir = false;
|
||||||
|
@ -533,8 +533,8 @@ When you’re promoted, just reload this page and you’ll be able to bl
|
||||||
wp_set_comment_status($comment, "delete");
|
wp_set_comment_status($comment, "delete");
|
||||||
do_action('delete_comment', $comment);
|
do_action('delete_comment', $comment);
|
||||||
|
|
||||||
if (($HTTP_SERVER_VARS['HTTP_REFERER'] != "") && (false == $noredir)) {
|
if (($_SERVER['HTTP_REFERER'] != "") && (false == $noredir)) {
|
||||||
header('Location: ' . $HTTP_SERVER_VARS['HTTP_REFERER']);
|
header('Location: ' . $_SERVER['HTTP_REFERER']);
|
||||||
} else {
|
} else {
|
||||||
header('Location: '. get_settings('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments');
|
header('Location: '. get_settings('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments');
|
||||||
}
|
}
|
||||||
|
@ -549,9 +549,9 @@ When you’re promoted, just reload this page and you’ll be able to bl
|
||||||
if ($user_level == 0)
|
if ($user_level == 0)
|
||||||
die (__('Cheatin’ uh?'));
|
die (__('Cheatin’ uh?'));
|
||||||
|
|
||||||
$comment = $HTTP_GET_VARS['comment'];
|
$comment = $_GET['comment'];
|
||||||
$p = $HTTP_GET_VARS['p'];
|
$p = $_GET['p'];
|
||||||
if (isset($HTTP_GET_VARS['noredir'])) {
|
if (isset($_GET['noredir'])) {
|
||||||
$noredir = true;
|
$noredir = true;
|
||||||
} else {
|
} else {
|
||||||
$noredir = false;
|
$noredir = false;
|
||||||
|
@ -561,8 +561,8 @@ When you’re promoted, just reload this page and you’ll be able to bl
|
||||||
|
|
||||||
wp_set_comment_status($comment, "hold");
|
wp_set_comment_status($comment, "hold");
|
||||||
|
|
||||||
if (($HTTP_SERVER_VARS['HTTP_REFERER'] != "") && (false == $noredir)) {
|
if (($_SERVER['HTTP_REFERER'] != "") && (false == $noredir)) {
|
||||||
header('Location: ' . $HTTP_SERVER_VARS['HTTP_REFERER']);
|
header('Location: ' . $_SERVER['HTTP_REFERER']);
|
||||||
} else {
|
} else {
|
||||||
header('Location: '. get_settings('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments');
|
header('Location: '. get_settings('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments');
|
||||||
}
|
}
|
||||||
|
@ -577,8 +577,8 @@ When you’re promoted, just reload this page and you’ll be able to bl
|
||||||
if ($user_level == 0)
|
if ($user_level == 0)
|
||||||
die (__('Cheatin’ uh?'));
|
die (__('Cheatin’ uh?'));
|
||||||
|
|
||||||
$comment = $HTTP_GET_VARS['comment'];
|
$comment = $_GET['comment'];
|
||||||
$p = $HTTP_GET_VARS['p'];
|
$p = $_GET['p'];
|
||||||
$commentdata = get_commentdata($comment, 1, true) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php'));
|
$commentdata = get_commentdata($comment, 1, true) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php'));
|
||||||
|
|
||||||
wp_set_comment_status($comment, "approve");
|
wp_set_comment_status($comment, "approve");
|
||||||
|
@ -606,9 +606,9 @@ When you’re promoted, just reload this page and you’ll be able to bl
|
||||||
if ($user_level == 0)
|
if ($user_level == 0)
|
||||||
die (__('Cheatin’ uh?'));
|
die (__('Cheatin’ uh?'));
|
||||||
|
|
||||||
$comment = $HTTP_GET_VARS['comment'];
|
$comment = $_GET['comment'];
|
||||||
$p = $HTTP_GET_VARS['p'];
|
$p = $_GET['p'];
|
||||||
if (isset($HTTP_GET_VARS['noredir'])) {
|
if (isset($_GET['noredir'])) {
|
||||||
$noredir = true;
|
$noredir = true;
|
||||||
} else {
|
} else {
|
||||||
$noredir = false;
|
$noredir = false;
|
||||||
|
@ -621,8 +621,8 @@ When you’re promoted, just reload this page and you’ll be able to bl
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (($HTTP_SERVER_VARS['HTTP_REFERER'] != "") && (false == $noredir)) {
|
if (($_SERVER['HTTP_REFERER'] != "") && (false == $noredir)) {
|
||||||
header('Location: ' . $HTTP_SERVER_VARS['HTTP_REFERER']);
|
header('Location: ' . $_SERVER['HTTP_REFERER']);
|
||||||
} else {
|
} else {
|
||||||
header('Location: '. get_settings('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments');
|
header('Location: '. get_settings('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments');
|
||||||
}
|
}
|
||||||
|
@ -637,22 +637,22 @@ When you’re promoted, just reload this page and you’ll be able to bl
|
||||||
if ($user_level == 0)
|
if ($user_level == 0)
|
||||||
die (__('Cheatin’ uh?'));
|
die (__('Cheatin’ uh?'));
|
||||||
|
|
||||||
$comment_ID = $HTTP_POST_VARS['comment_ID'];
|
$comment_ID = $_POST['comment_ID'];
|
||||||
$comment_post_ID = $HTTP_POST_VARS['comment_post_ID'];
|
$comment_post_ID = $_POST['comment_post_ID'];
|
||||||
$newcomment_author = $HTTP_POST_VARS['newcomment_author'];
|
$newcomment_author = $_POST['newcomment_author'];
|
||||||
$newcomment_author_email = $HTTP_POST_VARS['newcomment_author_email'];
|
$newcomment_author_email = $_POST['newcomment_author_email'];
|
||||||
$newcomment_author_url = $HTTP_POST_VARS['newcomment_author_url'];
|
$newcomment_author_url = $_POST['newcomment_author_url'];
|
||||||
$newcomment_author = addslashes($newcomment_author);
|
$newcomment_author = addslashes($newcomment_author);
|
||||||
$newcomment_author_email = addslashes($newcomment_author_email);
|
$newcomment_author_email = addslashes($newcomment_author_email);
|
||||||
$newcomment_author_url = addslashes($newcomment_author_url);
|
$newcomment_author_url = addslashes($newcomment_author_url);
|
||||||
|
|
||||||
if (($user_level > 4) && (!empty($HTTP_POST_VARS['edit_date']))) {
|
if (($user_level > 4) && (!empty($_POST['edit_date']))) {
|
||||||
$aa = $HTTP_POST_VARS['aa'];
|
$aa = $_POST['aa'];
|
||||||
$mm = $HTTP_POST_VARS['mm'];
|
$mm = $_POST['mm'];
|
||||||
$jj = $HTTP_POST_VARS['jj'];
|
$jj = $_POST['jj'];
|
||||||
$hh = $HTTP_POST_VARS['hh'];
|
$hh = $_POST['hh'];
|
||||||
$mn = $HTTP_POST_VARS['mn'];
|
$mn = $_POST['mn'];
|
||||||
$ss = $HTTP_POST_VARS['ss'];
|
$ss = $_POST['ss'];
|
||||||
$jj = ($jj > 31) ? 31 : $jj;
|
$jj = ($jj > 31) ? 31 : $jj;
|
||||||
$hh = ($hh > 23) ? $hh - 24 : $hh;
|
$hh = ($hh > 23) ? $hh - 24 : $hh;
|
||||||
$mn = ($mn > 59) ? $mn - 60 : $mn;
|
$mn = ($mn > 59) ? $mn - 60 : $mn;
|
||||||
|
@ -673,7 +673,7 @@ When you’re promoted, just reload this page and you’ll be able to bl
|
||||||
WHERE comment_ID = $comment_ID"
|
WHERE comment_ID = $comment_ID"
|
||||||
);
|
);
|
||||||
|
|
||||||
$referredby = $HTTP_POST_VARS['referredby'];
|
$referredby = $_POST['referredby'];
|
||||||
if (!empty($referredby)) header('Location: ' . $referredby);
|
if (!empty($referredby)) header('Location: ' . $referredby);
|
||||||
else header ("Location: edit.php?p=$comment_post_ID&c=1#comments");
|
else header ("Location: edit.php?p=$comment_post_ID&c=1#comments");
|
||||||
do_action('edit_comment', $comment_ID);
|
do_action('edit_comment', $comment_ID);
|
||||||
|
|
|
@ -13,23 +13,23 @@ function add_magic_quotes($array) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!get_magic_quotes_gpc()) {
|
if (!get_magic_quotes_gpc()) {
|
||||||
$HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS);
|
$_GET = add_magic_quotes($_GET);
|
||||||
$HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS);
|
$_POST = add_magic_quotes($_POST);
|
||||||
$HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
|
$_COOKIE = add_magic_quotes($_COOKIE);
|
||||||
}
|
}
|
||||||
|
|
||||||
$wpvarstoreset = array('action','standalone','redirect','profile','user');
|
$wpvarstoreset = array('action','standalone','redirect','profile','user');
|
||||||
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
||||||
$wpvar = $wpvarstoreset[$i];
|
$wpvar = $wpvarstoreset[$i];
|
||||||
if (!isset($$wpvar)) {
|
if (!isset($$wpvar)) {
|
||||||
if (empty($HTTP_POST_VARS["$wpvar"])) {
|
if (empty($_POST["$wpvar"])) {
|
||||||
if (empty($HTTP_GET_VARS["$wpvar"])) {
|
if (empty($_GET["$wpvar"])) {
|
||||||
$$wpvar = '';
|
$$wpvar = '';
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_GET_VARS["$wpvar"];
|
$$wpvar = $_GET["$wpvar"];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_POST_VARS["$wpvar"];
|
$$wpvar = $_POST["$wpvar"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,53 +43,53 @@ case 'update':
|
||||||
get_currentuserinfo();
|
get_currentuserinfo();
|
||||||
|
|
||||||
/* checking the nickname has been typed */
|
/* checking the nickname has been typed */
|
||||||
if (empty($HTTP_POST_VARS["newuser_nickname"])) {
|
if (empty($_POST["newuser_nickname"])) {
|
||||||
die ("<strong>ERROR</strong>: please enter your nickname (can be the same as your login)");
|
die ("<strong>ERROR</strong>: please enter your nickname (can be the same as your login)");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if the ICQ UIN has been entered, check to see if it has only numbers */
|
/* if the ICQ UIN has been entered, check to see if it has only numbers */
|
||||||
if (!empty($HTTP_POST_VARS["newuser_icq"])) {
|
if (!empty($_POST["newuser_icq"])) {
|
||||||
if ((ereg("^[0-9]+$",$HTTP_POST_VARS["newuser_icq"]))==false) {
|
if ((ereg("^[0-9]+$",$_POST["newuser_icq"]))==false) {
|
||||||
die ("<strong>ERROR</strong>: your ICQ UIN can only be a number, no letters allowed");
|
die ("<strong>ERROR</strong>: your ICQ UIN can only be a number, no letters allowed");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* checking e-mail address */
|
/* checking e-mail address */
|
||||||
if (empty($HTTP_POST_VARS["newuser_email"])) {
|
if (empty($_POST["newuser_email"])) {
|
||||||
die ("<strong>ERROR</strong>: please type your e-mail address");
|
die ("<strong>ERROR</strong>: please type your e-mail address");
|
||||||
return false;
|
return false;
|
||||||
} else if (!is_email($HTTP_POST_VARS["newuser_email"])) {
|
} else if (!is_email($_POST["newuser_email"])) {
|
||||||
die ("<strong>ERROR</strong>: the email address isn't correct");
|
die ("<strong>ERROR</strong>: the email address isn't correct");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($HTTP_POST_VARS["pass1"] == "") {
|
if ($_POST["pass1"] == "") {
|
||||||
if ($HTTP_POST_VARS["pass2"] != "")
|
if ($_POST["pass2"] != "")
|
||||||
die ("<strong>ERROR</strong>: you typed your new password only once. Go back to type it twice.");
|
die ("<strong>ERROR</strong>: you typed your new password only once. Go back to type it twice.");
|
||||||
$updatepassword = "";
|
$updatepassword = "";
|
||||||
} else {
|
} else {
|
||||||
if ($HTTP_POST_VARS["pass2"] == "")
|
if ($_POST["pass2"] == "")
|
||||||
die ("<strong>ERROR</strong>: you typed your new password only once. Go back to type it twice.");
|
die ("<strong>ERROR</strong>: you typed your new password only once. Go back to type it twice.");
|
||||||
if ($HTTP_POST_VARS["pass1"] != $HTTP_POST_VARS["pass2"])
|
if ($_POST["pass1"] != $_POST["pass2"])
|
||||||
die ("<strong>ERROR</strong>: you typed two different passwords. Go back to correct that.");
|
die ("<strong>ERROR</strong>: you typed two different passwords. Go back to correct that.");
|
||||||
$newuser_pass = $HTTP_POST_VARS["pass1"];
|
$newuser_pass = $_POST["pass1"];
|
||||||
$updatepassword = "user_pass=MD5('$newuser_pass'), ";
|
$updatepassword = "user_pass=MD5('$newuser_pass'), ";
|
||||||
setcookie("wordpresspass_".$cookiehash,md5($newuser_pass),time()+31536000);
|
setcookie("wordpresspass_".$cookiehash,md5($newuser_pass),time()+31536000);
|
||||||
}
|
}
|
||||||
|
|
||||||
$newuser_firstname=addslashes(stripslashes($HTTP_POST_VARS['newuser_firstname']));
|
$newuser_firstname=addslashes(stripslashes($_POST['newuser_firstname']));
|
||||||
$newuser_lastname=addslashes(stripslashes($HTTP_POST_VARS['newuser_lastname']));
|
$newuser_lastname=addslashes(stripslashes($_POST['newuser_lastname']));
|
||||||
$newuser_nickname=addslashes(stripslashes($HTTP_POST_VARS['newuser_nickname']));
|
$newuser_nickname=addslashes(stripslashes($_POST['newuser_nickname']));
|
||||||
$newuser_icq=addslashes(stripslashes($HTTP_POST_VARS['newuser_icq']));
|
$newuser_icq=addslashes(stripslashes($_POST['newuser_icq']));
|
||||||
$newuser_aim=addslashes(stripslashes($HTTP_POST_VARS['newuser_aim']));
|
$newuser_aim=addslashes(stripslashes($_POST['newuser_aim']));
|
||||||
$newuser_msn=addslashes(stripslashes($HTTP_POST_VARS['newuser_msn']));
|
$newuser_msn=addslashes(stripslashes($_POST['newuser_msn']));
|
||||||
$newuser_yim=addslashes(stripslashes($HTTP_POST_VARS['newuser_yim']));
|
$newuser_yim=addslashes(stripslashes($_POST['newuser_yim']));
|
||||||
$newuser_email=addslashes(stripslashes($HTTP_POST_VARS['newuser_email']));
|
$newuser_email=addslashes(stripslashes($_POST['newuser_email']));
|
||||||
$newuser_url=addslashes(stripslashes($HTTP_POST_VARS['newuser_url']));
|
$newuser_url=addslashes(stripslashes($_POST['newuser_url']));
|
||||||
$newuser_idmode=addslashes(stripslashes($HTTP_POST_VARS['newuser_idmode']));
|
$newuser_idmode=addslashes(stripslashes($_POST['newuser_idmode']));
|
||||||
$user_description = addslashes(stripslashes($HTTP_POST_VARS['user_description']));
|
$user_description = addslashes(stripslashes($_POST['user_description']));
|
||||||
|
|
||||||
$query = "UPDATE $tableusers SET user_firstname='$newuser_firstname', $updatepassword user_lastname='$newuser_lastname', user_nickname='$newuser_nickname', user_icq='$newuser_icq', user_email='$newuser_email', user_url='$newuser_url', user_aim='$newuser_aim', user_msn='$newuser_msn', user_yim='$newuser_yim', user_idmode='$newuser_idmode', user_description = '$user_description' WHERE ID = $user_ID";
|
$query = "UPDATE $tableusers SET user_firstname='$newuser_firstname', $updatepassword user_lastname='$newuser_lastname', user_nickname='$newuser_nickname', user_icq='$newuser_icq', user_email='$newuser_email', user_url='$newuser_url', user_aim='$newuser_aim', user_msn='$newuser_msn', user_yim='$newuser_yim', user_idmode='$newuser_idmode', user_description = '$user_description' WHERE ID = $user_ID";
|
||||||
$result = $wpdb->query($query);
|
$result = $wpdb->query($query);
|
||||||
|
@ -103,7 +103,7 @@ case 'viewprofile':
|
||||||
|
|
||||||
|
|
||||||
$profiledata = get_userdata($user);
|
$profiledata = get_userdata($user);
|
||||||
if ($HTTP_COOKIE_VARS['wordpressuser_'.$cookiehash] == $profiledata->user_login)
|
if ($_COOKIE['wordpressuser_'.$cookiehash] == $profiledata->user_login)
|
||||||
header ('Location: profile.php');
|
header ('Location: profile.php');
|
||||||
|
|
||||||
include_once('admin-header.php');
|
include_once('admin-header.php');
|
||||||
|
|
|
@ -11,7 +11,7 @@ if ($user_level == 0)
|
||||||
|
|
||||||
$time_difference = get_settings('time_difference');
|
$time_difference = get_settings('time_difference');
|
||||||
|
|
||||||
if ('b' == $HTTP_GET_VARS['a']) {
|
if ('b' == $_GET['a']) {
|
||||||
|
|
||||||
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
|
|
@ -29,23 +29,23 @@ function validate_file($file) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!get_magic_quotes_gpc()) {
|
if (!get_magic_quotes_gpc()) {
|
||||||
$HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS);
|
$_GET = add_magic_quotes($_GET);
|
||||||
$HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS);
|
$_POST = add_magic_quotes($_POST);
|
||||||
$HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
|
$_COOKIE = add_magic_quotes($_COOKIE);
|
||||||
}
|
}
|
||||||
|
|
||||||
$wpvarstoreset = array('action','standalone','redirect','profile','error','warning','a','file');
|
$wpvarstoreset = array('action','standalone','redirect','profile','error','warning','a','file');
|
||||||
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
||||||
$wpvar = $wpvarstoreset[$i];
|
$wpvar = $wpvarstoreset[$i];
|
||||||
if (!isset($$wpvar)) {
|
if (!isset($$wpvar)) {
|
||||||
if (empty($HTTP_POST_VARS["$wpvar"])) {
|
if (empty($_POST["$wpvar"])) {
|
||||||
if (empty($HTTP_GET_VARS["$wpvar"])) {
|
if (empty($_GET["$wpvar"])) {
|
||||||
$$wpvar = '';
|
$$wpvar = '';
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_GET_VARS["$wpvar"];
|
$$wpvar = $_GET["$wpvar"];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_POST_VARS["$wpvar"];
|
$$wpvar = $_POST["$wpvar"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -61,8 +61,8 @@ case 'update':
|
||||||
die('<p>You have do not have sufficient permissions to edit templates for this blog.</p>');
|
die('<p>You have do not have sufficient permissions to edit templates for this blog.</p>');
|
||||||
}
|
}
|
||||||
|
|
||||||
$newcontent = stripslashes($HTTP_POST_VARS['newcontent']);
|
$newcontent = stripslashes($_POST['newcontent']);
|
||||||
$file = $HTTP_POST_VARS['file'];
|
$file = $_POST['file'];
|
||||||
$file = validate_file($file);
|
$file = validate_file($file);
|
||||||
$real_file = '../' . $file;
|
$real_file = '../' . $file;
|
||||||
if (is_writeable($real_file)) {
|
if (is_writeable($real_file)) {
|
||||||
|
|
|
@ -4,7 +4,7 @@ if (!file_exists('../wp-config.php')) die("There doesn't seem to be a wp-config.
|
||||||
require('../wp-config.php');
|
require('../wp-config.php');
|
||||||
require('upgrade-functions.php');
|
require('upgrade-functions.php');
|
||||||
|
|
||||||
$step = $HTTP_GET_VARS['step'];
|
$step = $_GET['step'];
|
||||||
if (!$step) $step = 0;
|
if (!$step) $step = 0;
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
|
@ -11,7 +11,7 @@ if (!get_settings('use_fileupload')) //Checks if file upload is enabled in the c
|
||||||
|
|
||||||
$allowed_types = explode(' ', trim(strtolower(get_settings('fileupload_allowedtypes'))));
|
$allowed_types = explode(' ', trim(strtolower(get_settings('fileupload_allowedtypes'))));
|
||||||
|
|
||||||
if ($HTTP_POST_VARS['submit']) {
|
if ($_POST['submit']) {
|
||||||
$action = 'upload';
|
$action = 'upload';
|
||||||
} else {
|
} else {
|
||||||
$action = '';
|
$action = '';
|
||||||
|
@ -82,11 +82,11 @@ case 'upload':
|
||||||
//die();
|
//die();
|
||||||
|
|
||||||
|
|
||||||
$imgalt = (isset($HTTP_POST_VARS['imgalt'])) ? $HTTP_POST_VARS['imgalt'] : $imgalt;
|
$imgalt = (isset($_POST['imgalt'])) ? $_POST['imgalt'] : $imgalt;
|
||||||
|
|
||||||
$img1_name = (strlen($imgalt)) ? $HTTP_POST_VARS['imgalt'] : $HTTP_POST_FILES['img1']['name'];
|
$img1_name = (strlen($imgalt)) ? $_POST['imgalt'] : $HTTP_POST_FILES['img1']['name'];
|
||||||
$img1_type = (strlen($imgalt)) ? $HTTP_POST_VARS['img1_type'] : $HTTP_POST_FILES['img1']['type'];
|
$img1_type = (strlen($imgalt)) ? $_POST['img1_type'] : $HTTP_POST_FILES['img1']['type'];
|
||||||
$imgdesc = str_replace('"', '&quot;', $HTTP_POST_VARS['imgdesc']);
|
$imgdesc = str_replace('"', '&quot;', $_POST['imgdesc']);
|
||||||
|
|
||||||
$imgtype = explode(".",$img1_name);
|
$imgtype = explode(".",$img1_name);
|
||||||
$imgtype = strtolower($imgtype[count($imgtype)-1]);
|
$imgtype = strtolower($imgtype[count($imgtype)-1]);
|
||||||
|
@ -97,7 +97,7 @@ case 'upload':
|
||||||
|
|
||||||
if (strlen($imgalt)) {
|
if (strlen($imgalt)) {
|
||||||
$pathtofile = get_settings('fileupload_realpath')."/".$imgalt;
|
$pathtofile = get_settings('fileupload_realpath')."/".$imgalt;
|
||||||
$img1 = $HTTP_POST_VARS['img1'];
|
$img1 = $_POST['img1'];
|
||||||
} else {
|
} else {
|
||||||
$pathtofile = get_settings('fileupload_realpath')."/".$img1_name;
|
$pathtofile = get_settings('fileupload_realpath')."/".$img1_name;
|
||||||
$img1 = $HTTP_POST_FILES['img1']['tmp_name'];
|
$img1 = $HTTP_POST_FILES['img1']['tmp_name'];
|
||||||
|
@ -181,15 +181,15 @@ die();
|
||||||
or die("Couldn't Upload Your File to $pathtofile.");
|
or die("Couldn't Upload Your File to $pathtofile.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if($HTTP_POST_VARS['thumbsize'] != 'none' ) {
|
if($_POST['thumbsize'] != 'none' ) {
|
||||||
if($HTTP_POST_VARS['thumbsize'] == 'small') {
|
if($_POST['thumbsize'] == 'small') {
|
||||||
$max_side = 200;
|
$max_side = 200;
|
||||||
}
|
}
|
||||||
elseif($HTTP_POST_VARS['thumbsize'] == 'large') {
|
elseif($_POST['thumbsize'] == 'large') {
|
||||||
$max_side = 400;
|
$max_side = 400;
|
||||||
}
|
}
|
||||||
elseif($HTTP_POST_VARS['thumbsize'] == 'custom') {
|
elseif($_POST['thumbsize'] == 'custom') {
|
||||||
$max_side = $HTTP_POST_VARS['imgthumbsizecustom'];
|
$max_side = $_POST['imgthumbsizecustom'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = wp_create_thumbnail($pathtofile, $max_side, NULL);
|
$result = wp_create_thumbnail($pathtofile, $max_side, NULL);
|
||||||
|
|
|
@ -6,14 +6,14 @@ $wpvarstoreset = array('action','standalone','redirect','profile');
|
||||||
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
||||||
$wpvar = $wpvarstoreset[$i];
|
$wpvar = $wpvarstoreset[$i];
|
||||||
if (!isset($$wpvar)) {
|
if (!isset($$wpvar)) {
|
||||||
if (empty($HTTP_POST_VARS["$wpvar"])) {
|
if (empty($_POST["$wpvar"])) {
|
||||||
if (empty($HTTP_GET_VARS["$wpvar"])) {
|
if (empty($_GET["$wpvar"])) {
|
||||||
$$wpvar = '';
|
$$wpvar = '';
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_GET_VARS["$wpvar"];
|
$$wpvar = $_GET["$wpvar"];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_POST_VARS["$wpvar"];
|
$$wpvar = $_POST["$wpvar"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,12 +26,12 @@ case 'adduser':
|
||||||
return ereg('^[a-zA-Z0-9\_-\|]+$',$value);
|
return ereg('^[a-zA-Z0-9\_-\|]+$',$value);
|
||||||
}
|
}
|
||||||
|
|
||||||
$user_login = $HTTP_POST_VARS['user_login'];
|
$user_login = $_POST['user_login'];
|
||||||
$pass1 = $HTTP_POST_VARS['pass1'];
|
$pass1 = $_POST['pass1'];
|
||||||
$pass2 = $HTTP_POST_VARS['pass2'];
|
$pass2 = $_POST['pass2'];
|
||||||
$user_email = $HTTP_POST_VARS['email'];
|
$user_email = $_POST['email'];
|
||||||
$user_firstname = $HTTP_POST_VARS['firstname'];
|
$user_firstname = $_POST['firstname'];
|
||||||
$user_lastname = $HTTP_POST_VARS['lastname'];
|
$user_lastname = $_POST['lastname'];
|
||||||
|
|
||||||
/* checking login has been typed */
|
/* checking login has been typed */
|
||||||
if ($user_login == '') {
|
if ($user_login == '') {
|
||||||
|
@ -98,12 +98,12 @@ case 'promote':
|
||||||
$standalone = 1;
|
$standalone = 1;
|
||||||
require_once('admin-header.php');
|
require_once('admin-header.php');
|
||||||
|
|
||||||
if (empty($HTTP_GET_VARS['prom'])) {
|
if (empty($_GET['prom'])) {
|
||||||
header('Location: users.php');
|
header('Location: users.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
$id = $HTTP_GET_VARS['id'];
|
$id = $_GET['id'];
|
||||||
$prom = $HTTP_GET_VARS['prom'];
|
$prom = $_GET['prom'];
|
||||||
|
|
||||||
$user_data = get_userdata($id);
|
$user_data = get_userdata($id);
|
||||||
$usertopromote_level = $user_data->user_level;
|
$usertopromote_level = $user_data->user_level;
|
||||||
|
@ -130,7 +130,7 @@ case 'delete':
|
||||||
$standalone = 1;
|
$standalone = 1;
|
||||||
require_once('admin-header.php');
|
require_once('admin-header.php');
|
||||||
|
|
||||||
$id = intval($HTTP_GET_VARS['id']);
|
$id = intval($_GET['id']);
|
||||||
|
|
||||||
if (!$id) {
|
if (!$id) {
|
||||||
header('Location: users.php');
|
header('Location: users.php');
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$use_cache = 1; // No reason not to
|
|
||||||
|
|
||||||
/* Including config and functions files */
|
/* Including config and functions files */
|
||||||
$curpath = dirname(__FILE__).'/';
|
$curpath = dirname(__FILE__).'/';
|
||||||
|
|
||||||
|
@ -22,7 +20,7 @@ if (! empty($_SERVER['PATH_INFO'])) {
|
||||||
|
|
||||||
if (! empty($rewrite)) {
|
if (! empty($rewrite)) {
|
||||||
// Get the name of the file requesting path info.
|
// Get the name of the file requesting path info.
|
||||||
$req_uri = $HTTP_SERVER_VARS['REQUEST_URI'];
|
$req_uri = $_SERVER['REQUEST_URI'];
|
||||||
$req_uri = str_replace($pathinfo, '', $req_uri);
|
$req_uri = str_replace($pathinfo, '', $req_uri);
|
||||||
$req_uri = preg_replace("!/+$!", '', $req_uri);
|
$req_uri = preg_replace("!/+$!", '', $req_uri);
|
||||||
$req_uri = explode('/', $req_uri);
|
$req_uri = explode('/', $req_uri);
|
||||||
|
@ -57,16 +55,16 @@ $wpvarstoreset = array('m','p','posts','w', 'cat','withcomments','s','search','e
|
||||||
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
||||||
$wpvar = $wpvarstoreset[$i];
|
$wpvar = $wpvarstoreset[$i];
|
||||||
if (!isset($$wpvar)) {
|
if (!isset($$wpvar)) {
|
||||||
if (empty($HTTP_POST_VARS[$wpvar])) {
|
if (empty($_POST[$wpvar])) {
|
||||||
if (empty($HTTP_GET_VARS[$wpvar]) && empty($path_info[$wpvar])) {
|
if (empty($_GET[$wpvar]) && empty($path_info[$wpvar])) {
|
||||||
$$wpvar = '';
|
$$wpvar = '';
|
||||||
} elseif (!empty($HTTP_GET_VARS[$wpvar])) {
|
} elseif (!empty($_GET[$wpvar])) {
|
||||||
$$wpvar = $HTTP_GET_VARS[$wpvar];
|
$$wpvar = $_GET[$wpvar];
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $path_info[$wpvar];
|
$$wpvar = $path_info[$wpvar];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_POST_VARS[$wpvar];
|
$$wpvar = $_POST[$wpvar];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,12 +31,12 @@ foreach ($posts as $post) { start_wp();
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
// this line is WordPress' motor, do not delete it.
|
// this line is WordPress' motor, do not delete it.
|
||||||
$comment_author = (isset($HTTP_COOKIE_VARS['comment_author_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_'.$cookiehash]) : '';
|
$comment_author = (isset($_COOKIE['comment_author_'.$cookiehash])) ? trim($_COOKIE['comment_author_'.$cookiehash]) : '';
|
||||||
$comment_author_email = (isset($HTTP_COOKIE_VARS['comment_author_email_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_email_'.$cookiehash]) : '';
|
$comment_author_email = (isset($_COOKIE['comment_author_email_'.$cookiehash])) ? trim($_COOKIE['comment_author_email_'.$cookiehash]) : '';
|
||||||
$comment_author_url = (isset($HTTP_COOKIE_VARS['comment_author_url_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_url_'.$cookiehash]) : '';
|
$comment_author_url = (isset($_COOKIE['comment_author_url_'.$cookiehash])) ? trim($_COOKIE['comment_author_url_'.$cookiehash]) : '';
|
||||||
$comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = $id AND comment_approved = '1' ORDER BY comment_date");
|
$comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = $id AND comment_approved = '1' ORDER BY comment_date");
|
||||||
$commentstatus = $wpdb->get_row("SELECT comment_status, post_password FROM $tableposts WHERE ID = $id");
|
$commentstatus = $wpdb->get_row("SELECT comment_status, post_password FROM $tableposts WHERE ID = $id");
|
||||||
if (!empty($commentstatus->post_password) && $HTTP_COOKIE_VARS['wp-postpass_'.$cookiehash] != $commentstatus->post_password) { // and it doesn't match the cookie
|
if (!empty($commentstatus->post_password) && $_COOKIE['wp-postpass_'.$cookiehash] != $commentstatus->post_password) { // and it doesn't match the cookie
|
||||||
echo(get_the_password_form());
|
echo(get_the_password_form());
|
||||||
} else { ?>
|
} else { ?>
|
||||||
|
|
||||||
|
|
|
@ -13,26 +13,26 @@ function add_magic_quotes($array) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!get_magic_quotes_gpc()) {
|
if (!get_magic_quotes_gpc()) {
|
||||||
$HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS);
|
$_GET = add_magic_quotes($_GET);
|
||||||
$HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS);
|
$_POST = add_magic_quotes($_POST);
|
||||||
$HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
|
$_COOKIE = add_magic_quotes($_COOKIE);
|
||||||
}
|
}
|
||||||
|
|
||||||
$author = trim(strip_tags($HTTP_POST_VARS['author']));
|
$author = trim(strip_tags($_POST['author']));
|
||||||
|
|
||||||
$email = trim(strip_tags($HTTP_POST_VARS['email']));
|
$email = trim(strip_tags($_POST['email']));
|
||||||
if (strlen($email) < 6)
|
if (strlen($email) < 6)
|
||||||
$email = '';
|
$email = '';
|
||||||
|
|
||||||
$url = trim(strip_tags($HTTP_POST_VARS['url']));
|
$url = trim(strip_tags($_POST['url']));
|
||||||
$url = ((!stristr($url, '://')) && ($url != '')) ? 'http://'.$url : $url;
|
$url = ((!stristr($url, '://')) && ($url != '')) ? 'http://'.$url : $url;
|
||||||
if (strlen($url) < 7)
|
if (strlen($url) < 7)
|
||||||
$url = '';
|
$url = '';
|
||||||
|
|
||||||
$comment = trim($HTTP_POST_VARS['comment']);
|
$comment = trim($_POST['comment']);
|
||||||
$original_comment = $comment;
|
$original_comment = $comment;
|
||||||
$comment_post_ID = intval($HTTP_POST_VARS['comment_post_ID']);
|
$comment_post_ID = intval($_POST['comment_post_ID']);
|
||||||
$user_ip = $HTTP_SERVER_VARS['REMOTE_ADDR'];
|
$user_ip = $_SERVER['REMOTE_ADDR'];
|
||||||
$user_domain = gethostbyaddr($user_ip);
|
$user_domain = gethostbyaddr($user_ip);
|
||||||
|
|
||||||
$commentstatus = $wpdb->get_var("SELECT comment_status FROM $tableposts WHERE ID = $comment_post_ID");
|
$commentstatus = $wpdb->get_var("SELECT comment_status FROM $tableposts WHERE ID = $comment_post_ID");
|
||||||
|
@ -116,7 +116,7 @@ if ($ok) { // if there was no comment from this IP in the last 10 seconds
|
||||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||||
header('Cache-Control: no-cache, must-revalidate');
|
header('Cache-Control: no-cache, must-revalidate');
|
||||||
header('Pragma: no-cache');
|
header('Pragma: no-cache');
|
||||||
$location = (empty($HTTP_POST_VARS['redirect_to'])) ? $HTTP_SERVER_VARS["HTTP_REFERER"] : $HTTP_POST_VARS['redirect_to'];
|
$location = (empty($_POST['redirect_to'])) ? $_SERVER["HTTP_REFERER"] : $_POST['redirect_to'];
|
||||||
if ($is_IIS) {
|
if ($is_IIS) {
|
||||||
header("Refresh: 0;url=$location");
|
header("Refresh: 0;url=$location");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -25,15 +25,15 @@ require ('wp-blog-header.php');
|
||||||
if (($withcomments) or ($single)) {
|
if (($withcomments) or ($single)) {
|
||||||
|
|
||||||
if (!empty($post->post_password)) { // if there's a password
|
if (!empty($post->post_password)) { // if there's a password
|
||||||
if ($HTTP_COOKIE_VARS['wp-postpass_'.$cookiehash] != $post->post_password) { // and it doesn't match the cookie
|
if ($_COOKIE['wp-postpass_'.$cookiehash] != $post->post_password) { // and it doesn't match the cookie
|
||||||
echo("<p>Enter your password to view comments.<p>");
|
echo("<p>Enter your password to view comments.<p>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$comment_author = (isset($HTTP_COOKIE_VARS['comment_author_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_'.$cookiehash]) : '';
|
$comment_author = (isset($_COOKIE['comment_author_'.$cookiehash])) ? trim($_COOKIE['comment_author_'.$cookiehash]) : '';
|
||||||
$comment_author_email = (isset($HTTP_COOKIE_VARS['comment_author_email_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_email_'.$cookiehash]) : '';
|
$comment_author_email = (isset($_COOKIE['comment_author_email_'.$cookiehash])) ? trim($_COOKIE['comment_author_email_'.$cookiehash]) : '';
|
||||||
$comment_author_url = (isset($HTTP_COOKIE_VARS['comment_author_url_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_url_'.$cookiehash]) : '';
|
$comment_author_url = (isset($_COOKIE['comment_author_url_'.$cookiehash])) ? trim($_COOKIE['comment_author_url_'.$cookiehash]) : '';
|
||||||
$comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = '$id' AND comment_approved = '1' AND comment_ID = '$comment_reply_ID' ORDER BY comment_date");
|
$comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = '$id' AND comment_approved = '1' AND comment_ID = '$comment_reply_ID' ORDER BY comment_date");
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?php // Do not delete these lines
|
<?php // Do not delete these lines
|
||||||
if ('wp-comments.php' == basename($HTTP_SERVER_VARS['SCRIPT_FILENAME']))
|
if ('wp-comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
|
||||||
die ('Please do not load this page directly. Thanks!');
|
die ('Please do not load this page directly. Thanks!');
|
||||||
if (($withcomments) or ($single)) {
|
if (($withcomments) or ($single)) {
|
||||||
|
|
||||||
if (!empty($post->post_password)) { // if there's a password
|
if (!empty($post->post_password)) { // if there's a password
|
||||||
if ($HTTP_COOKIE_VARS['wp-postpass_'.$cookiehash] != $post->post_password) { // and it doesn't match the cookie
|
if ($_COOKIE['wp-postpass_'.$cookiehash] != $post->post_password) { // and it doesn't match the cookie
|
||||||
?>
|
?>
|
||||||
<p><?php e_("Enter your password to view comments."); ?><p>
|
<p><?php e_("Enter your password to view comments."); ?><p>
|
||||||
<?php
|
<?php
|
||||||
|
@ -12,9 +12,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$comment_author = (isset($HTTP_COOKIE_VARS['comment_author_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_'.$cookiehash]) : '';
|
$comment_author = (isset($_COOKIE['comment_author_'.$cookiehash])) ? trim($_COOKIE['comment_author_'.$cookiehash]) : '';
|
||||||
$comment_author_email = (isset($HTTP_COOKIE_VARS['comment_author_email_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_email_'.$cookiehash]) : '';
|
$comment_author_email = (isset($_COOKIE['comment_author_email_'.$cookiehash])) ? trim($_COOKIE['comment_author_email_'.$cookiehash]) : '';
|
||||||
$comment_author_url = (isset($HTTP_COOKIE_VARS['comment_author_url_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_url_'.$cookiehash]) : '';
|
$comment_author_url = (isset($_COOKIE['comment_author_url_'.$cookiehash])) ? trim($_COOKIE['comment_author_url_'.$cookiehash]) : '';
|
||||||
|
|
||||||
$comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = '$id' AND comment_approved = '1' ORDER BY comment_date");
|
$comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = '$id' AND comment_approved = '1' ORDER BY comment_date");
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -51,7 +51,7 @@ foreach ($posts as $post) { start_wp();
|
||||||
<pubDate><?php comment_time('r'); ?></pubDate>
|
<pubDate><?php comment_time('r'); ?></pubDate>
|
||||||
<guid isPermaLink="false"><?php comment_ID(); echo ":".$comment->comment_post_ID; ?>@<?php bloginfo_rss("url") ?></guid>
|
<guid isPermaLink="false"><?php comment_ID(); echo ":".$comment->comment_post_ID; ?>@<?php bloginfo_rss("url") ?></guid>
|
||||||
<?php
|
<?php
|
||||||
if (!empty($comment->post_password) && $HTTP_COOKIE_VARS['wp-postpass'] != $comment->post_password) {
|
if (!empty($comment->post_password) && $_COOKIE['wp-postpass'] != $comment->post_password) {
|
||||||
?>
|
?>
|
||||||
<description>Protected Comments: Please enter your password to view comments.</description>
|
<description>Protected Comments: Please enter your password to view comments.</description>
|
||||||
<content:encoded><![CDATA[<?php echo get_the_password_form() ?>]]></content:encoded>
|
<content:encoded><![CDATA[<?php echo get_the_password_form() ?>]]></content:encoded>
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
/*
|
/*
|
||||||
Plugin Name: Hello Dolly
|
Plugin Name: Hello Dolly
|
||||||
Plugin URI: http://wordpress.org/#
|
Plugin URI: http://wordpress.org/#
|
||||||
Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong. Hello, Dolly. This is, by the way, the world's first official WordPress plugin. Wish it did something useful.
|
Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong. Hello, Dolly. This is, by the way, the world's first official WordPress plugin. When enabled you will randomly see a lyric from <cite>Hello, Dolly</cite> in the upper right of your admin screen.
|
||||||
Author: Matt Mullenweg
|
Author: Matt Mullenweg
|
||||||
Author URI: http://photomatt.net
|
Author URI: http://photomatt.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function hello_dolly() {
|
function hello_dolly() {
|
||||||
|
|
|
@ -98,11 +98,11 @@ function get_weekstartend($mysqlstring, $start_of_week) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_lastpostdate($timezone = 'server') {
|
function get_lastpostdate($timezone = 'server') {
|
||||||
global $tableposts, $cache_lastpostdate, $use_cache, $pagenow, $wpdb;
|
global $tableposts, $cache_lastpostdate, $pagenow, $wpdb;
|
||||||
$add_seconds_blog = get_settings('gmt_offset') * 3600;
|
$add_seconds_blog = get_settings('gmt_offset') * 3600;
|
||||||
$add_seconds_server = date('Z');
|
$add_seconds_server = date('Z');
|
||||||
$now = current_time('mysql', 1);
|
$now = current_time('mysql', 1);
|
||||||
if ((!isset($cache_lastpostdate[$timezone])) OR (!$use_cache)) {
|
if ( !isset($cache_lastpostdate[$timezone]) ) {
|
||||||
switch(strtolower($timezone)) {
|
switch(strtolower($timezone)) {
|
||||||
case 'gmt':
|
case 'gmt':
|
||||||
$lastpostdate = $wpdb->get_var("SELECT post_date_gmt FROM $tableposts WHERE post_date_gmt <= '$now' AND post_status = 'publish' ORDER BY post_date_gmt DESC LIMIT 1");
|
$lastpostdate = $wpdb->get_var("SELECT post_date_gmt FROM $tableposts WHERE post_date_gmt <= '$now' AND post_status = 'publish' ORDER BY post_date_gmt DESC LIMIT 1");
|
||||||
|
@ -122,11 +122,11 @@ function get_lastpostdate($timezone = 'server') {
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_lastpostmodified($timezone = 'server') {
|
function get_lastpostmodified($timezone = 'server') {
|
||||||
global $tableposts, $cache_lastpostmodified, $use_cache, $pagenow, $wpdb;
|
global $tableposts, $cache_lastpostmodified, $pagenow, $wpdb;
|
||||||
$add_seconds_blog = get_settings('gmt_offset') * 3600;
|
$add_seconds_blog = get_settings('gmt_offset') * 3600;
|
||||||
$add_seconds_server = date('Z');
|
$add_seconds_server = date('Z');
|
||||||
$now = current_time('mysql', 1);
|
$now = current_time('mysql', 1);
|
||||||
if ((!isset($cache_lastpostmodified[$timezone])) OR (!$use_cache)) {
|
if ( !isset($cache_lastpostmodified[$timezone]) ) {
|
||||||
switch(strtolower($timezone)) {
|
switch(strtolower($timezone)) {
|
||||||
case 'gmt':
|
case 'gmt':
|
||||||
$lastpostmodified = $wpdb->get_var("SELECT post_modified_gmt FROM $tableposts WHERE post_modified_gmt <= '$now' AND post_status = 'publish' ORDER BY post_modified_gmt DESC LIMIT 1");
|
$lastpostmodified = $wpdb->get_var("SELECT post_modified_gmt FROM $tableposts WHERE post_modified_gmt <= '$now' AND post_status = 'publish' ORDER BY post_modified_gmt DESC LIMIT 1");
|
||||||
|
@ -150,8 +150,8 @@ function get_lastpostmodified($timezone = 'server') {
|
||||||
}
|
}
|
||||||
|
|
||||||
function user_pass_ok($user_login,$user_pass) {
|
function user_pass_ok($user_login,$user_pass) {
|
||||||
global $cache_userdata,$use_cache;
|
global $cache_userdata;
|
||||||
if ((empty($cache_userdata[$user_login])) OR (!$use_cache)) {
|
if ( empty($cache_userdata[$user_login]) ) {
|
||||||
$userdata = get_userdatabylogin($user_login);
|
$userdata = get_userdatabylogin($user_login);
|
||||||
} else {
|
} else {
|
||||||
$userdata = $cache_userdata[$user_login];
|
$userdata = $cache_userdata[$user_login];
|
||||||
|
@ -173,8 +173,8 @@ function get_currentuserinfo() { // a bit like get_userdata(), on steroids
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_userdata($userid) {
|
function get_userdata($userid) {
|
||||||
global $wpdb, $cache_userdata, $use_cache, $tableusers;
|
global $wpdb, $cache_userdata, $tableusers;
|
||||||
if ((empty($cache_userdata[$userid])) || (!$use_cache)) {
|
if ( empty($cache_userdata[$userid]) ) {
|
||||||
$user = $wpdb->get_row("SELECT * FROM $tableusers WHERE ID = '$userid'");
|
$user = $wpdb->get_row("SELECT * FROM $tableusers WHERE ID = '$userid'");
|
||||||
$user->user_nickname = stripslashes($user->user_nickname);
|
$user->user_nickname = stripslashes($user->user_nickname);
|
||||||
$user->user_firstname = stripslashes($user->user_firstname);
|
$user->user_firstname = stripslashes($user->user_firstname);
|
||||||
|
@ -190,8 +190,8 @@ function get_userdata($userid) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_userdatabylogin($user_login) {
|
function get_userdatabylogin($user_login) {
|
||||||
global $tableusers, $cache_userdata, $use_cache, $wpdb;
|
global $tableusers, $cache_userdata, $wpdb;
|
||||||
if ((empty($cache_userdata["$user_login"])) OR (!$use_cache)) {
|
if ( empty($cache_userdata["$user_login"]) ) {
|
||||||
$user = $wpdb->get_row("SELECT * FROM $tableusers WHERE user_login = '$user_login'");
|
$user = $wpdb->get_row("SELECT * FROM $tableusers WHERE user_login = '$user_login'");
|
||||||
$cache_userdata["$user_login"] = $user;
|
$cache_userdata["$user_login"] = $user;
|
||||||
} else {
|
} else {
|
||||||
|
@ -201,8 +201,8 @@ function get_userdatabylogin($user_login) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_userid($user_login) {
|
function get_userid($user_login) {
|
||||||
global $tableusers, $cache_userdata, $use_cache, $wpdb;
|
global $tableusers, $cache_userdata, $wpdb;
|
||||||
if ((empty($cache_userdata["$user_login"])) OR (!$use_cache)) {
|
if ( empty($cache_userdata["$user_login"]) ) {
|
||||||
$user_id = $wpdb->get_var("SELECT ID FROM $tableusers WHERE user_login = '$user_login'");
|
$user_id = $wpdb->get_var("SELECT ID FROM $tableusers WHERE user_login = '$user_login'");
|
||||||
|
|
||||||
$cache_userdata["$user_login"] = $user_id;
|
$cache_userdata["$user_login"] = $user_id;
|
||||||
|
@ -293,7 +293,7 @@ function url_to_postid($url = '') {
|
||||||
/* Options functions */
|
/* Options functions */
|
||||||
|
|
||||||
function get_settings($setting) {
|
function get_settings($setting) {
|
||||||
global $wpdb, $cache_settings, $use_cache;
|
global $wpdb, $cache_settings;
|
||||||
if (strstr($_SERVER['REQUEST_URI'], 'install.php')) {
|
if (strstr($_SERVER['REQUEST_URI'], 'install.php')) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -301,7 +301,7 @@ function get_settings($setting) {
|
||||||
// until we switch to using 'gmt_offset' everywhere
|
// until we switch to using 'gmt_offset' everywhere
|
||||||
$setting = str_replace('time_difference', 'gmt_offset', $setting);
|
$setting = str_replace('time_difference', 'gmt_offset', $setting);
|
||||||
|
|
||||||
if ((empty($cache_settings)) OR (!$use_cache)) {
|
if ( (empty($cache_settings)) ) {
|
||||||
$settings = get_alloptions();
|
$settings = get_alloptions();
|
||||||
$cache_settings = $settings;
|
$cache_settings = $settings;
|
||||||
} else {
|
} else {
|
||||||
|
@ -347,8 +347,7 @@ function add_option($name, $value='') {
|
||||||
$value = $wpdb->escape($value);
|
$value = $wpdb->escape($value);
|
||||||
$wpdb->query("INSERT INTO $tableoptions (option_name, option_value) VALUES ('$name', '$value')");
|
$wpdb->query("INSERT INTO $tableoptions (option_name, option_value) VALUES ('$name', '$value')");
|
||||||
|
|
||||||
global $use_cache;
|
if($wpdb->insert_id) {
|
||||||
if($wpdb->insert_id && $use_cache) {
|
|
||||||
global $cache_settings;
|
global $cache_settings;
|
||||||
$cache_settings->{$name} = $value;
|
$cache_settings->{$name} = $value;
|
||||||
}
|
}
|
||||||
|
@ -412,8 +411,8 @@ function get_commentdata($comment_ID,$no_cache=0,$include_unapproved=false) { //
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_catname($cat_ID) {
|
function get_catname($cat_ID) {
|
||||||
global $tablecategories,$cache_catnames,$use_cache, $wpdb;
|
global $tablecategories, $cache_catnames, $wpdb;
|
||||||
if ((!$cache_catnames) || (!$use_cache)) {
|
if ( !$cache_catnames) ) {
|
||||||
$results = $wpdb->get_results("SELECT * FROM $tablecategories") or die('Oops, couldn\'t query the db for categories.');
|
$results = $wpdb->get_results("SELECT * FROM $tablecategories") or die('Oops, couldn\'t query the db for categories.');
|
||||||
foreach ($results as $post) {
|
foreach ($results as $post) {
|
||||||
$cache_catnames[$post->cat_ID] = $post->cat_name;
|
$cache_catnames[$post->cat_ID] = $post->cat_name;
|
||||||
|
@ -474,7 +473,7 @@ function gzip_compression() {
|
||||||
ob_start("ob_gzhandler");
|
ob_start("ob_gzhandler");
|
||||||
}
|
}
|
||||||
} else if($phpver > "4.0") {
|
} else if($phpver > "4.0") {
|
||||||
if(strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip')) {
|
if(strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) {
|
||||||
if(extension_loaded("zlib")) {
|
if(extension_loaded("zlib")) {
|
||||||
$do_gzip_compress = TRUE;
|
$do_gzip_compress = TRUE;
|
||||||
ob_start();
|
ob_start();
|
||||||
|
@ -1002,7 +1001,7 @@ function wp_notify_postauthor($comment_id, $comment_type='comment') {
|
||||||
$notify_message .= get_permalink($comment->comment_post_ID) . '#comments';
|
$notify_message .= get_permalink($comment->comment_post_ID) . '#comments';
|
||||||
|
|
||||||
if ('' == $comment->comment_author_email || '' == $comment->comment_author) {
|
if ('' == $comment->comment_author_email || '' == $comment->comment_author) {
|
||||||
$from = "From: \"$blogname\" <wordpress@" . $HTTP_SERVER_VARS['SERVER_NAME'] . '>';
|
$from = "From: \"$blogname\" <wordpress@" . $_SERVER['SERVER_NAME'] . '>';
|
||||||
} else {
|
} else {
|
||||||
$from = 'From: "' . stripslashes($comment->comment_author) . "\" <$comment->comment_author_email>";
|
$from = 'From: "' . stripslashes($comment->comment_author) . "\" <$comment->comment_author_email>";
|
||||||
}
|
}
|
||||||
|
@ -1061,19 +1060,18 @@ function start_wp() {
|
||||||
global $post, $id, $postdata, $authordata, $day, $preview, $page, $pages, $multipage, $more, $numpages;
|
global $post, $id, $postdata, $authordata, $day, $preview, $page, $pages, $multipage, $more, $numpages;
|
||||||
global $preview_userid,$preview_date,$preview_content,$preview_title,$preview_category,$preview_notify,$preview_make_clickable,$preview_autobr;
|
global $preview_userid,$preview_date,$preview_content,$preview_title,$preview_category,$preview_notify,$preview_make_clickable,$preview_autobr;
|
||||||
global $pagenow;
|
global $pagenow;
|
||||||
global $HTTP_GET_VARS;
|
|
||||||
if (!$preview) {
|
if (!$preview) {
|
||||||
$id = $post->ID;
|
$id = $post->ID;
|
||||||
} else {
|
} else {
|
||||||
$id = 0;
|
$id = 0;
|
||||||
$postdata = array (
|
$postdata = array (
|
||||||
'ID' => 0,
|
'ID' => 0,
|
||||||
'Author_ID' => $HTTP_GET_VARS['preview_userid'],
|
'Author_ID' => $_GET['preview_userid'],
|
||||||
'Date' => $HTTP_GET_VARS['preview_date'],
|
'Date' => $_GET['preview_date'],
|
||||||
'Content' => $HTTP_GET_VARS['preview_content'],
|
'Content' => $_GET['preview_content'],
|
||||||
'Excerpt' => $HTTP_GET_VARS['preview_excerpt'],
|
'Excerpt' => $_GET['preview_excerpt'],
|
||||||
'Title' => $HTTP_GET_VARS['preview_title'],
|
'Title' => $_GET['preview_title'],
|
||||||
'Category' => $HTTP_GET_VARS['preview_category'],
|
'Category' => $_GET['preview_category'],
|
||||||
'Notify' => 1
|
'Notify' => 1
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,8 +112,8 @@ function the_category_rss($type = 'rss') {
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_the_category_by_ID($cat_ID) {
|
function get_the_category_by_ID($cat_ID) {
|
||||||
global $tablecategories, $cache_categories, $use_cache, $wpdb;
|
global $tablecategories, $cache_categories, $wpdb;
|
||||||
if ((!$cache_categories[$cat_ID]) OR (!$use_cache)) {
|
if ( !$cache_categories[$cat_ID]) ) {
|
||||||
$cat_name = $wpdb->get_var("SELECT cat_name FROM $tablecategories WHERE cat_ID = '$cat_ID'");
|
$cat_name = $wpdb->get_var("SELECT cat_name FROM $tablecategories WHERE cat_ID = '$cat_ID'");
|
||||||
$cache_categories[$cat_ID]->cat_name = $cat_name;
|
$cache_categories[$cat_ID]->cat_name = $cat_name;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -59,7 +59,7 @@ function comments_popup_script($width=400, $height=400, $file='wp-comments-popup
|
||||||
}
|
}
|
||||||
|
|
||||||
function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Comments', $CSSclass='', $none='Comments Off') {
|
function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Comments', $CSSclass='', $none='Comments Off') {
|
||||||
global $id, $wpcommentspopupfile, $wpcommentsjavascript, $post, $wpdb, $tablecomments, $HTTP_COOKIE_VARS, $cookiehash;
|
global $id, $wpcommentspopupfile, $wpcommentsjavascript, $post, $wpdb, $tablecomments, $cookiehash;
|
||||||
global $querystring_start, $querystring_equal, $querystring_separator;
|
global $querystring_start, $querystring_equal, $querystring_separator;
|
||||||
global $comment_count_cache, $single;
|
global $comment_count_cache, $single;
|
||||||
if (!$single) {
|
if (!$single) {
|
||||||
|
@ -73,7 +73,7 @@ function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Com
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
if (!empty($post->post_password)) { // if there's a password
|
if (!empty($post->post_password)) { // if there's a password
|
||||||
if ($HTTP_COOKIE_VARS['wp-postpass_'.$cookiehash] != $post->post_password) { // and it doesn't match the cookie
|
if ($_COOKIE['wp-postpass_'.$cookiehash] != $post->post_password) { // and it doesn't match the cookie
|
||||||
echo('Enter your password to view comments');
|
echo('Enter your password to view comments');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -308,7 +308,7 @@ function get_archives($type='', $limit='', $format='html', $before = "", $after
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_calendar($daylength = 1) {
|
function get_calendar($daylength = 1) {
|
||||||
global $wpdb, $HTTP_GET_VARS, $m, $monthnum, $year, $timedifference, $month, $weekday, $tableposts, $posts;
|
global $wpdb, $m, $monthnum, $year, $timedifference, $month, $weekday, $tableposts, $posts;
|
||||||
|
|
||||||
// Quick check. If we have no posts at all, abort!
|
// Quick check. If we have no posts at all, abort!
|
||||||
if (!$posts) {
|
if (!$posts) {
|
||||||
|
@ -317,8 +317,8 @@ function get_calendar($daylength = 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($HTTP_GET_VARS['w'])) {
|
if (isset($_GET['w'])) {
|
||||||
$w = ''.intval($HTTP_GET_VARS['w']);
|
$w = ''.intval($_GET['w']);
|
||||||
}
|
}
|
||||||
$time_difference = get_settings('time_difference');
|
$time_difference = get_settings('time_difference');
|
||||||
$add_hours = intval($time_difference);
|
$add_hours = intval($time_difference);
|
||||||
|
|
|
@ -98,7 +98,7 @@ function the_content_rss($more_link_text='(more...)', $stripteaser=0, $more_file
|
||||||
|
|
||||||
function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_file = '') {
|
function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_file = '') {
|
||||||
global $id, $post, $more, $single, $withcomments, $page, $pages, $multipage, $numpages;
|
global $id, $post, $more, $single, $withcomments, $page, $pages, $multipage, $numpages;
|
||||||
global $HTTP_SERVER_VARS, $preview, $cookiehash;
|
global $preview, $cookiehash;
|
||||||
global $pagenow;
|
global $pagenow;
|
||||||
$output = '';
|
$output = '';
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_
|
||||||
if ($more_file != '') {
|
if ($more_file != '') {
|
||||||
$file = $more_file;
|
$file = $more_file;
|
||||||
} else {
|
} else {
|
||||||
$file = $pagenow; //$HTTP_SERVER_VARS['PHP_SELF'];
|
$file = $pagenow; //$_SERVER['PHP_SELF'];
|
||||||
}
|
}
|
||||||
$content = $pages[$page-1];
|
$content = $pages[$page-1];
|
||||||
$content = explode('<!--more-->', $content);
|
$content = explode('<!--more-->', $content);
|
||||||
|
@ -343,16 +343,16 @@ function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat=
|
||||||
}
|
}
|
||||||
|
|
||||||
function next_posts($max_page = 0) { // original by cfactor at cooltux.org
|
function next_posts($max_page = 0) { // original by cfactor at cooltux.org
|
||||||
global $HTTP_SERVER_VARS, $p, $paged, $what_to_show, $pagenow;
|
global $p, $paged, $what_to_show, $pagenow;
|
||||||
global $querystring_start, $querystring_equal, $querystring_separator;
|
global $querystring_start, $querystring_equal, $querystring_separator;
|
||||||
if (empty($p) && ($what_to_show == 'paged')) {
|
if (empty($p) && ($what_to_show == 'paged')) {
|
||||||
$qstr = $HTTP_SERVER_VARS['QUERY_STRING'];
|
$qstr = $_SERVER['QUERY_STRING'];
|
||||||
if (!empty($qstr)) {
|
if (!empty($qstr)) {
|
||||||
$qstr = preg_replace('/&paged=\d{0,}/', '', $qstr);
|
$qstr = preg_replace('/&paged=\d{0,}/', '', $qstr);
|
||||||
$qstr = preg_replace('/paged=\d{0,}/', '', $qstr);
|
$qstr = preg_replace('/paged=\d{0,}/', '', $qstr);
|
||||||
} elseif (stristr($HTTP_SERVER_VARS['REQUEST_URI'], $HTTP_SERVER_VARS['SCRIPT_NAME'] )) {
|
} elseif (stristr($_SERVER['REQUEST_URI'], $_SERVER['SCRIPT_NAME'] )) {
|
||||||
if ('' != $qstr = str_replace($HTTP_SERVER_VARS['SCRIPT_NAME'], '',
|
if ('' != $qstr = str_replace($_SERVER['SCRIPT_NAME'], '',
|
||||||
$HTTP_SERVER_VARS['REQUEST_URI']) ) {
|
$_SERVER['REQUEST_URI']) ) {
|
||||||
$qstr = preg_replace('/^\//', '', $qstr);
|
$qstr = preg_replace('/^\//', '', $qstr);
|
||||||
$qstr = preg_replace('/paged\/\d{0,}\//', '', $qstr);
|
$qstr = preg_replace('/paged\/\d{0,}\//', '', $qstr);
|
||||||
$qstr = preg_replace('/paged\/\d{0,}/', '', $qstr);
|
$qstr = preg_replace('/paged\/\d{0,}/', '', $qstr);
|
||||||
|
@ -396,16 +396,16 @@ function next_posts_link($label='Next Page »', $max_page=0) {
|
||||||
|
|
||||||
|
|
||||||
function previous_posts() { // original by cfactor at cooltux.org
|
function previous_posts() { // original by cfactor at cooltux.org
|
||||||
global $HTTP_SERVER_VARS, $p, $paged, $what_to_show, $pagenow;
|
global $_SERVER, $p, $paged, $what_to_show, $pagenow;
|
||||||
global $querystring_start, $querystring_equal, $querystring_separator;
|
global $querystring_start, $querystring_equal, $querystring_separator;
|
||||||
if (empty($p) && ($what_to_show == 'paged')) {
|
if (empty($p) && ($what_to_show == 'paged')) {
|
||||||
$qstr = $HTTP_SERVER_VARS['QUERY_STRING'];
|
$qstr = $_SERVER['QUERY_STRING'];
|
||||||
if (!empty($qstr)) {
|
if (!empty($qstr)) {
|
||||||
$qstr = preg_replace('/&paged=\d{0,}/', '', $qstr);
|
$qstr = preg_replace('/&paged=\d{0,}/', '', $qstr);
|
||||||
$qstr = preg_replace('/paged=\d{0,}/', '', $qstr);
|
$qstr = preg_replace('/paged=\d{0,}/', '', $qstr);
|
||||||
} elseif (stristr($HTTP_SERVER_VARS['REQUEST_URI'], $HTTP_SERVER_VARS['SCRIPT_NAME'] )) {
|
} elseif (stristr($_SERVER['REQUEST_URI'], $_SERVER['SCRIPT_NAME'] )) {
|
||||||
if ('' != $qstr = str_replace($HTTP_SERVER_VARS['SCRIPT_NAME'], '',
|
if ('' != $qstr = str_replace($_SERVER['SCRIPT_NAME'], '',
|
||||||
$HTTP_SERVER_VARS['REQUEST_URI']) ) {
|
$_SERVER['REQUEST_URI']) ) {
|
||||||
$qstr = preg_replace('/^\//', '', $qstr);
|
$qstr = preg_replace('/^\//', '', $qstr);
|
||||||
$qstr = preg_replace("/paged\/\d{0,}\//", '', $qstr);
|
$qstr = preg_replace("/paged\/\d{0,}\//", '', $qstr);
|
||||||
$qstr = preg_replace('/paged\/\d{0,}/', '', $qstr);
|
$qstr = preg_replace('/paged\/\d{0,}/', '', $qstr);
|
||||||
|
|
|
@ -103,7 +103,7 @@ if (($querystring_start == '/') && ($pagenow != 'post.php')) {
|
||||||
// Simple browser detection
|
// Simple browser detection
|
||||||
$is_lynx = 0; $is_gecko = 0; $is_winIE = 0; $is_macIE = 0; $is_opera = 0; $is_NS4 = 0;
|
$is_lynx = 0; $is_gecko = 0; $is_winIE = 0; $is_macIE = 0; $is_opera = 0; $is_NS4 = 0;
|
||||||
if (!isset($HTTP_USER_AGENT)) {
|
if (!isset($HTTP_USER_AGENT)) {
|
||||||
$HTTP_USER_AGENT = $HTTP_SERVER_VARS['HTTP_USER_AGENT'];
|
$HTTP_USER_AGENT = $_SERVER['HTTP_USER_AGENT'];
|
||||||
}
|
}
|
||||||
if (preg_match('/Lynx/', $HTTP_USER_AGENT)) {
|
if (preg_match('/Lynx/', $HTTP_USER_AGENT)) {
|
||||||
$is_lynx = 1;
|
$is_lynx = 1;
|
||||||
|
@ -151,8 +151,8 @@ $wp_gecko_correction['out'] = array(
|
||||||
);
|
);
|
||||||
|
|
||||||
// Server detection
|
// Server detection
|
||||||
$is_apache = strstr($HTTP_SERVER_VARS['SERVER_SOFTWARE'], 'Apache') ? 1 : 0;
|
$is_apache = strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') ? 1 : 0;
|
||||||
$is_IIS = strstr($HTTP_SERVER_VARS['SERVER_SOFTWARE'], 'Microsoft-IIS') ? 1 : 0;
|
$is_IIS = strstr($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') ? 1 : 0;
|
||||||
|
|
||||||
// if the config file does not provide the smilies array, let's define it here
|
// if the config file does not provide the smilies array, let's define it here
|
||||||
if (!isset($wpsmiliestrans)) {
|
if (!isset($wpsmiliestrans)) {
|
||||||
|
|
|
@ -4,7 +4,7 @@ $doing_rss = 1;
|
||||||
header('Content-type: text/xml', true);
|
header('Content-type: text/xml', true);
|
||||||
require('wp-blog-header.php');
|
require('wp-blog-header.php');
|
||||||
|
|
||||||
$link_cat = $HTTP_GET_VARS['link_cat'];
|
$link_cat = $_GET['link_cat'];
|
||||||
if ((empty($link_cat)) || ($link_cat == 'all') || ($link_cat == '0')) {
|
if ((empty($link_cat)) || ($link_cat == 'all') || ($link_cat == '0')) {
|
||||||
$sql_cat = '';
|
$sql_cat = '';
|
||||||
} else { // be safe
|
} else { // be safe
|
||||||
|
|
38
wp-login.php
38
wp-login.php
|
@ -15,9 +15,9 @@ if (!function_exists('add_magic_quotes')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!get_magic_quotes_gpc()) {
|
if (!get_magic_quotes_gpc()) {
|
||||||
$HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS);
|
$_GET = add_magic_quotes($_GET);
|
||||||
$HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS);
|
$_POST = add_magic_quotes($_POST);
|
||||||
$HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
|
$_COOKIE = add_magic_quotes($_COOKIE);
|
||||||
}
|
}
|
||||||
|
|
||||||
$wpvarstoreset = array('action','mode','error','text','popupurl','popuptitle');
|
$wpvarstoreset = array('action','mode','error','text','popupurl','popuptitle');
|
||||||
|
@ -25,14 +25,14 @@ $wpvarstoreset = array('action','mode','error','text','popupurl','popuptitle');
|
||||||
for ($i = 0; $i < count($wpvarstoreset); $i = $i + 1) {
|
for ($i = 0; $i < count($wpvarstoreset); $i = $i + 1) {
|
||||||
$wpvar = $wpvarstoreset[$i];
|
$wpvar = $wpvarstoreset[$i];
|
||||||
if (!isset($$wpvar)) {
|
if (!isset($$wpvar)) {
|
||||||
if (empty($HTTP_POST_VARS["$wpvar"])) {
|
if (empty($_POST["$wpvar"])) {
|
||||||
if (empty($HTTP_GET_VARS["$wpvar"])) {
|
if (empty($_GET["$wpvar"])) {
|
||||||
$$wpvar = '';
|
$$wpvar = '';
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_GET_VARS["$wpvar"];
|
$$wpvar = $_GET["$wpvar"];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_POST_VARS["$wpvar"];
|
$$wpvar = $_POST["$wpvar"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,10 +58,10 @@ break;
|
||||||
|
|
||||||
case 'login':
|
case 'login':
|
||||||
|
|
||||||
if(!empty($HTTP_POST_VARS)) {
|
if(!empty($_POST)) {
|
||||||
$log = $HTTP_POST_VARS['log'];
|
$log = $_POST['log'];
|
||||||
$pwd = $HTTP_POST_VARS['pwd'];
|
$pwd = $_POST['pwd'];
|
||||||
$redirect_to = $HTTP_POST_VARS['redirect_to'];
|
$redirect_to = $_POST['redirect_to'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = get_userdatabylogin($log);
|
$user = get_userdatabylogin($log);
|
||||||
|
@ -122,7 +122,7 @@ case 'login':
|
||||||
$user_pass = $pwd;
|
$user_pass = $pwd;
|
||||||
setcookie('wordpressuser_'.$cookiehash, $user_login, time()+31536000);
|
setcookie('wordpressuser_'.$cookiehash, $user_login, time()+31536000);
|
||||||
setcookie('wordpresspass_'.$cookiehash, md5($user_pass), time()+31536000);
|
setcookie('wordpresspass_'.$cookiehash, md5($user_pass), time()+31536000);
|
||||||
if (empty($HTTP_COOKIE_VARS['wordpressblogid_'.$cookiehash])) {
|
if (empty($_COOKIE['wordpressblogid_'.$cookiehash])) {
|
||||||
setcookie('wordpressblogid_'.$cookiehash, 1,time()+31536000);
|
setcookie('wordpressblogid_'.$cookiehash, 1,time()+31536000);
|
||||||
}
|
}
|
||||||
header('Expires: Wed, 11 Jan 1984 05:00:00 GMT');
|
header('Expires: Wed, 11 Jan 1984 05:00:00 GMT');
|
||||||
|
@ -200,7 +200,7 @@ break;
|
||||||
|
|
||||||
case 'retrievepassword':
|
case 'retrievepassword':
|
||||||
|
|
||||||
$user_login = $HTTP_POST_VARS["user_login"];
|
$user_login = $_POST["user_login"];
|
||||||
$user_data = get_userdatabylogin($user_login);
|
$user_data = get_userdatabylogin($user_login);
|
||||||
$user_email = $user_data->user_email;
|
$user_email = $user_data->user_email;
|
||||||
|
|
||||||
|
@ -232,9 +232,9 @@ break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
if((!empty($HTTP_COOKIE_VARS['wordpressuser_'.$cookiehash])) && (!empty($HTTP_COOKIE_VARS['wordpresspass_'.$cookiehash]))) {
|
if((!empty($_COOKIE['wordpressuser_'.$cookiehash])) && (!empty($_COOKIE['wordpresspass_'.$cookiehash]))) {
|
||||||
$user_login = $HTTP_COOKIE_VARS['wordpressuser_'.$cookiehash];
|
$user_login = $_COOKIE['wordpressuser_'.$cookiehash];
|
||||||
$user_pass_md5 = $HTTP_COOKIE_VARS['wordpresspass_'.$cookiehash];
|
$user_pass_md5 = $_COOKIE['wordpresspass_'.$cookiehash];
|
||||||
}
|
}
|
||||||
|
|
||||||
function checklogin() {
|
function checklogin() {
|
||||||
|
@ -250,7 +250,7 @@ default:
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !(checklogin()) ) {
|
if ( !(checklogin()) ) {
|
||||||
if (!empty($HTTP_COOKIE_VARS['wordpressuser_'.$cookiehash])) {
|
if (!empty($_COOKIE['wordpressuser_'.$cookiehash])) {
|
||||||
$error="Error: wrong login/password"; //, or your session has expired.";
|
$error="Error: wrong login/password"; //, or your session has expired.";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -298,8 +298,8 @@ if ($error) echo "<div align=\"right\" style=\"padding:4px;\"><font color=\"#FF0
|
||||||
<input type="hidden" name="popupurl" value="<?php echo $popupurl ?>" />
|
<input type="hidden" name="popupurl" value="<?php echo $popupurl ?>" />
|
||||||
<input type="hidden" name="popuptitle" value="<?php echo $popuptitle ?>" />
|
<input type="hidden" name="popuptitle" value="<?php echo $popuptitle ?>" />
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (isset($HTTP_GET_VARS["redirect_to"])) { ?>
|
<?php if (isset($_GET["redirect_to"])) { ?>
|
||||||
<input type="hidden" name="redirect_to" value="<?php echo $HTTP_GET_VARS["redirect_to"] ?>" />
|
<input type="hidden" name="redirect_to" value="<?php echo $_GET["redirect_to"] ?>" />
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<input type="hidden" name="redirect_to" value="wp-admin/" />
|
<input type="hidden" name="redirect_to" value="wp-admin/" />
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
@ -6,7 +6,6 @@ require_once(ABSPATH.WPINC.'/class-pop3.php');
|
||||||
|
|
||||||
timer_start();
|
timer_start();
|
||||||
|
|
||||||
$use_cache = 1;
|
|
||||||
$output_debugging_info = 0; # =1 if you want to output debugging info
|
$output_debugging_info = 0; # =1 if you want to output debugging info
|
||||||
$time_difference = get_settings('time_difference');
|
$time_difference = get_settings('time_difference');
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
-- Matt
|
-- Matt
|
||||||
*/
|
*/
|
||||||
require(dirname(__FILE__) . '/wp-config.php');
|
require(dirname(__FILE__) . '/wp-config.php');
|
||||||
setcookie('wp-postpass_'.$cookiehash, $HTTP_POST_VARS['post_password'], time()+60*60*24*30);
|
setcookie('wp-postpass_'.$cookiehash, $_POST['post_password'], time()+60*60*24*30);
|
||||||
header('Location: ' . $HTTP_SERVER_VARS['HTTP_REFERER']);
|
header('Location: ' . $_SERVER['HTTP_REFERER']);
|
||||||
|
|
||||||
?>
|
?>
|
|
@ -13,23 +13,23 @@ function add_magic_quotes($array) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!get_magic_quotes_gpc()) {
|
if (!get_magic_quotes_gpc()) {
|
||||||
$HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS);
|
$_GET = add_magic_quotes($_GET);
|
||||||
$HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS);
|
$_POST = add_magic_quotes($_POST);
|
||||||
$HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
|
$_COOKIE = add_magic_quotes($_COOKIE);
|
||||||
}
|
}
|
||||||
|
|
||||||
$wpvarstoreset = array('action');
|
$wpvarstoreset = array('action');
|
||||||
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
||||||
$wpvar = $wpvarstoreset[$i];
|
$wpvar = $wpvarstoreset[$i];
|
||||||
if (!isset($$wpvar)) {
|
if (!isset($$wpvar)) {
|
||||||
if (empty($HTTP_POST_VARS["$wpvar"])) {
|
if (empty($_POST["$wpvar"])) {
|
||||||
if (empty($HTTP_GET_VARS["$wpvar"])) {
|
if (empty($_GET["$wpvar"])) {
|
||||||
$$wpvar = '';
|
$$wpvar = '';
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_GET_VARS["$wpvar"];
|
$$wpvar = $_GET["$wpvar"];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$$wpvar = $HTTP_POST_VARS["$wpvar"];
|
$$wpvar = $_POST["$wpvar"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,10 +46,10 @@ case 'register':
|
||||||
return ereg('^[a-zA-Z0-9\_-\|]+$',$value);
|
return ereg('^[a-zA-Z0-9\_-\|]+$',$value);
|
||||||
}
|
}
|
||||||
|
|
||||||
$user_login = $HTTP_POST_VARS['user_login'];
|
$user_login = $_POST['user_login'];
|
||||||
$pass1 = $HTTP_POST_VARS['pass1'];
|
$pass1 = $_POST['pass1'];
|
||||||
$pass2 = $HTTP_POST_VARS['pass2'];
|
$pass2 = $_POST['pass2'];
|
||||||
$user_email = $HTTP_POST_VARS['user_email'];
|
$user_email = $_POST['user_email'];
|
||||||
|
|
||||||
/* checking login has been typed */
|
/* checking login has been typed */
|
||||||
if ($user_login == '') {
|
if ($user_login == '') {
|
||||||
|
@ -80,9 +80,9 @@ case 'register':
|
||||||
die ('<strong>ERROR</strong>: This login is already registered, please choose another one.');
|
die ('<strong>ERROR</strong>: This login is already registered, please choose another one.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$user_ip = $HTTP_SERVER_VARS['REMOTE_ADDR'] ;
|
$user_ip = $_SERVER['REMOTE_ADDR'] ;
|
||||||
$user_domain = gethostbyaddr($HTTP_SERVER_VARS['REMOTE_ADDR'] );
|
$user_domain = gethostbyaddr($_SERVER['REMOTE_ADDR'] );
|
||||||
$user_browser = $HTTP_SERVER_VARS['HTTP_USER_AGENT'];
|
$user_browser = $_SERVER['HTTP_USER_AGENT'];
|
||||||
|
|
||||||
$user_login = addslashes($user_login);
|
$user_login = addslashes($user_login);
|
||||||
$pass1 = addslashes($pass1);
|
$pass1 = addslashes($pass1);
|
||||||
|
|
|
@ -3,12 +3,12 @@ require(dirname(__FILE__) . '/wp-config.php');
|
||||||
|
|
||||||
// trackback is done by a POST
|
// trackback is done by a POST
|
||||||
$request_array = 'HTTP_POST_VARS';
|
$request_array = 'HTTP_POST_VARS';
|
||||||
$tb_id = explode('/', $HTTP_SERVER_VARS['REQUEST_URI']);
|
$tb_id = explode('/', $_SERVER['REQUEST_URI']);
|
||||||
$tb_id = intval($tb_id[count($tb_id)-1]);
|
$tb_id = intval($tb_id[count($tb_id)-1]);
|
||||||
$tb_url = $HTTP_POST_VARS['url'];
|
$tb_url = $_POST['url'];
|
||||||
$title = $HTTP_POST_VARS['title'];
|
$title = $_POST['title'];
|
||||||
$excerpt = $HTTP_POST_VARS['excerpt'];
|
$excerpt = $_POST['excerpt'];
|
||||||
$blog_name = $HTTP_POST_VARS['blog_name'];
|
$blog_name = $_POST['blog_name'];
|
||||||
|
|
||||||
require('wp-blog-header.php');
|
require('wp-blog-header.php');
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ if (empty($title) && empty($tb_url) && empty($blog_name)) {
|
||||||
header('Location: ' . get_permalink($tb_id));
|
header('Location: ' . get_permalink($tb_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((strlen(''.$tb_id)) && (empty($HTTP_GET_VARS['__mode'])) && (strlen(''.$tb_url))) {
|
if ((strlen(''.$tb_id)) && (empty($_GET['__mode'])) && (strlen(''.$tb_url))) {
|
||||||
|
|
||||||
@header('Content-Type: text/xml');
|
@header('Content-Type: text/xml');
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ if ((strlen(''.$tb_id)) && (empty($HTTP_GET_VARS['__mode'])) && (strlen(''.$tb_u
|
||||||
$original_comment = $comment;
|
$original_comment = $comment;
|
||||||
$comment_post_ID = $tb_id;
|
$comment_post_ID = $tb_id;
|
||||||
|
|
||||||
$user_ip = $HTTP_SERVER_VARS['REMOTE_ADDR'];
|
$user_ip = $_SERVER['REMOTE_ADDR'];
|
||||||
$user_domain = gethostbyaddr($user_ip);
|
$user_domain = gethostbyaddr($user_ip);
|
||||||
$time_difference = get_settings('time_difference');
|
$time_difference = get_settings('time_difference');
|
||||||
$now = current_time('mysql');
|
$now = current_time('mysql');
|
||||||
|
|
Loading…
Reference in New Issue