wordpress-mu-1.2.4/ 0000755 0000000 0000000 00000000000 10656622433 014132 5 ustar root root 0000000 0000000 wordpress-mu-1.2.4/wp-comments-post.php 0000644 0000000 0000000 00000005531 10624363406 020100 0 ustar root root 0000000 0000000 get_row("SELECT post_status, comment_status FROM $wpdb->posts WHERE ID = '$comment_post_ID'");
if ( empty($status->comment_status) ) {
do_action('comment_id_not_found', $comment_post_ID);
exit;
} elseif ( 'closed' == $status->comment_status ) {
do_action('comment_closed', $comment_post_ID);
wp_die( __('Sorry, comments are closed for this item.') );
} elseif ( 'draft' == $status->post_status ) {
do_action('comment_on_draft', $comment_post_ID);
exit;
}
$comment_author = trim(strip_tags($_POST['author']));
$comment_author_email = trim($_POST['email']);
$comment_author_url = trim($_POST['url']);
$comment_content = trim($_POST['comment']);
// If the user is logged in
$user = wp_get_current_user();
if ( $user->ID ) {
$comment_author = $wpdb->escape($user->display_name);
$comment_author_email = $wpdb->escape($user->user_email);
$comment_author_url = $wpdb->escape($user->user_url);
if ( current_user_can('unfiltered_html') ) {
if ( wp_create_nonce('unfiltered-html-comment_' . $comment_post_ID) != $_POST['_wp_unfiltered_html_comment'] ) {
kses_remove_filters(); // start with a clean slate
kses_init_filters(); // set up the filters
}
}
} else {
if ( get_option('comment_registration') )
wp_die( __('Sorry, you must be logged in to post a comment.') );
}
$comment_type = '';
if ( get_option('require_name_email') && !$user->ID ) {
if ( 6 > strlen($comment_author_email) || '' == $comment_author )
wp_die( __('Error: please fill the required fields (name, email).') );
elseif ( !is_email($comment_author_email))
wp_die( __('Error: please enter a valid email address.') );
}
if ( '' == $comment_content )
wp_die( __('Error: please type a comment.') );
$commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'user_ID');
$comment_id = wp_new_comment( $commentdata );
$comment = get_comment($comment_id);
if ( !$user->ID ) :
setcookie('comment_author_' . COOKIEHASH, $comment->comment_author, time() + 30000000, COOKIEPATH, COOKIE_DOMAIN);
setcookie('comment_author_email_' . COOKIEHASH, $comment->comment_author_email, time() + 30000000, COOKIEPATH, COOKIE_DOMAIN);
setcookie('comment_author_url_' . COOKIEHASH, clean_url($comment->comment_author_url), time() + 30000000, COOKIEPATH, COOKIE_DOMAIN);
endif;
$location = ( empty($_POST['redirect_to']) ? get_permalink($comment_post_ID) : $_POST['redirect_to'] ) . '#comment-' . $comment_id;
$location = apply_filters('comment_post_redirect', $location, $comment);
wp_redirect($location);
?>
wordpress-mu-1.2.4/wp-signup.php 0000644 0000000 0000000 00000036701 10625007311 016567 0 ustar root root 0000000 0000000 domain}{$current_site->path}" );
die();
}
do_action("signup_header");
if( $current_blog->domain != $current_site->domain ) {
header( "Location: http://" . $current_site->domain . $current_site->path . "wp-signup.php" );
die();
}
function wpmu_signup_stylesheet() {
?>
get_error_message('blog_id') )
print '
';
else
print ' ';
if( constant( "VHOST" ) == 'no' )
echo '' . __('Blog Name:') . ' ';
else
echo ' ' . __('Blog Domain:') . ' ';
if ( $errmsg = $errors->get_error_message('blog_id') ) {
?>
' . $current_site->domain . $current_site->path . ' ';
} else {
print '.' . $current_site->domain . $current_site->path . ' ';
}
if ( !is_user_logged_in() ) {
print '(' . __( 'Your address will be ' );
if( constant( "VHOST" ) == 'no' ) {
print $current_site->domain . $current_site->path . __( 'blogname' );
} else {
print __( 'domain.' ) . $current_site->domain . $current_site->path;
}
print '. ' . __( 'Must be at least 4 characters, letters and numbers only. It cannot be changed so choose carefully!)' ) . ' ';
}
// Blog Title
if ( $errors->get_error_message('blog_title')) {
print '
';
} else {
print ' ';
}
?>get_error_message('blog_title') ) {
?>
';
?>
get_error_message('user_name') ) {
print '
';
} else {
print ' ';
}
echo '' . __('Username:') . ' ';
if ( $errmsg = $errors->get_error_message('user_name') ) {
?>
';
_e('(Must be at least 4 characters, letters and numbers only.)'); echo ' ';
// User Email
if ( $errors->get_error_message('user_email') ) {
print '
';
} else {
print ' ';
}
?>get_error_message('user_email') ) {
?>
triple-check it.)') ?>
get_error_message('generic') )
print '
'.$errmsg.' ';
do_action( 'signup_extra_fields', $errors );
}
function validate_user_form() {
$result = wpmu_validate_user_signup($_POST['user_name'], $_POST['user_email']);
return $result;
}
function signup_another_blog($blog_id = '', $blog_title = '', $errors = '') {
global $current_user, $wpdb, $domain, $current_site;
if ( ! is_wp_error($errors) )
$errors = new WP_Error();
// allow definition of default variables
$filtered_results = apply_filters('signup_another_blog_init', array('blog_id' => $blog_id, 'blog_title' => $blog_title, 'errors' => $errors ));
$blog_id = $filtered_results['blog_id'];
$blog_title = $filtered_results['blog_title'];
$errors = $filtered_results['errors'];
echo '
' . sprintf( __('Get another %s blog in seconds'), $current_site->site_name ) . ' ';
if ( $errors->get_error_code() ) {
echo "
" . __('There was a problem, please correct the form below and try again.') . "
";
}
?>
add another blog to your account. There is no limit to the number of blogs you can have, so create to your heart's content, but blog responsibly."), $current_user->display_name) ?>
ID);
if ( ! empty($blogs) ) {
?>
get_error_code() ) {
signup_another_blog($blog_id, $blog_title, $errors);
return;
}
$public = (int) $_POST['blog_public'];
$meta = apply_filters('signup_create_blog_meta', array ('lang_id' => 1, 'public' => $public));
wpmu_create_blog($domain, $path, $blog_title, $current_user->id, $meta);
confirm_another_blog_signup($domain, $path, $blog_title, $current_user->user_login, $current_user->user_email, $meta);
}
function confirm_another_blog_signup($domain, $path, $blog_title, $user_name, $user_email, $meta) {
?>
http://%2$s is your new blog. Login as "%4$s" using your existing password.'), $domain.$path, $domain.$path, "http://" . $domain.$path . "wp-login.php", $user_name) ?>
$user_name, 'user_email' => $user_email, 'errors' => $errors ));
$user_name = $filtered_results['user_name'];
$user_email = $filtered_results['user_email'];
$errors = $filtered_results['errors'];
?>
site_name ) ?>
get_error_code() ) {
signup_user($user_name, $user_email, $errors);
return;
}
if ( 'blog' == $_POST['signup_for'] ) {
signup_blog($user_name, $user_email);
return;
}
wpmu_signup_user($user_name, $user_email, apply_filters( "add_signup_meta", array() ) );
confirm_user_signup($user_name, $user_email);
}
function confirm_user_signup($user_name, $user_email) {
?>
you must activate it.') ?>
%1$s and click the link given. '), $user_email) ?>
$user_name, 'user_email' => $user_email, 'blog_id' => $blog_id, 'blog_title' => $blog_title, 'errors' => $errors ));
$user_name = $filtered_results['user_name'];
$user_email = $filtered_results['user_email'];
$blog_id = $filtered_results['blog_id'];
$blog_title = $filtered_results['blog_title'];
$errors = $filtered_results['errors'];
if ( empty($blog_id) )
$blog_id = $user_name;
?>
get_error_code() ) {
signup_user($user_name, $user_email, $errors);
return;
}
$result = wpmu_validate_blog_signup($_POST['blog_id'], $_POST['blog_title']);
extract($result);
if ( $errors->get_error_code() ) {
signup_blog($user_name, $user_email, $blog_id, $blog_title, $errors);
return;
}
$public = (int) $_POST['blog_public'];
$meta = array ('lang_id' => 1, 'public' => $public);
$meta = apply_filters( "add_signup_meta", $meta );
wpmu_signup_blog($domain, $path, $blog_title, $user_name, $user_email, $meta);
confirm_blog_signup($domain, $path, $blog_title, $user_name, $user_email, $meta);
}
function confirm_blog_signup($domain, $path, $blog_title, $user_name, $user_email, $meta) {
?>
you must activate it.') ?>
%s and click the link given. '), $user_email) ?>
domain . $current_site->path . $newblogname . '/';
else
$newblog = 'http://' . $newblogname . '.' . $current_site->domain . $current_site->path;
printf(__("
The blog you were looking for, %s doesn't exist but you can create it now!
"), $newblog );
}
break;
}
}
?>
wordpress-mu-1.2.4/wp-blog-header.php 0000644 0000000 0000000 00000000654 10574275205 017445 0 ustar root root 0000000 0000000
wordpress-mu-1.2.4/wp-pass.php 0000644 0000000 0000000 00000000444 10447777734 016254 0 ustar root root 0000000 0000000
wordpress-mu-1.2.4/wp-rss.php 0000644 0000000 0000000 00000000176 10567606257 016111 0 ustar root root 0000000 0000000
wordpress-mu-1.2.4/wp-includes/ 0000755 0000000 0000000 00000000000 10656622425 016365 5 ustar root root 0000000 0000000 wordpress-mu-1.2.4/wp-includes/post-template.php 0000644 0000000 0000000 00000030715 10636525036 021700 0 ustar root root 0000000 0000000 0 ) {
$title = apply_filters('the_title', $before . $title . $after, $before, $after);
if ( $echo )
echo $title;
else
return $title;
}
}
function get_the_title($id = 0) {
$post = &get_post($id);
$title = $post->post_title;
if ( !empty($post->post_password) )
$title = sprintf(__('Protected: %s'), $title);
else if ( 'private' == $post->post_status )
$title = sprintf(__('Private: %s'), $title);
return $title;
}
function the_guid( $id = 0 ) {
echo get_the_guid($id);
}
function get_the_guid( $id = 0 ) {
$post = &get_post($id);
return apply_filters('get_the_guid', $post->guid);
}
function the_content($more_link_text = '(more...)', $stripteaser = 0, $more_file = '') {
$content = get_the_content($more_link_text, $stripteaser, $more_file);
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
echo $content;
}
function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_file = '') {
global $id, $post, $more, $single, $withcomments, $page, $pages, $multipage, $numpages;
global $preview;
global $pagenow;
$output = '';
if ( !empty($post->post_password) ) { // if there's a password
if ( stripslashes($_COOKIE['wp-postpass_'.COOKIEHASH]) != $post->post_password ) { // and it doesn't match the cookie
$output = get_the_password_form();
return $output;
}
}
if ( $more_file != '' )
$file = $more_file;
else
$file = $pagenow; //$_SERVER['PHP_SELF'];
if ( $page > count($pages) ) // if the requested page doesn't exist
$page = count($pages); // give them the highest numbered page that DOES exist
$content = $pages[$page-1];
if ( preg_match('//', $content, $matches) ) {
$content = explode($matches[0], $content, 2);
if ( !empty($matches[1]) && !empty($more_link_text) )
$more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
} else {
$content = array($content);
}
if ( (false !== strpos($post->post_content, '') && ((!$multipage) || ($page==1))) )
$stripteaser = 1;
$teaser = $content[0];
if ( ($more) && ($stripteaser) )
$teaser = '';
$output .= $teaser;
if ( count($content) > 1 ) {
if ( $more ) {
$output .= '' . __('Pages:'), 'after' => '
', 'next_or_number' => 'number', 'nextpagelink' => __('Next page'),
'previouspagelink' => __('Previous page'), 'pagelink' => '%', 'more_file' => '', 'echo' => 1);
$r = array_merge($defaults, $r);
extract($r, EXTR_SKIP);
global $id, $page, $numpages, $multipage, $more, $pagenow;
if ( $more_file != '' )
$file = $more_file;
else
$file = $pagenow;
$output = '';
if ( $multipage ) {
if ( 'number' == $next_or_number ) {
$output .= $before;
for ( $i = 1; $i < ($numpages+1); $i = $i + 1 ) {
$j = str_replace('%',"$i",$pagelink);
$output .= ' ';
if ( ($i != $page) || ((!$more) && ($page==1)) ) {
if ( 1 == $i ) {
$output .= '