Compare commits

...

62 Commits

Author SHA1 Message Date
ryan
baf70aa0d2 2.9.2
git-svn-id: http://svn.automattic.com/wordpress/tags/2.9.2@13165 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-15 17:38:59 +00:00
ryan
7701f9fa59 Bump
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@13164 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-15 16:45:53 +00:00
ryan
987486e600 Ver bump
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@13120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-13 19:36:18 +00:00
ryan
f1ad7764d0 Ver bump
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@13119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-13 19:35:45 +00:00
ryan
23d63e32d8 Add trash to edit cap check.
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@13117 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-13 19:04:27 +00:00
westi
4cf8bb890d Fix bug in _search_terms_tidy. Fixes #12060 for 2.9 branch props miqrogroove.
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-04 22:00:48 +00:00
westi
fde35741d3 Don't both hooking in menu functions which will never get called. See #11922 props miqrogroove for 2.9 branch.
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-28 21:52:24 +00:00
westi
451711db8f Ensure that inaccessible parent menus are marked as such even if they have accessible children. See #11922.
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-16 22:53:40 +00:00
azaozz
9f1619ba6c Fix invalid HTML in edit-category-form.php, props nacin, fixes #11736 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-09 00:20:05 +00:00
ryan
41c2ad66da Block comments for future posts and password protected posts (when password not provided). Props filosofo. fixes #11810 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-07 19:38:38 +00:00
azaozz
b8ad7ce859 When decompressing try to raw-inflate first, props dd32, fixes #11600 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-07 10:55:23 +00:00
ryan
0f3f6c88f7 2.9.1
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-04 21:45:49 +00:00
azaozz
54d8f5ae49 Add AYS popup when deleting media, fixes #11673 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-31 10:22:44 +00:00
ryan
fabee8fe31 RC1
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-29 22:12:36 +00:00
ryan
7cfdf3deea Check PHP and MySQL versions in install.php. see #11666 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-29 22:08:33 +00:00
ryan
4ad5471e7f Check PHP and MySQL versions in upgrade.php. see #11666 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-29 21:57:42 +00:00
ryan
9b7adfd312 Don't set charset if mysql version does not have the collation cap. Props miqrogroove. see #11666 for 2.9k
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-29 21:34:34 +00:00
ryan
d172617902 Return empty array instead of null. Props Denis-de-Bernardy. fixes #11661 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-29 21:11:59 +00:00
ryan
22f08f23cf Remove extraneous br. Props nacin. fixes #11582 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-29 15:37:32 +00:00
azaozz
e0ad0d784b Fix alignment of checkbox in table.widefat, fixes #11610 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-29 13:18:31 +00:00
ryan
86d4df765d Update version in readme
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-28 17:21:33 +00:00
ryan
69c321d618 Cleanup after bailing when php or mysql versions are not compat. Props nacin. fixes #11638 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-28 17:19:43 +00:00
ryan
790029dc59 Use umeta_id for user meta. Props wnorris. fixes #11627 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-28 16:43:13 +00:00
ryan
a7632b611e Better duplicate option delete query. Props miqrogroove. fixes #11649 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-28 16:27:34 +00:00
azaozz
f7b0a058fc Show disabled image rotation buttons when imagerotate() is missing, props husky and hakre, fixes #11536 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-27 21:27:00 +00:00
azaozz
a313be2e75 Replace ctype_digit() with is_numeric() for better compatibility, props markup, fixes #11620 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-26 08:49:32 +00:00
ryan
d9d8ddf4c8 windows-1252 is canonical, not Windows-1252. Props Denis-de-Bernardy. fixes #11219 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-24 02:21:06 +00:00
ryan
995624eefa 2.9.1 beta 1
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-23 19:03:38 +00:00
ryan
c2d8b7f9b5 Sanitize only string and numeric fields in the user object. Props filosofo hakre. fixes #11509 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12512 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-23 15:02:38 +00:00
ryan
c7b4b84ca3 Do not use deprecated Etc timezones. Props miqrogroove. fixes #11558 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12508 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-23 14:17:55 +00:00
azaozz
2a5bfcc972 Fix sanitize_text_field() issue with some UTF-8 characters, fixes #11528 for 2.9.1
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-23 09:16:31 +00:00
ryan
a1100b85da Validation fix. Props Simek. fixes #11560 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-22 17:17:04 +00:00
ryan
6e9a7b16b1 Add escaping to _wp_comment_row(). Props Denis-de-Bernardy. fixes #11492 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-22 17:01:30 +00:00
ryan
359ccb0bf8 Update json lib. Use encodeUnsafe in our json wrapper. Props nacin. fixes #11537 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-22 16:50:27 +00:00
ryan
d7cd7a912f Increase download_url() timeout to 5 minutes. fixes #11551 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-22 16:43:05 +00:00
westi
a1fdb6f3e0 Fix spelling mistake in tooltip for image rotation button. Fixes #11488 for 2.9.1 props computerwiz908.
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-22 12:05:28 +00:00
ryan
eb71e0147d Don't display plugin compatibility info if the new WordPress version is the same as the current one. For example for RC/Beta upgrades. Props westi. fixes #11525 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-21 23:55:23 +00:00
ryan
269071ba85 Make sure we have a SimplePie object before calling destruct. Props scribu. see #11518 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-21 23:37:22 +00:00
azaozz
c69eda3791 Round back the buttons, fixes #11502
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-21 20:34:48 +00:00
ryan
36cd8eec3d Don't use CURLOPT_CONNECTTIMEOUT_MS or CURLOPT_TIMEOUT_MS due to bugginess. fixes #11505 see #11499 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-21 19:35:01 +00:00
ryan
5e2ea907c9 Bump ver
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-21 19:21:45 +00:00
ryan
cf042e3102 Fix typos. Props gautam2011. fixes #11529 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-21 09:01:08 +00:00
ryan
fcdac4e218 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-18 23:15:10 +00:00
ryan
47ede9401b Remove stray paren. Props demetris. fixes #11485 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-18 18:19:59 +00:00
ryan
18799ba194 Hard code required version in update-core.php. see #11464 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12451 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-18 16:54:57 +00:00
azaozz
a9af4600f2 Fix checkbox and radio styles in IE7/8 and Opera for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12449 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-18 13:07:57 +00:00
azaozz
e85d6dd1aa Fix the scale image check in image editor, fixes #11473 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-18 09:53:46 +00:00
azaozz
b82bf6bdcc Fix typo in edit-tags.php (proper patch), props nacin, fixes #11350 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-18 06:31:24 +00:00
azaozz
3f7a182e4a Fix typo in edit-tags.php, props nacin, fixes #11350 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-18 06:23:50 +00:00
ryan
b38d55e624 Escape percent sign. Props sirzooro. fixes #11476 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-17 22:01:46 +00:00
azaozz
7dc7fcfcd9 Fix the 'current_user_can' check for 'add-comment' for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-17 21:06:41 +00:00
ryan
91218306b8 Give feedback when Upgrade Plugins is clicked but no plugins are selected. see #10973 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12437 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-17 20:19:43 +00:00
ryan
9e887aeb62 Make sure dir() returned a dir object. for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-17 19:57:04 +00:00
ryan
7e2f6d83a9 Add required php and mysql versions to version.php. Future proof required version check strings. Props nacin. see #11464 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-17 18:46:54 +00:00
ryan
0e66497ecb Delete all comment meta when deleting a comment. Props nacin. fixes #11463 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-17 17:55:40 +00:00
ryan
899892a3ce Delete all comment meta when deleting a comment. Props nacin. fixes #11463 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-17 17:11:21 +00:00
ryan
7ad0c5ca60 Fix typo. see #11464
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-17 16:23:36 +00:00
ryan
bba9715b3c Properly handle float timeouts for all transports. Props mdawaffe. fixes #11468 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-17 16:14:34 +00:00
ryan
ec273e08e3 Check MySQL and PHP versions when auto upgrading. Props westi, Denis-de-Bernardy, nacin, caesarsgrunt. see #11464 for 2.9
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-17 16:05:33 +00:00
westi
5b79e15243 Fix phpDoc for Comment Meta functions to refer to comments not posts. See #11462 props sirzooro.
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12421 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-16 22:14:41 +00:00
westi
d42ebe4443 Update the readme to include new mysql minimum version.
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12419 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-16 18:05:06 +00:00
ryan
b1bf2eaa03 2.9 branch, from [12416]
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12417 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-16 17:55:36 +00:00
46 changed files with 303 additions and 159 deletions

View File

