summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-01-23 10:13:14 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-01-23 10:13:14 +0000
commit736af28d7287b477c7b5f155edf81040c7e779cc (patch)
treeb50cf0d54fb1fde7217e2e39a636ef372db46a5b
parente22e581d7d6ed4f7962a2dca899c59655ddf0994 (diff)
WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@509 7be80a69-a1ef-0310-a953-fb0f7c49ff36
-rw-r--r--wp-inst/wp-admin/inline-uploading.php44
-rw-r--r--wp-inst/wp-includes/classes.php4
-rw-r--r--wp-inst/wp-includes/functions.php11
-rw-r--r--wp-inst/wp-settings.php2
4 files changed, 35 insertions, 26 deletions
diff --git a/wp-inst/wp-admin/inline-uploading.php b/wp-inst/wp-admin/inline-uploading.php
index c6260e9..88b1239 100644
--- a/wp-inst/wp-admin/inline-uploading.php
+++ b/wp-inst/wp-admin/inline-uploading.php
@@ -261,8 +261,8 @@ imgb[{$ID}] = '<img id=\"image{$ID}\" src=\"{$image['guid']}\" alt=\"{$title}\"
$filename = basename($attachment['guid']);
$icon = get_attachment_icon($ID);
$toggle_icon = "<a id=\"I{$ID}\" onclick=\"toggleOtherIcon({$ID});return false;\" href=\"javascript:void()\">$__using_title</a>";
- $script .= "aa[{$ID}] = '<a id=\"p{$ID}\" rel=\"attachment\" href=\"$href\" onclick=\"doPopup({$ID});return false;\" title=\"{$title}\">{$title}</a>';
-ab[{$ID}] = '<a id=\"p{$ID}\" href=\"{$filename}\" onclick=\"doPopup({$ID});return false;\" title=\"{$title}\">{$title}</a>';
+ $script .= "aa[{$ID}] = '<a id=\"p{$ID}\" rel=\"attachment\" href=\"$href\" onclick=\"doPopup({$ID});return false;\" title=\"{$title}\">';
+ab[{$ID}] = '<a id=\"p{$ID}\" href=\"{$filename}\" onclick=\"doPopup({$ID});return false;\" title=\"{$title}\">';
title[{$ID}] = '{$title}';
filename[{$ID}] = '{$filename}';
icon[{$ID}] = '{$icon}';
@@ -350,19 +350,13 @@ function toggleLink(n) {
updateImage(n);
}
function toggleOtherLink(n) {
- od=document.getElementById('div'+n);
ol=document.getElementById('L'+n);
- oi=document.getElementById('p'+n);
- ih=oi.innerHTML;
if ( ol.innerHTML == htmldecode(linkedtofile) ) {
- od.innerHTML = aa[n];
ol.innerHTML = linkedtopage;
} else {
- od.innerHTML = ab[n];
ol.innerHTML = linkedtofile;
}
- oi=document.getElementById('p'+n);
- oi.innerHTML = ih;
+ updateOtherIcon(n);
}
function toggleImage(n) {
oi = document.getElementById('I'+n);
@@ -375,22 +369,18 @@ function toggleImage(n) {
}
function toggleOtherIcon(n) {
od = document.getElementById('div'+n);
- o = document.getElementById('p'+n);
oi = document.getElementById('I'+n);
if ( oi.innerHTML == htmldecode(usingtitle) ) {
- o.innerHTML = filename[n];
oi.innerHTML = usingfilename;
+ od.className = 'otherwrap usingtext';
} else if ( oi.innerHTML == htmldecode(usingfilename) && icon[n] != '' ) {
- o.innerHTML = icon[n];
oi.innerHTML = usingicon;
+ od.className = 'otherwrap usingicon';
} else {
- o.innerHTML = title[n];
oi.innerHTML = usingtitle;
- }
- if ( oi.innerHTML == usingicon )
- od.className = 'otherwrap usingicon';
- else
od.className = 'otherwrap usingtext';
+ }
+ updateOtherIcon(n);
}
function updateImage(n) {
od=document.getElementById('div'+n);
@@ -409,6 +399,26 @@ function updateImage(n) {
od.innerHTML = img;
}
}
+function updateOtherIcon(n) {
+ od=document.getElementById('div'+n);
+ ol=document.getElementById('L'+n);
+ oi=document.getElementById('I'+n);
+ if ( oi.innerHTML == htmldecode(usingfilename) ) {
+ txt = filename[n];
+ } else if ( oi.innerHTML == htmldecode(usingicon) ) {
+ txt = icon[n];
+ } else {
+ txt = title[n];
+ }
+ if ( ol.innerHTML == htmldecode(linkedtofile) ) {
+ od.innerHTML = ab[n]+txt+'</a>';
+ } else if ( ol.innerHTML == htmldecode(linkedtopage) ) {
+ od.innerHTML = aa[n]+txt+'</a>';
+ } else {
+ od.innerHTML = txt;
+ }
+}
+
var win = window.opener ? window.opener : window.dialogArguments;
if (!win) win = top;
tinyMCE = win.tinyMCE;
diff --git a/wp-inst/wp-includes/classes.php b/wp-inst/wp-includes/classes.php
index fe4b735..8e4d2d5 100644
--- a/wp-inst/wp-includes/classes.php
+++ b/wp-inst/wp-includes/classes.php
@@ -372,13 +372,13 @@ class WP_Query {
$all_page_ids = get_all_page_ids();
$reqpage = 0;
- foreach ( $all_page_ids as $page_id ) {
+ if (is_array($all_page_ids)) { foreach ( $all_page_ids as $page_id ) {
$page = get_page($page_id);
if ( $page->fullpath == $page_path ) {
$reqpage = $page_id;
break;
}
- }
+ } }
$where .= " AND (ID = '$reqpage')";
} elseif ('' != $q['attachment']) {
diff --git a/wp-inst/wp-includes/functions.php b/wp-inst/wp-includes/functions.php
index e105f94..4a7e9bb 100644
--- a/wp-inst/wp-includes/functions.php
+++ b/wp-inst/wp-includes/functions.php
@@ -1797,11 +1797,12 @@ function get_themes() {
$template = $theme_data['Template'];
$stylesheet = dirname($theme_file);
- $screenshot = glob("$theme_root/$stylesheet/screenshot.*");
- if ( !empty( $screenshot ) )
- $screenshot = basename( $screenshot[0] );
- else
- $screenshot = false;
+ foreach (array('png', 'gif', 'jpg', 'jpeg') as $ext) {
+ if (file_exists("$theme_root/$stylesheet/screenshot.$ext")) {
+ $screenshot = "screenshot.$ext";
+ break;
+ }
+ }
if ( empty($name) ) {
$name = dirname($theme_file);
diff --git a/wp-inst/wp-settings.php b/wp-inst/wp-settings.php
index 99b4f2f..d5e2069 100644
--- a/wp-inst/wp-settings.php
+++ b/wp-inst/wp-settings.php
@@ -220,8 +220,6 @@ else
wp_cache_init();
-$wp_filters = array();
-
if( defined( "BLOGDEFINITION" ) && constant( "BLOGDEFINITION" ) == true )
return;