summaryrefslogtreecommitdiffstats
path: root/wp-content
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-10-09 11:39:17 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-10-09 11:39:17 +0000
commit75e0ccc3a64e164d036da4f71f458520ddea3b24 (patch)
tree94f00db692e25c95030f7984c27178e1bd7e1bcd /wp-content
parentca036ad95fc44c318275ab539a52f1eb6fddf060 (diff)
downloadwordpress-mu-75e0ccc3a64e164d036da4f71f458520ddea3b24.tar.gz
wordpress-mu-75e0ccc3a64e164d036da4f71f458520ddea3b24.tar.xz
wordpress-mu-75e0ccc3a64e164d036da4f71f458520ddea3b24.zip
WP Merge - needs testing.
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@797 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-content')
-rw-r--r--wp-content/blogs.php9
-rw-r--r--wp-content/mu-plugins/pluggable.php28
-rw-r--r--wp-content/themes/classic/sidebar.php20
-rw-r--r--wp-content/themes/default/sidebar.php14
4 files changed, 41 insertions, 30 deletions
diff --git a/wp-content/blogs.php b/wp-content/blogs.php
index 16cb742..cf01353 100644
--- a/wp-content/blogs.php
+++ b/wp-content/blogs.php
@@ -8,7 +8,7 @@ if (
$current_blog->deleted == '1'
) {
header("HTTP/1.1 404 Not Found");
- die('404 &#8212; File not found.');
+ graceful_fail('404 &#8212; File not found.');
}
if ( !function_exists('wp_check_filetype') ) :
@@ -68,19 +68,20 @@ function wp_check_filetype($filename, $mimes = null) {
}
endif;
+
$file = $_GET[ 'file' ];
-$file = constant( "ABSPATH" ) . constant( "UPLOADS" ) . $file;
+$file = constant( "ABSPATH" ) . constant( "UPLOADS" ) . $file;
if ( !is_file( $file ) ) {
header("HTTP/1.1 404 Not Found");
- die('404 &#8212; File not found.');
+ graceful_fail('404 &#8212; File not found.');
}
// These should never, ever be served
$never = array( 'js', 'exe', 'swf', 'class', 'tar', 'zip', 'rar' );
if ( in_array( preg_replace( '|.*\.(.*)$|', '$1', $file ), $never ) ) {
header("HTTP/1.1 404 Not Found");
- die('404 &#8212; File not found.');
+ graceful_fail('404 &#8212; File not found.');
}
$mime = wp_check_filetype( $_SERVER[ 'REQUEST_URI' ] );
diff --git a/wp-content/mu-plugins/pluggable.php b/wp-content/mu-plugins/pluggable.php
index f1cf497..7990a3a 100644
--- a/wp-content/mu-plugins/pluggable.php
+++ b/wp-content/mu-plugins/pluggable.php
@@ -42,14 +42,11 @@ function wp_login($username, $password, $already_md5 = false) {
$error = __('<strong>Error</strong>: Wrong username.');
return false;
} else {
- $primary_blog = get_usermeta( $login->ID, "primary_blog" );
- if( $primary_blog ) {
+ if( is_site_admin( $username ) == false && ( $primary_blog = get_usermeta( $login->ID, "primary_blog" ) ) ) {
$details = get_blog_details( $primary_blog );
- if( is_object( $details ) ) {
- if( $details->archived == 1 || $details->spam == 1 || $details->deleted == 1 ) {
- $error = __('<strong>Error</strong>: Blog suspended.');
- return false;
- }
+ if( is_object( $details ) && $details->archived == 1 || $details->spam == 1 || $details->deleted == 1 ) {
+ $error = __('<strong>Error</strong>: Blog suspended.');
+ return false;
}
}
// If the password is already_md5, it has been double hashed.
@@ -72,15 +69,14 @@ function get_userdata( $user_id ) {
$user = wp_cache_get($user_id, 'users');
$user_level = $wpmuBaseTablePrefix . $wpdb->blogid . '_user_level';
- if( $user->$user_level != '' || $user->user_level != '' ) {
- if( $user && is_site_admin( $user->user_login ) == true ) {
- $user->$user_level = 10;
- $user->user_level = 10;
- $cap_key = $wpdb->prefix . 'capabilities';
- $user->{$cap_key} = array( 'administrator' => '1' );
- return $user;
- } elseif ( $user )
- return $user;
+ if ( $user && is_site_admin( $user->user_login ) ) {
+ $user->$user_level = 10;
+ $user->user_level = 10;
+ $cap_key = $wpdb->prefix . 'capabilities';
+ $user->{$cap_key} = array( 'administrator' => '1' );
+ return $user;
+ } elseif ( $user ) {
+ return $user;
}
if ( !$user = $wpdb->get_row("SELECT * FROM $wpdb->users WHERE ID = '$user_id'") )
diff --git a/wp-content/themes/classic/sidebar.php b/wp-content/themes/classic/sidebar.php
index 24a1cdd..8e34c73 100644
--- a/wp-content/themes/classic/sidebar.php
+++ b/wp-content/themes/classic/sidebar.php
@@ -3,13 +3,19 @@
<div id="menu">
<ul>
- <?php wp_list_pages(); ?>
- <?php get_links_list(); ?>
- <li id="categories"><?php _e('Categories:'); ?>
- <ul>
- <?php wp_list_cats(); ?>
- </ul>
- </li>
+<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar() ) : ?>
+
+</ul>
+
+</div>
+
+<?php return; ?>
+
+<?php endif; ?>
+
+ <?php wp_list_pages('title_li=' . __('Pages:')); ?>
+ <?php wp_list_bookmarks('title_after=&title_before='); ?>
+ <?php wp_list_categories('title_li=' . __('Categories:')); ?>
<li id="search">
<label for="s"><?php _e('Search:'); ?></label>
<form id="searchform" method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
diff --git a/wp-content/themes/default/sidebar.php b/wp-content/themes/default/sidebar.php
index b20b5de..a45b1bb 100644
--- a/wp-content/themes/default/sidebar.php
+++ b/wp-content/themes/default/sidebar.php
@@ -1,6 +1,14 @@
<div id="sidebar">
<ul>
+<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar() ) : ?>
+
+ </ul>
+ </div>
+<?php return; ?>
+
+<?php endif; ?>
+
<li>
<?php include (TEMPLATEPATH . '/searchform.php'); ?>
</li>
@@ -24,11 +32,11 @@
<p>You are currently browsing the <a href="<?php bloginfo('home'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives
for <?php the_time('F, Y'); ?>.</p>
- <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
+ <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<p>You are currently browsing the <a href="<?php bloginfo('home'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives
for the year <?php the_time('Y'); ?>.</p>
- <?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
+ <?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
<p>You have searched the <a href="<?php echo bloginfo('home'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives
for <strong>'<?php the_search_query(); ?>'</strong>. If you are unable to find anything in these search results, you can try one of these links.</p>
@@ -38,7 +46,7 @@
<?php } ?>
</li>
- <?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?>
+ <?php wp_list_pages('title_li=<h2>Pages</h2>&sort_column=post_title&sort_order=ASC'); ?>
<li><h2>Archives</h2>
<ul>