@@ -8,7 +8,7 @@
<body>
<h1 id="logo" style="text-align: center">
<img alt="WordPress" src="wp-admin/images/wordpress-logo.png" />
<br /> Version 2.9
<br /> Version 2.9.2
</h1>
<p style="text-align: center">Semantic Personal Publishing Platform</p>
@@ -29,7 +29,7 @@
<h1>Upgrading</h1>
<p>Before you upgrade anything, make sure you have backup copies of any files you may have modified such as <code>index.php</code>.</p>
<h2>Upgrading from any previous WordPress to 2.9:</h2>
<h2>Upgrading from any previous WordPress to 2.9.2:</h2>
<ol>
<li>Delete your old WP files, saving ones you've modified.</li>
<li>Upload the new files.</li>
@@ -57,7 +57,7 @@
<h1>System Recommendations</h1>
<ul>
<li>PHP version <strong>4.3</strong> or higher.</li>
<li>MySQL version <strong>4.0</strong> or higher.</li>
<li>MySQL version <strong>4.1.2</strong> or higher.</li>
<li>... and a link to <a href="http://wordpress.org/">http://wordpress.org</a> on your site.</li>
</ul>
<p>WordPress is the official continuation of <a href="http://cafelog.com/">b2/caf&eacute;log</a>, which came from Michel V. The work has been continued by the <a href="http://wordpress.org/about/">WordPress developers</a>. If you would like to support WordPress, please consider <a href="http://wordpress.org/donate/">donating</a>.</p>

View File

@@ -636,7 +636,7 @@ case 'get-tagcloud' :
break;
case 'add-comment' :
check_ajax_referer( $action );
if ( !current_user_can( 'edit_post', $id ) )
if ( !current_user_can( 'edit_posts' ) )
die('-1');
$search = isset($_POST['s']) ? $_POST['s'] : false;
$status = isset($_POST['comment_status']) ? $_POST['comment_status'] : 'all';

File diff suppressed because one or more lines are too long

View File

@@ -8,7 +8,12 @@ html {
}
textarea,
input,
input[type="text"],
input[type="password"],
input[type="file"],
input[type="button"],
input[type="submit"],
input[type="reset"],
select {
border-color: #dfdfdf;
background-color: #fff;
@@ -242,11 +247,6 @@ strong .post-com-count span {
border-top-color: #dfdfdf;
}
.describe input[type="text"],
.describe textarea {
border-color: #dfdfdf;
}
.media-upload-form label.form-help,
td.help {
color: #9a9a9a;

File diff suppressed because one or more lines are too long

View File

@@ -8,7 +8,12 @@ html {
}
textarea,
input,
input[type="text"],
input[type="password"],
input[type="file"],
input[type="button"],
input[type="submit"],
input[type="reset"],
select {
border-color: #dfdfdf;
background-color: #fff;
@@ -242,11 +247,6 @@ strong .post-com-count span {
border-top-color: #dfdfdf;
}
.describe input[type="text"],
.describe textarea {
border-color: #dfdfdf;
}
.media-upload-form label.form-help,
td.help {
color: #9a9a9a;

View File

@@ -1 +1 @@
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;background:transparent;}body{line-height:1;}ol,ul{list-style:none;}blockquote,q{quotes:none;}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}ins{text-decoration:none;}del{text-decoration:line-through;}#wpwrap{height:auto;min-height:100%;width:100%;}#wpcontent{height:100%;padding-bottom:50px;}#wpbody{clear:both;margin-left:175px;}.folded #wpbody{margin-left:60px;}#wpbody-content{float:left;width:100%;}#adminmenu{float:left;clear:left;width:145px;margin-top:15px;margin-right:5px;margin-bottom:15px;margin-left:-160px;position:relative;padding:0;list-style:none;}.folded #adminmenu{margin-left:-45px;}.folded #adminmenu,.folded #adminmenu li.menu-top{width:28px;}#footer{clear:both;position:relative;width:100%;}.inner-sidebar{float:right;clear:right;display:none;width:281px;position:relative;}.inner-sidebar #side-sortables{width:280px;min-height:300px;}.has-right-sidebar .inner-sidebar{display:block;}.has-right-sidebar #post-body{float:left;clear:left;width:100%;margin-right:-340px;}.has-right-sidebar #post-body-content{margin-right:300px;}#col-container{overflow:hidden;padding:0;margin:0;}#col-left{padding:0;margin:0;overflow:hidden;width:39%;}#col-right{float:right;clear:right;overflow:hidden;padding:0;margin:0;width:59%;}.alignleft{float:left;}.alignright{float:right;}.textleft{text-align:left;}.textright{text-align:right;}.clear{clear:both;}.screen-reader-text,.screen-reader-text span{position:absolute;left:-1000em;height:1px;width:1px;overflow:hidden;}.hidden,.js .closed .inside,.js .hide-if-js,.no-js .hide-if-no-js{display:none;}input[type="text"],input[type="password"],textarea{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;}input[type="checkbox"],input[type="radio"]{vertical-align:middle;}html,body{height:100%;}body,td,textarea,input,select{font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;font-size:13px;}body,textarea{line-height:1.4em;}input,select{line-height:1em;}p{margin:1em 0;}blockquote{margin:1em;}label{cursor:pointer;}li,dd{margin-bottom:6px;}p,li,dl,dd,dt{line-height:140%;}textarea,input,select{margin:1px;padding:3px;}h1{display:block;font-size:2em;font-weight:bold;margin:.67em 0;}h2{display:block;font-size:1.5em;font-weight:bold;margin:.83em 0;}h3{display:block;font-size:1.17em;font-weight:bold;margin:1em 0;}h4{display:block;font-size:1em;font-weight:bold;margin:1.33em 0;}h5{display:block;font-size:.83em;font-weight:bold;margin:1.67em 0;}h6{display:block;font-size:.67em;font-weight:bold;margin:2.33em 0;}ul.ul-disc{list-style:disc outside;}ul.ul-square{list-style:square outside;}ol.ol-decimal{list-style:decimal outside;}ul.ul-disc,ul.ul-square,ol.ol-decimal{margin-left:1.8em;}ul.ul-disc>li,ul.ul-square>li,ol.ol-decimal>li{margin:0 0 .5em;}.subsubsub{list-style:none;margin:8px 0 5px;padding:0;white-space:nowrap;font-size:11px;float:left;}.subsubsub a{line-height:2;padding:.2em;text-decoration:none;}.subsubsub a .count,.subsubsub a.current .count{color:#999;font-weight:normal;}.subsubsub a.current{font-weight:bold;background:none;border:none;}.subsubsub li{display:inline;margin:0;padding:0;}.widefat{border-width:1px;border-style:solid;border-spacing:0;width:100%;clear:both;margin:0;-moz-border-radius:4px;-khtml-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;}.widefat *{word-wrap:break-word;}.widefat a{text-decoration:none;}.widefat td,.widefat th{border-bottom-width:1px;border-bottom-style:solid;font-size:11px;vertical-align:text-top;}.widefat td{padding:3px 7px;vertical-align:top;}.widefat td p,.widefat td ol,.widefat td ul{font-size:11px;}.widefat th{padding:7px 7px 8px;text-align:left;line-height:1.3em;}.widefat th input{margin:0 0 0 8px;padding:0;vertical-align:text-top;}.widefat .check-column{width:2.2em;padding:0;}.widefat tbody th.check-column{padding:7px 0 22px;}.widefat .num,.column-comments,.column-links,.column-posts{text-align:center;}.widefat th#comments{vertical-align:middle;}.wrap{margin:0 15px 0 5px;}.updated,.error{border-width:1px;border-style:solid;padding:0 .6em;margin:5px 15px 2px;-moz-border-radius:3px;-khtml-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;}.updated p,.error p{margin:.5em 0;line-height:1;padding:2px;}.wrap .updated,.wrap .error{margin:5px 0 15px;}.wrap h2{font:italic normal normal 24px/29px Georgia,"Times New Roman","Bitstream Charter",Times,serif;margin:0;padding:14px 15px 3px 0;line-height:35px;text-shadow:rgba(255,255,255,1) 0 1px 0;}.wrap h2.long-header{padding-right:0;}
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;background:transparent;}body{line-height:1;}ol,ul{list-style:none;}blockquote,q{quotes:none;}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}ins{text-decoration:none;}del{text-decoration:line-through;}#wpwrap{height:auto;min-height:100%;width:100%;}#wpcontent{height:100%;padding-bottom:50px;}#wpbody{clear:both;margin-left:175px;}.folded #wpbody{margin-left:60px;}#wpbody-content{float:left;width:100%;}#adminmenu{float:left;clear:left;width:145px;margin-top:15px;margin-right:5px;margin-bottom:15px;margin-left:-160px;position:relative;padding:0;list-style:none;}.folded #adminmenu{margin-left:-45px;}.folded #adminmenu,.folded #adminmenu li.menu-top{width:28px;}#footer{clear:both;position:relative;width:100%;}.inner-sidebar{float:right;clear:right;display:none;width:281px;position:relative;}.inner-sidebar #side-sortables{width:280px;min-height:300px;}.has-right-sidebar .inner-sidebar{display:block;}.has-right-sidebar #post-body{float:left;clear:left;width:100%;margin-right:-340px;}.has-right-sidebar #post-body-content{margin-right:300px;}#col-container{overflow:hidden;padding:0;margin:0;}#col-left{padding:0;margin:0;overflow:hidden;width:39%;}#col-right{float:right;clear:right;overflow:hidden;padding:0;margin:0;width:59%;}.alignleft{float:left;}.alignright{float:right;}.textleft{text-align:left;}.textright{text-align:right;}.clear{clear:both;}.screen-reader-text,.screen-reader-text span{position:absolute;left:-1000em;height:1px;width:1px;overflow:hidden;}.hidden,.js .closed .inside,.js .hide-if-js,.no-js .hide-if-no-js{display:none;}input[type="text"],input[type="password"],textarea{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;}input[type="checkbox"],input[type="radio"]{vertical-align:middle;}html,body{height:100%;}body,td,textarea,input,select{font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;font-size:13px;}body,textarea{line-height:1.4em;}input,select{line-height:1em;}p{margin:1em 0;}blockquote{margin:1em;}label{cursor:pointer;}li,dd{margin-bottom:6px;}p,li,dl,dd,dt{line-height:140%;}textarea,input,select{margin:1px;padding:3px;}h1{display:block;font-size:2em;font-weight:bold;margin:.67em 0;}h2{display:block;font-size:1.5em;font-weight:bold;margin:.83em 0;}h3{display:block;font-size:1.17em;font-weight:bold;margin:1em 0;}h4{display:block;font-size:1em;font-weight:bold;margin:1.33em 0;}h5{display:block;font-size:.83em;font-weight:bold;margin:1.67em 0;}h6{display:block;font-size:.67em;font-weight:bold;margin:2.33em 0;}ul.ul-disc{list-style:disc outside;}ul.ul-square{list-style:square outside;}ol.ol-decimal{list-style:decimal outside;}ul.ul-disc,ul.ul-square,ol.ol-decimal{margin-left:1.8em;}ul.ul-disc>li,ul.ul-square>li,ol.ol-decimal>li{margin:0 0 .5em;}.subsubsub{list-style:none;margin:8px 0 5px;padding:0;white-space:nowrap;font-size:11px;float:left;}.subsubsub a{line-height:2;padding:.2em;text-decoration:none;}.subsubsub a .count,.subsubsub a.current .count{color:#999;font-weight:normal;}.subsubsub a.current{font-weight:bold;background:none;border:none;}.subsubsub li{display:inline;margin:0;padding:0;}.widefat{border-width:1px;border-style:solid;border-spacing:0;width:100%;clear:both;margin:0;-moz-border-radius:4px;-khtml-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;}.widefat *{word-wrap:break-word;}.widefat a{text-decoration:none;}.widefat td,.widefat th{border-bottom-width:1px;border-bottom-style:solid;font-size:11px;}.widefat td{padding:3px 7px;vertical-align:top;}.widefat td p,.widefat td ol,.widefat td ul{font-size:11px;}.widefat th{padding:7px 7px 8px;text-align:left;line-height:1.3em;}.widefat th input{margin:0 0 0 8px;padding:0;vertical-align:text-top;}.widefat .check-column{width:2.2em;padding:0;}.widefat tbody th.check-column{padding:7px 0 22px;vertical-align:top;}.widefat .num,.column-comments,.column-links,.column-posts{text-align:center;}.widefat th#comments{vertical-align:middle;}.wrap{margin:0 15px 0 5px;}.updated,.error{border-width:1px;border-style:solid;padding:0 .6em;margin:5px 15px 2px;-moz-border-radius:3px;-khtml-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;}.updated p,.error p{margin:.5em 0;line-height:1;padding:2px;}.wrap .updated,.wrap .error{margin:5px 0 15px;}.wrap h2{font:italic normal normal 24px/29px Georgia,"Times New Roman","Bitstream Charter",Times,serif;margin:0;padding:14px 15px 3px 0;line-height:35px;text-shadow:rgba(255,255,255,1) 0 1px 0;}.wrap h2.long-header{padding-right:0;}

