summaryrefslogtreecommitdiffstats
path: root/wp-inst
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-06-16 12:00:59 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-06-16 12:00:59 +0000
commit5c7038928d16e2f54188ee0a56eec6eb4a4b409f (patch)
tree0af0791a983a479684cf87a77f75abc8478e71dd /wp-inst
parent2db2412d55f6f3c2339d44ae7a006d85b0232e6c (diff)
downloadwordpress-mu-5c7038928d16e2f54188ee0a56eec6eb4a4b409f.tar.gz
wordpress-mu-5c7038928d16e2f54188ee0a56eec6eb4a4b409f.tar.xz
wordpress-mu-5c7038928d16e2f54188ee0a56eec6eb4a4b409f.zip
WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@565 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst')
-rw-r--r--wp-inst/wp-admin/upgrade-functions.php2
-rw-r--r--wp-inst/wp-includes/comment-template.php3
-rwxr-xr-xwp-inst/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspellShell.class.php6
-rw-r--r--wp-inst/wp-includes/pluggable.php8
-rw-r--r--wp-inst/wp-includes/wp-l10n.php97
-rw-r--r--wp-inst/wp-links-opml.php67
-rw-r--r--wp-inst/wp-settings.php2
7 files changed, 40 insertions, 145 deletions
diff --git a/wp-inst/wp-admin/upgrade-functions.php b/wp-inst/wp-admin/upgrade-functions.php
index e1c1e02..03c34c2 100644
--- a/wp-inst/wp-admin/upgrade-functions.php
+++ b/wp-inst/wp-admin/upgrade-functions.php
@@ -63,7 +63,7 @@ function wp_install_defaults($user_id) {
$wpdb->query("INSERT INTO $wpdb->categories (cat_ID, cat_name, category_nicename, link_count, category_description) VALUES ('0', '".$wpdb->escape(__('Blogroll'))."', '".sanitize_title(__('Blogroll'))."', '7', '')");
// Now drop in some default links
- $wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_category, link_rss, link_notes) VALUES ('http://blogs.linux.ie/xeer/', 'Donncha', 0, 'http://blogs.linux.ie/xeer/feed/', '');");
+ $wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_category, link_rss, link_notes) VALUES ('http://inphotos.org/', 'Donncha', 0, 'http://inphotos.org/feed/', '');");
$wpdb->query( "INSERT INTO $wpdb->link2cat (`link_id`, `category_id`) VALUES (1, 2)" );
$wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_category, link_rss, link_notes) VALUES ('http://zengun.org/weblog/', 'Michel', 0, 'http://zengun.org/weblog/feed/', '');");
diff --git a/wp-inst/wp-includes/comment-template.php b/wp-inst/wp-includes/comment-template.php
index 1ed1dd6..6355a96 100644
--- a/wp-inst/wp-includes/comment-template.php
+++ b/wp-inst/wp-includes/comment-template.php
@@ -366,7 +366,8 @@ function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Com
if (!empty($CSSclass)) {
echo ' class="'.$CSSclass.'"';
}
- echo ' title="' . sprintf( __('Comment on %s'), $post->post_title ) .'">';
+ $title = wp_specialchars(apply_filters('the_title', get_the_title()));
+ echo ' title="' . sprintf( __('Comment on %s'), $title ) .'">';
comments_number($zero, $one, $more, $number);
echo '</a>';
}
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspellShell.class.php b/wp-inst/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspellShell.class.php
index cd75ce9..41c0948 100755
--- a/wp-inst/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspellShell.class.php
+++ b/wp-inst/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspellShell.class.php
@@ -27,7 +27,7 @@ class TinyPspellShell {
$this->errorMsg = array();
$this->tmpfile = tempnam($config['tinypspellshell.tmp'], "tinyspell");
- $this->cmd = "cat ". $this->tmpfile ." | " . $config['tinypspellshell.aspell'] . " -a --lang=". $this->lang;
+ $this->cmd = "cat ". $this->tmpfile ." | " . $config['tinypspellshell.aspell'] . " -a --lang=". $this->lang;
}
// Returns array with bad words or false if failed.
@@ -44,6 +44,7 @@ class TinyPspellShell {
}
$data = shell_exec($this->cmd);
+ @unlink($this->tmpfile);
$returnData = array();
$dataArr = preg_split("/\n/", $data, -1, PREG_SPLIT_NO_EMPTY);
@@ -73,6 +74,7 @@ class TinyPspellShell {
die("Error opening tmp file.");
$data = shell_exec($this->cmd);
+ @unlink($this->tmpfile);
$returnData = array();
$dataArr = preg_split("/\n/", $data, -1, PREG_SPLIT_NO_EMPTY);
@@ -97,4 +99,4 @@ class TinyPspellShell {
// Setup classname, should be the same as the name of the spellchecker class
$spellCheckerConfig['class'] = "TinyPspellShell";
-?> \ No newline at end of file
+?>
diff --git a/wp-inst/wp-includes/pluggable.php b/wp-inst/wp-includes/pluggable.php
index 3ef5974..4d6f061 100644
--- a/wp-inst/wp-includes/pluggable.php
+++ b/wp-inst/wp-includes/pluggable.php
@@ -168,7 +168,7 @@ if ( !function_exists('wp_mail') ) :
function wp_mail($to, $subject, $message, $headers = '') {
if( $headers == '' ) {
$headers = "MIME-Version: 1.0\n" .
- "From: wordpress@" . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME'])) . "\n" .
+ "From: " . get_settings('admin_email') . "\n" .
"Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\n";
}
@@ -394,14 +394,14 @@ function wp_notify_postauthor($comment_id, $comment_type='') {
$notify_message .= sprintf( __('To delete this comment, visit: %s'), get_settings('siteurl').'/wp-admin/comment.php?action=confirmdeletecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
$notify_message .= sprintf( __('To mark this comment as spam, visit: %s'), get_settings('siteurl').'/wp-admin/comment.php?action=confirmdeletecomment&delete_type=spam&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
- $wp_email = 'wordpress@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME']));
+ $admin_email = get_settings('admin_email');
if ( '' == $comment->comment_author ) {
- $from = "From: \"$blogname\" <$wp_email>";
+ $from = "From: \"$blogname\" <$admin_email>";
if ( '' != $comment->comment_author_email )
$reply_to = "Reply-To: $comment->comment_author_email";
} else {
- $from = "From: \"$comment->comment_author\" <$wp_email>";
+ $from = "From: \"$comment->comment_author\" <$admin_email>";
if ( '' != $comment->comment_author_email )
$reply_to = "Reply-To: \"$comment->comment_author_email\" <$comment->comment_author_email>";
}
diff --git a/wp-inst/wp-includes/wp-l10n.php b/wp-inst/wp-includes/wp-l10n.php
deleted file mode 100644
index 4fe1cc9..0000000
--- a/wp-inst/wp-includes/wp-l10n.php
+++ /dev/null
@@ -1,97 +0,0 @@
-<?php
-
-if ( defined('WPLANG') && '' != constant('WPLANG') ) {
- include_once(ABSPATH . 'wp-includes/streams.php');
- include_once(ABSPATH . 'wp-includes/gettext.php');
-}
-
-function get_locale() {
- global $locale;
-
- if (isset($locale))
- return $locale;
-
- // WPLANG is defined in wp-config.
- if (defined('WPLANG'))
- $locale = WPLANG;
-
- if (empty($locale))
- $locale = 'en_US';
-
- $locale = apply_filters('locale', $locale);
-
- return $locale;
-}
-
-// Return a translated string.
-function __($text, $domain = 'default') {
- global $l10n;
-
- if (isset($l10n[$domain]))
- return apply_filters('gettext', $l10n[$domain]->translate($text), $text);
- else
- return $text;
-}
-
-// Echo a translated string.
-function _e($text, $domain = 'default') {
- global $l10n;
-
- if (isset($l10n[$domain]))
- echo apply_filters('gettext', $l10n[$domain]->translate($text), $text);
- else
- echo $text;
-}
-
-// Return the plural form.
-function __ngettext($single, $plural, $number, $domain = 'default') {
- global $l10n;
-
- if (isset($l10n[$domain])) {
- return $l10n[$domain]->ngettext($single, $plural, $number);
- } else {
- if ($number != 1)
- return $plural;
- else
- return $single;
- }
-}
-
-function load_textdomain($domain, $mofile) {
- global $l10n;
-
- if (isset($l10n[$domain]))
- return;
-
- if ( is_readable($mofile))
- $input = new CachedFileReader($mofile);
- else
- return;
-
- $l10n[$domain] = new gettext_reader($input);
-}
-
-function load_default_textdomain() {
- global $l10n;
-
- $locale = get_locale();
- $mofile = ABSPATH . "wp-includes/languages/$locale.mo";
-
- load_textdomain('default', $mofile);
-}
-
-function load_plugin_textdomain($domain, $path = 'wp-content/plugins') {
- $locale = get_locale();
-
- $mofile = ABSPATH . "$path/$domain-$locale.mo";
- load_textdomain($domain, $mofile);
-}
-
-function load_theme_textdomain($domain) {
- $locale = get_locale();
-
- $mofile = get_template_directory() . "/$locale.mo";
- load_textdomain($domain, $mofile);
-}
-
-?>
diff --git a/wp-inst/wp-links-opml.php b/wp-inst/wp-links-opml.php
index 5245f66..cfbb274 100644
--- a/wp-inst/wp-links-opml.php
+++ b/wp-inst/wp-links-opml.php
@@ -1,61 +1,50 @@
-<?php
-$doing_rss = 1;
+<?php
+
+if (empty($wp)) {
+ require_once('./wp-config.php');
+ wp();
+}
-require('wp-blog-header.php');
header('Content-type: text/xml; charset=' . get_settings('blog_charset'), true);
$link_cat = $_GET['link_cat'];
-if ((empty($link_cat)) || ($link_cat == 'all') || ($link_cat == '0')) {
- $sql_cat = '';
+if ((empty ($link_cat)) || ($link_cat == 'all') || ($link_cat == '0')) {
+ $link_cat = '';
} else { // be safe
- $link_cat = ''.urldecode($link_cat).'';
- $link_cat = addslashes_gpc($link_cat);
- $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";
- }
- }
+ $link_cat = '' . urldecode($link_cat) . '';
+ $link_cat = intval($link_cat);
}
?><?php echo '<?xml version="1.0"?'.">\n"; ?>
-<!-- generator="wordpress/<?php echo $wp_version ?>" -->
+<!-- generator="wordpress/<?php bloginfo_rss('version') ?>" -->
<opml version="1.0">
<head>
<title>Links for <?php echo get_bloginfo('name').$cat_name ?></title>
<dateCreated><?php echo gmdate("D, d M Y H:i:s"); ?> GMT</dateCreated>
</head>
<body>
-<?php $sql = "SELECT $wpdb->links.link_url, link_rss, $wpdb->links.link_name, $wpdb->links.link_category, $wpdb->linkcategories.cat_name, link_updated
-FROM $wpdb->links
- JOIN $wpdb->linkcategories on $wpdb->links.link_category = $wpdb->linkcategories.cat_id
- AND $wpdb->links.link_visible = 'Y'
- $sql_cat
- ORDER BY $wpdb->linkcategories.cat_name, $wpdb->links.link_name \n";
- //echo("<!-- $sql -->");
- $prev_cat_id = 0;
- $results = $wpdb->get_results($sql);
- if ($results) {
- foreach ($results as $result) {
- if ($result->link_category != $prev_cat_id) { // new category
- if ($prev_cat_id != 0) { // not first time
-?>
- </outline>
<?php
- } // end if not first time
+
+if (empty ($link_cat))
+ $cats = get_categories("type=link&hierarchical=0");
+else
+ $cats = array (get_category($link_cat));
+
+foreach ((array) $cats as $cat) {
?>
- <outline type="category" title="<?php echo wp_specialchars($result->cat_name); ?>">
+<outline type="category" title="<?php echo wp_specialchars($cat->cat_name); ?>">
<?php
- $prev_cat_id = $result->link_category;
- } // end if new category
+
+ $bookmarks = get_bookmarks("category={$cat->cat_ID}");
+ foreach ((array) $bookmarks as $bookmark) {
?>
- <outline text="<?php echo wp_specialchars($result->link_name); ?>" type="link" xmlUrl="<?php echo wp_specialchars($result->link_rss); ?>" htmlUrl="<?php echo wp_specialchars($result->link_url); ?>" updated="<?php if ('0000-00-00 00:00:00' != $result->link_updated) echo $result->link_updated; ?>" />
+ <outline text="<?php echo wp_specialchars($bookmark->link_name); ?>" type="link" xmlUrl="<?php echo wp_specialchars($bookmark->link_rss); ?>" htmlUrl="<?php echo wp_specialchars($bookmark->link_url); ?>" updated="<?php if ('0000-00-00 00:00:00' != $bookmark->link_updated) echo $bookmark->link_updated; ?>" />
<?php
- } // end foreach
+
+ }
?>
- </outline>
+</outline>
<?php
- } // end if
+
+}
?>
</body>
</opml>
diff --git a/wp-inst/wp-settings.php b/wp-inst/wp-settings.php
index 5f34e1b..2f821fb 100644
--- a/wp-inst/wp-settings.php
+++ b/wp-inst/wp-settings.php
@@ -132,7 +132,7 @@ define( "UPLOADS", "wp-content/blogs.dir/{$wpdb->blogid}/files" );
require (ABSPATH . WPINC . '/functions.php');
require (ABSPATH . WPINC . '/default-filters.php');
-require_once (ABSPATH . WPINC . '/wp-l10n.php');
+require_once (ABSPATH . WPINC . '/l10n.php');
$wpdb->hide_errors();
$db_check = $wpdb->get_var("SELECT option_value FROM $wpdb->options WHERE option_name = 'siteurl'");