summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2005-11-18 13:31:37 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2005-11-18 13:31:37 +0000
commit2b56b90f06b0018f0dba866e2d799cda640d9597 (patch)
tree5c7ff6836df5f6a9539847b49738e5665c06e498
parent2f31acafe53edd3619b85a16fe1692dee7339a6b (diff)
downloadwordpress-mu-2b56b90f06b0018f0dba866e2d799cda640d9597.tar.gz
wordpress-mu-2b56b90f06b0018f0dba866e2d799cda640d9597.tar.xz
wordpress-mu-2b56b90f06b0018f0dba866e2d799cda640d9597.zip
WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@439 7be80a69-a1ef-0310-a953-fb0f7c49ff36
-rw-r--r--wp-inst/wp-admin/admin-footer.php3
-rw-r--r--wp-inst/wp-admin/admin-functions.php40
-rw-r--r--wp-inst/wp-admin/admin-header.php185
-rw-r--r--wp-inst/wp-admin/edit-form-advanced.php16
-rw-r--r--wp-inst/wp-admin/edit-form-ajax-cat.php27
-rw-r--r--wp-inst/wp-admin/edit-page-form.php2
-rw-r--r--wp-inst/wp-admin/images/wordpress-logo.pngbin0 -> 2098 bytes
-rw-r--r--wp-inst/wp-admin/inline-uploading.php249
-rw-r--r--wp-inst/wp-admin/install.php4
-rw-r--r--wp-inst/wp-admin/menu.php11
-rw-r--r--wp-inst/wp-admin/options-discussion.php2
-rw-r--r--wp-inst/wp-admin/options-general.php2
-rw-r--r--wp-inst/wp-admin/options-misc.php2
-rw-r--r--wp-inst/wp-admin/options-permalink.php2
-rw-r--r--wp-inst/wp-admin/options-personal-update.php18
-rw-r--r--wp-inst/wp-admin/options-personal.php36
-rw-r--r--wp-inst/wp-admin/options-reading.php2
-rw-r--r--wp-inst/wp-admin/options-writing.php4
-rw-r--r--wp-inst/wp-admin/post.php16
-rw-r--r--wp-inst/wp-admin/profile-update.php9
-rw-r--r--wp-inst/wp-admin/profile.php9
-rw-r--r--wp-inst/wp-admin/themes.php2
-rw-r--r--wp-inst/wp-admin/upgrade-functions.php13
-rw-r--r--wp-inst/wp-admin/upgrade.php4
-rw-r--r--wp-inst/wp-admin/wp-admin.css20
-rw-r--r--wp-inst/wp-content/themes/classic/comments-popup.php4
-rw-r--r--wp-inst/wp-content/themes/classic/footer.php2
-rw-r--r--wp-inst/wp-content/themes/classic/header.php4
-rw-r--r--wp-inst/wp-content/themes/default/comments-popup.php8
-rw-r--r--wp-inst/wp-content/themes/default/footer.php2
-rw-r--r--wp-inst/wp-content/themes/default/header.php2
-rw-r--r--wp-inst/wp-content/themes/default/searchform.php2
-rw-r--r--wp-inst/wp-content/themes/default/sidebar.php10
-rw-r--r--wp-inst/wp-includes/cache.php40
-rw-r--r--wp-inst/wp-includes/classes.php138
-rw-r--r--wp-inst/wp-includes/comment-functions.php7
-rw-r--r--wp-inst/wp-includes/functions-formatting.php2
-rw-r--r--wp-inst/wp-includes/functions.php5
-rw-r--r--wp-inst/wp-includes/images/wp-small.pngbin1416 -> 0 bytes
-rw-r--r--wp-inst/wp-includes/images/wpminilogo.pngbin989 -> 0 bytes
-rw-r--r--wp-inst/wp-includes/js/tinymce/license.html465
-rw-r--r--wp-inst/wp-includes/js/tinymce/plugins/wordpress/images/help.gifbin0 -> 92 bytes
-rw-r--r--wp-inst/wp-includes/pluggable-functions.php4
-rw-r--r--wp-inst/wp-includes/template-functions-general.php2
-rw-r--r--wp-inst/wp-includes/template-functions-links.php9
-rw-r--r--wp-inst/wp-login.php22
-rw-r--r--wp-inst/wp-register.php9
47 files changed, 992 insertions, 423 deletions
diff --git a/wp-inst/wp-admin/admin-footer.php b/wp-inst/wp-admin/admin-footer.php
index 82fdd24..8c881a2 100644
--- a/wp-inst/wp-admin/admin-footer.php
+++ b/wp-inst/wp-admin/admin-footer.php
@@ -1,5 +1,6 @@
-<div id="footer"><p><a href="http://wordpress.org/"><img src="../wp-includes/images/wp-small.png" alt="WordPress" /></a><br />
+<div id="footer"><p><a href="http://wordpress.org/" id="wordpress-logo"><img src="images/wordpress-logo.png" alt="WordPress" /></a></p>
+<p>
<a href="http://codex.wordpress.org/"><?php _e('Documentation'); ?></a> <br />
<?php printf(__('%s seconds'), number_format(timer_stop(), 2)); ?>
</p>
diff --git a/wp-inst/wp-admin/admin-functions.php b/wp-inst/wp-admin/admin-functions.php
index aea5881..1cf51b5 100644
--- a/wp-inst/wp-admin/admin-functions.php
+++ b/wp-inst/wp-admin/admin-functions.php
@@ -212,17 +212,37 @@ function get_post_to_edit($id) {
// Default post information to use when populating the "Write Post" form.
function get_default_post_to_edit() {
- global $content, $excerpt, $edited_post_title;
+ if ( !empty($_REQUEST['post_title']) )
+ $post_title = wp_specialchars(stripslashes($_REQUEST['post_title']));
+ else if ( !empty($_REQUEST['popuptitle']) ) {
+ $post_title = wp_specialchars(stripslashes($_REQUEST['popuptitle']));
+ $post_title = funky_javascript_fix($post_title);
+ } else {
+ $post_title = '';
+ }
+
+ if ( !empty($_REQUEST['content']) )
+ $post_content = wp_specialchars(stripslashes($_REQUEST['content']));
+ else if ( !empty($post_title) ) {
+ $text = wp_specialchars(stripslashes(urldecode($_REQUEST['text'])));
+ $text = funky_javascript_fix($text);
+ $popupurl = wp_specialchars($_REQUEST['popupurl']);
+ $post_content = '<a href="'.$popupurl.'">'.$post_title.'</a>'."\n$text";
+ }
+
+ if ( !empty($_REQUEST['excerpt']) )
+ $post_excerpt = wp_specialchars(stripslashes($_REQUEST['excerpt']));
+ else
+ $post_excerpt = '';
$post->post_status = 'draft';
$post->comment_status = get_settings('default_comment_status');
$post->ping_status = get_settings('default_ping_status');
$post->post_pingback = get_settings('default_pingback_flag');
$post->post_category = get_settings('default_category');
- $content = wp_specialchars($content);
- $post->post_content = apply_filters('default_content', $content);
- $post->post_title = apply_filters('default_title', $edited_post_title);
- $post->post_excerpt = apply_filters('default_excerpt', $excerpt);
+ $post->post_content = apply_filters('default_content', $post_content);
+ $post->post_title = apply_filters('default_title', $post_title);
+ $post->post_excerpt = apply_filters('default_excerpt', $post_excerpt);
$post->page_template = 'default';
$post->post_parent = 0;
$post->menu_order = 0;
@@ -984,14 +1004,6 @@ function got_mod_rewrite() {
return false;
}
- if ( function_exists('ob_get_clean') ) {
- ob_start();
- phpinfo(INFO_MODULES);
- $php_modules = ob_get_clean();
- if ( strpos($php_modules, 'mod_rewrite') === false)
- return false;
- }
-
return true;
}
@@ -1276,7 +1288,7 @@ function add_submenu_page($parent, $page_title, $menu_title, $access_level, $fil
}
function add_options_page($page_title, $menu_title, $access_level, $file, $function = '') {
- return add_submenu_page('options-personal.php', $page_title, $menu_title, $access_level, $file, $function);
+ return add_submenu_page('options-general.php', $page_title, $menu_title, $access_level, $file, $function);
}
function add_management_page($page_title, $menu_title, $access_level, $file, $function = '') {
diff --git a/wp-inst/wp-admin/admin-header.php b/wp-inst/wp-admin/admin-header.php
index 65cae8e..e4061f3 100644
--- a/wp-inst/wp-admin/admin-header.php
+++ b/wp-inst/wp-admin/admin-header.php
@@ -110,6 +110,32 @@ tinyMCE.init({
<script type="text/javascript" src="../wp-includes/js/dbx-key.js"></script>
<?php if ( current_user_can('manage_categories') ) : ?>
+<style type="text/css">
+#newcat { width: 120px; margin-right: 5px; }
+input#catadd { background: #a4a4a4;
+ border-bottom: 1px solid #898989;
+ border-left: 1px solid #bcbcbc;
+ border-right: 1px solid #898989;
+ border-top: 1px solid #bcbcbc;
+ color: #fff;
+ font-size: 10px;
+ padding: 0;
+ margin: 0;
+ font-weight: bold;
+ height: 20px;
+ margin-bottom: 2px;
+ text-align: center;
+ width: 37px; }
+#howto {
+ font-size: 11px;
+ margin: 0 5px;
+ display: block;
+}
+#jaxcat {
+ margin: 0;
+ padding: 0;
+}
+</style>
<script type="text/javascript">
var ajaxCat = new sack();
var newcat;
@@ -126,11 +152,12 @@ function newCatAddIn() {
newcat.setAttribute('autocomplete', 'off');
newcat.onkeypress = ajaxNewCatKeyPress;
- //var newcatSub = document.createElement('input');
- //newcatSub.type = 'button';
- //newcatSub.name = 'Button';
- //newcatSub.value = '+';
- //newcat.onkeypress = ajaxNewCatKeyPress;
+ var newcatSub = document.createElement('input');
+ newcatSub.type = 'button';
+ newcatSub.name = 'Button';
+ newcatSub.id = 'catadd';
+ newcatSub.value = '<?php _e('Add'); ?>';
+ newcatSub.onclick = ajaxNewCat;
var searchResult = document.createElement( 'div' );
searchResult.type = 'div';
@@ -143,9 +170,14 @@ function newCatAddIn() {
ajaxcat.appendChild(newcat);
- //ajaxcat.appendChild(newcatSub);
+ ajaxcat.appendChild(newcatSub);
ajaxcat.appendChild(searchResult);
- document.getElementById('categorychecklist').parentNode.appendChild(ajaxcat);
+ document.getElementById('jaxcat').appendChild(ajaxcat);
+
+ howto = document.createElement('span');
+ howto.innerHTML = '<?php _e('Separate multiple categories with commas.'); ?>';
+ howto.id = 'howto';
+ ajaxcat.appendChild(howto);
}
addLoadEvent(newCatAddIn);
@@ -154,7 +186,7 @@ function getResponseElement() {
var p = document.getElementById('ajaxcatresponse');
if (!p) {
p = document.createElement('p');
- document.getElementById('categorydiv').appendChild(p);
+ document.getElementById('jaxcat').appendChild(p);
p.id = 'ajaxcatresponse';
}
return p;
@@ -172,57 +204,73 @@ function newCatLoaded() {
function newCatInteractive() {
var p = getResponseElement();
- p.innerHTML = 'Processing Data...';
+ p.innerHTML = 'Processing Request...';
}
function newCatCompletion() {
var p = getResponseElement();
- var id = parseInt(ajaxCat.response, 10);
- if ( id == '-1' ) {
- p.innerHTML = "You don't have permission to do that.";
- return;
- }
- if ( id == '0' ) {
- p.innerHTML = "That category name is invalid. Try something else.";
- return;
+// alert(ajaxCat.response);
+ var id = 0;
+ var ids = new Array();
+ var names = new Array();
+
+ ids = myPload( ajaxCat.response );
+ names = myPload( newcat.value );
+
+ for ( i = 0; i < ids.length; i++ ) {
+ id = ids[i];
+// alert(id);
+ if ( id == '-1' ) {
+ p.innerHTML = "You don't have permission to do that.";
+ return;
+ }
+ if ( id == '0' ) {
+ p.innerHTML = "That category name is invalid. Try something else.";
+ return;
+ }
+
+ var exists = document.getElementById('category-' + id);
+
+ if (exists) {
+ var moveIt = exists.parentNode;
+ var container = moveIt.parentNode;
+ container.removeChild(moveIt);
+ container.insertBefore(moveIt, container.firstChild);
+ moveIt.id = 'new-category-' + id;
+ exists.checked = 'checked';
+ var nowClass = moveIt.className;
+ moveIt.className = nowClass + ' fade';
+ Fat.fade_all();
+ moveIt.className = nowClass;
+ } else {
+ var catDiv = document.getElementById('categorychecklist');
+ var newLabel = document.createElement('label');
+ newLabel.setAttribute('for', 'category-' + id);
+ newLabel.id = 'new-category-' + id;
+ newLabel.className = 'selectit fade';
+
+ var newCheck = document.createElement('input');
+ newCheck.type = 'checkbox';
+ newCheck.value = id;
+ newCheck.name = 'post_category[]';
+ newCheck.id = 'category-' + id;
+ newLabel.appendChild(newCheck);
+
+ var newLabelText = document.createTextNode(' ' + names[i]);
+ newLabel.appendChild(newLabelText);
+
+ catDiv.insertBefore(newLabel, catDiv.firstChild);
+ newCheck.checked = 'checked';
+
+ Fat.fade_all();
+ newLabel.className = 'selectit';
+ }
+ newcat.value = '';
}
p.parentNode.removeChild(p);
- var exists = document.getElementById('category-' + id);
- if (exists) {
- var moveIt = exists.parentNode;
- var container = moveIt.parentNode;
- container.removeChild(moveIt);
- container.insertBefore(moveIt, container.firstChild);
- moveIt.id = 'new-category-' + id;
- exists.checked = 'checked';
- var nowClass = moveIt.className;
- moveIt.className = nowClass + ' fade';
- Fat.fade_all();
- moveIt.className = nowClass;
- } else {
- var catDiv = document.getElementById('categorychecklist');
- var newLabel = document.createElement('label');
- newLabel.setAttribute('for', 'category-' + id);
- newLabel.id = 'new-category-' + id;
- newLabel.className = 'selectit fade';
-
- var newCheck = document.createElement('input');
- newCheck.type = 'checkbox';
- newCheck.value = id;
- newCheck.name = 'post_category[]';
- newCheck.id = 'category-' + id;
- newLabel.appendChild(newCheck);
-
- var newLabelText = document.createTextNode(' ' + newcat.value);
- newLabel.appendChild(newLabelText);
-
- catDiv.insertBefore(newLabel, catDiv.firstChild);
- newCheck.checked = 'checked';
-
- Fat.fade_all();
- newLabel.className = 'selectit';
- }
- newcat.value = '';
+// var id = parseInt(ajaxCat.response, 10);
+
+
}
function ajaxNewCatKeyPress(e) {
@@ -243,7 +291,10 @@ function ajaxNewCatKeyPress(e) {
function ajaxNewCat() {
var newcat = document.getElementById('newcat');
- var catString = 'ajaxnewcat=' + encodeURIComponent(newcat.value);
+ var split_cats = new Array(1);
+ var catString = '';
+
+ catString = 'ajaxnewcat=' + encodeURIComponent(newcat.value);
ajaxCat.requestFile = 'edit-form-ajax-cat.php';
ajaxCat.method = 'GET';
ajaxCat.onLoading = newCatLoading;
@@ -252,6 +303,30 @@ function ajaxNewCat() {
ajaxCat.onCompletion = newCatCompletion;
ajaxCat.runAJAX(catString);
}
+
+function myPload( str ) {
+ var fixedExplode = new Array();
+ var comma = new String(',');
+ var count = 0;
+ var currentElement = '';
+
+ for( x=0; x < str.length; x++) {
+ andy = str.charAt(x);
+ if ( comma.indexOf(andy) != -1 ) {
+ fixedExplode[count] = currentElement;
+ currentElement = "";
+ count++;
+ } else {
+ if ( ' ' != andy )
+ currentElement += andy;
+ }
+ }
+
+ if ( currentElement != "" )
+ fixedExplode[count] = currentElement;
+ return fixedExplode;
+}
+
</script>
<?php endif; ?>
@@ -271,7 +346,7 @@ function ajaxNewCat() {
<?php
require(ABSPATH . '/wp-admin/menu-header.php');
-if ( $parent_file == 'options-personal.php' ) {
+if ( $parent_file == 'options-general.php' ) {
require(ABSPATH . '/wp-admin/options-head.php');
}
?>
diff --git a/wp-inst/wp-admin/edit-form-advanced.php b/wp-inst/wp-admin/edit-form-advanced.php
index b1575b7..18c3ff6 100644
--- a/wp-inst/wp-admin/edit-form-advanced.php
+++ b/wp-inst/wp-admin/edit-form-advanced.php
@@ -8,6 +8,10 @@ $messages[3] = __('Custom field deleted.');
<?php endif; ?>
<form name="post" action="post.php" method="post" id="post">
+<?php if ( (isset($mode) && 'bookmarklet' == $mode) ||
+ isset($_GET['popupurl']) ): ?>
+<input type="hidden" name="mode" value="bookmarklet" />
+<?php endif; ?>
<div class="wrap">
<h2 id="write-post"><?php _e('Write Post'); ?><?php if ( 0 != $post_ID ) : ?>
@@ -85,8 +89,10 @@ addLoadEvent(focusit);
</fieldset>
<fieldset id="categorydiv" class="dbx-box">
-<h3 class="dbx-handle"><?php _e('Categories') ?></h3>
-<div class="dbx-content"><div id="categorychecklist"><?php dropdown_categories(get_settings('default_category')); ?></div></div>
+<h3 class="dbx-handle"><?php _e('Categories') ?></h3>
+<div class="dbx-content">
+<p id="jaxcat"></p>
+<div id="categorychecklist"><?php dropdown_categories(get_settings('default_category')); ?></div></div>
<?php if ( current_user_can('manage_categories') ) : ?>
<?php AJAX_search_box( "wpmu-edit.php?action=searchcategories&search=", "newcat", "searchresults" ); ?>
<?php endif; ?>
@@ -207,7 +213,9 @@ if ('publish' != $post->post_status || 0 == $post_ID) {
}
?>
<input name="referredby" type="hidden" id="referredby" value="<?php
-if ( url_to_postid($_SERVER['HTTP_REFERER']) == $post_ID )
+if ( !empty($_REQUEST['popupurl']) )
+ echo wp_specialchars($_REQUEST['popupurl']);
+else if ( url_to_postid($_SERVER['HTTP_REFERER']) == $post_ID )
echo 'redo';
else
echo wp_specialchars($_SERVER['HTTP_REFERER']);
@@ -218,6 +226,8 @@ else
<?php
$uploading_iframe_ID = (0 == $post_ID ? $temp_ID : $post_ID);
$uploading_iframe_src = "inline-uploading.php?action=view&amp;post=$uploading_iframe_ID";
+if ( !$attachments = $wpdb->get_results("SELECT ID FROM $wpdb->posts WHERE post_parent = '$uploading_iframe_ID'") )
+ $uploading_iframe_src = "inline-uploading.php?action=upload&amp;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>';
diff --git a/wp-inst/wp-admin/edit-form-ajax-cat.php b/wp-inst/wp-admin/edit-form-ajax-cat.php
index 5debf95..ce9e43f 100644
--- a/wp-inst/wp-admin/edit-form-ajax-cat.php
+++ b/wp-inst/wp-admin/edit-form-ajax-cat.php
@@ -12,13 +12,26 @@ function get_out_now() { exit; }
add_action('shutdown', 'get_out_now', -1);
-$cat_name = rawurldecode($_GET['ajaxnewcat']);
+$names = explode(',', rawurldecode($_GET['ajaxnewcat']) );
+$ids = array();
-if ( !$category_nicename = sanitize_title($cat_name) )
- die('0');
-if ( $already = category_exists($cat_name) )
- die((string) $already);
+foreach ($names as $cat_name) {
+ $cat_name = trim( $cat_name );
+
+ if ( !$category_nicename = sanitize_title($cat_name) )
+ continue;
+ if ( $already = category_exists($cat_name) ) {
+ $ids[] = (string) $already;
+ continue;
+ }
+
+ $new_cat_id = wp_create_category($cat_name);
+
+ $ids[] = (string) $new_cat_id;
+}
+
+$return = join(',', $ids);
+
+die( (string) $return );
-$new_cat_id = wp_create_category($cat_name);
-die((string) $new_cat_id);
?>
diff --git a/wp-inst/wp-admin/edit-page-form.php b/wp-inst/wp-admin/edit-page-form.php
index 803884b..cf9d584 100644
--- a/wp-inst/wp-admin/edit-page-form.php
+++ b/wp-inst/wp-admin/edit-page-form.php
@@ -150,6 +150,8 @@ edCanvas = document.getElementById('content');
<?php
$uploading_iframe_ID = (0 == $post_ID ? $temp_ID : $post_ID);
$uploading_iframe_src = "inline-uploading.php?action=view&amp;post=$uploading_iframe_ID";
+if ( !$attachments = $wpdb->get_results("SELECT ID FROM $wpdb->posts WHERE post_parent = '$uploading_iframe_ID'") )
+ $uploading_iframe_src = "inline-uploading.php?action=upload&amp;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>';
diff --git a/wp-inst/wp-admin/images/wordpress-logo.png b/wp-inst/wp-admin/images/wordpress-logo.png
new file mode 100644
index 0000000..7d8e672
--- /dev/null
+++ b/wp-inst/wp-admin/images/wordpress-logo.png
Binary files differ
diff --git a/wp-inst/wp-admin/inline-uploading.php b/wp-inst/wp-admin/inline-uploading.php
index fcfad48..25251bb 100644
--- a/wp-inst/wp-admin/inline-uploading.php
+++ b/wp-inst/wp-admin/inline-uploading.php
@@ -120,7 +120,7 @@ if ( $start < 0 )
$start = 0;
if ( '' == $sort )
- $sort = "ID";
+ $sort = "post_date_gmt DESC";
$images = $wpdb->get_results("SELECT ID, post_date, post_title, guid FROM $wpdb->posts WHERE post_status = 'attachment' AND left(post_mime_type, 5) = 'image' $and_post ORDER BY $sort LIMIT $start, $double", ARRAY_A);
@@ -145,12 +145,13 @@ $images_style = '';
$images_script = '';
if ( count($images) > 0 ) {
$images = array_slice( $images, 0, $num );
- $__delete = __('DELETE');
- $__attachment_on = __('ATTACHMENT <strong>ON</strong>');
- $__thumbnail_on = __('THUMBNAIL <strong>ON</strong>');
- $__thumbnail_off = __('THUMBNAIL <strong>OFF</strong>');
- $__no_thumbnail = __('<del>THUMBNAIL</del>');
- $__close = __('CLOSE');
+ $__delete = __('Delete');
+ $__attachment_on = __('Link to Page');
+ $__attachment_off = __('Link to Image');
+ $__thumbnail_on = __('Use Thumbnail');
+ $__thumbnail_off = __('Use Full Image');
+ $__no_thumbnail = __('<del>No Thumbnail</del>');
+ $__close = __('Close Options');
$__confirmdelete = __('Delete this photo from the server?');
$__nothumb = __('There is no thumbnail associated with this photo.');
$images_script .= "attachmenton = '$__attachment_on';\nattachmentoff = '$__attachment_off';\n";
@@ -268,165 +269,172 @@ function toggleImage(n) {
</script>
<style type="text/css">
body {
-font: 13px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana;
-border: none;
-margin: 0px;
-height: 150px;
-background: rgb(223, 232, 241);
+ font: 13px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana;
+ border: none;
+ margin: 0px;
+ height: 150px;
+ background: #dfe8f1;
}
form {
-margin: 6px 2px 0px 6px;
+ margin: 6px 2px 0px 6px;
}
#wrap {
-clear: both;
-margin: 0px;
-padding: 0px;
-height: 133px;
-width: 100%;
-overflow: auto;
+ clear: both;
+ margin: 0px;
+ padding: 0px;
+ height: 133px;
+ width: 100%;
+ overflow: auto;
}
#images {
-clear: both;
-margin: 0px;
-padding: 5px 15px;
-height: 96px;
-white-space: nowrap;
-width: <?php echo $images_width; ?>px;
+ clear: both;
+ margin: 0px;
+ padding: 5px 15px;
+ height: 96px;
+ white-space: nowrap;
+ width: <?php echo $images_width; ?>px;
}
#images img {
-background-color: rgb(209, 226, 239);
+ background-color: rgb(209, 226, 239);
}
<?php echo $images_style; ?>
.imagewrap {
-margin-right: 5px;
-height: 96px;
-overflow: hidden;
+ margin-right: 5px;
+ height: 96px;
+ overflow: hidden;
}
.imagewrap * {
-margin: 0px;
-padding: 0px;
-border: 0px;
+ margin: 0px;
+ padding: 0px;
+ border: 0px;
}
.imagewrap a, .imagewrap a img, .imagewrap a:hover img, .imagewrap a:visited img, .imagewrap a:active img {
-text-decoration: none;
-float: left;
-/*display: block;*/
-text-align: center;
-}
-#menu {
-margin: 0px;
-list-style: none;
-background: rgb(109, 166, 209);
-padding: 4px 0px 0px 8px;
-text-align: left;
-border-bottom: 3px solid rgb(68, 138, 189);
-}
-#menu li {
-display: inline;
-margin: 0px;
-}
-#menu a, #menu a:visited, #menu a:active {
-padding: 1px 3px 3px;
-text-decoration: none;
-color: #234;
-background: transparent;
-}
-#menu a:hover {
-background: rgb(203, 214, 228);
-color: #000;
-}
-#menu .current a, #menu .current a:hover, #menu .current a:visited, #menu .current a:active {
-background: rgb(223, 232, 241);
-padding-bottom: 3px;
-color: #000;
-border-right: 2px solid rgb(20, 86, 138);
+ text-decoration: none;
+ float: left;
+ text-align: center;
}
+
+#upload-menu {
+ background: #fff;
+ margin: 0;
+ padding: 0;
+ list-style: none;
+ height: 2em;
+ border-bottom: 1px solid #448abd;
+}
+
+#upload-menu li {
+ float: left;
+ margin: 0 0 0 1em;
+}
+
+#upload-menu a {
+ display: block;
+ padding: 5px;
+ text-decoration: none;
+ color: #000;
+ border-top: 3px solid #fff;
+}
+
+#upload-menu .current a {
+ background: #dfe8f1;
+ border-right: 2px solid #448abd;
+
+}
+
+#upload-menu a:hover {
+ background: #dfe8f1;
+ color: #000;
+}
+
+
.tip {
-color: rgb(68, 138, 189);
-padding: 1px 3px;
+ color: rgb(68, 138, 189);
+ padding: 2px 1em;
}
.inactive {
-color: #579;
-padding: 1px 3px;
+ color: #fff;
+ padding: 1px 3px;
}
.left {
-float: left;
+ float: left;
}
.right {
-float: right;
+ float: right;
}
.center {
-text-align: center;
+ text-align: center;
}
-#menu li.spacer {
-margin-left: 40px;
-}
-label {
-float: left;
-width: 18%;
+#upload-menu li.spacer {
+ margin-left: 40px;
}
+
#title, #descr {
-width: 80%;
-margin-top: 2px;
+ width: 80%;
+ margin-top: 2px;
}
#descr {
-height: 35px;
-v-align: top;
+ height: 35px;
+ v-align: top;
}
#buttons {
-width: 98%;
-margin-top: 2px;
-text-align: right;
+ width: 98%;
+ margin-top: 2px;
+ text-align: right;
}
.popup {
-margin: 4px 4px;
-padding: 3px;
-position: absolute;
-width: 114px;
-height: 82px;
-display: none;
-background-color: rgb(223, 232, 241);
-opacity: .90;
-filter:alpha(opacity=90);
-text-align: center;
+ margin: 4px 4px;
+ padding: 3px;
+ position: absolute;
+ width: 114px;
+ height: 82px;
+ display: none;
+ background-color: rgb(223, 232, 241);
+ opacity: .90;
+ filter:alpha(opacity=90);
+ text-align: center;
}
.popup a, .popup a:visited, .popup a:active {
-background-color: transparent;
-display: block;
-width: 100%;
-text-decoration: none;
-color: #246;
+ background-color: transparent;
+ display: block;
+ width: 100%;
+ text-decoration: none;
+ color: #246;
}
.popup a:hover {
-background-color: #fff;
-color: #000;
+ background-color: #fff;
+ color: #000;
}
</style>
</head>
<body onload="init()">
-<ul id="menu">
-<li<?php echo $current_1; ?>><a href="<?php echo basename(__FILE__); ?>?action=upload&amp;post=<?php echo $post; ?>&amp;all=<?php echo $all; ?>"><?php _e('Upload File'); ?></a></li>
-<li<?php echo $current_2; ?>><a href="<?php echo basename(__FILE__); ?>?action=view&amp;post=<?php echo $post; ?>"><?php _e('Browse Attached'); ?></a></li>
-<li<?php echo $current_3; ?>><a href="<?php echo basename(__FILE__); ?>?action=view&amp;post=<?php echo $post; ?>&amp;all=true"><?php _e('Browse All'); ?></a></li>
+<ul id="upload-menu">
+<li<?php echo $current_1; ?>><a href="<?php echo basename(__FILE__); ?>?action=upload&amp;post=<?php echo $post; ?>&amp;all=<?php echo $all; ?>"><?php _e('Upload Image'); ?></a></li>
+<?php if ( $attachments = $wpdb->get_results("SELECT ID FROM $wpdb->posts WHERE post_parent = '$post'") ) { ?>
+<li<?php echo $current_2; ?>><a href="<?php echo basename(__FILE__); ?>?action=view&amp;post=<?php echo $post; ?>"><?php _e('Attached Images'); ?></a></li>
+<?php } ?>
+<li<?php echo $current_3; ?>><a href="<?php echo basename(__FILE__); ?>?action=view&amp;post=<?php echo $post; ?>&amp;all=true"><?php _e('All Images'); ?></a></li>
<li> </li>
+<?php if ( $action != 'upload' ) { ?>
<?php if ( false !== $back ) : ?>
-<li class="spacer"><a href="<?php echo basename(__FILE__); ?>?action=<?php echo $action; ?>&amp;post=<?php echo $post; ?>&amp;all=<?php echo $all; ?>&amp;start=0" title="<?php _e('First'); ?>">|&lt;</a></li>
-<li><a href="<?php echo basename(__FILE__); ?>?action=<?php echo $action; ?>&amp;post=<?php echo $post; ?>&amp;all=<?php echo $all; ?>&amp;start=<?php echo $back; ?>" title="<?php _e('Back'); ?>">&lt;&lt;</a></li>
+<li class="spacer"><a href="<?php echo basename(__FILE__); ?>?action=<?php echo $action; ?>&amp;post=<?php echo $post; ?>&amp;all=<?php echo $all; ?>&amp;start=0" title="<?php _e('First'); ?>">|&laquo;</a></li>
+<li><a href="<?php echo basename(__FILE__); ?>?action=<?php echo $action; ?>&amp;post=<?php echo $post; ?>&amp;all=<?php echo $all; ?>&amp;start=<?php echo $back; ?>"">&laquo; <?php _e('Back'); ?></a></li>
<?php else : ?>
<li class="inactive spacer">|&lt;</li>
<li class="inactive">&lt;&lt;</li>
<?php endif; ?>
<?php if ( false !== $next ) : ?>
-<li><a href="<?php echo basename(__FILE__); ?>?action=<?php echo $action; ?>&amp;post=<?php echo $post; ?>&amp;all=<?php echo $all; ?>&amp;start=<?php echo $next; ?>" title="<?php _e('Next'); ?>">&gt;&gt;</a></li>
-<li><a href="<?php echo basename(__FILE__); ?>?action=<?php echo $action; ?>&amp;post=<?php echo $post; ?>&amp;all=<?php echo $all; ?>&amp;last=true" title="<?php _e('Last'); ?>">&gt;|</a></li>
+<li><a href="<?php echo basename(__FILE__); ?>?action=<?php echo $action; ?>&amp;post=<?php echo $post; ?>&amp;all=<?php echo $all; ?>&amp;start=<?php echo $next; ?>"><?php _e('Next'); ?> &raquo;</a></li>
+<li><a href="<?php echo basename(__FILE__); ?>?action=<?php echo $action; ?>&amp;post=<?php echo $post; ?>&amp;all=<?php echo $all; ?>&amp;last=true" title="<?php _e('Last'); ?>">&raquo;|</a></li>
<?php else : ?>
<li class="inactive">&gt;&gt;</li>
<li class="inactive">&gt;|</li>
<?php endif; ?>
+<?php } // endif not upload?>
</ul>
<?php if ( $action == 'view' ) : ?>
-<span class="left tip"><?php _e('Drag and drop photos to post'); ?></span>
-<span class="right tip"><?php _e('Click photos for more options'); ?></span>
+<span class="left tip"><?php _e('You can drag and drop these photos into your post. Click on the thumbnail for more options.'); ?></span>
+<span class="right tip"></span>
<div id="wrap">
<div id="images">
<?php echo $images_html; ?>
@@ -438,13 +446,24 @@ color: #000;
} else { ?>
<div class="tip"></div>
<form enctype="multipart/form-data" id="uploadForm" method="POST" action="<?php echo basename(__FILE__); ?>" onsubmit="return validateImageName()">
-<label for="upload"><?php _e('Image:'); ?></label><input type="file" id="upload" name="image" onchange="validateImageName()" />
-<label for="title"><?php _e('Title:'); ?></label><input type="text" id="title" name="imgtitle" />
-<label for="descr"><?php _e('Description:'); ?></label><input type="textarea" name="descr" id="descr" value="" />
+<table style="width: 100%">
+<tr>
+<th scope="row" style="width: 6em; text-align: right;"><label for="upload"><?php _e('Image:'); ?></label></th>
+<td><input type="file" id="upload" name="image" onchange="validateImageName()" /></td>
+</tr>
+<tr>
+<th scope="row" style="text-align: right;"><label for="title"><?php _e('Title:'); ?></label></th>
+<td><input type="text" id="title" name="imgtitle" /></td>
+</tr>
+<tr>
+<th scope="row" style="text-align: right;"><label for="descr"><?php _e('Description:'); ?></th>
+<td><input type="textarea" name="descr" id="descr" value="" /></td>
+</tr>
+</table>
+<p class="submit">
<input type="hidden" name="action" value="save" />
<input type="hidden" name="post" value="<?php echo $post; ?>" />
<input type="hidden" name="all" value="<?php echo $all; ?>" />
-<div id="buttons">
<input type="submit" value="<?php _e('Upload'); ?>" />
<input type="button" value="<?php _e('Cancel'); ?>" onclick="cancelUpload()" />
</div>
diff --git a/wp-inst/wp-admin/install.php b/wp-inst/wp-admin/install.php
index 2344978..8681f3b 100644
--- a/wp-inst/wp-admin/install.php
+++ b/wp-inst/wp-admin/install.php
@@ -74,7 +74,7 @@ header( 'Content-Type: text/html; charset=utf-8' );
</style>
</head>
<body>
-<h1 id="logo"><img alt="WordPress" src="http://static.wordpress.org/logo.png" /></h1>
+<h1 id="logo"><img alt="WordPress" src="images/wordpress-logo.png" /></h1>
<?php
// Let's check to make sure WP isn't already installed.
$wpdb->hide_errors();
@@ -156,7 +156,7 @@ $wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_category, link
$wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_category, link_rss) VALUES ('http://dougal.gunters.org/', 'Dougal', 1, 'http://dougal.gunters.org/feed/');");
// Default category
-$wpdb->query("INSERT INTO $wpdb->categories (cat_ID, cat_name, category_nicename) VALUES ('0', '".$wpdb->escape(__('Uncategorized'))."', '".sanitize_title(__('Uncategorized'))."')");
+$wpdb->query("INSERT INTO $wpdb->categories (cat_ID, cat_name, category_nicename, category_count) VALUES ('0', '".$wpdb->escape(__('Uncategorized'))."', '".sanitize_title(__('Uncategorized'))."', '1')");
// First post
$now = date('Y-m-d H:i:s');
diff --git a/wp-inst/wp-admin/menu.php b/wp-inst/wp-admin/menu.php
index 5fa5e37..e9e586e 100644
--- a/wp-inst/wp-admin/menu.php
+++ b/wp-inst/wp-admin/menu.php
@@ -20,7 +20,7 @@ if ( current_user_can('edit_users') )
$menu[35] = array(__('Users'), 'read', 'profile.php');
else
$menu[35] = array(__('Profile'), 'read', 'profile.php');
-$menu[40] = array(__('Options'), 'read', 'options-personal.php');
+$menu[40] = array(__('Options'), 'read', 'options-general.php');
$menu[45] = array(__('Import'), 'import', 'import.php');
/*
@@ -51,11 +51,10 @@ $submenu['link-manager.php'][20] = array(__('Import Links'), 'manage_links', 'li
$submenu['profile.php'][5] = array(__('Your Profile'), 'read', 'profile.php');
$submenu['profile.php'][10] = array(__('Authors &amp; Users'), 'edit_users', 'users.php');
-$submenu['options-personal.php'][5] = array(__('Personal'), 'read', 'options-personal.php');
-$submenu['options-personal.php'][10] = array(__('General'), 'manage_options', 'options-general.php');
-$submenu['options-personal.php'][15] = array(__('Writing'), 'manage_options', 'options-writing.php');
-$submenu['options-personal.php'][20] = array(__('Reading'), 'manage_options', 'options-reading.php');
-$submenu['options-personal.php'][25] = array(__('Discussion'), 'manage_options', 'options-discussion.php');
+$submenu['options-general.php'][10] = array(__('General'), 'manage_options', 'options-general.php');
+$submenu['options-general.php'][15] = array(__('Writing'), 'manage_options', 'options-writing.php');
+$submenu['options-general.php'][20] = array(__('Reading'), 'manage_options', 'options-reading.php');
+$submenu['options-general.php'][25] = array(__('Discussion'), 'manage_options', 'options-discussion.php');
$submenu['themes.php'][5] = array(__('Themes'), 'switch_themes', 'themes.php');
diff --git a/wp-inst/wp-admin/options-discussion.php b/wp-inst/wp-admin/options-discussion.php
index 7abf4ad..c26ea2e 100644
--- a/wp-inst/wp-admin/options-discussion.php
+++ b/wp-inst/wp-admin/options-discussion.php
@@ -2,7 +2,7 @@
require_once('admin.php');
$title = __('Discussion Options');
-$parent_file = 'options-personal.php';
+$parent_file = 'options-general.php';
include('admin-header.php');
diff --git a/wp-inst/wp-admin/options-general.php b/wp-inst/wp-admin/options-general.php
index 8e4f7ee..299736e 100644
--- a/wp-inst/wp-admin/options-general.php
+++ b/wp-inst/wp-admin/options-general.php
@@ -2,7 +2,7 @@
require_once('admin.php');
$title = __('General Options');
-$parent_file = 'options-personal.php';
+$parent_file = 'options-general.php';
include('admin-header.php');
?>
diff --git a/wp-inst/wp-admin/options-misc.php b/wp-inst/wp-admin/options-misc.php
index b2380a1..23cbd92 100644
--- a/wp-inst/wp-admin/options-misc.php
+++ b/wp-inst/wp-admin/options-misc.php
@@ -2,7 +2,7 @@
require_once('admin.php');
$title = __('Miscellaneous Options');
-$parent_file = 'options-personal.php';
+$parent_file = 'options-general.php';
include('admin-header.php');
return;
diff --git a/wp-inst/wp-admin/options-permalink.php b/wp-inst/wp-admin/options-permalink.php
index 5ddc682..aaba9bc 100644
--- a/wp-inst/wp-admin/options-permalink.php
+++ b/wp-inst/wp-admin/options-permalink.php
@@ -3,7 +3,7 @@ return;
require_once('admin.php');
$title = __('Permalink Options');
-$parent_file = 'options-personal.php';
+$parent_file = 'options-general.php';
function add_js() {
?>
diff --git a/wp-inst/wp-admin/options-personal-update.php b/wp-inst/wp-admin/options-personal-update.php
deleted file mode 100644
index e211449..0000000
--- a/wp-inst/wp-admin/options-personal-update.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-
-require_once('admin.php');
-
-check_admin_referer();
-
-if ( isset( $_POST['action'] ) ) {
- if ( !isset( $_POST['rich_editing'] ) )
- $_POST['rich_editing'] = 'false';
- update_user_option( $current_user->id, 'rich_editing', $wpdb->escape($_POST['rich_editing']), true );
- do_action('personal_options_update');
-
- $goback = add_query_arg('updated', 'true', $_SERVER['HTTP_REFERER']);
- $goback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $goback);
- wp_redirect($goback);
-}
-
-?> \ No newline at end of file
diff --git a/wp-inst/wp-admin/options-personal.php b/wp-inst/wp-admin/options-personal.php
deleted file mode 100644
index 2ab6a04..0000000
--- a/wp-inst/wp-admin/options-personal.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-require_once('admin.php');
-
-$title = __('Personal Options');
-$parent_file = 'options-personal.php';
-
-include('admin-header.php');
-?>
-
-<div class="wrap">
-<h2><?php _e('Personal Options') ?></h2>
-<form id="personal-options" method="post" action="options-personal-update.php">
-<fieldset>
-<p><?php _e('Personal options are just for you, they don&#8217;t affect other users on blog.'); ?><input type="hidden" name="action" value="update" />
-<input type="hidden" name="page_options" value="rich_editing<?php do_action('personal_option_list'); ?>" /></p>
-<table width="100%" cellspacing="2" cellpadding="5" class="editform">
-<tr valign="top">
-<th width="33%" scope="row"><?php _e('Editing:') ?></th>
-<td><label for="rich_editing">
-<input name="rich_editing" type="checkbox" id="rich_editing" value="true" <?php checked('true', get_user_option('rich_editing')); ?> />
-<?php _e('Use the visual rich editor when writing') ?></label></td>
-</tr>
-<tr valign="top">
-<th scope="row"><?php _e('More:') ?></th>
-<td>We should really figure out what else to put here.</td>
-</tr>
-<?php do_action('personal_options_table'); ?>
-</table>
-
-</fieldset>
-<p class="submit">
-<input type="submit" name="Submit" value="<?php _e('Update Personal Options') ?> &raquo;" />
-</p>
-</form>
-</div>
-<?php include('admin-footer.php'); ?>
diff --git a/wp-inst/wp-admin/options-reading.php b/wp-inst/wp-admin/options-reading.php
index 898e24d..578e937 100644
--- a/wp-inst/wp-admin/options-reading.php
+++ b/wp-inst/wp-admin/options-reading.php
@@ -2,7 +2,7 @@
require_once('admin.php');
$title = __('Reading Options');
-$parent_file = 'options-personal.php';
+$parent_file = 'options-general.php';
include('admin-header.php');
?>
diff --git a/wp-inst/wp-admin/options-writing.php b/wp-inst/wp-admin/options-writing.php
index 0855aa3..b065735 100644
--- a/wp-inst/wp-admin/options-writing.php
+++ b/wp-inst/wp-admin/options-writing.php
@@ -2,7 +2,7 @@
require_once('admin.php');
$title = __('Writing Options');
-$parent_file = 'options-personal.php';
+$parent_file = 'options-general.php';
include('admin-header.php');
?>
@@ -88,7 +88,7 @@ endforeach;
<p class="submit">
<input type="hidden" name="action" value="update" />
-<input type="hidden" name="page_options" value="default_post_edit_rows,use_smilies,ping_sites,mailserver_url, mailserver_port,mailserver_login,mailserver_pass,default_category,default_email_category" />
+<input type="hidden" name="page_options" value="default_post_edit_rows,use_smilies,rich_editing,ping_sites,mailserver_url,mailserver_port,mailserver_login,mailserver_pass,default_category,default_email_category" />
<input type="submit" name="Submit" value="<?php _e('Update Options') ?> &raquo;" />
</p>
</form>
diff --git a/wp-inst/wp-admin/post.php b/wp-inst/wp-admin/post.php
index a6fa7c9..e0620ab 100644
--- a/wp-inst/wp-admin/post.php
+++ b/wp-inst/wp-admin/post.php
@@ -36,7 +36,7 @@ case 'post':
if (!empty($_POST['mode'])) {
switch($_POST['mode']) {
case 'bookmarklet':
- $location = 'bookmarklet.php?a=b';
+ $location = $_POST['referredby'];
break;
case 'sidebar':
$location = 'sidebar.php?a=b';
@@ -52,7 +52,7 @@ case 'post':
if ( 'static' == $_POST['post_status'] )
$location = "page-new.php?saved=true";
- if ( '' != $_POST['advanced'] || isset($_POST['save']) )
+ if ( isset($_POST['save']) )
$location = "post.php?action=edit&post=$post_ID";
header("Location: $location");
@@ -308,7 +308,7 @@ default:
require_once ('./admin-header.php');
?>
<?php if ( isset($_GET['posted']) ) : ?>
-<div id="message" class="updated fade"><p><?php printf(__('Post saved. <a href="%s">View site &raquo;</a>'), get_bloginfo('home')); ?></p></div>
+<div id="message" class="updated fade"><p><?php printf(__('Post saved. <a href="%s">View site &raquo;</a>'), get_bloginfo('home') . '/'); ?></p></div>
<?php endif; ?>
<?php
if ( current_user_can('edit_posts') ) {
@@ -349,15 +349,13 @@ default:
<p>
<?php
-$bookmarklet_height= (get_settings('use_trackback')) ? 480 : 440;
-
if ($is_NS4 || $is_gecko) {
?>
-<a href="javascript:if(navigator.userAgent.indexOf('Safari') >= 0){Q=getSelection();}else{Q=document.selection?document.selection.createRange().text:document.getSelection();}void(window.open('<?php echo get_settings('siteurl') ?>/wp-admin/bookmarklet.php?text='+encodeURIComponent(Q)+'&amp;popupurl='+encodeURIComponent(location.href)+'&amp;popuptitle='+encodeURIComponent(document.title),'<?php _e('WordPress bookmarklet') ?>','scrollbars=yes,width=600,height=460,left=100,top=150,status=yes'));"><?php printf(__('Press It - %s'), wp_specialchars(get_settings('blogname'))); ?></a>
+<a href="javascript:if(navigator.userAgent.indexOf('Safari') >= 0){Q=getSelection();}else{Q=document.selection?document.selection.createRange().text:document.getSelection();}location.href='<?php echo get_settings('siteurl') ?>/wp-admin/post.php?text='+encodeURIComponent(Q)+'&amp;popupurl='+encodeURIComponent(location.href)+'&amp;popuptitle='+encodeURIComponent(document.title);"><?php printf(__('Press It - %s'), wp_specialchars(get_settings('blogname'))); ?></a>
<?php
} else if ($is_winIE) {
?>
-<a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;void(btw=window.open('<?php echo get_settings('siteurl') ?>/wp-admin/bookmarklet.php?text='+encodeURIComponent(Q)+'<?php echo $bookmarklet_tbpb ?>&amp;popupurl='+encodeURIComponent(location.href)+'&amp;popuptitle='+encodeURIComponent(document.title),'bookmarklet','scrollbars=yes,width=600,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));btw.focus();"><?php printf(__('Press it - %s'), get_settings('blogname')); ?></a>
+<a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;location.href='<?php echo get_settings('siteurl') ?>/wp-admin/post.php?text='+encodeURIComponent(Q)+'&amp;popupurl='+encodeURIComponent(location.href)+'&amp;popuptitle='+encodeURIComponent(document.title);"><?php printf(__('Press it - %s'), get_settings('blogname')); ?></a>
<script type="text/javascript">
<!--
function oneclickbookmarklet(blah) {
@@ -372,11 +370,11 @@ window.open ("profile.php?action=IErightclick", "oneclickbookmarklet", "width=50
<?php
} else if ($is_opera) {
?>
-<a href="javascript:void(window.open('<?php echo get_settings('siteurl'); ?>/wp-admin/bookmarklet.php?popupurl='+escape(location.href)+'&popuptitle='+escape(document.title)+'<?php echo $bookmarklet_tbpb ?>','bookmarklet','scrollbars=yes,width=600,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));"><?php printf(__('Press it - %s'), get_settings('blogname')); ?></a>
+<a href="javascript:location.href='<?php echo get_settings('siteurl'); ?>/wp-admin/post.php?popupurl='+escape(location.href)+'&popuptitle='+escape(document.title);"><?php printf(__('Press it - %s'), get_settings('blogname')); ?></a>
<?php
} else if ($is_macIE) {
?>
-<a href="javascript:Q='';if(top.frames.length==0);void(btw=window.open('<?php echo get_settings('siteurl'); ?>/wp-admin/bookmarklet.php?text='+escape(document.getSelection())+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title)+'<?php echo $bookmarklet_tbpb ?>','bookmarklet','scrollbars=yes,width=600,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));btw.focus();"><?php printf(__('Press it - %s'), get_settings('blogname')); ?></a>
+<a href="javascript:Q='';location.href='<?php echo get_settings('siteurl'); ?>/wp-admin/bookmarklet.php?text='+escape(document.getSelection())+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title);"><?php printf(__('Press it - %s'), get_settings('blogname')); ?></a>
<?php
}
?>
diff --git a/wp-inst/wp-admin/profile-update.php b/wp-inst/wp-admin/profile-update.php
index 1b5f412..77d5267 100644
--- a/wp-inst/wp-admin/profile-update.php
+++ b/wp-inst/wp-admin/profile-update.php
@@ -4,6 +4,9 @@ require_once('admin.php');
check_admin_referer();
+if ( !$_POST )
+ die( __('No post?') );
+
$errors = edit_user($user_ID);
if (count($errors) != 0) {
@@ -13,6 +16,12 @@ if (count($errors) != 0) {
exit;
}
+if ( !isset( $_POST['rich_editing'] ) )
+ $_POST['rich_editing'] = 'false';
+update_user_option( $current_user->id, 'rich_editing', $_POST['rich_editing'], true );
+
+do_action('personal_options_update');
+
if ( 'profile' == $_POST['from'] )
$to = 'profile.php?updated=true';
else
diff --git a/wp-inst/wp-admin/profile.php b/wp-inst/wp-admin/profile.php
index 2b031f4..a243d49 100644
--- a/wp-inst/wp-admin/profile.php
+++ b/wp-inst/wp-admin/profile.php
@@ -6,7 +6,6 @@ $title = 'Profile';
$parent_file = 'profile.php';
include_once('admin-header.php');
$profileuser = new WP_User($user_ID);
-$profiledata = &$profileuser->data;
$bookmarklet_height= 440;
?>
@@ -106,6 +105,14 @@ if ( $show_password_fields ) :
<?php do_action('show_user_profile'); ?>
<br clear="all" />
+
+<h3><?php _e('Personal Options'); ?></h3>
+
+<p><label for="rich_editing"><input name="rich_editing" type="checkbox" id="rich_editing" value="true" <?php checked('true', get_user_option('rich_editing')); ?> />
+<?php _e('Use the visual rich editor when writing') ?></label></p>
+
+<?php do_action('profile_personal_options'); ?>
+
<table width="99%" border="0" cellspacing="2" cellpadding="3" class="editform">
<?php
if(count($profileuser->caps) > count($profileuser->roles)):
diff --git a/wp-inst/wp-admin/themes.php b/wp-inst/wp-admin/themes.php
index aad15b4..8821bf7 100644
--- a/wp-inst/wp-admin/themes.php
+++ b/wp-inst/wp-admin/themes.php
@@ -26,7 +26,7 @@ require_once('admin-header.php');
<?php if ( ! validate_current_theme() ) : ?>
<div id="message1" class="updated fade"><p><?php _e('The active theme is broken. Reverting to the default theme.'); ?></p></div>
<?php elseif ( isset($_GET['activated']) ) : ?>
-<div id="message2" class="updated fade"><p><?php printf(__('New theme activated. <a href="%s">View site &raquo;</a>'), get_bloginfo('home')); ?></p></div>
+<div id="message2" class="updated fade"><p><?php printf(__('New theme activated. <a href="%s">View site &raquo;</a>'), get_bloginfo('home') . '/'); ?></p></div>
<?php endif; ?>
<?php
diff --git a/wp-inst/wp-admin/upgrade-functions.php b/wp-inst/wp-admin/upgrade-functions.php
index 762b92c..9c9f2e2 100644
--- a/wp-inst/wp-admin/upgrade-functions.php
+++ b/wp-inst/wp-admin/upgrade-functions.php
@@ -293,7 +293,7 @@ function upgrade_160_helper( $users ) {
}
function upgrade_160() {
- global $wpdb, $table_prefix;
+ global $wpdb, $table_prefix, $wp_current_db_version;
$users = $wpdb->get_results("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = '{$table_prefix}capabilities'", ARRAY_A);
upgrade_160_helper( $users );
$users = $wpdb->get_results("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = '{$table_prefix}user_level'", ARRAY_A);
@@ -328,11 +328,10 @@ function upgrade_160() {
foreach ($objects as $object) {
$wpdb->query("UPDATE $wpdb->posts SET post_status = 'attachment',
post_mime_type = '$object->post_type',
- post_type = '',
- guid = '$guid'
+ post_type = ''
WHERE ID = $object->ID");
- $meta = get_post_meta($postid, 'imagedata', true);
+ $meta = get_post_meta($object->ID, 'imagedata', true);
if ( ! empty($meta['file']) )
add_post_meta($object->ID, '_wp_attached_file', $meta['file']);
}
@@ -427,6 +426,12 @@ function __get_option($setting) {
$option = $wpdb->get_var("SELECT option_value FROM $wpdb->options WHERE option_name = '$setting'");
+ if ( 'home' == $setting && '' == $value )
+ return __get_option('siteurl');
+
+ if ( 'siteurl' == $setting || 'home' == $setting || 'category_base' == $setting )
+ $option = preg_replace('|/+$|', '', $option);
+
@ $kellogs = unserialize($option);
if ($kellogs !== FALSE)
return $kellogs;
diff --git a/wp-inst/wp-admin/upgrade.php b/wp-inst/wp-admin/upgrade.php
index 7360f62..ce0dabd 100644
--- a/wp-inst/wp-admin/upgrade.php
+++ b/wp-inst/wp-admin/upgrade.php
@@ -62,7 +62,7 @@ text-align: center; border-top: 1px solid #ccc; padding-top: 1em; font-style: it
</style>
</head>
<body>
-<h1 id="logo"><img alt="WordPress" src="http://static.wordpress.org/logo.png" /></h1>
+<h1 id="logo"><img alt="WordPress" src="images/wordpress-logo.png" /></h1>
<?php
switch($step) {
@@ -74,8 +74,10 @@ switch($step) {
break;
case 1:
+ wp_cache_flush();
make_db_current_silent();
upgrade_all();
+ wp_cache_flush();
?>
<h2><?php _e('Step 1'); ?></h2>
<p><?php printf(__("There's actually only one step. So if you see this, you're done. <a href='%s'>Have fun</a>!"), __get_option('home')); ?></p>
diff --git a/wp-inst/wp-admin/wp-admin.css b/wp-inst/wp-admin/wp-admin.css
index 86133f2..15c6d67 100644
--- a/wp-inst/wp-admin/wp-admin.css
+++ b/wp-inst/wp-admin/wp-admin.css
@@ -156,7 +156,7 @@ textarea, input, select {
border-style: none;
padding: 0px;
margin-bottom: 16px;
- height: 180px;
+ height: 15em;
width: 100%;
overflow-y: hidden;
}
@@ -189,7 +189,7 @@ textarea, input, select {
.available-theme a.screenshot {
width: 250px;
height: 200px;
- display: inline-block;
+ display: block;
margin: auto;
background: #f1f1f1;
border: 1px solid #ccc;
@@ -471,7 +471,7 @@ table .vers, table .name {
#login {
background: #fff;
- border: 2px solid #a2a2a2;
+ border: 1px solid #a2a2a2;
margin: 5em auto;
padding: 1.5em;
width: 25em;
@@ -488,13 +488,15 @@ table .vers, table .name {
}
#login h1 {
- background: url(../wp-includes/images/wp-small.png) no-repeat;
+ background: url(images/wordpress-logo.png) no-repeat top left;
margin-top: 0;
}
#login h1 a {
display: block;
text-indent: -1000px;
+ height: 66px;
+ border-bottom: none;
}
#login input {
@@ -513,6 +515,14 @@ table .vers, table .name {
text-align: center;
}
+#login #log, #pwd {
+ font-size: 1.7em;
+ width: 80%;
+}
+
+#login #submit {
+ font-size: 1.7em;
+}
#postcustom .updatemeta, #postcustom .deletemeta {
margin: auto;
@@ -807,7 +817,7 @@ a.dbx-toggle, a.dbx-toggle:visited {
position: absolute;
top: 10px;
right: 14px;
- background-repeat: none;
+ background-repeat: no-repeat;
border-bottom: 0;
background-position: 0 9px;
}
diff --git a/wp-inst/wp-content/themes/classic/comments-popup.php b/wp-inst/wp-content/themes/classic/comments-popup.php
index 4d22c93..f42d38d 100644
--- a/wp-inst/wp-content/themes/classic/comments-popup.php
+++ b/wp-inst/wp-content/themes/classic/comments-popup.php
@@ -32,8 +32,8 @@ foreach ($posts as $post) { start_wp();
$comment_author = (isset($_COOKIE['comment_author_' . COOKIEHASH])) ? trim($_COOKIE['comment_author_'. COOKIEHASH]) : '';
$comment_author_email = (isset($_COOKIE['comment_author_email_'. COOKIEHASH])) ? trim($_COOKIE['comment_author_email_'. COOKIEHASH]) : '';
$comment_author_url = (isset($_COOKIE['comment_author_url_'. COOKIEHASH])) ? trim($_COOKIE['comment_author_url_'. COOKIEHASH]) : '';
-$comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved = '1' ORDER BY comment_date");
-$commentstatus = $wpdb->get_row("SELECT comment_status, post_password FROM $wpdb->posts WHERE ID = $id");
+$comments = get_approved_comments($id);
+$commentstatus = get_post($id);
if (!empty($commentstatus->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH] != $commentstatus->post_password) { // and it doesn't match the cookie
echo(get_the_password_form());
} else { ?>
diff --git a/wp-inst/wp-content/themes/classic/footer.php b/wp-inst/wp-content/themes/classic/footer.php
index 7c821c2..53ab958 100644
--- a/wp-inst/wp-content/themes/classic/footer.php
+++ b/wp-inst/wp-content/themes/classic/footer.php
@@ -3,7 +3,7 @@
<?php get_sidebar(); ?>
-<p class="credit"><!--<?php echo $wpdb->num_queries; ?> queries. <?php timer_stop(1); ?> seconds. --> <cite><?php echo sprintf(__("Powered by <a href='http://wordpress.org/' title='%s'><strong>WordPress</strong></a>"), __("Powered by WordPress, state-of-the-art semantic personal publishing platform.")); ?></cite></p>
+<p class="credit"><!--<?php echo get_num_queries(); ?> queries. <?php timer_stop(1); ?> seconds. --> <cite><?php echo sprintf(__("Powered by <a href='http://wordpress.org/' title='%s'><strong>WordPress</strong></a>"), __("Powered by WordPress, state-of-the-art semantic personal publishing platform.")); ?></cite></p>
</div>
diff --git a/wp-inst/wp-content/themes/classic/header.php b/wp-inst/wp-content/themes/classic/header.php
index 2c1d7c4..e505e29 100644
--- a/wp-inst/wp-content/themes/classic/header.php
+++ b/wp-inst/wp-content/themes/classic/header.php
@@ -24,7 +24,7 @@
<body>
<div id="rap">
-<h1 id="header"><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1>
+<h1 id="header"><a href="<?php bloginfo('url'); ?>/"><?php bloginfo('name'); ?></a></h1>
<div id="content">
-<!-- end header --> \ No newline at end of file
+<!-- end header -->
diff --git a/wp-inst/wp-content/themes/default/comments-popup.php b/wp-inst/wp-content/themes/default/comments-popup.php
index 980717b..d5dd176 100644
--- a/wp-inst/wp-content/themes/default/comments-popup.php
+++ b/wp-inst/wp-content/themes/default/comments-popup.php
@@ -32,9 +32,9 @@ foreach ($posts as $post) { start_wp();
$comment_author = (isset($_COOKIE['comment_author_' . COOKIEHASH])) ? trim($_COOKIE['comment_author_'. COOKIEHASH]) : '';
$comment_author_email = (isset($_COOKIE['comment_author_email_'. COOKIEHASH])) ? trim($_COOKIE['comment_author_email_'. COOKIEHASH]) : '';
$comment_author_url = (isset($_COOKIE['comment_author_url_'. COOKIEHASH])) ? trim($_COOKIE['comment_author_url_'. COOKIEHASH]) : '';
-$comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved = '1' ORDER BY comment_date");
-$commentstatus = $wpdb->get_row("SELECT comment_status, post_password FROM $wpdb->posts WHERE ID = $id");
-if (!empty($commentstatus->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH] != $commentstatus->post_password) { // and it doesn't match the cookie
+$comments = get_approved_comments($id);
+$post = get_post($id);
+if (!empty($post->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie
echo(get_the_password_form());
} else { ?>
@@ -52,7 +52,7 @@ if (!empty($commentstatus->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH
<p>No comments yet.</p>
<?php } ?>
-<?php if ('open' == $commentstatus->comment_status) { ?>
+<?php if ('open' == $post->comment_status) { ?>
<h2>Leave a comment</h2>
<p>Line and paragraph breaks automatic, e-mail address never displayed, <acronym title="Hypertext Markup Language">HTML</acronym> allowed: <code><?php echo allowed_tags(); ?></code></p>
diff --git a/wp-inst/wp-content/themes/default/footer.php b/wp-inst/wp-content/themes/default/footer.php
index 2973ab6..a6cfd87 100644
--- a/wp-inst/wp-content/themes/default/footer.php
+++ b/wp-inst/wp-content/themes/default/footer.php
@@ -6,7 +6,7 @@
<a href="http://wordpress.org/">WordPress</a>
<br /><a href="feed:<?php bloginfo('rss2_url'); ?>">Entries (RSS)</a>
and <a href="feed:<?php bloginfo('comments_rss2_url'); ?>">Comments (RSS)</a>.
- <!-- <?php echo $wpdb->num_queries; ?> queries. <?php timer_stop(1); ?> seconds. -->
+ <!-- <?php echo get_num_queries(); ?> queries. <?php timer_stop(1); ?> seconds. -->
</p>
</div>
</div>
diff --git a/wp-inst/wp-content/themes/default/header.php b/wp-inst/wp-content/themes/default/header.php
index 977daf0..65ea78b 100644
--- a/wp-inst/wp-content/themes/default/header.php
+++ b/wp-inst/wp-content/themes/default/header.php
@@ -49,7 +49,7 @@
<div id="header">
<div id="headerimg">
- <h1><a href="<?php echo get_settings('home'); ?>"><?php bloginfo('name'); ?></a></h1>
+ <h1><a href="<?php echo get_settings('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
<div class="description"><?php bloginfo('description'); ?></div>
</div>
</div>
diff --git a/wp-inst/wp-content/themes/default/searchform.php b/wp-inst/wp-content/themes/default/searchform.php
index fdb226e..c7c73f1 100644
--- a/wp-inst/wp-content/themes/default/searchform.php
+++ b/wp-inst/wp-content/themes/default/searchform.php
@@ -1,4 +1,4 @@
-<form method="get" id="searchform" action="<?php bloginfo('home'); ?>">
+<form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
<div><input type="text" value="<?php echo wp_specialchars($s, 1); ?>" name="s" id="s" />
<input type="submit" id="searchsubmit" value="Search" />
</div>
diff --git a/wp-inst/wp-content/themes/default/sidebar.php b/wp-inst/wp-content/themes/default/sidebar.php
index 1368706..03364b8 100644
--- a/wp-inst/wp-content/themes/default/sidebar.php
+++ b/wp-inst/wp-content/themes/default/sidebar.php
@@ -17,23 +17,23 @@
<p>You are currently browsing the archives for the <?php single_cat_title(''); ?> category.</p>
<?php /* If this is a yearly archive */ } elseif (is_day()) { ?>
- <p>You are currently browsing the <a href="<?php bloginfo('home'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives
+ <p>You are currently browsing the <a href="<?php bloginfo('home'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives
for the day <?php the_time('l, F jS, Y'); ?>.</p>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
- <p>You are currently browsing the <a href="<?php bloginfo('home'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives
+ <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()) { ?>
- <p>You are currently browsing the <a href="<?php bloginfo('home'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives
+ <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()) { ?>
- <p>You have searched the <a href="<?php echo bloginfo('home'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives
+ <p>You have searched the <a href="<?php echo bloginfo('home'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives
for <strong>'<?php echo wp_specialchars($s); ?>'</strong>. If you are unable to find anything in these search results, you can try one of these links.</p>
<?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
- <p>You are currently browsing the <a href="<?php echo bloginfo('home'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives.</p>
+ <p>You are currently browsing the <a href="<?php echo bloginfo('home'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives.</p>
<?php } ?>
</li>
diff --git a/wp-inst/wp-includes/cache.php b/wp-inst/wp-includes/cache.php
index b2458e0..7f3c066 100644
--- a/wp-inst/wp-includes/cache.php
+++ b/wp-inst/wp-includes/cache.php
@@ -54,14 +54,11 @@ class WP_Object_Cache {
var $cache_dir;
var $cache_enabled = false;
var $expiration_time = 86400;
- var $use_flock = false;
var $flock_filename = 'wp_object_cache.lock';
- var $sem_id = 5454;
- var $mutex;
var $cache = array ();
var $dirty_objects = array ();
var $non_existant_objects = array ();
- var $global_groups = array ('users', 'usermeta');
+ var $global_groups = array ('users', 'usermeta', 'site-options');
var $blog_id;
var $cold_cache_hits = 0;
var $warm_cache_hits = 0;
@@ -91,6 +88,9 @@ class WP_Object_Cache {
}
function flush() {
+ if ( !$this->cache_enabled )
+ return;
+
$this->rm($this->cache_dir.'*');
$this->cache = array ();
$this->dirty_objects = array ();
@@ -196,13 +196,13 @@ class WP_Object_Cache {
foreach (split('/', $group_dir) as $subdir) {
$make_dir .= "$subdir/";
if (!file_exists($this->cache_dir.$make_dir)) {
- if (!mkdir($this->cache_dir.$make_dir))
+ if (! @ mkdir($this->cache_dir.$make_dir))
break;
@ chmod($this->cache_dir.$make_dir, $perms);
}
if (!file_exists($this->cache_dir.$make_dir."index.php")) {
- touch($this->cache_dir.$make_dir."index.php");
+ @ touch($this->cache_dir.$make_dir."index.php");
}
}
@@ -275,19 +275,12 @@ class WP_Object_Cache {
}
if (!file_exists($this->cache_dir."index.php")) {
- touch($this->cache_dir."index.php");
+ @ touch($this->cache_dir."index.php");
}
- // Acquire a write lock. Semaphore preferred. Fallback to flock.
- if (function_exists('sem_get')) {
- $this->use_flock = false;
- $mutex = sem_get($this->sem_id, 1, 0644 | IPC_CREAT, 1);
- sem_acquire($mutex);
- } else {
- $this->use_flock = true;
- $mutex = fopen($this->cache_dir.$this->flock_filename, 'w');
- flock($mutex, LOCK_EX);
- }
+ // Acquire a write lock.
+ $mutex = fopen($this->cache_dir.$this->flock_filename, 'w');
+ flock($mutex, LOCK_EX);
// Loop over dirty objects and save them.
foreach ($this->dirty_objects as $group => $ids) {
@@ -310,18 +303,16 @@ class WP_Object_Cache {
fputs($fd, $serial);
fclose($fd);
if (!@ rename($temp_file, $cache_file)) {
- if (copy($temp_file, $cache_file)) {
- unlink($temp_file);
+ if (@ copy($temp_file, $cache_file)) {
+ @ unlink($temp_file);
}
}
}
}
// Release write lock.
- if ($this->use_flock)
- flock($mutex, LOCK_UN);
- else
- sem_release($mutex);
+ flock($mutex, LOCK_UN);
+ fclose($mutex);
}
function stats() {
@@ -359,8 +350,7 @@ class WP_Object_Cache {
else
$this->cache_dir = ABSPATH.'wp-content/cache/';
- if (is_dir($this->cache_dir)) {
- if (is_writable($this->cache_dir))
+ if (is_writable($this->cache_dir) && is_dir($this->cache_dir)) {
$this->cache_enabled = true;
} else
if (is_writable(ABSPATH.'wp-content')) {
diff --git a/wp-inst/wp-includes/classes.php b/wp-inst/wp-includes/classes.php
index 99c2b3a..56502b4 100644
--- a/wp-inst/wp-includes/classes.php
+++ b/wp-inst/wp-includes/classes.php
@@ -601,11 +601,13 @@ class WP_Query {
// Apply post-paging filters on where and join. Only plugins that
// manipulate paging queries should use these hooks.
$where = apply_filters('posts_where_paged', $where);
- $where .= " GROUP BY $wpdb->posts.ID";
+ $groupby = " $wpdb->posts.ID ";
+ $groupby = apply_filters('posts_groupby', $groupby);
$join = apply_filters('posts_join_paged', $join);
$orderby = "post_" . $q['orderby'];
$orderby = apply_filters('posts_orderby', $orderby);
- $request = " SELECT $distinct * FROM $wpdb->posts $join WHERE 1=1".$where." ORDER BY " . $orderby . " $limits";
+ $request = " SELECT $distinct * FROM $wpdb->posts $join WHERE 1=1" . $where . " GROUP BY " . $groupby . " ORDER BY " . $orderby . " $limits";
+ $request = apply_filters('posts_request', $request);
$this->posts = $wpdb->get_results($request);
@@ -1412,85 +1414,66 @@ class WP {
$extra_query_vars = array();
// Process PATH_INFO, REQUEST_URI, and 404 for permalinks.
- if ((isset($_GET['error']) && $_GET['error'] == '404') ||
- ((! empty($_SERVER['PATH_INFO'])) &&
- ('/' != $_SERVER['PATH_INFO']) &&
- (false === strpos($_SERVER['PATH_INFO'], '.php'))
- ) ||
- (false === strpos($_SERVER['REQUEST_URI'], '.php'))
- ) {
- $this->did_permalink = true;
+ // Fetch the rewrite rules.
+ $rewrite = $wp_rewrite->wp_rewrite_rules();
+ if (! empty($rewrite)) {
// If we match a rewrite rule, this will be cleared.
$error = '404';
+ $this->did_permalink = true;
- // Fetch the rewrite rules.
- $rewrite = $wp_rewrite->wp_rewrite_rules();
-
- if (! empty($rewrite)) {
- $pathinfo = $_SERVER['PATH_INFO'];
- $pathinfo_array = explode('?', $pathinfo);
- $pathinfo = $pathinfo_array[0];
- $req_uri = $_SERVER['REQUEST_URI'];
- $req_uri_array = explode('?', $req_uri);
- $req_uri = $req_uri_array[0];
- $home_path = parse_url(get_settings('home'));
- $home_path = $home_path['path'];
-
- // Trim path info from the end and the leading home path from the
- // front. For path info requests, this leaves us with the requesting
- // filename, if any. For 404 requests, this leaves us with the
- // requested permalink.
- $req_uri = str_replace($pathinfo, '', $req_uri);
- $req_uri = str_replace($home_path, '', $req_uri);
- $req_uri = trim($req_uri, '/');
- $pathinfo = trim($pathinfo, '/');
-
- // The requested permalink is in $pathinfo for path info requests and
- // $req_uri for other requests.
- if (! empty($pathinfo) && ($wp_rewrite->index != $pathinfo)) {
- $request = $pathinfo;
- } else {
- $request = $req_uri;
- }
-
- // Look for matches.
- $request_match = $request;
- foreach ($rewrite as $match => $query) {
- // If the requesting file is the anchor of the match, prepend it
- // to the path info.
- if ((! empty($req_uri)) && (strpos($match, $req_uri) === 0) && ($req_uri != $request)) {
- $request_match = $req_uri . '/' . $request;
- }
-
- if (preg_match("!^$match!", $request_match, $matches)) {
- // Got a match.
- // Trim the query of everything up to the '?'.
- $query = preg_replace("!^.+\?!", '', $query);
-
- // Substitute the substring matches into the query.
- eval("\$query = \"$query\";");
+ $pathinfo = $_SERVER['PATH_INFO'];
+ $pathinfo_array = explode('?', $pathinfo);
+ $pathinfo = $pathinfo_array[0];
+ $req_uri = $_SERVER['REQUEST_URI'];
+ $req_uri_array = explode('?', $req_uri);
+ $req_uri = $req_uri_array[0];
+ $self = $_SERVER['PHP_SELF'];
+ $home_path = parse_url(get_settings('home'));
+ $home_path = $home_path['path'];
+
+ // Trim path info from the end and the leading home path from the
+ // front. For path info requests, this leaves us with the requesting
+ // filename, if any. For 404 requests, this leaves us with the
+ // requested permalink.
+ $req_uri = str_replace($pathinfo, '', $req_uri);
+ $req_uri = str_replace($home_path, '', $req_uri);
+ $req_uri = trim($req_uri, '/');
+ $pathinfo = trim($pathinfo, '/');
+ $self = str_replace($home_path, '', $self);
+ $self = trim($self, '/');
+
+ // The requested permalink is in $pathinfo for path info requests and
+ // $req_uri for other requests.
+ if (! empty($pathinfo) && ($wp_rewrite->index != $pathinfo)) {
+ $request = $pathinfo;
+ } else {
+ $request = $req_uri;
+ }
- // Parse the query.
- parse_str($query, $query_vars);
+ // Look for matches.
+ $request_match = $request;
+ foreach ($rewrite as $match => $query) {
+ // If the requesting file is the anchor of the match, prepend it
+ // to the path info.
+ if ((! empty($req_uri)) && (strpos($match, $req_uri) === 0) && ($req_uri != $request)) {
+ $request_match = $req_uri . '/' . $request;
+ }
- // If we're processing a 404 request, clear the error var
- // since we found something.
- if (isset($_GET['error'])) {
- unset($_GET['error']);
- }
+ if (preg_match("!^$match!", $request_match, $matches)) {
+ // Got a match.
+ // Trim the query of everything up to the '?'.
+ $query = preg_replace("!^.+\?!", '', $query);
- if (isset($error)) {
- unset($error);
- }
+ // Substitute the substring matches into the query.
+ eval("\$query = \"$query\";");
- break;
- }
- }
+ // Parse the query.
+ parse_str($query, $query_vars);
- // If req_uri is empty, the home page was requested. Unset error.
- if ( empty($req_uri) ) {
+ // If we're processing a 404 request, clear the error var
+ // since we found something.
if (isset($_GET['error'])) {
unset($_GET['error']);
}
@@ -1498,6 +1481,19 @@ class WP {
if (isset($error)) {
unset($error);
}
+
+ break;
+ }
+ }
+
+ // If req_uri is empty or if it is a request for ourself, unset error.
+ if ( empty($request) || $req_uri == $self ) {
+ if (isset($_GET['error'])) {
+ unset($_GET['error']);
+ }
+
+ if (isset($error)) {
+ unset($error);
}
}
}
diff --git a/wp-inst/wp-includes/comment-functions.php b/wp-inst/wp-includes/comment-functions.php
index ee1a666..4cf7a47 100644
--- a/wp-inst/wp-includes/comment-functions.php
+++ b/wp-inst/wp-includes/comment-functions.php
@@ -307,7 +307,7 @@ 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) ) .'">';
+ echo ' title="' . sprintf( __('Comment on %s'), $post->post_title ) .'">';
comments_number($zero, $one, $more, $number);
echo '</a>';
}
@@ -863,4 +863,9 @@ function check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $
return true;
}
+function get_approved_comments($post_id) {
+ global $wpdb;
+ return $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $post_id AND comment_approved = '1' ORDER BY comment_date");
+}
+
?>
diff --git a/wp-inst/wp-includes/functions-formatting.php b/wp-inst/wp-includes/functions-formatting.php
index f73382f..c95fb23 100644
--- a/wp-inst/wp-includes/functions-formatting.php
+++ b/wp-inst/wp-includes/functions-formatting.php
@@ -563,7 +563,7 @@ function make_clickable($ret) {
$ret = ' ' . $ret . ' ';
$ret = preg_replace("#([\s>])(https?)://([^\s<>{}()]+[^\s.,<>{}()])#i", "$1<a href='$2://$3' rel='nofollow'>$2://$3</a>", $ret);
$ret = preg_replace("#(\s)www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[^ <>{}()\n\r]*[^., <>{}()\n\r]?)?)#i", "$1<a href='http://www.$2.$3$4' rel='nofollow'>www.$2.$3$4</a>", $ret);
- $ret = preg_replace("#(\s)([a-z0-9\-_.]+)@([^,< \n\r]+)#i", "$1<a href=\"mailto:$2@$3\">$2@$3</a>", $ret);
+ $ret = preg_replace("#(\s)([a-z0-9\-_.]+)@([a-z0-9\-_.]+)\.([^,< \n\r]+)#i", "$1<a href=\"mailto:$2@$3.$4\">$2@$3.$4</a>", $ret);
$ret = trim($ret);
return $ret;
}
diff --git a/wp-inst/wp-includes/functions.php b/wp-inst/wp-includes/functions.php
index e3a6a0d..ed9e5ff 100644
--- a/wp-inst/wp-includes/functions.php
+++ b/wp-inst/wp-includes/functions.php
@@ -2148,4 +2148,9 @@ function plugin_basename($file) {
return $file;
}
+function get_num_queries() {
+ global $wpdb;
+ return $wpdb->num_queries;
+}
+
?>
diff --git a/wp-inst/wp-includes/images/wp-small.png b/wp-inst/wp-includes/images/wp-small.png
deleted file mode 100644
index b96f741..0000000
--- a/wp-inst/wp-includes/images/wp-small.png
+++ /dev/null
Binary files differ
diff --git a/wp-inst/wp-includes/images/wpminilogo.png b/wp-inst/wp-includes/images/wpminilogo.png
deleted file mode 100644
index 12573ec..0000000
--- a/wp-inst/wp-includes/images/wpminilogo.png
+++ /dev/null
Binary files differ
diff --git a/wp-inst/wp-includes/js/tinymce/license.html b/wp-inst/wp-includes/js/tinymce/license.html
new file mode 100644
index 0000000..c0c9c9a
--- /dev/null
+++ b/wp-inst/wp-includes/js/tinymce/license.html
@@ -0,0 +1,465 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>TinyMCE License (LGPL)</title>
+<link href="css/screen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+
+<div class="header">
+ <h1>TinyMCE License (LGPL)</h1>
+</div>
+
+<div class="content">
+<p>
+Visit the <a href="faq.html">FAQ</a> for general answers surrounding TinyMCE. Or visit <a href="http://www.fsf.org" target="_blank">http://www.fsf.org</a> for more information about Open-Source licenses.
+</p>
+<pre>
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it. You can use it for
+your libraries, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library. If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+.
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software. To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+ Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs. This
+license, the GNU Library General Public License, applies to certain
+designated libraries. This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+ The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it. Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program. However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+ Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries. We
+concluded that weaker conditions might promote sharing better.
+
+ However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves. This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them. (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.) The hope is that this
+will lead to faster development of free libraries.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+ Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+.
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License"). Each licensee is
+addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+.
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+.
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+.
+ 6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ c) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ d) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+.
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+.
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+.
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+</pre>
+</div>
+
+<div class="footer">
+ <div class="helpindexlink"><a href="index.html">Index</a></div>
+ <div class="copyright">Copyright &copy; 2005 Moxiecode Systems AB</div>
+ <br style="clear: both" />
+</div>
+
+</body>
+</html>
diff --git a/wp-inst/wp-includes/js/tinymce/plugins/wordpress/images/help.gif b/wp-inst/wp-includes/js/tinymce/plugins/wordpress/images/help.gif
new file mode 100644
index 0000000..933d853
--- /dev/null
+++ b/wp-inst/wp-includes/js/tinymce/plugins/wordpress/images/help.gif
Binary files differ
diff --git a/wp-inst/wp-includes/pluggable-functions.php b/wp-inst/wp-includes/pluggable-functions.php
index b8435fa..b010cc5 100644
--- a/wp-inst/wp-includes/pluggable-functions.php
+++ b/wp-inst/wp-includes/pluggable-functions.php
@@ -149,10 +149,10 @@ if ( !function_exists('wp_login') ) :
function wp_login($username, $password, $already_md5 = false) {
global $wpdb, $error;
- if ( !$username )
+ if ( '' == $username )
return false;
- if ( !$password ) {
+ if ( '' == $password ) {
$error = __('<strong>Error</strong>: The password field is empty.');
return false;
}
diff --git a/wp-inst/wp-includes/template-functions-general.php b/wp-inst/wp-includes/template-functions-general.php
index ab388f8..ff96256 100644
--- a/wp-inst/wp-includes/template-functions-general.php
+++ b/wp-inst/wp-includes/template-functions-general.php
@@ -62,7 +62,7 @@ function wp_meta() {
function bloginfo($show='') {
$info = get_bloginfo($show);
- if ( ! strstr($info, 'url') ) {
+ if ( ! (strstr($info, 'url') || strstr($info, 'directory')) ) {
$info = apply_filters('bloginfo', $info, $show);
$info = convert_chars($info);
}
diff --git a/wp-inst/wp-includes/template-functions-links.php b/wp-inst/wp-includes/template-functions-links.php
index b80c366..a4e37d5 100644
--- a/wp-inst/wp-includes/template-functions-links.php
+++ b/wp-inst/wp-includes/template-functions-links.php
@@ -297,13 +297,11 @@ function get_next_post($in_same_cat = false, $excluded_categories = '') {
function previous_post_link($format='&laquo; %link', $link='%title', $in_same_cat = false, $excluded_categories = '') {
- if ( is_attachment() ) {
+
+ if ( is_attachment() )
$post = & get_post($GLOBALS['post']->post_parent);
- $pre = __('Belongs to ');
- } else {
+ else
$post = get_previous_post($in_same_cat, $excluded_categories);
- $pre = '';
- }
if ( !$post )
return;
@@ -314,6 +312,7 @@ function previous_post_link($format='&laquo; %link', $link='%title', $in_same_ca
$link = $pre . $string . $link . '</a>';
$format = str_replace('%link', $link, $format);
+
echo $format;
}
diff --git a/wp-inst/wp-login.php b/wp-inst/wp-login.php
index e83e6f7..495ad31 100644
--- a/wp-inst/wp-login.php
+++ b/wp-inst/wp-login.php
@@ -76,7 +76,7 @@ if ($error)
<p class="submit"><input type="submit" name="submit" id="submit" value="<?php _e('Retrieve Password'); ?> &raquo;" tabindex="3" /></p>
</form>
<ul>
- <li><a href="<?php bloginfo('home'); ?>" title="<?php _e('Are you lost?') ?>">&laquo; <?php _e('Back to blog') ?></a></li>
+ <li><a href="<?php bloginfo('home'); ?>/" title="<?php _e('Are you lost?') ?>">&laquo; <?php _e('Back to blog') ?></a></li>
<?php if (get_settings('users_can_register')) : ?>
<li><a href="<?php bloginfo('wpurl'); ?>/wp-register.php"><?php _e('Register') ?></a></li>
<?php endif; ?>
@@ -170,8 +170,9 @@ default:
$redirect_to = $_REQUEST['redirect_to'];
$redirect_to = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $redirect_to);
- if( !empty($_POST) ) {
+ if( $_POST ) {
$user_login = $_POST['log'];
+ $user_login = sanitize_user( $user_login );
$user_pass = $_POST['pwd'];
$rememberme = $_POST['rememberme'];
} elseif ( !empty($_COOKIE) ) {
@@ -185,13 +186,13 @@ default:
do_action('wp_authenticate', array(&$user_login, &$user_pass));
- if ($user_login && $user_pass) {
+ if ( $_POST ) {
$user = new WP_User($user_login);
-
+
// If the user can't edit posts, send them to their profile.
if ( !$user->has_cap('edit_posts') && ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' ) )
- $redirect_to = get_settings('siteurl') . '/wp-admin/profile.php';
-
+ $redirect_to = get_settings('siteurl') . '/wp-admin/profile.php';
+
if ( wp_login($user_login, $user_pass, $using_cookie) ) {
if ( !$using_cookie )
wp_setcookie($user_login, $user_pass, false, '', '', $rememberme);
@@ -216,11 +217,6 @@ default:
}
window.onload = focusit;
</script>
- <style type="text/css">
- #log, #pwd, #submit {
- font-size: 1.7em;
- }
- </style>
</head>
<body>
@@ -232,7 +228,7 @@ if ( $error )
?>
<form name="loginform" id="loginform" action="wp-login.php" method="post">
-<p><label><?php _e('Username:') ?><br /><input type="text" name="log" id="log" value="" size="20" tabindex="1" /></label></p>
+<p><label><?php _e('Username:') ?><br /><input type="text" name="log" id="log" value="<?php echo wp_specialchars(stripslashes($user_login), 1); ?>" size="20" tabindex="1" /></label></p>
<p><label><?php _e('Password:') ?><br /> <input type="password" name="pwd" id="pwd" value="" size="20" tabindex="2" /></label></p>
<p>
<label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="3" />
@@ -243,7 +239,7 @@ if ( $error )
</p>
</form>
<ul>
- <li><a href="<?php bloginfo('home'); ?>" title="<?php _e('Are you lost?') ?>">&laquo; <?php _e('Back to blog') ?></a></li>
+ <li><a href="<?php bloginfo('home'); ?>/" title="<?php _e('Are you lost?') ?>">&laquo; <?php _e('Back to blog') ?></a></li>
<?php if (get_settings('users_can_register')) : ?>
<li><a href="<?php bloginfo('wpurl'); ?>/wp-register.php"><?php _e('Register') ?></a></li>
<?php endif; ?>
diff --git a/wp-inst/wp-register.php b/wp-inst/wp-register.php
index 8591de7..e59def0 100644
--- a/wp-inst/wp-register.php
+++ b/wp-inst/wp-register.php
@@ -30,6 +30,11 @@ case 'register':
if ( username_exists( $user_login ) )
$errors['user_login'] = __('<strong>ERROR</strong>: This username is already registered, please choose another one.');
+ /* checking the email isn't already used by another user */
+ $email_exists = $wpdb->get_row("SELECT user_email FROM $wpdb->users WHERE user_email = '$user_email'");
+ if ( $email_exists)
+ die (__('<strong>ERROR</strong>: This email address is already registered, please supply another.'));
+
if ( 0 == count($errors) ) {
$password = substr( md5( uniqid( microtime() ) ), 0, 7);
@@ -108,7 +113,7 @@ default:
<p class="submit"><input type="submit" value="<?php _e('Register') ?> &raquo;" id="submit" name="submit" /></p>
</form>
<ul>
- <li><a href="<?php bloginfo('home'); ?>" title="<?php _e('Are you lost?') ?>">&laquo; <?php _e('Back to blog') ?></a></li>
+ <li><a href="<?php bloginfo('home'); ?>/" title="<?php _e('Are you lost?') ?>">&laquo; <?php _e('Back to blog') ?></a></li>
<li><a href="<?php bloginfo('wpurl'); ?>/wp-login.php"><?php _e('Login') ?></a></li>
<li><a href="<?php bloginfo('wpurl'); ?>/wp-login.php?action=lostpassword" title="<?php _e('Password Lost and Found') ?>"><?php _e('Lost your password?') ?></a></li>
</ul>
@@ -136,7 +141,7 @@ case 'disabled':
<div id="login">
<h2><?php _e('Registration Disabled') ?></h2>
<p><?php _e('User registration is currently not allowed.') ?><br />
- <a href="<?php echo get_settings('home') . '/'; ?>" title="<?php _e('Go back to the blog') ?>"><?php _e('Home') ?></a>
+ <a href="<?php echo get_settings('home'); ?>/" title="<?php _e('Go back to the blog') ?>"><?php _e('Home') ?></a>
</p>
</div>