View File

@@ -398,7 +398,6 @@ ol.ol-decimal > li {
border-bottom-width: 1px;
border-bottom-style: solid;
font-size: 11px;
vertical-align: text-top;
}
.widefat td {
@@ -432,6 +431,7 @@ ol.ol-decimal > li {
.widefat tbody th.check-column {
padding: 7px 0 22px;
vertical-align: top;
}
.widefat .num,

View File

@@ -438,3 +438,7 @@ table.ie-fixed {
.imgedit-submit {
width: 300px;
}
* html input {
border: 1px solid #dfdfdf;
}

View File

@@ -96,8 +96,10 @@ foreach ($posts_columns as $column_name => $column_display_name ) {
$actions['untrash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=untrash&amp;post=$post->ID", 'untrash-post_' . $post->ID) . "'>" . __('Restore') . "</a>";
elseif ( EMPTY_TRASH_DAYS && MEDIA_TRASH )
$actions['trash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=trash&amp;post=$post->ID", 'trash-post_' . $post->ID) . "'>" . __('Trash') . "</a>";
if ( $is_trash || !EMPTY_TRASH_DAYS || !MEDIA_TRASH )
$actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>";
if ( $is_trash || !EMPTY_TRASH_DAYS || !MEDIA_TRASH ) {
$delete_ays = (!$is_trash && !MEDIA_TRASH) ? " onclick='return showNotice.warn();'" : '';
$actions['delete'] = "<a class='submitdelete'$delete_ays href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>";
}
}
if ( !$is_trash )
$actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('View') . '</a>';

View File

@@ -56,7 +56,7 @@ _fill_empty_category($category);
<table class="form-table">
<tr class="form-field form-required">
<th scope="row" valign="top"><label for="cat_name"><?php _e('Category Name') ?></label></th>
<td><input name="cat_name" id="cat_name" type="text" value="<?php echo esc_attr($category->name); ?>" size="40" aria-required="true" /><br />
<td><input name="cat_name" id="cat_name" type="text" value="<?php echo esc_attr($category->name); ?>" size="40" aria-required="true" /></td>
</tr>
<tr class="form-field">
<th scope="row" valign="top"><label for="category_nicename"><?php _e('Category Slug') ?></label></th>

View File

@@ -27,7 +27,7 @@ if ( isset( $_GET['action'] ) && isset($_GET['delete_tags']) && ( 'delete' == $_
switch($action) {
case 'addtag':
case 'add-tag':
check_admin_referer('add-tag');

View File

@@ -235,7 +235,7 @@ function wp_handle_upload( &$file, $overrides = false, $time = null ) {
$upload_error_handler = 'wp_handle_upload_error';
// You may have had one or more 'wp_handle_upload_prefilter' functions error out the file. Handle that gracefully.
if ( isset( $file['error'] ) && !ctype_digit( $file['error'] ) && $file['error'] )
if ( isset( $file['error'] ) && !is_numeric( $file['error'] ) && $file['error'] )
return $upload_error_handler( $file, $file['error'] );
// You may define your own function and pass the name in $overrides['unique_filename_callback']
@@ -458,7 +458,7 @@ function download_url( $url ) {
if ( ! $handle )
return new WP_Error('http_no_file', __('Could not create Temporary file'));
$response = wp_remote_get($url, array('timeout' => 60));
$response = wp_remote_get($url, array('timeout' => 300));
if ( is_wp_error($response) ) {
fclose($handle);

View File

@@ -39,12 +39,16 @@ function wp_image_editor($post_id, $msg = false) {
<div class="imgedit-menu">
<div onclick="imageEdit.crop(<?php echo "$post_id, '$nonce'"; ?>, this)" class="imgedit-crop disabled" title="<?php esc_attr_e( 'Crop' ); ?>"></div><?php
// On some setups GD library does not provide imagerotate() - Ticket #11536
if ( function_exists('imagerotate') ) { ?>
<div onclick="imageEdit.rotate(90, <?php echo "$post_id, '$nonce'"; ?>, this)" class="imgedit-rleft" title="<?php esc_attr_e( 'Rotate couter-clockwise' ); ?>"></div>
<div onclick="imageEdit.rotate(-90, <?php echo "$post_id, '$nonce'"; ?>, this)" class="imgedit-rright" title="<?php esc_attr_e( 'Rotate clockwise' ); ?>"></div><?php
} ?>
<div class="imgedit-rleft" onclick="imageEdit.rotate( 90, <?php echo "$post_id, '$nonce'"; ?>, this)" title="<?php esc_attr_e( 'Rotate counter-clockwise' ); ?>"></div>
<div class="imgedit-rright" onclick="imageEdit.rotate(-90, <?php echo "$post_id, '$nonce'"; ?>, this)" title="<?php esc_attr_e( 'Rotate clockwise' ); ?>"></div>
<?php } else {
$note_gdlib = esc_attr__('Image rotation is not supported by your web host (function imagerotate() is missing)');
?>
<div class="imgedit-rleft disabled" title="<?php echo $note_gdlib; ?>"></div>
<div class="imgedit-rright disabled" title="<?php echo $note_gdlib; ?>"></div>
<?php } ?>
<div onclick="imageEdit.flip(1, <?php echo "$post_id, '$nonce'"; ?>, this)" class="imgedit-flipv" title="<?php esc_attr_e( 'Flip vertically' ); ?>"></div>
<div onclick="imageEdit.flip(2, <?php echo "$post_id, '$nonce'"; ?>, this)" class="imgedit-fliph" title="<?php esc_attr_e( 'Flip horizontally' ); ?>"></div>
@@ -509,7 +513,8 @@ function wp_save_image($post_id) {
$sY = imagesy($img);
// check if it has roughly the same w / h ratio
if ( round($sX / $sY, 2) == round($fwidth / $fheight, 2) ) {
$diff = round($sX / $sY, 2) - round($fwidth / $fheight, 2);
if ( -0.1 < $diff && $diff < 0.1 ) {
// scale the full size image
$dst = wp_imagecreatetruecolor($fwidth, $fheight);
if ( imagecopyresampled( $dst, $img, 0, 0, 0, 0, $fwidth, $fheight, $sX, $sY ) ) {

View File

@@ -591,7 +591,7 @@ function add_menu_page( $page_title, $menu_title, $access_level, $file, $functio
$admin_page_hooks[$file] = sanitize_title( $menu_title );
$hookname = get_plugin_page_hookname( $file, '' );
if (!empty ( $function ) && !empty ( $hookname ))
if (!empty ( $function ) && !empty ( $hookname ) && current_user_can( $access_level ) )
add_action( $hookname, $function );
if ( empty($icon_url) ) {

View File

@@ -2114,6 +2114,7 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true,
$del_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "delete-comment_$comment->comment_ID" ) );
$approve_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "approve-comment_$comment->comment_ID" ) );
$comment_url = esc_url(get_comment_link($comment->comment_ID));
$approve_url = esc_url( "comment.php?action=approvecomment&p=$post->ID&c=$comment->comment_ID&$approve_nonce" );
$unapprove_url = esc_url( "comment.php?action=unapprovecomment&p=$post->ID&c=$comment->comment_ID&$approve_nonce" );
$spam_url = esc_url( "comment.php?action=spamcomment&p=$post->ID&c=$comment->comment_ID&$del_nonce" );
@@ -2145,7 +2146,7 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true,
case 'comment':
echo "<td $attributes>";
echo '<div id="submitted-on">';
printf(__('Submitted on <a href="%1$s">%2$s at %3$s</a>'), get_comment_link($comment->comment_ID), get_comment_date(__('Y/m/d')), get_comment_date(__('g:ia')));
printf(__('Submitted on <a href="%1$s">%2$s at %3$s</a>'), $comment_url, get_comment_date(__('Y/m/d')), get_comment_date(__('g:ia')));
echo '</div>';
comment_text();
if ( $user_can ) { ?>
@@ -2172,16 +2173,16 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true,
if ( $comment_status && 'all' != $comment_status ) { // not looking at all comments
if ( 'approved' == $the_comment_status )
$actions['unapprove'] = "<a href='$unapprove_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&amp;new=unapproved vim-u vim-destructive' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
$actions['unapprove'] = "<a href='$unapprove_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&amp;new=unapproved vim-u vim-destructive' title='" . esc_attr__( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
else if ( 'unapproved' == $the_comment_status )
$actions['approve'] = "<a href='$approve_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&amp;new=approved vim-a vim-destructive' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
$actions['approve'] = "<a href='$approve_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&amp;new=approved vim-a vim-destructive' title='" . esc_attr__( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
} else {
$actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved vim-a' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
$actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved vim-u' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
$actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved vim-a' title='" . esc_attr__( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
$actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved vim-u' title='" . esc_attr__( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
}
if ( 'spam' != $the_comment_status && 'trash' != $the_comment_status ) {
$actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . __( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>';
$actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . esc_attr__( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>';
} elseif ( 'spam' == $the_comment_status ) {
$actions['unspam'] = "<a href='$untrash_url' class='delete:the-comment-list:comment-$comment->comment_ID:66cc66:unspam=1 vim-z vim-destructive'>" . __( 'Not Spam' ) . '</a>';
} elseif ( 'trash' == $the_comment_status ) {
@@ -2191,14 +2192,14 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true,
if ( 'spam' == $the_comment_status || 'trash' == $the_comment_status || !EMPTY_TRASH_DAYS ) {
$actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID::delete=1 delete vim-d vim-destructive'>" . __('Delete Permanently') . '</a>';
} else {
$actions['trash'] = "<a href='$trash_url' class='delete:the-comment-list:comment-$comment->comment_ID::trash=1 delete vim-d vim-destructive' title='" . __( 'Move this comment to the trash' ) . "'>" . _x('Trash', 'verb') . '</a>';
$actions['trash'] = "<a href='$trash_url' class='delete:the-comment-list:comment-$comment->comment_ID::trash=1 delete vim-d vim-destructive' title='" . esc_attr__( 'Move this comment to the trash' ) . "'>" . _x('Trash', 'verb') . '</a>';
}
if ( 'trash' != $the_comment_status ) {
$actions['edit'] = "<a href='comment.php?action=editcomment&amp;c={$comment->comment_ID}' title='" . __('Edit comment') . "'>". __('Edit') . '</a>';
$actions['quickedit'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$post->ID.'\',\'edit\');return false;" class="vim-q" title="'.__('Quick Edit').'" href="#">' . __('Quick&nbsp;Edit') . '</a>';
$actions['edit'] = "<a href='comment.php?action=editcomment&amp;c={$comment->comment_ID}' title='" . esc_attr__('Edit comment') . "'>". __('Edit') . '</a>';
$actions['quickedit'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$post->ID.'\',\'edit\');return false;" class="vim-q" title="'.esc_attr__('Quick Edit').'" href="#">' . __('Quick&nbsp;Edit') . '</a>';
if ( 'spam' != $the_comment_status )
$actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$post->ID.'\');return false;" class="vim-r" title="'.__('Reply to this comment').'" href="#">' . __('Reply') . '</a>';
$actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$post->ID.'\');return false;" class="vim-r" title="'.esc_attr__('Reply to this comment').'" href="#">' . __('Reply') . '</a>';
}
$actions = apply_filters( 'comment_row_actions', array_filter($actions), $comment );
@@ -2266,7 +2267,7 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true,
echo "<td $attributes>\n";
echo '<div class="response-links"><span class="post-com-count-wrapper">';
echo $post_link . '<br />';
$pending_phrase = sprintf( __('%s pending'), number_format( $pending_comments ) );
$pending_phrase = esc_attr(sprintf( __('%s pending'), number_format( $pending_comments ) ));
if ( $pending_comments )
echo '<strong>';
comments_number("<a href='edit-comments.php?p=$post->ID' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . /* translators: comment count link */ _x('0', 'comment count') . '</span></a>', "<a href='edit-comments.php?p=$post->ID' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . /* translators: comment count link */ _x('1', 'comment count') . '</span></a>', "<a href='edit-comments.php?p=$post->ID' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . /* translators: comment count link: % will be substituted by comment count */ _x('%', 'comment count') . '</span></a>');

View File

@@ -215,10 +215,28 @@ $_old_files = array(
* @return WP_Error|null WP_Error on failure, null on success.
*/
function update_core($from, $to) {
global $wp_filesystem, $_old_files;
global $wp_filesystem, $_old_files, $wpdb;
@set_time_limit( 300 );
$php_version = phpversion();
$mysql_version = $wpdb->db_version();
$required_php_version = '4.3';
$required_mysql_version = '4.1.2';
$wp_version = '2.9.2';
$php_compat = version_compare( $php_version, $required_php_version, '>=' );
$mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' );
if ( !$mysql_compat || !$php_compat )
$wp_filesystem->delete($from, true);
if ( !$mysql_compat && !$php_compat )
return new WP_Error( 'php_mysql_not_compatible', sprintf( __('The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version ) );
elseif ( !$php_compat )
return new WP_Error( 'php_not_compatible', sprintf( __('The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.'), $wp_version, $required_php_version, $php_version ) );
elseif ( !$mysql_compat )
return new WP_Error( 'mysql_not_compatible', sprintf( __('The update cannot be installed because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.'), $wp_version, $required_mysql_version, $mysql_version ) );
// Sanity check the unzipped distribution
apply_filters('update_feedback', __('Verifying the unpacked files'));
if ( !$wp_filesystem->exists($from . '/wordpress/wp-settings.php') || !$wp_filesystem->exists($from . '/wordpress/wp-admin/admin.php') ||

View File

@@ -1688,11 +1688,7 @@ function pre_schema_upgrade() {
// Upgrade versions prior to 2.9
if ( $wp_current_db_version < 11557 ) {
// Delete duplicate options. Keep the option with the highest option_id.
$delete_options = $wpdb->get_col("SELECT o1.option_id FROM $wpdb->options AS o1 JOIN $wpdb->options AS o2 ON o2.option_name = o1.option_name AND o2.option_id > o1.option_id");
if ( !empty($delete_options) ) {
$delete_options = implode(',', $delete_options);
$wpdb->query("DELETE FROM $wpdb->options WHERE option_id IN ($delete_options)");
}
$wpdb->query("DELETE o1 FROM $wpdb->options AS o1 JOIN $wpdb->options AS o2 USING (`option_name`) WHERE o2.option_id > o1.option_id");
// Drop the old primary key and add the new.
$wpdb->query("ALTER TABLE $wpdb->options DROP PRIMARY KEY, ADD PRIMARY KEY(option_id)");

View File

@@ -82,6 +82,23 @@ function display_setup_form( $error = null ) {
// Let's check to make sure WP isn't already installed.
if ( is_blog_installed() ) {display_header(); die('<h1>'.__('Already Installed').'</h1><p>'.__('You appear to have already installed WordPress. To reinstall please clear your old database tables first.').'</p></body></html>');}
$php_version = phpversion();
$mysql_version = $wpdb->db_version();
$php_compat = version_compare( $php_version, $required_php_version, '>=' );
$mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' );
if ( !$mysql_compat && !$php_compat )
$compat = sprintf( __('You cannot install because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version );
elseif ( !$php_compat )
$compat = sprintf( __('You cannot install because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.'), $wp_version, $required_php_version, $php_version );
elseif ( !$mysql_compat )
$compat = sprintf( __('You cannot install because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.'), $wp_version, $required_mysql_version, $mysql_version );
if ( !$mysql_compat || !$php_compat ) {
display_header();
die('<h1>' . __('Insufficient Requirements') . '</h1><p>' . $compat . '</p></body></html>');
}
switch($step) {
case 0:
case 1: // in case people are directly linking to this

View File

@@ -41,9 +41,9 @@ if ( !defined('WP_ALLOW_REPAIR') ) {
echo "<p>The {$wpdb->prefix}$table table is okay.";
} else {
echo "<p>The {$wpdb->prefix}$table table is not okay. It is reporting the following error: <code>$check->Msg_text</code>. WordPress will attempt to repair this table&hellip;";
$repair = $wpdb->get_row("REPAIR TABLE {$wpb->prefix}$table");
$repair = $wpdb->get_row("REPAIR TABLE {$wpdb->prefix}$table");
if ( 'OK' == $check->Msg_text ) {
echo "<br />&nbsp;&nbsp;&nbsp;&nbsp;Sucessfully repaired the {$wpb->prefix}$table table.";
echo "<br />&nbsp;&nbsp;&nbsp;&nbsp;Sucessfully repaired the {$wpdb->prefix}$table table.";
} else {
echo "<br />&nbsp;&nbsp;&nbsp;&nbsp;Failed to repair the {$wpdb->prefix}$table table. Error: $check->Msg_text<br />";
$problems["{$wpdb->prefix}$table"] = $check->Msg_text;
@@ -53,11 +53,11 @@ if ( !defined('WP_ALLOW_REPAIR') ) {
if ( $okay && $optimize ) {
$check = $wpdb->get_row("ANALYZE TABLE {$wpdb->prefix}$table");
if ( 'Table is already up to date' == $check->Msg_text ) {
echo "<br />&nbsp;&nbsp;&nbsp;&nbsp;The {$wpb->prefix}$table table is already optimized.";
echo "<br />&nbsp;&nbsp;&nbsp;&nbsp;The {$wpdb->prefix}$table table is already optimized.";
} else {
$check = $wpdb->get_row("OPTIMIZE TABLE {$wpdb->prefix}$table");
if ( 'OK' == $check->Msg_text || 'Table is already up to date' == $check->Msg_text )
echo "<br />&nbsp;&nbsp;&nbsp;&nbsp;Sucessfully optimized the {$wpb->prefix}$table table.";
echo "<br />&nbsp;&nbsp;&nbsp;&nbsp;Sucessfully optimized the {$wpdb->prefix}$table table.";
else
echo "<br />&nbsp;&nbsp;&nbsp;&nbsp;Failed to optimize the {$wpdb->prefix}$table table. Error: $check->Msg_text";
}

View File

@@ -198,11 +198,13 @@ do_action('admin_menu', '');
// Remove menus that have no accessible submenus and require privs that the user does not have.
// Run re-parent loop again.
foreach ( $menu as $id => $data ) {
if ( ! current_user_can($data[1]) )
$_wp_menu_nopriv[$data[2]] = true;
// If submenu is empty...
if ( empty($submenu[$data[2]]) ) {
// And user doesn't have privs, remove menu.
if ( ! current_user_can($data[1]) ) {
$_wp_menu_nopriv[$data[2]] = true;
if ( isset( $_wp_menu_nopriv[$data[2]] ) ) {
unset($menu[$id]);
}
}

View File

@@ -139,11 +139,23 @@ foreach ( $offset_range as $offset ) {
else: // looks like we can do nice timezone selection!
$current_offset = get_option('gmt_offset');
$tzstring = get_option('timezone_string');
$check_zone_info = true;
// Remove old Etc mappings. Fallback to gmt_offset.
if ( false !== strpos($tzstring,'Etc/GMT') )
$tzstring = '';
if (empty($tzstring)) { // set the Etc zone if no timezone string exists
if ($current_offset < 0) $offnum = - ceil($current_offset);
else $offnum = - floor($current_offset);
$tzstring = 'Etc/GMT' . (($offnum >= 0) ? '+' : '') . $offnum;
$check_zone_info = false;
if ( 0 == $current_offset )
$tzstring = 'UTC+0';
elseif ($current_offset < 0)
$tzstring = 'UTC' . $current_offset;
else
$tzstring = 'UTC+' . $current_offset;
}
?>
<th scope="row"><label for="timezone_string"><?php _e('Timezone') ?></label></th>
<td>
@@ -160,7 +172,7 @@ if (empty($tzstring)) { // set the Etc zone if no timezone string exists
<span class="description"><?php _e('Choose a city in the same timezone as you.'); ?></span>
<br />
<span>
<?php if ($tzstring) : ?>
<?php if ($check_zone_info && $tzstring) : ?>
<?php
$now = localtime(time(),true);
if ($now['tm_isdst']) _e('This timezone is currently in daylight savings time.');

View File

@@ -65,6 +65,12 @@ case 'update':
$_POST['date_format'] = $_POST['date_format_custom'];
if ( !empty($_POST['time_format']) && isset($_POST['time_format_custom']) && '\c\u\s\t\o\m' == stripslashes( $_POST['time_format'] ) )
$_POST['time_format'] = $_POST['time_format_custom'];
// Map UTC+- timezones to gmt_offsets and set timezone_string to empty.
if ( !empty($_POST['timezone_string']) && preg_match('/^UTC[+-]/', $_POST['timezone_string']) ) {
$_POST['gmt_offset'] = $_POST['timezone_string'];
$_POST['gmt_offset'] = preg_replace('/UTC\+?/', '', $_POST['gmt_offset']);
$_POST['timezone_string'] = '';
}
}
if ( $options ) {

View File

@@ -140,7 +140,6 @@ $desc_header = ( $description != $file_show ) ? "<strong>$description</strong> (
</div>
<br class="clear" />
</div>
<br class="clear" />
<div id="templateside">
<h3><?php _e("Theme Files"); ?></h3>

View File

@@ -95,12 +95,20 @@ function dismissed_updates() {
* @return null
*/
function core_upgrade_preamble() {
global $upgrade_error;
$updates = get_core_updates();
?>
<div class="wrap">
<?php screen_icon(); ?>
<h2><?php _e('Upgrade WordPress'); ?></h2>
<?php
if ( $upgrade_error ) {
echo '<div class="error"><p>';
_e('Please select one or more plugins to upgrade.');
echo '</p></div>';
}
if ( !isset($updates[0]->response) || 'latest' == $updates[0]->response ) {
echo '<h3>';
_e('You have the latest version of WordPress. You do not need to upgrade');
@@ -145,13 +153,13 @@ function list_plugin_updates() {
$form_action = 'update-core.php?action=do-plugin-upgrade';
$core_updates = get_core_updates();
if ( !isset($core_updates[0]->response) || 'latest' == $core_updates[0]->response || 'development' == $core_updates[0]->response )
if ( !isset($core_updates[0]->response) || 'latest' == $core_updates[0]->response || 'development' == $core_updates[0]->response || version_compare( $core_updates[0]->current, $cur_wp_version, '=') )
$core_update_version = false;
else
$core_update_version = $core_updates[0]->current;
?>
<h3><?php _e('Plugins'); ?></h3>
<p><?php _e('The following plugins have new versions available. Check the ones you want to upgrade and then click "Upgrade Plugins".'); ?><p>
<p><?php _e('The following plugins have new versions available. Check the ones you want to upgrade and then click "Upgrade Plugins".'); ?></p>
<form method="post" action="<?php echo $form_action; ?>" name="upgrade-plugins" class="upgrade">
<?php wp_nonce_field('upgrade-core'); ?>
<p><input id="upgrade-plugins" class="button" type="submit" value="<?php esc_attr_e('Upgrade Plugins'); ?>" name="upgrade" /></p>
@@ -175,12 +183,12 @@ function list_plugin_updates() {
$info = plugins_api('plugin_information', array('slug' => $plugin_data->update->slug ));
// Get plugin compat for running version of WordPress.
if ( isset($info->tested) && version_compare($info->tested, $cur_wp_version, '>=') ) {
$compat = '<br />' . sprintf(__('Compatibility with WordPress %1$s: 100% (according to its author)'), $cur_wp_version);
$compat = '<br />' . sprintf(__('Compatibility with WordPress %1$s: 100%% (according to its author)'), $cur_wp_version);
} elseif ( isset($info->compatibility[$cur_wp_version][$plugin_data->update->new_version]) ) {
$compat = $info->compatibility[$cur_wp_version][$plugin_data->update->new_version];
$compat = '<br />' . sprintf(__('Compatibility with WordPress %1$s: %2$d%% (%3$d "works" votes out of %4$d total)'), $cur_wp_version, $compat[0], $compat[2], $compat[1]);
} else {
$compat = '<br />' . sprintf(__('Compatibility with WordPress %1$s: Unknown)'), $cur_wp_version);
$compat = '<br />' . sprintf(__('Compatibility with WordPress %1$s: Unknown'), $cur_wp_version);
}
// Get plugin compat for updated version of WordPress.
if ( $core_update_version ) {
@@ -331,8 +339,11 @@ function do_plugin_upgrade() {
if ( isset($_GET['plugins']) ) {
$plugins = explode(',', $_GET['plugins']);
} else {
} elseif ( isset($_POST['checked']) ) {
$plugins = (array) $_POST['checked'];
} else {
// Nothing to do.
return;
}
$url = 'update-core.php?action=do-plugin-upgrade&amp;plugins=' . urlencode(join(',', $plugins));
$title = __('Upgrade Plugins');
@@ -343,6 +354,12 @@ function do_plugin_upgrade() {
$action = isset($_GET['action']) ? $_GET['action'] : 'upgrade-core';
$upgrade_error = false;
if ( 'do-plugin-upgrade' == $action && !isset($_GET['plugins']) && !isset($_POST['checked']) ) {
$upgrade_error = true;
$action = 'upgrade-core';
}
$title = __('Upgrade WordPress');
$parent_file = 'tools.php';

View File

@@ -35,6 +35,11 @@ if ( 'upgrade_db' === $step ) {
$step = (int) $step;
$php_version = phpversion();
$mysql_version = $wpdb->db_version();
$php_compat = version_compare( $php_version, $required_php_version, '>=' );
$mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' );
@header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -53,6 +58,14 @@ $step = (int) $step;
<p><?php _e( 'Your WordPress database is already up-to-date!' ); ?></p>
<p class="step"><a class="button" href="<?php echo get_option( 'home' ); ?>/"><?php _e( 'Continue' ); ?></a></p>
<?php elseif ( !$php_compat || !$mysql_compat ) :
if ( !$mysql_compat && !$php_compat )
printf( __('You cannot upgrade because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version );
elseif ( !$php_compat )
printf( __('You cannot upgrade because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.'), $wp_version, $required_php_version, $php_version );
elseif ( !$mysql_compat )
printf( __('You cannot upgrade because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.'), $wp_version, $required_mysql_version, $mysql_version );
?>
<?php else :
switch ( $step ) :
case 0:

View File

@@ -392,10 +392,12 @@ foreach ($arc_result as $arc_row) {
if ( current_user_can('edit_post', $post->ID) )
$actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '">' . __('Edit') . '</a>';
if ( current_user_can('delete_post', $post->ID) )
if ( EMPTY_TRASH_DAYS && MEDIA_TRASH )
if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) {
$actions['trash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=trash&amp;post=$post->ID", 'trash-post_' . $post->ID) . "'>" . __('Trash') . "</a>";
else
$actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>";
} else {
$delete_ays = !MEDIA_TRASH ? " onclick='return showNotice.warn();'" : '';
$actions['delete'] = "<a class='submitdelete'$delete_ays href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>";
}
$actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('View') . '</a>';
if ( current_user_can('edit_post', $post->ID) )
$actions['attach'] = '<a href="#the-list" onclick="findPosts.open(\'media[]\',\''.$post->ID.'\');return false;" class="hide-if-no-js">'.__('Attach').'</a>';

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,10 @@
textarea,
input,
input[type="text"],
input[type="password"],
input[type="file"],
input[type="button"],
input[type="submit"],
input[type="reset"],
select {
border-width: 1px;
border-style: solid;
@@ -9,12 +14,6 @@ select {
border-radius: 4px;
}
input[type="checkbox"],
input[type="radio"],
input[type="image"] {
border: 0 none;
}
p,
ul,
ol,
@@ -32,6 +31,7 @@ select option {
#pass-strength-result.strong,
#pass-strength-result.short,
.button-highlighted,
input.button-highlighted,
#quicktags #ed_strong,
#ed_reply_toolbar #ed_reply_strong {
font-weight: bold;
@@ -379,9 +379,13 @@ form p.submit a.cancel:hover {
.submit input,
.button,
input.button,
.button-primary,
input.button-primary,
.button-secondary,
input.button-secondary,
.button-highlighted,
input.button-highlighted,
#postcustomstuff .submit input {
text-decoration: none;
font-size: 11px !important;
@@ -1311,14 +1315,6 @@ strong .post-com-count {
width: auto;
}
.form-table input,
.form-table textarea,
#wpbody-content .describe input,
#wpbody-content .describe textarea {
border-width: 1px;
border-style: solid;
}
.form-table div.color-option {
display: block;
clear: both;

View File

@@ -27,12 +27,15 @@ if ( empty($status->comment_status) ) {
} elseif ( !comments_open($comment_post_ID) ) {
do_action('comment_closed', $comment_post_ID);
wp_die( __('Sorry, comments are closed for this item.') );
} elseif ( in_array($status->post_status, array('draft', 'pending') ) ) {
} elseif ( in_array($status->post_status, array('draft', 'future', 'pending') ) ) {
do_action('comment_on_draft', $comment_post_ID);
exit;
} elseif ( 'trash' == $status->post_status ) {
do_action('comment_on_trash', $comment_post_ID);
exit;
} elseif ( post_password_required($comment_post_ID) ) {
do_action('comment_on_password_protected', $comment_post_ID);
exit;
} else {
do_action('pre_comment_on_post', $comment_post_ID);
}

View File

@@ -50,7 +50,7 @@
* @author Matt Knapp <mdknapp[at]gmail[dot]com>
* @author Brett Stimmerman <brettstimmerman[at]gmail[dot]com>
* @copyright 2005 Michal Migurski
* @version CVS: $Id: JSON.php,v 1.3 2009/05/22 23:51:00 alan_k Exp $
* @version CVS: $Id: JSON.php 288200 2009-09-09 15:41:29Z alan_k $
* @license http://www.opensource.org/licenses/bsd-license.php
* @link http://pear.php.net/pepr/pepr-proposal-show.php?id=198
*/
@@ -235,7 +235,7 @@ class Services_JSON
*/
function encode($var)
{
header('Content-type: application/x-javascript');
header('Content-type: application/json');
return $this->_encode($var);
}
/**

View File

@@ -9426,7 +9426,7 @@ class SimplePie_Misc
}
// This is first, as behaviour of this is completely predictable
if ($input === 'Windows-1252' && $output === 'UTF-8')
if ($input === 'windows-1252' && $output === 'UTF-8')
{
return SimplePie_Misc::windows_1252_to_utf8($data);
}

View File

@@ -371,13 +371,11 @@ function get_comment_count( $post_id = 0 ) {
/**
* Add meta data field to a comment.
*
* Post meta data is called "Custom Fields" on the Administration Panels.
*
* @since 2.9
* @uses add_metadata
* @link http://codex.wordpress.org/Function_Reference/add_comment_meta
*
* @param int $comment_id Post ID.
* @param int $comment_id Comment ID.
* @param string $key Metadata name.
* @param mixed $value Metadata value.
* @param bool $unique Optional, default is false. Whether the same key should not be added.
@@ -414,7 +412,7 @@ function delete_comment_meta($comment_id, $meta_key, $meta_value = '') {
* @uses get_metadata
* @link http://codex.wordpress.org/Function_Reference/get_comment_meta
*
* @param int $comment_id Post ID.
* @param int $comment_id Comment ID.
* @param string $key The meta key to retrieve.
* @param bool $single Whether to return a single value.
* @return mixed Will be an array if $single is false. Will be value of meta data field if $single
@@ -436,7 +434,7 @@ function get_comment_meta($comment_id, $key, $single = false) {
* @uses update_metadata
* @link http://codex.wordpress.org/Function_Reference/update_comment_meta
*
* @param int $comment_id Post ID.
* @param int $comment_id Comment ID.
* @param string $key Metadata key.
* @param mixed $value Metadata value.
* @param mixed $prev_value Optional. Previous value to check before removing.
@@ -808,6 +806,7 @@ function wp_count_comments( $post_id = 0 ) {
* @since 2.0.0
* @uses $wpdb
* @uses do_action() Calls 'delete_comment' hook on comment ID
* @uses do_action() Calls 'deleted_comment' hook on comment ID after deletion, on success
* @uses do_action() Calls 'wp_set_comment_status' hook on comment ID with 'delete' set for the second parameter
* @uses wp_transition_comment_status() Passes new and old comment status along with $comment object
*
@@ -824,12 +823,6 @@ function wp_delete_comment($comment_id) {
do_action('delete_comment', $comment_id);
delete_comment_meta($comment_id,'_wp_trash_meta_status');
delete_comment_meta($comment_id,'_wp_trash_meta_time');
if ( ! $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->comments WHERE comment_ID = %d LIMIT 1", $comment_id) ) )
return false;
// Move children up a level.
$children = $wpdb->get_col( $wpdb->prepare("SELECT comment_ID FROM $wpdb->comments WHERE comment_parent = %d", $comment_id) );
if ( !empty($children) ) {
@@ -837,6 +830,19 @@ function wp_delete_comment($comment_id) {
clean_comment_cache($children);
}
// Delete metadata
$meta_ids = $wpdb->get_col( $wpdb->prepare( "SELECT meta_id FROM $wpdb->commentmeta WHERE comment_id = %d ", $comment_id ) );
if ( !empty($meta_ids) ) {
do_action( 'delete_commentmeta', $meta_ids );
$in_meta_ids = "'" . implode("', '", $meta_ids) . "'";
$wpdb->query( "DELETE FROM $wpdb->commentmeta WHERE meta_id IN ($in_meta_ids)" );
do_action( 'deleted_commentmeta', $meta_ids );
}
if ( ! $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->comments WHERE comment_ID = %d LIMIT 1", $comment_id) ) )
return false;
do_action('deleted_comment', $comment_id);
$post_id = $comment->comment_post_ID;
if ( $post_id && $comment->comment_approved == 1 )
wp_update_comment_count($post_id);

View File

@@ -133,7 +133,7 @@ if ( !function_exists('json_encode') ) {
$wp_json = new Services_JSON();
}
return $wp_json->encode( $string );
return $wp_json->encodeUnsafe( $string );
}
}

View File

@@ -732,7 +732,9 @@ class WP_Widget_RSS extends WP_Widget {
echo $before_title . $title . $after_title;
wp_widget_rss_output( $rss, $instance );
echo $after_widget;
$rss->__destruct();
if ( ! is_wp_error($rss) )
$rss->__destruct();
unset($rss);
}

View File

@@ -2810,7 +2810,7 @@ function wp_strip_all_tags($string, $remove_breaks = false) {
$string = strip_tags($string);
if ( $remove_breaks )
$string = preg_replace('/\s+/', ' ', $string);
$string = preg_replace('/[\r\n\t ]+/', ' ', $string);
return trim($string);
}
@@ -2836,7 +2836,7 @@ function sanitize_text_field($str) {
$filtered = wp_pre_kses_less_than( $filtered );
$filtered = wp_strip_all_tags( $filtered, true );
} else {
$filtered = trim( preg_replace('/\s+/', ' ', $filtered) );
$filtered = trim( preg_replace('/[\r\n\t ]+/', ' ', $filtered) );
}
$match = array();

View File

@@ -3393,7 +3393,7 @@ function _wp_timezone_choice_usort_callback( $a, $b ) {
function wp_timezone_choice( $selected_zone ) {
static $mo_loaded = false;
$continents = array( 'Africa', 'America', 'Antarctica', 'Arctic', 'Asia', 'Atlantic', 'Australia', 'Europe', 'Indian', 'Pacific', 'Etc' );
$continents = array( 'Africa', 'America', 'Antarctica', 'Arctic', 'Asia', 'Atlantic', 'Australia', 'Europe', 'Indian', 'Pacific');
// Load translations for continents and cities
if ( !$mo_loaded ) {
@@ -3409,9 +3409,6 @@ function wp_timezone_choice( $selected_zone ) {
if ( !in_array( $zone[0], $continents ) ) {
continue;
}
if ( 'Etc' === $zone[0] && in_array( $zone[1], array( 'UCT', 'GMT', 'GMT0', 'GMT+0', 'GMT-0', 'Greenwich', 'Universal', 'Zulu' ) ) ) {
continue;
}
// This determines what gets set and translated - we don't translate Etc/* strings here, they are done later
$exists = array(
@@ -3452,27 +3449,18 @@ function wp_timezone_choice( $selected_zone ) {
// Continent optgroup
if ( !isset( $zonen[$key - 1] ) || $zonen[$key - 1]['continent'] !== $zone['continent'] ) {
$label = ( 'Etc' === $zone['continent'] ) ? __( 'Manual offsets' ) : $zone['t_continent'];
$label = $zone['t_continent'];
$structure[] = '<optgroup label="'. esc_attr( $label ) .'">';
}
// Add the city to the value
$value[] = $zone['city'];
if ( 'Etc' === $zone['continent'] ) {
if ( 'UTC' === $zone['city'] ) {
$display = '';
} else {
$display = str_replace( 'GMT', '', $zone['city'] );
$display = strtr( $display, '+-', '-+' ) . ':00';
}
$display = sprintf( __( 'UTC %s' ), $display );
} else {
$display = $zone['t_city'];
if ( !empty( $zone['subcity'] ) ) {
// Add the subcity to the value
$value[] = $zone['subcity'];
$display .= ' - ' . $zone['t_subcity'];
}
$display = $zone['t_city'];
if ( !empty( $zone['subcity'] ) ) {
// Add the subcity to the value
$value[] = $zone['subcity'];
$display .= ' - ' . $zone['t_subcity'];
}
}
@@ -3490,6 +3478,36 @@ function wp_timezone_choice( $selected_zone ) {
}
}
// Do UTC
$structure[] = '<optgroup label="'. esc_attr__( 'UTC' ) .'">';
$selected = '';
if ( 'UTC' === $selected_zone )
$selected = 'selected="selected" ';
$structure[] = '<option ' . $selected . 'value="' . esc_attr( 'UTC' ) . '">' . __('UTC') . '</option>';
$structure[] = '</optgroup>';
// Do manual UTC offsets
$structure[] = '<optgroup label="'. esc_attr__( 'Manual Offsets' ) .'">';
$offset_range = array (-12, -11.5, -11, -10.5, -10, -9.5, -9, -8.5, -8, -7.5, -7, -6.5, -6, -5.5, -5, -4.5, -4, -3.5, -3, -2.5, -2, -1.5, -1, -0.5,
0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 5.75, 6, 6.5, 7, 7.5, 8, 8.5, 8.75, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.75, 13, 13.75, 14);
foreach ( $offset_range as $offset ) {
if ( 0 <= $offset )
$offset_name = '+' . $offset;
else
$offset_name = (string) $offset;
$offset_value = $offset_name;
$offset_name = str_replace(array('.25','.5','.75'), array(':15',':30',':45'), $offset_name);
$offset_name = 'UTC' . $offset_name;
$offset_value = 'UTC' . $offset_value;
$selected = '';
if ( $offset_value === $selected_zone )
$selected = 'selected="selected" ';
$structure[] = '<option ' . $selected . 'value="' . esc_attr( $offset_value ) . '">' . esc_html( $offset_name ) . "</option>";
}
$structure[] = '</optgroup>';
return join( "\n", $structure );
}
@@ -3617,6 +3635,6 @@ function get_file_data( $file, $default_headers, $context = '' ) {
* @since 2.9.0
*/
function _search_terms_tidy($t) {
return trim($t, "\"\'\n\r ");
return trim($t, "\"'\n\r ");
}
?>

View File

@@ -678,7 +678,9 @@ class WP_Http_Fsockopen {
if ( false === $handle )
return new WP_Error('http_request_failed', $iError . ': ' . $strError);
stream_set_timeout($handle, $r['timeout'] );
$timeout = (int) floor( $r['timeout'] );
$utimeout = $timeout == $r['timeout'] ? 0 : 1000000 * $r['timeout'] % 1000000;
stream_set_timeout( $handle, $timeout, $utimeout );
if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) //Some proxies require full URL in this field.
$requestPath = $url;
@@ -834,7 +836,9 @@ class WP_Http_Fopen {
if (! $handle)
return new WP_Error('http_request_failed', sprintf(__('Could not open handle for fopen() to %s'), $url));
stream_set_timeout($handle, $r['timeout'] );
$timeout = (int) floor( $r['timeout'] );
$utimeout = $timeout == $r['timeout'] ? 0 : 1000000 * $r['timeout'] % 1000000;
stream_set_timeout( $handle, $timeout, $utimeout );
if ( ! $r['blocking'] ) {
fclose($handle);
@@ -1007,9 +1011,9 @@ class WP_Http_Streams {
if ( ! $handle)
return new WP_Error('http_request_failed', sprintf(__('Could not open handle for fopen() to %s'), $url));
// WordPress supports PHP 4.3, which has this function. Removed sanity checking for
// performance reasons.
stream_set_timeout($handle, $r['timeout'] );
$timeout = (int) floor( $r['timeout'] );
$utimeout = $timeout == $r['timeout'] ? 0 : 1000000 * $r['timeout'] % 1000000;
stream_set_timeout( $handle, $timeout, $utimeout );
if ( ! $r['blocking'] ) {
stream_set_blocking($handle, 0);
@@ -1141,6 +1145,8 @@ class WP_Http_ExtHTTP {
elseif ( ! $is_local )
$ssl_verify = apply_filters('https_ssl_verify', $ssl_verify);
$r['timeout'] = (int) ceil( $r['timeout'] );
$options = array(
'timeout' => $r['timeout'],
'connecttimeout' => $r['timeout'],
@@ -1255,11 +1261,6 @@ class WP_Http_Curl {
// Construct Cookie: header if any cookies are set.
WP_Http::buildCookieHeader( $r );
// cURL extension will sometimes fail when the timeout is less than 1 as it may round down
// to 0, which gives it unlimited timeout.
if ( $r['timeout'] > 0 && $r['timeout'] < 1 )
$r['timeout'] = 1;
$handle = curl_init();
// cURL offers really easy proxy support.
@@ -1292,13 +1293,18 @@ class WP_Http_Curl {
elseif ( ! $is_local )
$ssl_verify = apply_filters('https_ssl_verify', $ssl_verify);
// CURLOPT_TIMEOUT and CURLOPT_CONNECTTIMEOUT expect integers. Have to use ceil since
// a value of 0 will allow an ulimited timeout.
$timeout = (int) ceil( $r['timeout'] );
curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, $timeout );
curl_setopt( $handle, CURLOPT_TIMEOUT, $timeout );
curl_setopt( $handle, CURLOPT_URL, $url);
curl_setopt( $handle, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $handle, CURLOPT_SSL_VERIFYHOST, $ssl_verify );
curl_setopt( $handle, CURLOPT_SSL_VERIFYPEER, $ssl_verify );
curl_setopt( $handle, CURLOPT_USERAGENT, $r['user-agent'] );
curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, $r['timeout'] );
curl_setopt( $handle, CURLOPT_TIMEOUT, $r['timeout'] );
curl_setopt( $handle, CURLOPT_MAXREDIRS, $r['redirection'] );
switch ( $r['method'] ) {
@@ -1810,18 +1816,18 @@ class WP_Http_Encoding {
* @return string|bool False on failure.
*/
function decompress( $compressed, $length = null ) {
$decompressed = WP_Http_Encoding::compatible_gzinflate( $compressed );
if ( false !== $decompressed )
if ( false !== ( $decompressed = @gzinflate( $compressed ) ) )
return $decompressed;
$decompressed = gzuncompress( $compressed );
if ( false !== ( $decompressed = WP_Http_Encoding::compatible_gzinflate( $compressed ) ) )
return $decompressed;
if ( false !== $decompressed )
if ( false !== ( $decompressed = @gzuncompress( $compressed ) ) )
return $decompressed;
if ( function_exists('gzdecode') ) {
$decompressed = gzdecode( $compressed );
$decompressed = @gzdecode( $compressed );
if ( false !== $decompressed )
return $decompressed;
@@ -1910,7 +1916,7 @@ class WP_Http_Encoding {
if ( is_array( $headers ) ) {
if ( array_key_exists('content-encoding', $headers) && ! empty( $headers['content-encoding'] ) )
return true;
} else if( is_string( $headers ) ) {
} else if ( is_string( $headers ) ) {
return ( stripos($headers, 'content-encoding:') !== false );
}

View File

@@ -53,11 +53,12 @@ function update_metadata($meta_type, $object_id, $meta_key, $meta_value, $prev_v
global $wpdb;
$column = esc_sql($meta_type . '_id');
$id_column = 'user' == $meta_type ? 'umeta_id' : 'meta_id';
// expected_slashed ($meta_key)
$meta_key = stripslashes($meta_key);
if ( ! $meta_id = $wpdb->get_var( $wpdb->prepare( "SELECT meta_id FROM $table WHERE meta_key = %s AND $column = %d", $meta_key, $object_id ) ) )
if ( ! $meta_id = $wpdb->get_var( $wpdb->prepare( "SELECT $id_column FROM $table WHERE meta_key = %s AND $column = %d", $meta_key, $object_id ) ) )
return add_metadata($meta_type, $object_id, $meta_key, $meta_value);
$meta_value = maybe_serialize( stripslashes_deep($meta_value) );
@@ -90,11 +91,12 @@ function delete_metadata($meta_type, $object_id, $meta_key, $meta_value = '', $d
global $wpdb;
$type_column = esc_sql($meta_type . '_id');
$id_column = 'user' == $meta_type ? 'umeta_id' : 'meta_id';
// expected_slashed ($meta_key)
$meta_key = stripslashes($meta_key);
$meta_value = maybe_serialize( stripslashes_deep($meta_value) );
$query = $wpdb->prepare( "SELECT meta_id FROM $table WHERE meta_key = %s", $meta_key );
$query = $wpdb->prepare( "SELECT $id_column FROM $table WHERE meta_key = %s", $meta_key );
if ( !$delete_all )
$query .= $wpdb->prepare(" AND $type_column = %d", $object_id );
@@ -106,7 +108,7 @@ function delete_metadata($meta_type, $object_id, $meta_key, $meta_value = '', $d
if ( !count( $meta_ids ) )
return false;
$query = "DELETE FROM $table WHERE meta_id IN( " . implode( ',', $meta_ids ) . " )";
$query = "DELETE FROM $table WHERE $id_column IN( " . implode( ',', $meta_ids ) . " )";
$count = $wpdb->query($query);

View File

@@ -2391,8 +2391,10 @@ function &get_page_children($page_id, $pages) {
*/
function &get_page_hierarchy( &$pages, $page_id = 0 ) {
if ( empty( $pages ) )
return null;
if ( empty( $pages ) ) {
$return = array();
return $return;
}
$children = array();
foreach ( (array) $pages as $p ) {

View File

@@ -2280,7 +2280,7 @@ class WP_Query {
// User must be logged in to view unpublished posts.
$this->posts = array();
} else {
if (in_array($status, array('draft', 'pending')) ) {
if (in_array($status, array('draft', 'pending', 'trash')) ) {
// User must have edit permissions on the draft to preview.
if (! current_user_can("edit_$post_type_cap", $this->posts[0]->ID)) {
$this->posts = array();

View File

@@ -426,12 +426,12 @@ function wp_default_styles( &$styles ) {
$rtl_styles = array( 'global', 'colors', 'dashboard', 'ie', 'install', 'login', 'media', 'theme-editor', 'upload', 'widgets', 'press-this', 'plugin-install', 'farbtastic' );
// all colors stylesheets need to have the same query strings (cache manifest compat)
$colors_version = '20091214';
$colors_version = '20091217';
$styles->add( 'wp-admin', "/wp-admin/wp-admin$suffix.css", array(), '20091214' );
$styles->add( 'wp-admin', "/wp-admin/wp-admin$suffix.css", array(), '20091221' );
$styles->add_data( 'wp-admin', 'rtl', "/wp-admin/rtl$suffix.css" );
$styles->add( 'ie', '/wp-admin/css/ie.css', array(), '20091128' );
$styles->add( 'ie', '/wp-admin/css/ie.css', array(), '20091217' );
$styles->add_data( 'ie', 'conditional', 'lte IE 7' );
// Register "meta" stylesheet for admin colors. All colors-* style sheets should have the same version string.
@@ -443,7 +443,7 @@ function wp_default_styles( &$styles ) {
$styles->add( 'colors-classic', "/wp-admin/css/colors-classic$suffix.css", array(), $colors_version);
$styles->add_data( 'colors-classic', 'rtl', true );
$styles->add( 'global', "/wp-admin/css/global$suffix.css", array(), '20091212' );
$styles->add( 'global', "/wp-admin/css/global$suffix.css", array(), '20091228' );
$styles->add( 'media', "/wp-admin/css/media$suffix.css", array(), '20091029' );
$styles->add( 'widgets', "/wp-admin/css/widgets$suffix.css", array(), '20091118' );
$styles->add( 'dashboard', "/wp-admin/css/dashboard$suffix.css", array(), '20091211' );

View File

@@ -353,6 +353,8 @@ function get_themes() {
$template_files[] = "$template_directory/$file";
} elseif ( is_dir("$template_directory/$file") ) {
$template_subdir = @ dir("$template_directory/$file");
if ( !$template_subdir )
continue;
while ( ($subfile = $template_subdir->read()) !== false ) {
if ( preg_match('|^\.+$|', $subfile) )
continue;

View File

@@ -638,9 +638,8 @@ function sanitize_user_object($user, $context = 'display') {
else
$vars = get_object_vars($user);
foreach ( array_keys($vars) as $field ) {
if ( is_array($user->$field) )
continue;
$user->$field = sanitize_user_field($field, $user->$field, $user->ID, $context);
if ( is_string($user->$field) || is_numeric($user->$field) )
$user->$field = sanitize_user_field($field, $user->$field, $user->ID, $context);
}
$user->filter = $context;
} else {
@@ -689,7 +688,7 @@ function sanitize_user_field($field, $value, $user_id, $context) {
if ( 'raw' == $context )
return $value;
if ( is_array($value) )
if ( !is_string($value) && !is_numeric($value) )
return $value;
$prefixed = false;

View File

@@ -8,7 +8,7 @@
*
* @global string $wp_version
*/
$wp_version = '2.9-RC1';
$wp_version = '2.9.2';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
@@ -30,3 +30,17 @@ $tinymce_version = '327-1235';
* @global string $manifest_version
*/
$manifest_version = '20090616';
/**
* Holds the required PHP version
*
* @global string $required_php_version
*/
$required_php_version = '4.3';
/**
* Holds the required MySQL version
*
* @global string $required_mysql_version
*/
$required_mysql_version = '4.1.2';

View File

@@ -385,7 +385,7 @@ class wpdb {
$this->ready = true;
if ( !empty($this->charset) ) {
if ( $this->has_cap( 'collation' ) && !empty($this->charset) ) {
if ( function_exists('mysql_set_charset') ) {
mysql_set_charset($this->charset, $this->dbh);
$this->real_escape = true;