Commit Graph

78 Commits

Author SHA1 Message Date
Mark Jaquith f646510aaa No longer need to work around zend_hash_del_key_or_index bug. fixes #24029. see [4717]
git-svn-id: https://develop.svn.wordpress.org/trunk@23947 602fd350-edb4-49c9-b593-d223f7449a82
2013-04-10 07:57:58 +00:00
Andrew Nacin 2604bfffbf Ensure we have a charset before calling mb_internal_encoding(), avoiding an unnecessary (if suppressed) warning. props dfavor. fixes #23093.
git-svn-id: https://develop.svn.wordpress.org/trunk@23373 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-02 02:01:29 +00:00
Ryan Boren 42cfdfb614 * Register blog-id-cache group as global
* Introduce clean_blog_cache() so we can run it independently of refresh_blog_details() which assumes the blog still exists and get_blog_details() can be called.
* Don't db escape cache keys in get_blog_id_from_url()
* prepare() the query in get_blog_id_from_url()
* Return 0 for all failures in get_blog_id_from_url()
* clean_blog_cache() after dropping tables in wpmu_delete_blog() to make sure the cache is for real cleaned.



git-svn-id: https://develop.svn.wordpress.org/trunk@22092 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-01 18:03:23 +00:00
Andrew Nacin b7198b85f8 Stop cleaning the cache of a post's children. Ancestors are no longer cached against the post object, which means this kind of walking is unnecessary. It is also prohibitively expensive with large hierarchies.
We need to remove post_ancestors non-persistent caching for this. get_post_ancestors() can simply rely on the caching of get_post() instead. Previously, it was a direct query, hence the extra layers of caching and clearing.

Child cache clearing stays in wp_delete_post() as children get a new parent.

fixes #11399.



git-svn-id: https://develop.svn.wordpress.org/trunk@21952 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-22 15:55:02 +00:00
Andrew Nacin 040d03235d Don't include functions.php in wp_load_translations_early()
to avoid a parse error in a PHP4 environment (caused by use of
the clone keyword in option.php).

Manually include functions.php in the rare situations where it
is not already included by the time we need to load translations
early.

Remove the functions.php dependency by switching the wp_die() calls
to die(), in wp_check_php_mysql_versions().

props SergeyBiryukov, see #21316, for trunk.




git-svn-id: https://develop.svn.wordpress.org/trunk@21715 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-04 02:38:37 +00:00
Ryan Boren ba5f7b35fd s/blog/site/. see #21742
git-svn-id: https://develop.svn.wordpress.org/trunk@21693 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-31 20:45:28 +00:00
Ryan Boren 7907be8f15 Introduce WP_Screen::in_admin() for determining which admin the screen is in.
Change is_*_admin() to reference in_admin() with fallback to the WP_*_ADMIN constants during early bootstrap. This allows unit tests and ajax handlers to set the admin context.

fixes #21742


git-svn-id: https://develop.svn.wordpress.org/trunk@21687 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-31 17:16:46 +00:00
Ryan Boren 30218d5ea5 Introduce WP_Post class. Clean up ancestors handling. Props scribu, toppa. fixes #10381 see #21309
git-svn-id: https://develop.svn.wordpress.org/trunk@21559 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-20 19:47:52 +00:00
Ryan Boren fd52f7397d Move get_current_blog_id() to load.php so it is available during multisite bootstrap. fixes #21432
git-svn-id: https://develop.svn.wordpress.org/trunk@21484 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-09 13:17:14 +00:00
Ryan Boren 691425a3ff Introduce wp_cache_switch_to_blog() and WP_Object_Cache::switch_to_blog() as a lighter/faster way to switch the cache to a new blog id.
Add the blog id to the cache keys for multisite installs.

Use wp_cache_switch_to_blog() instead of wp_cache_init() in switch_to_blog().

Use wp_cache_switch_to_blog() instead of wp_cache_reset() in wp_start_object_cache().

Deprecate wp_cache_reset().

This avoids the many queries needed to re-prime the cache after switch_to_blog() on multisite installs using the default cache backend.

fixes #21434



git-svn-id: https://develop.svn.wordpress.org/trunk@21403 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-02 18:31:14 +00:00
Ryan Boren c1051b1088 Take the mmm out of comment_ID. Just mm is sufficient.
Props wonderboymusic
fixes #21400


