summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-01-06 10:06:20 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-01-06 10:06:20 +0000
commit12a70ca4a30a719ec19f9cd4fe6b9095ec9fe8a5 (patch)
tree7a0f94770be334ac3b8486a2ca43a9ef58a649d1
parentb57ac48281c44847de6f128c109c5d13bd46d1cc (diff)
downloadwordpress-mu-12a70ca4a30a719ec19f9cd4fe6b9095ec9fe8a5.tar.gz
wordpress-mu-12a70ca4a30a719ec19f9cd4fe6b9095ec9fe8a5.tar.xz
wordpress-mu-12a70ca4a30a719ec19f9cd4fe6b9095ec9fe8a5.zip
WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@493 7be80a69-a1ef-0310-a953-fb0f7c49ff36
-rw-r--r--wp-inst/wp-admin/inline-uploading.php34
-rw-r--r--wp-inst/wp-includes/cache.php2
-rw-r--r--wp-inst/wp-includes/functions.php2
-rw-r--r--wp-inst/wp-includes/template-loader.php48
-rw-r--r--wp-inst/wp-settings.php4
5 files changed, 49 insertions, 41 deletions
diff --git a/wp-inst/wp-admin/inline-uploading.php b/wp-inst/wp-admin/inline-uploading.php
index e3ff445..6a91dca 100644
--- a/wp-inst/wp-admin/inline-uploading.php
+++ b/wp-inst/wp-admin/inline-uploading.php
@@ -337,24 +337,15 @@ function selectLink(n) {
}
}
function toggleLink(n) {
- od=document.getElementById('div'+n);
ol=document.getElementById('L'+n);
- oi=document.getElementById('I'+n);
- if ( oi.innerHTML == usingthumbnail ) {
- img = imga[n];
- } else {
- img = imgb[n];
- }
if ( ol.innerHTML == htmldecode(notlinked) ) {
- od.innerHTML = ab[n]+img+'</a>';
ol.innerHTML = linkedtoimage;
} else if ( ol.innerHTML == htmldecode(linkedtoimage) ) {
- od.innerHTML = aa[n]+img+'</a>';
ol.innerHTML = linkedtopage;
} else {
- od.innerHTML = img;
ol.innerHTML = notlinked;
}
+ updateImage(n);
}
function toggleOtherLink(n) {
od=document.getElementById('div'+n);
@@ -372,15 +363,13 @@ function toggleOtherLink(n) {
oi.innerHTML = ih;
}
function toggleImage(n) {
- o = document.getElementById('image'+n);
oi = document.getElementById('I'+n);
if ( oi.innerHTML == htmldecode(usingthumbnail) ) {
- o.src = srcb[n];
oi.innerHTML = usingoriginal;
} else {
- o.src = srca[n];
oi.innerHTML = usingthumbnail;
}
+ updateImage(n);
}
function toggleOtherIcon(n) {
od = document.getElementById('div'+n);
@@ -401,7 +390,23 @@ function toggleOtherIcon(n) {
else
od.className = 'otherwrap usingtext';
}
-
+function updateImage(n) {
+ od=document.getElementById('div'+n);
+ ol=document.getElementById('L'+n);
+ oi=document.getElementById('I'+n);
+ if ( oi.innerHTML == htmldecode(usingthumbnail) ) {
+ img = imga[n];
+ } else {
+ img = imgb[n];
+ }
+ if ( ol.innerHTML == htmldecode(linkedtoimage) ) {
+ od.innerHTML = ab[n]+img+'</a>';
+ } else if ( ol.innerHTML == htmldecode(linkedtopage) ) {
+ od.innerHTML = aa[n]+img+'</a>';
+ } else {
+ od.innerHTML = img;
+ }
+}
var win = window.opener ? window.opener : window.dialogArguments;
if (!win) win = top;
tinyMCE = win.tinyMCE;
@@ -410,6 +415,7 @@ function sendToEditor(n) {
o = document.getElementById('div'+n);
h = o.innerHTML.replace(new RegExp('^\\s*(.*?)\\s*$', ''), '$1'); // Trim
h = h.replace(new RegExp(' (class|title|width|height|id|onclick|onmousedown)=([^\'"][^ ]*)( |/|>)', 'g'), ' $1="$2"$3'); // Enclose attribs in quotes
+ h = h.replace(new RegExp(' (width|height)=".*?"', 'g'), ''); // Drop size constraints
h = h.replace(new RegExp(' on(click|mousedown)="[^"]*"', 'g'), ''); // Drop menu events
h = h.replace(new RegExp('<(/?)A', 'g'), '<$1a'); // Lowercase tagnames
h = h.replace(new RegExp('<IMG', 'g'), '<img'); // Lowercase again
diff --git a/wp-inst/wp-includes/cache.php b/wp-inst/wp-includes/cache.php
index 0ae4350..e76cc69 100644
--- a/wp-inst/wp-includes/cache.php
+++ b/wp-inst/wp-includes/cache.php
@@ -333,6 +333,8 @@ class WP_Object_Cache {
}
}
+ $this->dirty_objects = array();
+
// Release write lock.
flock($mutex, LOCK_UN);
fclose($mutex);
diff --git a/wp-inst/wp-includes/functions.php b/wp-inst/wp-includes/functions.php
index 87e00ea..fee474a 100644
--- a/wp-inst/wp-includes/functions.php
+++ b/wp-inst/wp-includes/functions.php
@@ -477,7 +477,7 @@ function get_post_meta($post_id, $key, $single = false) {
if ( $single ) {
return maybe_unserialize( $post_meta_cache[$post_id][$key][0] );
} else {
- return maybe_unserialize( $post_meta_cache[$post_id][$key][0] );
+ return maybe_unserialize( $post_meta_cache[$post_id][$key] );
}
}
diff --git a/wp-inst/wp-includes/template-loader.php b/wp-inst/wp-includes/template-loader.php
index f503f37..cf039f2 100644
--- a/wp-inst/wp-includes/template-loader.php
+++ b/wp-inst/wp-includes/template-loader.php
@@ -7,45 +7,45 @@ if ( defined('WP_USE_THEMES') && constant('WP_USE_THEMES') ) {
} else if ( is_trackback() ) {
include(ABSPATH . '/wp-trackback.php');
exit;
- } else if ( is_404() && get_404_template() ) {
- include(get_404_template());
+ } else if ( is_404() && $template = get_404_template() ) {
+ include($template);
exit;
- } else if ( is_search() && get_search_template() ) {
- include(get_search_template());
+ } else if ( is_search() && $template = get_search_template() ) {
+ include($template);
exit;
- } else if ( is_home() && get_home_template() ) {
- include(get_home_template());
+ } else if ( is_home() && $template = get_home_template() ) {
+ include($template);
exit;
- } else if ( is_attachment() && get_attachment_template() ) {
- include(get_attachment_template());
+ } else if ( is_attachment() && $template = get_attachment_template() ) {
+ include($template);
exit;
- } else if ( is_single() && get_single_template() ) {
+ } else if ( is_single() && $template = get_single_template() ) {
if ( is_attachment() )
add_filter('the_content', 'prepend_attachment');
- include(get_single_template());
+ include($template);
exit;
- } else if ( is_page() && get_page_template() ) {
+ } else if ( is_page() && $template = get_page_template() ) {
if ( is_attachment() )
add_filter('the_content', 'prepend_attachment');
- include(get_page_template());
+ include($template);
exit;
- } else if ( is_category() && get_category_template()) {
- include(get_category_template());
+ } else if ( is_category() && $template = get_category_template()) {
+ include($template);
exit;
- } else if ( is_author() && get_author_template() ) {
- include(get_author_template());
+ } else if ( is_author() && $template = get_author_template() ) {
+ include($template);
exit;
- } else if ( is_date() && get_date_template() ) {
- include(get_date_template());
+ } else if ( is_date() && $template = get_date_template() ) {
+ include($template);
exit;
- } else if ( is_archive() && get_archive_template() ) {
- include(get_archive_template());
+ } else if ( is_archive() && $template = get_archive_template() ) {
+ include($template);
exit;
- } else if ( is_comments_popup() && get_comments_popup_template() ) {
- include(get_comments_popup_template());
+ } else if ( is_comments_popup() && $template = get_comments_popup_template() ) {
+ include($template);
exit;
- } else if ( is_paged() && get_paged_template() ) {
- include(get_paged_template());
+ } else if ( is_paged() && $template = get_paged_template() ) {
+ include($template);
exit;
} else if ( file_exists(TEMPLATEPATH . "/index.php") ) {
if ( is_attachment() )
diff --git a/wp-inst/wp-settings.php b/wp-inst/wp-settings.php
index 48e9b8e..274db1b 100644
--- a/wp-inst/wp-settings.php
+++ b/wp-inst/wp-settings.php
@@ -35,7 +35,7 @@ if ( empty( $_SERVER['REQUEST_URI'] ) ) {
}
// Fix for PHP as CGI hosts that set SCRIPT_FILENAME to something ending in php.cgi for all requests
-if ( strpos($_SERVER['SCRIPT_FILENAME'], 'php.cgi') == strlen($_SERVER['SCRIPT_FILENAME']) - 7 )
+if ( isset($_SERVER['SCRIPT_FILENAME']) && ( strpos($_SERVER['SCRIPT_FILENAME'], 'php.cgi') == strlen($_SERVER['SCRIPT_FILENAME']) - 7 ) )
$_SERVER['SCRIPT_FILENAME'] = $_SERVER['PATH_TRANSLATED'];
// Fix for Dreamhost and other PHP as CGI hosts
@@ -376,8 +376,8 @@ if ( file_exists(TEMPLATEPATH . "/functions.php") )
include(TEMPLATEPATH . "/functions.php");
function shutdown_action_hook() {
- wp_cache_close();
do_action('shutdown');
+ wp_cache_close();
}
register_shutdown_function('shutdown_action_hook');