diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-01-20 17:03:17 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-01-20 17:03:17 +0000 |
commit | de23735d75bd523cea68e43fc1ef717eb440d069 (patch) | |
tree | 324aec89bd3e3ed45a3976d526b6abd50bb5d230 /wp-inst | |
parent | 42ad115c5b6e5d184a54f825a5c24b19a3b30fb3 (diff) | |
download | wordpress-mu-de23735d75bd523cea68e43fc1ef717eb440d069.tar.gz wordpress-mu-de23735d75bd523cea68e43fc1ef717eb440d069.tar.xz wordpress-mu-de23735d75bd523cea68e43fc1ef717eb440d069.zip |
WP Merge
Removed Legacy Code (Thanks IT Damager)
createBlog - only backup roles class if it exists!
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@507 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst')
-rw-r--r-- | wp-inst/wp-admin/edit-form-advanced.php | 12 | ||||
-rw-r--r-- | wp-inst/wp-admin/edit-page-form.php | 12 | ||||
-rw-r--r-- | wp-inst/wp-admin/execute-pings.php | 41 | ||||
-rw-r--r-- | wp-inst/wp-admin/inline-uploading.php | 4 | ||||
-rw-r--r-- | wp-inst/wp-admin/upgrade-schema.php | 20 | ||||
-rw-r--r-- | wp-inst/wp-admin/wp-admin.css | 3 | ||||
-rw-r--r-- | wp-inst/wp-content/themes/default/style.css | 8 | ||||
-rw-r--r-- | wp-inst/wp-includes/cache.php | 27 | ||||
-rw-r--r-- | wp-inst/wp-includes/capabilities.php | 23 | ||||
-rw-r--r-- | wp-inst/wp-includes/classes.php | 1 | ||||
-rw-r--r-- | wp-inst/wp-includes/functions-formatting.php | 7 | ||||
-rw-r--r-- | wp-inst/wp-includes/functions.php | 7 | ||||
-rw-r--r-- | wp-inst/wp-includes/pluggable-functions.php | 10 | ||||
-rw-r--r-- | wp-inst/wp-includes/wpmu-functions.php | 10 | ||||
-rw-r--r-- | wp-inst/wp-settings.php | 4 | ||||
-rw-r--r-- | wp-inst/wpmu-settings.php.dist | 20 |
16 files changed, 109 insertions, 100 deletions
diff --git a/wp-inst/wp-admin/edit-form-advanced.php b/wp-inst/wp-admin/edit-form-advanced.php index 233bfce..a30e0f1 100644 --- a/wp-inst/wp-admin/edit-form-advanced.php +++ b/wp-inst/wp-admin/edit-form-advanced.php @@ -221,11 +221,13 @@ else <?php do_action('edit_form_advanced'); ?> <?php -$uploading_iframe_ID = (0 == $post_ID ? $temp_ID : $post_ID); -$uploading_iframe_src = "inline-uploading.php?action=view&post=$uploading_iframe_ID"; -$uploading_iframe_src = apply_filters('uploading_iframe_src', $uploading_iframe_src); -if ( false != $uploading_iframe_src ) - echo '<iframe id="uploading" border="0" src="' . $uploading_iframe_src . '">' . __('This feature requires iframe support.') . '</iframe>'; +if (current_user_can('upload_files')) { + $uploading_iframe_ID = (0 == $post_ID ? $temp_ID : $post_ID); + $uploading_iframe_src = "inline-uploading.php?action=view&post=$uploading_iframe_ID"; + $uploading_iframe_src = apply_filters('uploading_iframe_src', $uploading_iframe_src); + if ( false != $uploading_iframe_src ) + echo '<iframe id="uploading" border="0" src="' . $uploading_iframe_src . '">' . __('This feature requires iframe support.') . '</iframe>'; +} ?> <div id="advancedstuff" class="dbx-group" > diff --git a/wp-inst/wp-admin/edit-page-form.php b/wp-inst/wp-admin/edit-page-form.php index 0c9d687..ae59489 100644 --- a/wp-inst/wp-admin/edit-page-form.php +++ b/wp-inst/wp-admin/edit-page-form.php @@ -184,11 +184,13 @@ else <?php do_action('edit_page_form'); ?> <?php -$uploading_iframe_ID = (0 == $post_ID ? $temp_ID : $post_ID); -$uploading_iframe_src = "inline-uploading.php?action=view&post=$uploading_iframe_ID"; -$uploading_iframe_src = apply_filters('uploading_iframe_src', $uploading_iframe_src); -if ( false != $uploading_iframe_src ) - echo '<iframe id="uploading" border="0" src="' . $uploading_iframe_src . '">' . __('This feature requires iframe support.') . '</iframe>'; +if (current_user_can('upload_files')) { + $uploading_iframe_ID = (0 == $post_ID ? $temp_ID : $post_ID); + $uploading_iframe_src = "inline-uploading.php?action=view&post=$uploading_iframe_ID"; + $uploading_iframe_src = apply_filters('uploading_iframe_src', $uploading_iframe_src); + if ( false != $uploading_iframe_src ) + echo '<iframe id="uploading" border="0" src="' . $uploading_iframe_src . '">' . __('This feature requires iframe support.') . '</iframe>'; +} ?> <div id="advancedstuff" class="dbx-group"> diff --git a/wp-inst/wp-admin/execute-pings.php b/wp-inst/wp-admin/execute-pings.php index d6b0880..8dc2945 100644 --- a/wp-inst/wp-admin/execute-pings.php +++ b/wp-inst/wp-admin/execute-pings.php @@ -1,34 +1,25 @@ <?php + require_once('../wp-config.php'); -register_shutdown_function('execute_all_pings'); -//execute_all_pings(); +// Do pingbacks +while ($ping = $wpdb->get_row("SELECT * FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = '_pingme' LIMIT 1")) { + $wpdb->query("DELETE FROM {$wpdb->postmeta} WHERE post_id = {$ping->ID} AND meta_key = '_pingme';"); + pingback($ping->post_content, $ping->ID); +} -function execute_all_pings() { - global $wpdb; - // Do pingbacks - while ($ping = $wpdb->get_row("SELECT * FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = '_pingme' LIMIT 1")) { - $wpdb->query("DELETE FROM {$wpdb->postmeta} WHERE post_id = {$ping->ID} AND meta_key = '_pingme';"); - pingback($ping->post_content, $ping->ID); - echo "Pingback: $ping->post_title : $ping->ID<br/>"; - } - // Do Enclosures - while ($enclosure = $wpdb->get_row("SELECT * FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = '_encloseme' LIMIT 1")) { - $wpdb->query("DELETE FROM {$wpdb->postmeta} WHERE post_id = {$enclosure->ID} AND meta_key = '_encloseme';"); - do_enclose($enclosure->post_content, $enclosure->ID); - echo "Enclosure: $enclosure->post_title : $enclosure->ID<br/>"; - } - // Do Trackbacks - $trackbacks = $wpdb->get_results("SELECT ID FROM $wpdb->posts WHERE TRIM(to_ping) != '' AND post_status != 'draft'"); +// Do Enclosures +while ($enclosure = $wpdb->get_row("SELECT * FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = '_encloseme' LIMIT 1")) { + $wpdb->query("DELETE FROM {$wpdb->postmeta} WHERE post_id = {$enclosure->ID} AND meta_key = '_encloseme';"); + do_enclose($enclosure->post_content, $enclosure->ID); +} - if (is_array($trackbacks) && count($trackbacks)) { - foreach ($trackbacks as $trackback ) { - echo "Trackback : $trackback->ID<br/>"; - do_trackbacks($trackback->ID); - } +// Do Trackbacks +$trackbacks = $wpdb->get_results("SELECT ID FROM $wpdb->posts WHERE CHAR_LENGTH(TRIM(to_ping)) > 7 AND post_status != 'draft'"); +if ( is_array($trackbacks) ) { + foreach ( $trackbacks as $trackback ) { + do_trackbacks($trackback->ID); } } -_e('Done.'); - ?> diff --git a/wp-inst/wp-admin/inline-uploading.php b/wp-inst/wp-admin/inline-uploading.php index 4b9c30e..c6260e9 100644 --- a/wp-inst/wp-admin/inline-uploading.php +++ b/wp-inst/wp-admin/inline-uploading.php @@ -4,8 +4,8 @@ require_once('admin.php'); header('Content-Type: text/html; charset=' . get_option('blog_charset'));
-if (!current_user_can('edit_posts'))
- die(__('You do not have permission to edit posts.'));
+if (!current_user_can('upload_files'))
+ die(__('You do not have permission to upload files.'));
$wpvarstoreset = array('action', 'post', 'all', 'last', 'link', 'sort', 'start', 'imgtitle', 'descr', 'attachment');
diff --git a/wp-inst/wp-admin/upgrade-schema.php b/wp-inst/wp-admin/upgrade-schema.php index 81868b4..35395d6 100644 --- a/wp-inst/wp-admin/upgrade-schema.php +++ b/wp-inst/wp-admin/upgrade-schema.php @@ -299,14 +299,14 @@ function populate_roles_160() { global $wp_roles; // Add roles - $wp_roles->add_role('administrator', __('Administrator')); - $wp_roles->add_role('editor', __('Editor')); - $wp_roles->add_role('author', __('Author')); - $wp_roles->add_role('contributor', __('Contributor')); - $wp_roles->add_role('subscriber', __('Subscriber')); + add_role('administrator', __('Administrator')); + add_role('editor', __('Editor')); + add_role('author', __('Author')); + add_role('contributor', __('Contributor')); + add_role('subscriber', __('Subscriber')); // Add caps for Administrator role - $role = $wp_roles->get_role('administrator'); + $role = get_role('administrator'); $role->add_cap('switch_themes'); $role->add_cap('edit_themes'); $role->add_cap('activate_plugins'); @@ -339,7 +339,7 @@ function populate_roles_160() { $role->add_cap('level_0'); // Add caps for Editor role - $role = $wp_roles->get_role('editor'); + $role = get_role('editor'); $role->add_cap('moderate_comments'); $role->add_cap('manage_categories'); $role->add_cap('manage_links'); @@ -361,7 +361,7 @@ function populate_roles_160() { $role->add_cap('level_0'); // Add caps for Author role - $role = $wp_roles->get_role('author'); + $role = get_role('author'); $role->add_cap('upload_files'); $role->add_cap('edit_posts'); $role->add_cap('edit_published_posts'); @@ -372,14 +372,14 @@ function populate_roles_160() { $role->add_cap('level_0'); // Add caps for Contributor role - $role = $wp_roles->get_role('contributor'); + $role = get_role('contributor'); $role->add_cap('edit_posts'); $role->add_cap('read'); $role->add_cap('level_1'); $role->add_cap('level_0'); // Add caps for Subscriber role - $role = $wp_roles->get_role('subscriber'); + $role = get_role('subscriber'); $role->add_cap('read'); $role->add_cap('level_0'); } diff --git a/wp-inst/wp-admin/wp-admin.css b/wp-inst/wp-admin/wp-admin.css index 2576ba9..439b58a 100644 --- a/wp-inst/wp-admin/wp-admin.css +++ b/wp-inst/wp-admin/wp-admin.css @@ -780,6 +780,9 @@ table .vers, table .name { right: 5%; width: 14.5em; } +#moremeta select { + width: 96%; +} #slugdiv input, #passworddiv input, #authordiv select, #thumbdiv input, #parentdiv input { margin-top: .5em; diff --git a/wp-inst/wp-content/themes/default/style.css b/wp-inst/wp-content/themes/default/style.css index 8d5a730..667b7a5 100644 --- a/wp-inst/wp-content/themes/default/style.css +++ b/wp-inst/wp-content/themes/default/style.css @@ -90,7 +90,7 @@ h1 { text-align: center; } -.description { +#headerimg .description { font-size: 1.2em; text-align: center; } @@ -112,7 +112,7 @@ h3 { font-size: 1.3em; } -h1, h1 a, h1 a:hover, h1 a:visited, .description { +h1, h1 a, h1 a:hover, h1 a:visited, #headerimg .description { text-decoration: none; color: white; } @@ -302,10 +302,6 @@ h1 { margin: 0; } -.description { - text-align: center; - } - h2 { margin: 30px 0 0; } diff --git a/wp-inst/wp-includes/cache.php b/wp-inst/wp-includes/cache.php index 7e04a7f..4b9bde2 100644 --- a/wp-inst/wp-includes/cache.php +++ b/wp-inst/wp-includes/cache.php @@ -235,10 +235,11 @@ class WP_Object_Cache { $dir = rtrim($dir, DIRECTORY_SEPARATOR); $top_dir = $dir; $stack = array($dir); + $index = 0; - while (count($stack)) { - # Get last directory on stack - $dir = end($stack); + while ($index < count($stack)) { + # Get indexed directory from stack + $dir = $stack[$index]; $dh = @ opendir($dir); if (!$dh) @@ -247,19 +248,22 @@ class WP_Object_Cache { while (($file = @ readdir($dh)) !== false) { if ($file == '.' or $file == '..') continue; - + if (@ is_dir($dir . DIRECTORY_SEPARATOR . $file)) $stack[] = $dir . DIRECTORY_SEPARATOR . $file; else if (@ is_file($dir . DIRECTORY_SEPARATOR . $file)) @ unlink($dir . DIRECTORY_SEPARATOR . $file); } - if (end($stack) == $dir) { - if ( $dir != $top_dir) - @ rmdir($dir); - array_pop($stack); - } + $index++; } + + $stack = array_reverse($stack); // Last added dirs are deepest + foreach($stack as $dir) { + if ( $dir != $top_dir) + @ rmdir($dir); + } + } function release_lock() { @@ -397,13 +401,14 @@ class WP_Object_Cache { return; // Disable the persistent cache if safe_mode is on. - if ( ini_get('safe_mode') ) + if ( ini_get('safe_mode') && ! defined('ENABLE_CACHE') ) return; if (defined('CACHE_PATH')) $this->cache_dir = CACHE_PATH; else - $this->cache_dir = ABSPATH.'wp-content/cache/'; + // Using the correct separator eliminates some cache flush errors on Windows + $this->cache_dir = ABSPATH.'wp-content'.DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR; if (is_writable($this->cache_dir) && is_dir($this->cache_dir)) { $this->cache_enabled = true; diff --git a/wp-inst/wp-includes/capabilities.php b/wp-inst/wp-includes/capabilities.php index d6877d3..e148974 100644 --- a/wp-inst/wp-includes/capabilities.php +++ b/wp-inst/wp-includes/capabilities.php @@ -85,6 +85,9 @@ class WP_Role { function add_cap($cap, $grant = true) { global $wp_roles; + if ( ! isset($wp_roles) ) + $wp_roles = new WP_Roles(); + $this->capabilities[$cap] = $grant; $wp_roles->add_cap($this->name, $cap, $grant); } @@ -92,6 +95,9 @@ class WP_Role { function remove_cap($cap) { global $wp_roles; + if ( ! isset($wp_roles) ) + $wp_roles = new WP_Roles(); + unset($this->capabilities[$cap]); $wp_roles->remove_cap($this->name, $cap); } @@ -115,7 +121,7 @@ class WP_User { var $allcaps = array(); function WP_User($id, $name = '') { - global $wp_roles, $table_prefix; + global $table_prefix; if ( empty($id) && empty($name) ) return; @@ -147,6 +153,10 @@ class WP_User { function get_role_caps() { global $wp_roles; + + if ( ! isset($wp_roles) ) + $wp_roles = new WP_Roles(); + //Filter out caps that are not role names and assign to $this->roles if(is_array($this->caps)) $this->roles = array_filter(array_keys($this->caps), array(&$wp_roles, 'is_role')); @@ -214,8 +224,6 @@ class WP_User { //has_cap(capability_or_role_name) or //has_cap('edit_post', post_id) function has_cap($cap) { - global $wp_roles; - if ( is_numeric($cap) ) $cap = $this->translate_level_to_cap($cap); @@ -316,18 +324,27 @@ function current_user_can($capability) { function get_role($role) { global $wp_roles; + if ( ! isset($wp_roles) ) + $wp_roles = new WP_Roles(); + return $wp_roles->get_role($role); } function add_role($role, $display_name, $capabilities = '') { global $wp_roles; + if ( ! isset($wp_roles) ) + $wp_roles = new WP_Roles(); + return $wp_roles->add_role($role, $display_name, $capabilities = ''); } function remove_role($role) { global $wp_roles; + if ( ! isset($wp_roles) ) + $wp_roles = new WP_Roles(); + return $wp_roles->remove_role($role); } diff --git a/wp-inst/wp-includes/classes.php b/wp-inst/wp-includes/classes.php index 6226bf4..fe4b735 100644 --- a/wp-inst/wp-includes/classes.php +++ b/wp-inst/wp-includes/classes.php @@ -662,6 +662,7 @@ class WP_Query { $this->posts = array(); } else { $this->is_preview = true; + $this->posts[0]->post_date = current_time('mysql'); } } else { if (! current_user_can('read_post', $this->posts[0]->ID)) diff --git a/wp-inst/wp-includes/functions-formatting.php b/wp-inst/wp-includes/functions-formatting.php index 255b6cc..274d7e6 100644 --- a/wp-inst/wp-includes/functions-formatting.php +++ b/wp-inst/wp-includes/functions-formatting.php @@ -266,7 +266,12 @@ function remove_accents($string) { } function sanitize_user( $username ) { - return preg_replace('|a-z0-9 _.-|i', '', $username); + $raw_username = $username; + $username = strip_tags($username); + // Kill octets + $username = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '', $username); + $username = preg_replace('/&.+?;/', '', $username); // Kill entities + return apply_filters('sanitize_user', $username, $raw_username); } function sanitize_title($title, $fallback_title = '') { diff --git a/wp-inst/wp-includes/functions.php b/wp-inst/wp-includes/functions.php index 681c4cb..e105f94 100644 --- a/wp-inst/wp-includes/functions.php +++ b/wp-inst/wp-includes/functions.php @@ -931,7 +931,7 @@ function make_url_footnote($content) { $link_url = $matches[2][$i]; $link_text = $matches[4][$i]; $content = str_replace($link_match, $link_text.' '.$link_number, $content); - $link_url = ((strtolower(substr($link_url,0,7)) != 'http://') && (strtolower(substr($link_url,0,7)) != 'https://')) ? get_settings('home') . $link_url : $link_url; + $link_url = ((strtolower(substr($link_url,0,7)) != 'http://') && (strtolower(substr($link_url,0,8)) != 'https://')) ? get_settings('home') . $link_url : $link_url; $links_summary .= "\n".$link_number.' '.$link_url; } $content = strip_tags($content); @@ -1687,6 +1687,11 @@ function get_stylesheet_uri() { } function get_template() { + $template = get_settings('template'); + if (!file_exists(get_theme_root() . "/$template")) { //works for dirs too + update_option('template', 'default'); + update_option('stylesheet', 'default'); + } return apply_filters('template', get_settings('template')); } diff --git a/wp-inst/wp-includes/pluggable-functions.php b/wp-inst/wp-includes/pluggable-functions.php index 566b990..921ccd4 100644 --- a/wp-inst/wp-includes/pluggable-functions.php +++ b/wp-inst/wp-includes/pluggable-functions.php @@ -331,9 +331,9 @@ function wp_notify_postauthor($comment_id, $comment_type='') { if ( isset($reply_to) ) $message_headers .= $reply_to . "\n"; - $notify_message = apply_filters('comment_notification_text', $notify_message); - $subject = apply_filters('comment_notification_subject', $subject); - $message_headers = apply_filters('comment_notification_headers', $message_headers); + $notify_message = apply_filters('comment_notification_text', $notify_message, $comment_id); + $subject = apply_filters('comment_notification_subject', $subject, $comment_id); + $message_headers = apply_filters('comment_notification_headers', $message_headers, $comment_id); @wp_mail($user->user_email, $subject, $notify_message, $message_headers); @@ -374,8 +374,8 @@ function wp_notify_moderator($comment_id) { $subject = sprintf( __('[%1$s] Please moderate: "%2$s"'), get_settings('blogname'), $post->post_title ); $admin_email = get_settings('admin_email'); - $notify_message = apply_filters('comment_moderation_text', $notify_message); - $subject = apply_filters('comment_moderation_subject', $subject); + $notify_message = apply_filters('comment_moderation_text', $notify_message, $comment_id); + $subject = apply_filters('comment_moderation_subject', $subject, $comment_id); @wp_mail($admin_email, $subject, $notify_message); diff --git a/wp-inst/wp-includes/wpmu-functions.php b/wp-inst/wp-includes/wpmu-functions.php index 4d8d4cd..062d0b5 100644 --- a/wp-inst/wp-includes/wpmu-functions.php +++ b/wp-inst/wp-includes/wpmu-functions.php @@ -136,7 +136,8 @@ function createBlog( $domain, $path, $username, $weblog_title, $admin_email, $so $tmp[ 'options' ] = $wpdb->options; $tmp[ 'postmeta' ] = $wpdb->postmeta; $tmptable_prefix = $table_prefix; - $tmprolekey = $wp_roles->role_key; + if( is_object( $wp_roles ) ) + $tmprolekey = $wp_roles->role_key; // fix the new prefix. $table_prefix = $wpmuBaseTablePrefix . $blog_id . "_"; @@ -150,7 +151,8 @@ function createBlog( $domain, $path, $username, $weblog_title, $admin_email, $so $wpdb->linkcategories = $table_prefix . 'linkcategories'; $wpdb->options = $table_prefix . 'options'; $wpdb->postmeta = $table_prefix . 'postmeta'; - $wp_roles->role_key = $table_prefix . 'user_roles'; + if( is_object( $wp_roles ) ) + $wp_roles->role_key = $table_prefix . 'user_roles'; wp_cache_flush(); @mkdir( ABSPATH . "wp-content/blogs.dir/".$blog_id, 0777 ); @@ -291,6 +293,7 @@ SITE_NAME" ) ); $current_site->site_name = "WordPress MU"; @mail($admin_email, __('New ' . $current_site->site_name . ' Blog').": ".stripslashes( $weblog_title ), $message, $message_headers); + $wp_rewrite->init(); $wp_rewrite->flush_rules(); // restore wpdb variables @@ -300,7 +303,8 @@ SITE_NAME" ) ); $wpdb->$key = $val; } $table_prefix = $tmptable_prefix; - $wp_roles->role_key = $tmprolekey; + if( $tmprolekey ) + $wp_roles->role_key = $tmprolekey; $wpdb->show_errors(); wp_cache_flush(); diff --git a/wp-inst/wp-settings.php b/wp-inst/wp-settings.php index 9e9705d..99b4f2f 100644 --- a/wp-inst/wp-settings.php +++ b/wp-inst/wp-settings.php @@ -86,8 +86,7 @@ $wpdb->hide_errors(); $domain = addslashes($_SERVER['HTTP_HOST']); if( substr( $domain, 0, 4 ) == 'www.' ) $domain = substr( $domain, 4 ); -if( substr( $domain, -3, 3 ) == ':80' ) - $domain = str_replace(':80', '', $domain); +$domain = preg_replace('/:.*$/', '', $domain); // Strip ports function is_installed() { global $wpdb, $domain, $base; @@ -362,7 +361,6 @@ $_SERVER = add_magic_quotes($_SERVER); $wp_query = new WP_Query(); $wp_rewrite = new WP_Rewrite(); $wp = new WP(); -$wp_roles = new WP_Roles(); define('TEMPLATEPATH', get_template_directory()); diff --git a/wp-inst/wpmu-settings.php.dist b/wp-inst/wpmu-settings.php.dist index a443f64..516e7be 100644 --- a/wp-inst/wpmu-settings.php.dist +++ b/wp-inst/wpmu-settings.php.dist @@ -56,24 +56,4 @@ $passsql = DB_PASSWORD; require_once( ABSPATH.'wp-settings.php' ); -if( $redirect ) -{ - if( $p ) - { - $url = get_permalink( $p ); - } - elseif( $m ) - { - $url = get_settings( 'siteurl' )."/".substr( $m, 0, 4 )."/".substr( $m, 4, 2 ); - } - elseif( $cat ) - { - $query = "SELECT cat_name FROM ".$wpdb->categories." WHERE cat_ID='$cat'"; - $cat_name = $wpdb->get_var( $query ); - $url = get_settings( 'siteurl' ). "/category/".$cat_name; - } - header("HTTP/1.0 301 Moved Permanently"); - header( "Location: $url" ); - exit; -} ?> |