git-svn-id: https://develop.svn.wordpress.org/trunk@21363 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-30 16:16:13 +00:00
Andrew Nacin 0c59eacb55 Use is_rtl() for html direction when possible. In sites.php, language_attributes() will always exist (MU vestige). When the DB is dead, language_attributes() is worse than a simple is_rtl() check. is_rtl() exists here due to wp_load_translations_early(). see #18180.
git-svn-id: https://develop.svn.wordpress.org/trunk@19862 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-08 06:05:35 +00:00
Andrew Nacin e92b79e31f Do RTL detection based on a translated string, rather than a hardcoded list. Makes things a bit cleaner. fixes #19924, fixes #19600.
git-svn-id: https://develop.svn.wordpress.org/trunk@19836 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-06 19:36:24 +00:00
Andrew Nacin 7f118d4b05 Load admin-$locale.mo in setup-config.php. see #19852, see #18180.
git-svn-id: https://develop.svn.wordpress.org/trunk@19787 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-29 20:49:34 +00:00
Andrew Nacin 2fd55c3df1 Introduce wp_load_translations_early(), which can be used before the locale is properly loaded in order to translate early error strings. Internationalize setup-config.php -- translators no longer have a reason to modify this file. fixes #18180.
git-svn-id: https://develop.svn.wordpress.org/trunk@19760 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-26 20:34:27 +00:00
Ryan Boren 2b186b0c45 Lose EOF ?>. Clean up EOF newlines. fixes #12307
git-svn-id: https://develop.svn.wordpress.org/trunk@19712 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-08 17:01:11 +00:00
Dion Hulse 112ed6af44 Revert Debug cruft from [19679], See #19249
git-svn-id: https://develop.svn.wordpress.org/trunk@19681 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-05 07:43:40 +00:00
Ryan Boren c855c642ea Clear strict notices for the walkers. fixes #19249
git-svn-id: https://develop.svn.wordpress.org/trunk@19679 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-04 23:03:46 +00:00
Andrew Nacin fa9f927d75 Ask for a float from microtime() for timer_start(), timer_stop(). Clarify docs. props solarissmoke, fixes #19157.
git-svn-id: https://develop.svn.wordpress.org/trunk@19611 602fd350-edb4-49c9-b593-d223f7449a82
2011-12-20 21:36:53 +00:00
Ryan Boren 676ba7043e Use one space, not two, after trailing punctuation. fixes #19537
git-svn-id: https://develop.svn.wordpress.org/trunk@19593 602fd350-edb4-49c9-b593-d223f7449a82
2011-12-13 23:45:31 +00:00
Ryan Boren 4e081d3171 phpdoc typo and readability fixes. Props SergeyBiryukov. fixes #18560
git-svn-id: https://develop.svn.wordpress.org/trunk@18827 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-29 22:57:43 +00:00
Andrew Nacin bde0e2ff31 Force display_errors to off when WP_DEBUG_DISPLAY == false. Technically a backwards incompatible change - if you want the passthrough to php.ini (which false used to provide) then use WP_DEBUG_DISPLAY === null. see #18391.
git-svn-id: https://develop.svn.wordpress.org/trunk@18545 602fd350-edb4-49c9-b593-d223f7449a82
2011-08-13 18:59:05 +00:00
Andrew Ozz 9bcfc3da39 <!DOCTYPE html> for all, fixes #18202
git-svn-id: https://develop.svn.wordpress.org/trunk@18460 602fd350-edb4-49c9-b593-d223f7449a82
2011-07-22 00:25:41 +00:00
Andrew Nacin b40bdc3928 Mark a few files as needing to be parsable by PHP4 in order to show the proper error messages. Non-exhaustive. see #17934.
git-svn-id: https://develop.svn.wordpress.org/trunk@18375 602fd350-edb4-49c9-b593-d223f7449a82
2011-06-29 16:50:07 +00:00
Andrew Nacin 85d77664fb wp_check_php_mysql_versions() during setup and install. see #17934.
git-svn-id: https://develop.svn.wordpress.org/trunk@18374 602fd350-edb4-49c9-b593-d223f7449a82
2011-06-29 16:46:46 +00:00
Ryan Boren 8be45e1409 Avoid PHP 4 parse error prior to version checks. Props dd32. see #17880
git-svn-id: https://develop.svn.wordpress.org/trunk@18339 602fd350-edb4-49c9-b593-d223f7449a82
2011-06-24 21:32:40 +00:00
Andrew Nacin 2a4706af64 Avoid _deprecated_function() in wp_clone(). An object cache gets loaded before i18n functions exist. Maybe a better solution in 3.3. see #17206.
git-svn-id: https://develop.svn.wordpress.org/trunk@18293 602fd350-edb4-49c9-b593-d223f7449a82
2011-06-12 20:36:47 +00:00
Ryan Boren d48d7451c6 Move wp_clone() back to load.php. Props technosailor. fixes #17206
git-svn-id: https://develop.svn.wordpress.org/trunk@17681 602fd350-edb4-49c9-b593-d223f7449a82
2011-04-22 17:46:02 +00:00
Andrew Nacin 3d84216d69 Remove more E_RECOVERABLE_ERROR checks. props duck_, see #16920.
git-svn-id: https://develop.svn.wordpress.org/trunk@17632 602fd350-edb4-49c9-b593-d223f7449a82
2011-04-12 09:21:13 +00:00
Ryan Boren 259c415b7b Deprecate wp_clone(). Call clone directly. Props hakre. fixes #16813
git-svn-id: https://develop.svn.wordpress.org/trunk@17613 602fd350-edb4-49c9-b593-d223f7449a82
2011-04-06 17:44:29 +00:00
Dion Hulse 746173b4b8 Default WP_LANG_DIR to `WP_CONTENT_DIR/languages` when `wp-includes/languages/` doesn't exist. Fixes #17006
git-svn-id: https://develop.svn.wordpress.org/trunk@17575 602fd350-edb4-49c9-b593-d223f7449a82
2011-03-31 08:11:30 +00:00
Andrew Nacin dfe0736002 Add a note about E_DEPRECATED in wp_debug_mode() because I keep seeing reports about people trying to define it.
git-svn-id: https://develop.svn.wordpress.org/trunk@17194 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-31 21:01:30 +00:00
Ryan Boren 3df8f3d4a5 Define net and user admin constants for fetch-list case. Props scribu. fixes #15903
git-svn-id: https://develop.svn.wordpress.org/trunk@17080 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-20 13:30:39 +00:00
Ryan Boren c460268d15 Check is_network in the screen object for AJAX requests. Props scribu. fixes #15903
git-svn-id: https://develop.svn.wordpress.org/trunk@17077 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-20 11:57:25 +00:00
Ryan Boren af8f9bf98d Load network plugins for wp-activate.php. Restore MU load order. Props blamenacin. fixes #14718
git-svn-id: https://develop.svn.wordpress.org/trunk@16558 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-24 00:19:38 +00:00
Andrew Nacin fcb14d6104 Also look for SUBDOMAIN_INSTALL in is_multisite(). props wpmuguru, fixes #14536 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@15968 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-26 03:45:13 +00:00
Ryan Boren 9ee8b20f30 First pass of user admin. Network admin and screen cleanups. see #14696
git-svn-id: https://develop.svn.wordpress.org/trunk@15746 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-07 19:34:18 +00:00
Dion Hulse c9ab260ab4 utilise wp_guess_url() in installation redirection to provide an Absolute URL. See #14062. See #14904
git-svn-id: https://develop.svn.wordpress.org/trunk@15680 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-02 03:08:02 +00:00
Andrew Nacin 5963feeca6 Always include wp-db.php. Prevents a conditional include and allows db dropins to cleanly extend the wpdb class. Move require_wp_db() to load.php for consistency with bootloader helpers. fixes #14508.
git-svn-id: https://develop.svn.wordpress.org/trunk@15638 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-20 19:13:47 +00:00
Ryan Boren b2351693de is_blog_admin(). fixes #14763
git-svn-id: https://develop.svn.wordpress.org/trunk@15558 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-02 15:03:39 +00:00
Ryan Boren 27806b68d9 Add user_meta to global groups. see #14475
git-svn-id: https://develop.svn.wordpress.org/trunk@15482 602fd350-edb4-49c9-b593-d223f7449a82
2010-07-30 21:30:06 +00:00
Ryan Boren edd48280e3 Network Admin, first pass. see #14435
git-svn-id: https://develop.svn.wordpress.org/trunk@15481 602fd350-edb4-49c9-b593-d223f7449a82
2010-07-30 20:34:54 +00:00
Andrew Nacin 10e6b2fbcd Fix two sprintf placeholders in a WP_I18N string. props demetris, fixes #13865.
git-svn-id: https://develop.svn.wordpress.org/trunk@15240 602fd350-edb4-49c9-b593-d223f7449a82
2010-06-12 21:00:08 +00:00
Ryan Boren baa954e82e Make upgrading global so maintenance_nag() can see it. see #13721
git-svn-id: https://develop.svn.wordpress.org/trunk@15139 602fd350-edb4-49c9-b593-d223f7449a82
2010-06-04 15:16:17 +00:00
Andrew Nacin 8800622876 s/blog/site/ in more places. props PeteMall, see #11644.
git-svn-id: https://develop.svn.wordpress.org/trunk@14313 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-30 01:54:32 +00:00
Peter Westwood 3f2ee78320 Restore support for floating point numbers in number_format_i18n(). Fixes #10555.
git-svn-id: https://develop.svn.wordpress.org/trunk@14190 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-22 21:39:37 +00:00
Peter Westwood 00b53270ca Remove unnecessary translations of decimal point character and number of decimal places. Fixes #10555 props nbachiyski.
git-svn-id: https://develop.svn.wordpress.org/trunk@14184 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-21 21:41:20 +00:00
Ryan Boren 3750f4ac5d Move the global up
git-svn-id: https://develop.svn.wordpress.org/trunk@14181 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-21 20:37:54 +00:00
Ryan Boren 70fdc2138c Make sure is set correctly when advanced-cache.php is being used.
git-svn-id: https://develop.svn.wordpress.org/trunk@14180 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-21 20:34:32 +00:00
Andrew Nacin 6d5a19ed17 Simplify logic in is_multisite().
git-svn-id: https://develop.svn.wordpress.org/trunk@14036 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-08 02:39:17 +00:00