[wp-cvs] wordpress wp-blog-header.php, 1.64,
1.65 wp-comments-popup.php, 1.11, 1.12 wp-comments-post.php,
1.11, 1.12 wp-comments-reply.php, 1.3, 1.4 wp-comments.php,
1.17, 1.18 wp-commentsrss2.php, 1.16, 1.17 wp-links-opml.php,
1.6, 1.7 wp-login.php, 1.22, 1.23 wp-mail.php, 1.14,
1.15 wp-register.php, 1.16, 1.17 wp-settings.php, 1.41,
1.42 wp-trackback.php, 1.12, 1.13 xmlrpc.php, 1.60, 1.61
Matthew Mullenweg
saxmatt at users.sourceforge.net
Mon May 24 03:22:20 CDT 2004
- Previous message: [wp-cvs] wordpress/wp-includes functions.php,1.102,1.103
- Next message: [wp-cvs] wordpress/wp-admin admin-functions.php, 1.26,
1.27 admin-header.php, 1.22, 1.23 auth.php, 1.5,
1.6 categories.php, 1.29, 1.30 edit-comments.php, 1.23,
1.24 edit.php, 1.21, 1.22 import-b2.php, 1.9,
1.10 import-blogger.php, 1.11, 1.12 import-greymatter.php,
1.13, 1.14 import-livejournal.php, 1.3, 1.4 import-mt.php,
1.10, 1.11 import-rss.php, 1.3, 1.4 import-textpattern.php,
1.9, 1.10 install-helper.php, 1.1, 1.2 install.php, 1.29,
1.30 link-add.php, 1.11, 1.12 link-categories.php, 1.8,
1.9 link-import.php, 1.10, 1.11 link-manager.php, 1.24,
1.25 moderation.php, 1.9, 1.10 optionhandler.php, 1.7,
1.8 options-head.php, 1.7, 1.8 options-writing.php, 1.16,
1.17 options.php, 1.20, 1.21 post.php, 1.60, 1.61 profile.php,
1.20, 1.21 upgrade-functions.php, 1.54, 1.55 users.php, 1.26,
1.27 xmlrpc.php, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/cafelog/wordpress
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19270
Modified Files:
wp-blog-header.php wp-comments-popup.php wp-comments-post.php
wp-comments-reply.php wp-comments.php wp-commentsrss2.php
wp-links-opml.php wp-login.php wp-mail.php wp-register.php
wp-settings.php wp-trackback.php xmlrpc.php
Log Message:
Giant commit, sorry mailing list people. Move all table names to new $wpdb versions. Works but the whole app needs thorough testing now.
Index: wp-links-opml.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-links-opml.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** wp-links-opml.php 22 Apr 2004 07:41:57 -0000 1.6
--- wp-links-opml.php 24 May 2004 08:22:18 -0000 1.7
***************
*** 13,18 ****
$link_cat = intval($link_cat);
if ($link_cat != 0) {
! $sql_cat = "AND $tablelinks.link_category = $link_cat";
! $cat_name = $wpdb->get_var("SELECT $tablelinkcategories.cat_name FROM $tablelinkcategories WHERE $tablelinkcategories.cat_id = $link_cat");
if (!empty($cat_name)) {
$cat_name = ": category $cat_name";
--- 13,18 ----
$link_cat = intval($link_cat);
if ($link_cat != 0) {
! $sql_cat = "AND $wpdb->links.link_category = $link_cat";
! $cat_name = $wpdb->get_var("SELECT $wpdb->linkcategories.cat_name FROM $wpdb->linkcategories WHERE $wpdb->linkcategories.cat_id = $link_cat");
if (!empty($cat_name)) {
$cat_name = ": category $cat_name";
***************
*** 28,36 ****
</head>
<body>
! <?php $sql = "SELECT $tablelinks.link_url, link_rss, $tablelinks.link_name, $tablelinks.link_category, $tablelinkcategories.cat_name
! FROM $tablelinks
! LEFT JOIN $tablelinkcategories on $tablelinks.link_category = $tablelinkcategories.cat_id
$sql_cat
! ORDER BY $tablelinkcategories.cat_name, $tablelinks.link_name \n";
//echo("<!-- $sql -->");
$prev_cat_id = 0;
--- 28,36 ----
</head>
<body>
! <?php $sql = "SELECT $wpdb->links.link_url, link_rss, $wpdb->links.link_name, $wpdb->links.link_category, $wpdb->linkcategories.cat_name
! FROM $wpdb->links
! LEFT JOIN $wpdb->linkcategories on $wpdb->links.link_category = $wpdb->linkcategories.cat_id
$sql_cat
! ORDER BY $wpdb->linkcategories.cat_name, $wpdb->links.link_name \n";
//echo("<!-- $sql -->");
$prev_cat_id = 0;
Index: wp-commentsrss2.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-commentsrss2.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** wp-commentsrss2.php 5 May 2004 06:32:18 -0000 1.16
--- wp-commentsrss2.php 24 May 2004 08:22:18 -0000 1.17
***************
*** 29,35 ****
$comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_author_email,
comment_author_url, comment_date, comment_content, comment_post_ID,
! $tableposts.ID, $tableposts.post_password FROM $tablecomments
! LEFT JOIN $tableposts ON comment_post_id = id WHERE comment_post_ID = '$id'
! AND $tablecomments.comment_approved = '1' AND $tableposts.post_status = 'publish'
AND post_date < '".date("Y-m-d H:i:59")."'
ORDER BY comment_date LIMIT " . get_settings('posts_per_rss') );
--- 29,35 ----
$comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_author_email,
comment_author_url, comment_date, comment_content, comment_post_ID,
! $wpdb->posts.ID, $wpdb->posts.post_password FROM $wpdb->comments
! LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE comment_post_ID = '$id'
! AND $wpdb->comments.comment_approved = '1' AND $wpdb->posts.post_status = 'publish'
AND post_date < '".date("Y-m-d H:i:59")."'
ORDER BY comment_date LIMIT " . get_settings('posts_per_rss') );
***************
*** 37,43 ****
$comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_author_email,
comment_author_url, comment_date, comment_content, comment_post_ID,
! $tableposts.ID, $tableposts.post_password FROM $tablecomments
! LEFT JOIN $tableposts ON comment_post_id = id WHERE $tableposts.post_status = 'publish'
! AND $tablecomments.comment_approved = '1' AND post_date < '".date("Y-m-d H:i:s")."'
ORDER BY comment_date DESC LIMIT " . get_settings('posts_per_rss') );
}
--- 37,43 ----
$comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_author_email,
comment_author_url, comment_date, comment_content, comment_post_ID,
! $wpdb->posts.ID, $wpdb->posts.post_password FROM $wpdb->comments
! LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE $wpdb->posts.post_status = 'publish'
! AND $wpdb->comments.comment_approved = '1' AND post_date < '".date("Y-m-d H:i:s")."'
ORDER BY comment_date DESC LIMIT " . get_settings('posts_per_rss') );
}
Index: xmlrpc.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/xmlrpc.php,v
retrieving revision 1.60
retrieving revision 1.61
diff -C2 -d -r1.60 -r1.61
*** xmlrpc.php 24 May 2004 01:35:36 -0000 1.60
--- xmlrpc.php 24 May 2004 08:22:18 -0000 1.61
***************
*** 60,64 ****
global $xmlrpcerruser; // import user errcode value
! global $blog_ID,$cache_userdata,$tableposts,$use_rss;
global $post_default_title,$post_default_category;
global $cafelogID, $sleep_after_edit;
--- 60,64 ----
global $xmlrpcerruser; // import user errcode value
! global $blog_ID,$cache_userdata,$use_rss;
global $post_default_title,$post_default_category;
global $cafelogID, $sleep_after_edit;
***************
*** 145,149 ****
function b2getcategories($m) {
global $wpdb;
! global $xmlrpcerruser,$tablecategories;
--- 145,149 ----
function b2getcategories($m) {
global $wpdb;
! global $xmlrpcerruser;
***************
*** 162,166 ****
if (user_pass_ok($username,$password)) {
! $results = $wpdb->get_results("SELECT * FROM $tablecategories ORDER BY cat_ID ASC");
if (!$results) die("Error getting data");
$i = 0;
--- 162,166 ----
if (user_pass_ok($username,$password)) {
! $results = $wpdb->get_results("SELECT * FROM $wpdb->categories ORDER BY cat_ID ASC");
if (!$results) die("Error getting data");
$i = 0;
***************
*** 200,204 ****
function b2_getPostURL($m) {
global $wpdb;
! global $xmlrpcerruser, $tableposts;
global $querystring_start, $querystring_equal, $querystring_separator;
--- 200,204 ----
function b2_getPostURL($m) {
global $wpdb;
! global $xmlrpcerruser;
global $querystring_start, $querystring_equal, $querystring_separator;
***************
*** 299,303 ****
global $xmlrpcerruser; // import user errcode value
! global $blog_ID,$cache_userdata,$tableposts,$use_rss;
global $post_default_title,$post_default_category;
global $cafelogID, $sleep_after_edit;
--- 299,303 ----
global $xmlrpcerruser; // import user errcode value
! global $blog_ID,$cache_userdata,$use_rss;
global $post_default_title,$post_default_category;
global $cafelogID, $sleep_after_edit;
***************
*** 374,378 ****
global $xmlrpcerruser; // import user errcode value
! global $blog_ID,$cache_userdata,$tableposts,$use_rss;
global $post_default_title,$post_default_category, $sleep_after_edit;
$err="";
--- 374,378 ----
global $xmlrpcerruser; // import user errcode value
! global $blog_ID,$cache_userdata,$use_rss;
global $post_default_title,$post_default_category, $sleep_after_edit;
$err="";
***************
*** 463,467 ****
global $xmlrpcerruser; // import user errcode value
! global $blog_ID,$cache_userdata,$tableposts,$use_rss;
global $post_default_title,$post_default_category, $sleep_after_edit;
$err="";
--- 463,467 ----
global $xmlrpcerruser; // import user errcode value
! global $blog_ID,$cache_userdata,$use_rss;
global $post_default_title,$post_default_category, $sleep_after_edit;
$err="";
***************
*** 478,482 ****
$newcontent = $newcontent->scalarval();
! $sql = "SELECT * FROM $tableposts WHERE ID = '$post_ID'";
$result = $wpdb->get_results($sql);
if (!$result)
--- 478,482 ----
$newcontent = $newcontent->scalarval();
! $sql = "SELECT * FROM $wpdb->posts WHERE ID = '$post_ID'";
$result = $wpdb->get_results($sql);
if (!$result)
***************
*** 539,543 ****
global $xmlrpcerruser;
- global $tableusers;
$user_login = $m->getParam(1);
--- 539,542 ----
***************
*** 545,549 ****
! $sql = "SELECT user_level FROM $tableusers WHERE user_login = '$user_login' AND user_level > 3";
$result = $wpdb->get_results($sql);
--- 544,548 ----
! $sql = "SELECT user_level FROM $wpdb->users WHERE user_login = '$user_login' AND user_level > 3";
$result = $wpdb->get_results($sql);
***************
*** 570,574 ****
function bloggergetuserinfo($m) {
! global $xmlrpcerruser,$tableusers;
--- 569,573 ----
function bloggergetuserinfo($m) {
! global $xmlrpcerruser;
***************
*** 607,611 ****
function bloggergetpost($m) {
! global $xmlrpcerruser,$tableposts;
--- 606,610 ----
function bloggergetpost($m) {
! global $xmlrpcerruser;
***************
*** 659,663 ****
function bloggergetrecentposts($m) {
global $wpdb;
! global $xmlrpcerruser,$tableposts;
error_reporting(0); // there is a bug in phpxmlrpc that makes it say there are errors while the output is actually valid, so let's disable errors for that function
--- 658,662 ----
function bloggergetrecentposts($m) {
global $wpdb;
! global $xmlrpcerruser;
error_reporting(0); // there is a bug in phpxmlrpc that makes it say there are errors while the output is actually valid, so let's disable errors for that function
***************
*** 683,687 ****
if (user_pass_ok($username,$password)) {
! $sql = "SELECT * FROM $tableposts ORDER BY post_date DESC".$limit;
$result = $wpdb->get_results($sql);
if (!$result)
--- 682,686 ----
if (user_pass_ok($username,$password)) {
! $sql = "SELECT * FROM $wpdb->posts ORDER BY post_date DESC".$limit;
$result = $wpdb->get_results($sql);
if (!$result)
***************
*** 776,780 ****
function bloggergettemplate($m) {
! global $xmlrpcerruser,$tableusers;
error_reporting(0); // there is a bug in phpxmlrpc that makes it say there are errors while the output is actually valid, so let's disable errors for that function
--- 775,779 ----
function bloggergettemplate($m) {
! global $xmlrpcerruser;
error_reporting(0); // there is a bug in phpxmlrpc that makes it say there are errors while the output is actually valid, so let's disable errors for that function
***************
*** 839,843 ****
function bloggersettemplate($m) {
! global $xmlrpcerruser, $tableusers;
error_reporting(0); // there is a bug in phpxmlrpc that makes it say there are errors while the output is actually valid, so let's disable errors for that function
--- 838,842 ----
function bloggersettemplate($m) {
! global $xmlrpcerruser;
error_reporting(0); // there is a bug in phpxmlrpc that makes it say there are errors while the output is actually valid, so let's disable errors for that function
***************
*** 912,916 ****
function mwnewpost($params) {
global $xmlrpcerruser;
! global $blog_ID, $cache_userdata,$tableposts;
global $use_rss, $post_default_title;
global $post_default_category,$cafelogID,$sleep_after_edit;
--- 911,915 ----
function mwnewpost($params) {
global $xmlrpcerruser;
! global $blog_ID, $cache_userdata;
global $use_rss, $post_default_title;
global $post_default_category,$cafelogID,$sleep_after_edit;
***************
*** 1254,1258 ****
function mwgetcats ($params) { // ($blogid, $user, $pass)
! global $xmlrpcerruser,$wpdb,$tablecategories;
global $querystring_start, $querystring_equal, $querystring_separator;
--- 1253,1257 ----
function mwgetcats ($params) { // ($blogid, $user, $pass)
! global $xmlrpcerruser,$wpdb;
global $querystring_start, $querystring_equal, $querystring_separator;
***************
*** 1261,1265 ****
$arr = array();
! if ($cats = $wpdb->get_results("SELECT cat_ID,cat_name FROM $tablecategories",ARRAY_A)) {
foreach ($cats as $cat) {
$struct['categoryId'] = $cat['cat_ID'];
--- 1260,1264 ----
$arr = array();
! if ($cats = $wpdb->get_results("SELECT cat_ID,cat_name FROM $wpdb->categories",ARRAY_A)) {
foreach ($cats as $cat) {
$struct['categoryId'] = $cat['cat_ID'];
***************
*** 1446,1450 ****
function mt_getRecentPostTitles($params) {
! global $xmlrpcusererr, $wpdb, $tableposts;
$xblogid = $params->getParam(0);
--- 1445,1449 ----
function mt_getRecentPostTitles($params) {
! global $xmlrpcusererr, $wpdb;
$xblogid = $params->getParam(0);
***************
*** 1459,1463 ****
if (user_pass_ok($username,$password)) {
! $sql = "SELECT post_date, post_author, ID, post_title FROM $tableposts ORDER BY post_date DESC LIMIT $numposts";
$posts = $wpdb->get_results($sql,ARRAY_A);
--- 1458,1462 ----
if (user_pass_ok($username,$password)) {
! $sql = "SELECT post_date, post_author, ID, post_title FROM $wpdb->posts ORDER BY post_date DESC LIMIT $numposts";
$posts = $wpdb->get_results($sql,ARRAY_A);
***************
*** 1521,1527 ****
function pingback_ping($m) { // original code by Mort
// (http://mort.mine.nu:8080)
! global $tableposts, $tablecomments, $wpdb;
! global $wp_version;
! global $wpdb;
--- 1520,1524 ----
function pingback_ping($m) { // original code by Mort
// (http://mort.mine.nu:8080)
! global $wpdb, $wp_version;
***************
*** 1591,1595 ****
// ...or a string #title, a little more complicated
$title = preg_replace('/[^a-zA-Z0-9]/', '.', $urltest['fragment']);
! $sql = "SELECT ID FROM $tableposts WHERE post_title RLIKE '$title'";
$post_ID = $wpdb->get_var($sql) or die("Query: $sql\n\nError: ");
$way = 'from the fragment (title)';
--- 1588,1592 ----
// ...or a string #title, a little more complicated
$title = preg_replace('/[^a-zA-Z0-9]/', '.', $urltest['fragment']);
! $sql = "SELECT ID FROM $wpdb->posts WHERE post_title RLIKE '$title'";
$post_ID = $wpdb->get_var($sql) or die("Query: $sql\n\nError: ");
$way = 'from the fragment (title)';
***************
*** 1605,1609 ****
//debug_fwrite($log, "Found post ID $way: $post_ID\n");
! $sql = 'SELECT post_author FROM '.$tableposts.' WHERE ID = '.$post_ID;
$result = $wpdb->get_results($sql);
--- 1602,1606 ----
//debug_fwrite($log, "Found post ID $way: $post_ID\n");
! $sql = 'SELECT post_author FROM '.$wpdb->posts.' WHERE ID = '.$post_ID;
$result = $wpdb->get_results($sql);
***************
*** 1613,1617 ****
// Let's check that the remote site didn't already pingback this entry
! $sql = 'SELECT * FROM '.$tablecomments.'
WHERE comment_post_ID = '.$post_ID.'
AND comment_author_url = \''.$pagelinkedfrom.'\'
--- 1610,1614 ----
// Let's check that the remote site didn't already pingback this entry
! $sql = 'SELECT * FROM '.$wpdb->comments.'
WHERE comment_post_ID = '.$post_ID.'
AND comment_author_url = \''.$pagelinkedfrom.'\'
***************
*** 1658,1662 ****
if (!empty($context)) {
// Check if pings are on, inelegant exit
! $pingstatus = $wpdb->get_var("SELECT ping_status FROM $tableposts WHERE ID = $post_ID");
if ('closed' == $pingstatus) die('Sorry, pings are turned off for this post.');
--- 1655,1659 ----
if (!empty($context)) {
// Check if pings are on, inelegant exit
! $pingstatus = $wpdb->get_var("SELECT ping_status FROM $wpdb->posts WHERE ID = $post_ID");
if ('closed' == $pingstatus) die('Sorry, pings are turned off for this post.');
***************
*** 1677,1681 ****
$approved = 0;
}
! $consulta = $wpdb->query("INSERT INTO $tablecomments
(comment_post_ID, comment_author, comment_author_url, comment_author_IP, comment_date, comment_content, comment_approved)
VALUES
--- 1674,1678 ----
$approved = 0;
}
! $consulta = $wpdb->query("INSERT INTO $wpdb->comments
(comment_post_ID, comment_author, comment_author_url, comment_author_IP, comment_date, comment_content, comment_approved)
VALUES
Index: wp-trackback.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-trackback.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** wp-trackback.php 24 Apr 2004 21:52:24 -0000 1.12
--- wp-trackback.php 24 May 2004 08:22:18 -0000 1.13
***************
*** 29,33 ****
trackback_response(1, 'Sorry, this weblog does not allow you to trackback its posts.');
! $pingstatus = $wpdb->get_var("SELECT ping_status FROM $tableposts WHERE ID = $tb_id");
if ('closed' == $pingstatus)
--- 29,33 ----
trackback_response(1, 'Sorry, this weblog does not allow you to trackback its posts.');
! $pingstatus = $wpdb->get_var("SELECT ping_status FROM $wpdb->posts WHERE ID = $tb_id");
if ('closed' == $pingstatus)
***************
*** 73,77 ****
}
! $result = $wpdb->query("INSERT INTO $tablecomments
(comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_date_gmt, comment_content, comment_approved)
VALUES
--- 73,77 ----
}
! $result = $wpdb->query("INSERT INTO $wpdb->comments
(comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_date_gmt, comment_content, comment_approved)
VALUES
Index: wp-comments-reply.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-comments-reply.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** wp-comments-reply.php 28 Apr 2004 07:26:49 -0000 1.3
--- wp-comments-reply.php 24 May 2004 08:22:18 -0000 1.4
***************
*** 35,39 ****
$comment_author_email = (isset($_COOKIE['comment_author_email_'.$cookiehash])) ? trim($_COOKIE['comment_author_email_'.$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");
?>
--- 35,39 ----
$comment_author_email = (isset($_COOKIE['comment_author_email_'.$cookiehash])) ? trim($_COOKIE['comment_author_email_'.$cookiehash]) : '';
$comment_author_url = (isset($_COOKIE['comment_author_url_'.$cookiehash])) ? trim($_COOKIE['comment_author_url_'.$cookiehash]) : '';
! $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$id' AND comment_approved = '1' AND comment_ID = '$comment_reply_ID' ORDER BY comment_date");
?>
Index: wp-comments.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-comments.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** wp-comments.php 19 May 2004 01:39:43 -0000 1.17
--- wp-comments.php 24 May 2004 08:22:18 -0000 1.18
***************
*** 18,22 ****
$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");
?>
--- 18,22 ----
$comment_author_url = (isset($_COOKIE['comment_author_url_'.$cookiehash])) ? trim($_COOKIE['comment_author_url_'.$cookiehash]) : '';
! $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$id' AND comment_approved = '1' ORDER BY comment_date");
?>
Index: wp-comments-popup.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-comments-popup.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** wp-comments-popup.php 20 Apr 2004 22:56:36 -0000 1.11
--- wp-comments-popup.php 24 May 2004 08:22:18 -0000 1.12
***************
*** 35,40 ****
$comment_author_email = (isset($_COOKIE['comment_author_email_'.$cookiehash])) ? trim($_COOKIE['comment_author_email_'.$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");
! $commentstatus = $wpdb->get_row("SELECT comment_status, post_password FROM $tableposts WHERE ID = $id");
if (!empty($commentstatus->post_password) && $_COOKIE['wp-postpass_'.$cookiehash] != $commentstatus->post_password) { // and it doesn't match the cookie
echo(get_the_password_form());
--- 35,40 ----
$comment_author_email = (isset($_COOKIE['comment_author_email_'.$cookiehash])) ? trim($_COOKIE['comment_author_email_'.$cookiehash]) : '';
$comment_author_url = (isset($_COOKIE['comment_author_url_'.$cookiehash])) ? trim($_COOKIE['comment_author_url_'.$cookiehash]) : '';
! $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved = '1' ORDER BY comment_date");
! $commentstatus = $wpdb->get_row("SELECT comment_status, post_password FROM $wpdb->posts WHERE ID = $id");
if (!empty($commentstatus->post_password) && $_COOKIE['wp-postpass_'.$cookiehash] != $commentstatus->post_password) { // and it doesn't match the cookie
echo(get_the_password_form());
Index: wp-comments-post.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-comments-post.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** wp-comments-post.php 7 May 2004 23:21:26 -0000 1.11
--- wp-comments-post.php 24 May 2004 08:22:18 -0000 1.12
***************
*** 33,37 ****
$user_ip = $_SERVER['REMOTE_ADDR'];
! if ( 'closed' == $wpdb->get_var("SELECT comment_status FROM $tableposts WHERE ID = '$comment_post_ID'") )
die( __('Sorry, comments are closed for this item.') );
--- 33,37 ----
$user_ip = $_SERVER['REMOTE_ADDR'];
! if ( 'closed' == $wpdb->get_var("SELECT comment_status FROM $wpdb->posts WHERE ID = '$comment_post_ID'") )
die( __('Sorry, comments are closed for this item.') );
***************
*** 52,56 ****
// Simple flood-protection
! $lasttime = $wpdb->get_var("SELECT comment_date FROM $tablecomments WHERE comment_author_IP = '$user_ip' ORDER BY comment_date DESC LIMIT 1");
if (!empty($lasttime)) {
$time_lastcomment= mysql2date('U', $lasttime);
--- 52,56 ----
// Simple flood-protection
! $lasttime = $wpdb->get_var("SELECT comment_date FROM $wpdb->comments WHERE comment_author_IP = '$user_ip' ORDER BY comment_date DESC LIMIT 1");
if (!empty($lasttime)) {
$time_lastcomment= mysql2date('U', $lasttime);
***************
*** 69,73 ****
}
! $wpdb->query("INSERT INTO $tablecomments
(comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_date_gmt, comment_content, comment_approved)
VALUES
--- 69,73 ----
}
! $wpdb->query("INSERT INTO $wpdb->comments
(comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_date_gmt, comment_content, comment_approved)
VALUES
Index: wp-settings.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-settings.php,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** wp-settings.php 8 May 2004 20:42:51 -0000 1.41
--- wp-settings.php 24 May 2004 08:22:18 -0000 1.42
***************
*** 10,35 ****
error_reporting(E_ALL ^ E_NOTICE);
- // Table names
- $tableposts = $table_prefix . 'posts';
- $tableusers = $table_prefix . 'users';
- $tablesettings = $table_prefix . 'settings'; // only used during upgrade
- $tablecategories = $table_prefix . 'categories';
- $tablepost2cat = $table_prefix . 'post2cat';
- $tablecomments = $table_prefix . 'comments';
- $tablelinks = $table_prefix . 'links';
- $tablelinkcategories = $table_prefix . 'linkcategories';
- $tableoptions = $table_prefix . 'options';
- $tableoptiontypes = $table_prefix . 'optiontypes';
- $tableoptionvalues = $table_prefix . 'optionvalues';
- $tableoptiongroups = $table_prefix . 'optiongroups';
- $tableoptiongroup_options = $table_prefix . 'optiongroup_options';
- $tablepostmeta = $table_prefix . 'postmeta';
-
define('WPINC', 'wp-includes');
-
require_once (ABSPATH . WPINC . '/wp-db.php');
$wpdb->hide_errors();
! $users = $wpdb->get_results("SELECT * FROM $tableusers");
if (!$users && !strstr($_SERVER['PHP_SELF'], 'install.php')) {
die("It doesn't look like you've installed WP yet. Try running <a href='wp-admin/install.php'>install.php</a>.");
--- 10,33 ----
error_reporting(E_ALL ^ E_NOTICE);
define('WPINC', 'wp-includes');
require_once (ABSPATH . WPINC . '/wp-db.php');
+ // Table names
+ $wpdb->posts = $table_prefix . 'posts';
+ $wpdb->users = $table_prefix . 'users';
+ $wpdb->categories = $table_prefix . 'categories';
+ $wpdb->post2cat = $table_prefix . 'post2cat';
+ $wpdb->comments = $table_prefix . 'comments';
+ $wpdb->links = $table_prefix . 'links';
+ $wpdb->linkcategories = $table_prefix . 'linkcategories';
+ $wpdb->options = $table_prefix . 'options';
+ $wpdb->optiontypes = $table_prefix . 'optiontypes';
+ $wpdb->optionvalues = $table_prefix . 'optionvalues';
+ $wpdb->optiongroups = $table_prefix . 'optiongroups';
+ $wpdb->optiongroup_options = $table_prefix . 'optiongroup_options';
+ $wpdb->postmeta = $table_prefix . 'postmeta';
+
$wpdb->hide_errors();
! $users = $wpdb->get_results("SELECT * FROM $wpdb->users");
if (!$users && !strstr($_SERVER['PHP_SELF'], 'install.php')) {
die("It doesn't look like you've installed WP yet. Try running <a href='wp-admin/install.php'>install.php</a>.");
Index: wp-mail.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-mail.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** wp-mail.php 19 May 2004 05:43:32 -0000 1.14
--- wp-mail.php 24 May 2004 08:22:18 -0000 1.15
***************
*** 122,126 ****
! $sql = "INSERT INTO $tableposts (post_author, post_date, post_date_gmt, post_content, post_title, post_modified, post_modified_gmt) VALUES (1, '$post_date', '$post_date_gmt', '$content', '$post_title', '$post_date', '$post_date_gmt')";
$result = $wpdb->query($sql);
--- 122,126 ----
! $sql = "INSERT INTO $wpdb->posts (post_author, post_date, post_date_gmt, post_content, post_title, post_modified, post_modified_gmt) VALUES (1, '$post_date', '$post_date_gmt', '$content', '$post_title', '$post_date', '$post_date_gmt')";
$result = $wpdb->query($sql);
***************
*** 139,147 ****
// Double check it's not there already
! $exists = $wpdb->get_row("SELECT * FROM $tablepost2cat WHERE post_id = $post_ID AND category_id = $post_category");
if (!$exists && $result) {
$wpdb->query("
! INSERT INTO $tablepost2cat
(post_id, category_id)
VALUES
--- 139,147 ----
// Double check it's not there already
! $exists = $wpdb->get_row("SELECT * FROM $wpdb->post2cat WHERE post_id = $post_ID AND category_id = $post_category");
if (!$exists && $result) {
$wpdb->query("
! INSERT INTO $wpdb->post2cat
(post_id, category_id)
VALUES
Index: wp-login.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-login.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** wp-login.php 18 May 2004 01:29:29 -0000 1.22
--- wp-login.php 24 May 2004 08:22:18 -0000 1.23
***************
*** 73,77 ****
function login() {
global $wpdb, $log, $pwd, $error, $user_ID;
! global $tableusers, $pass_is_md5;
$user_login = &$log;
$pwd = md5($pwd);
--- 73,77 ----
function login() {
global $wpdb, $log, $pwd, $error, $user_ID;
! global $pass_is_md5;
$user_login = &$log;
$pwd = md5($pwd);
***************
*** 87,91 ****
}
! $query = "SELECT ID, user_login, user_pass FROM $tableusers WHERE user_login = '$user_login' AND user_pass = '$password'";
$login = $wpdb->get_row($query);
--- 87,91 ----
}
! $query = "SELECT ID, user_login, user_pass FROM $wpdb->users WHERE user_login = '$user_login' AND user_pass = '$password'";
$login = $wpdb->get_row($query);
***************
*** 209,213 ****
$user_pass = substr((MD5("time" . rand(1,16000))), 0, 6);
// now insert the new pass md5'd into the db
! $wpdb->query("UPDATE $tableusers SET user_pass = MD5('$user_pass') WHERE user_login = '$user_login'");
$message = "Login: $user_login\r\n";
$message .= "Password: $user_pass\r\n";
--- 209,213 ----
$user_pass = substr((MD5("time" . rand(1,16000))), 0, 6);
// now insert the new pass md5'd into the db
! $wpdb->query("UPDATE $wpdb->users SET user_pass = MD5('$user_pass') WHERE user_login = '$user_login'");
$message = "Login: $user_login\r\n";
$message .= "Password: $user_pass\r\n";
Index: wp-register.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-register.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** wp-register.php 18 May 2004 20:54:58 -0000 1.16
--- wp-register.php 24 May 2004 08:22:18 -0000 1.17
***************
*** 72,76 ****
/* checking the login isn't already used by another user */
! $result = $wpdb->get_results("SELECT user_login FROM $tableusers WHERE user_login = '$user_login'");
if (count($result) >= 1) {
die (__('<strong>ERROR</strong>: This login is already registered, please choose another one.'));
--- 72,76 ----
/* checking the login isn't already used by another user */
! $result = $wpdb->get_results("SELECT user_login FROM $wpdb->users WHERE user_login = '$user_login'");
if (count($result) >= 1) {
die (__('<strong>ERROR</strong>: This login is already registered, please choose another one.'));
***************
*** 87,91 ****
$new_users_can_blog = get_settings('new_users_can_blog');
! $result = $wpdb->query("INSERT INTO $tableusers
(user_login, user_pass, user_nickname, user_email, user_ip, user_browser, dateYMDhour, user_level, user_idmode)
VALUES
--- 87,91 ----
$new_users_can_blog = get_settings('new_users_can_blog');
! $result = $wpdb->query("INSERT INTO $wpdb->users
(user_login, user_pass, user_nickname, user_email, user_ip, user_browser, dateYMDhour, user_level, user_idmode)
VALUES
Index: wp-blog-header.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-blog-header.php,v
retrieving revision 1.64
retrieving revision 1.65
diff -C2 -d -r1.64 -r1.65
*** wp-blog-header.php 24 May 2004 02:55:37 -0000 1.64
--- wp-blog-header.php 24 May 2004 08:22:17 -0000 1.65
***************
*** 167,169 ****
}
}
! ?>
--- 167,170 ----
}
}
!
! ?>
\ No newline at end of file
- Previous message: [wp-cvs] wordpress/wp-includes functions.php,1.102,1.103
- Next message: [wp-cvs] wordpress/wp-admin admin-functions.php, 1.26,
1.27 admin-header.php, 1.22, 1.23 auth.php, 1.5,
1.6 categories.php, 1.29, 1.30 edit-comments.php, 1.23,
1.24 edit.php, 1.21, 1.22 import-b2.php, 1.9,
1.10 import-blogger.php, 1.11, 1.12 import-greymatter.php,
1.13, 1.14 import-livejournal.php, 1.3, 1.4 import-mt.php,
1.10, 1.11 import-rss.php, 1.3, 1.4 import-textpattern.php,
1.9, 1.10 install-helper.php, 1.1, 1.2 install.php, 1.29,
1.30 link-add.php, 1.11, 1.12 link-categories.php, 1.8,
1.9 link-import.php, 1.10, 1.11 link-manager.php, 1.24,
1.25 moderation.php, 1.9, 1.10 optionhandler.php, 1.7,
1.8 options-head.php, 1.7, 1.8 options-writing.php, 1.16,
1.17 options.php, 1.20, 1.21 post.php, 1.60, 1.61 profile.php,
1.20, 1.21 upgrade-functions.php, 1.54, 1.55 users.php, 1.26,
1.27 xmlrpc.php, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cvs
mailing list