Commit Graph

34 Commits

Author SHA1 Message Date
Sergey Biryukov
2a050d1e6f Remove unnecessary semicolon.
props ixkaito.
fixes #29784.

git-svn-id: https://develop.svn.wordpress.org/trunk@29784 602fd350-edb4-49c9-b593-d223f7449a82
2014-09-29 10:29:16 +00:00
Andrew Nacin
1cde8312b6 DB: Revert [28814] and require a WHERE for wpdb::update().
see #26106.


git-svn-id: https://develop.svn.wordpress.org/trunk@29664 602fd350-edb4-49c9-b593-d223f7449a82
2014-09-02 04:55:17 +00:00
Drew Jaynes (DrewAPicture)
7ad77d58ee Add periods to short descriptions for magic methods added in [28501], [28521], and [28524].
See #22234 and #28885.


git-svn-id: https://develop.svn.wordpress.org/trunk@29165 602fd350-edb4-49c9-b593-d223f7449a82
2014-07-14 01:11:55 +00:00
Drew Jaynes (DrewAPicture)
551f829c55 Inline documentation cleanup for 4.0 audit.
Various improvements:
* Adds `@see` reference for `wp_list_comments()` in 'wp_list_comments_args' filter docs, added in [28285]
* Various phpDoc tweaks for the 'run_wptexturize' filter docs, added in [28715]
* Sentence and wrapping changes for `is_https_url()`, added in [28894]
* Documents the `$args` parameter for `wp_dropdown_languages()`, added in [29007]
* Adds a period to the parameter description for `_update_posts_count_on_delete()`, added in [28835]
* Documents a global in `is_customize_preview()`, added in [28999]
* phpDoc tweaks, adds an access modifier for `wpdb::esc_like()`, added in [28711]

See #28885.


git-svn-id: https://develop.svn.wordpress.org/trunk@29163 602fd350-edb4-49c9-b593-d223f7449a82
2014-07-14 01:01:22 +00:00
Andrew Nacin
a7c3b23f1c Simplify the setup-config.php UI flow and load process.
When no configuration file is detected, we now redirect to setup-config.php. This process now uses the WordPress bootstrap, rather than a set of fragile hacks.

fixes #28740.


git-svn-id: https://develop.svn.wordpress.org/trunk@28978 602fd350-edb4-49c9-b593-d223f7449a82
2014-07-03 19:56:37 +00:00
Scott Taylor
220fda0095 In $wpdb->update(), prevent explosions when $where is empty.
Adds unit tests.

Props UmeshSingla, wonderboymusic.
Fixes #26106


git-svn-id: https://develop.svn.wordpress.org/trunk@28814 602fd350-edb4-49c9-b593-d223f7449a82
2014-06-24 00:23:09 +00:00
Scott Taylor
2a551f57a4 LIKE escape sanity:
* Deprecate `like_escape()`
* Add a method to `$wpdb`, `->esc_like()`, and add unit tests

`$wpdb::esc_like()` is not used yet. As such, many unit tests will throw `Unexpected deprecated notice for like_escape`. Subsequent commits will alleviate this.

Props miqrogroove.
See #10041.


git-svn-id: https://develop.svn.wordpress.org/trunk@28711 602fd350-edb4-49c9-b593-d223f7449a82
2014-06-10 00:29:35 +00:00
Drew Jaynes (DrewAPicture)
85961d28df Mark the MYSQL_NEW_LINK constant as deprecated in 3.9+ as no equivalent to the $new_link parameter exists in mysqli_* functions.
Fixes #27933.


git-svn-id: https://develop.svn.wordpress.org/trunk@28657 602fd350-edb4-49c9-b593-d223f7449a82
2014-06-04 05:00:00 +00:00
Scott Taylor
02a28ec4e9 In wpdb, make some things explicitly public. Do not set anything to private. This would instantly blow up hyperdb in the wild.
See #27881, #22234.


git-svn-id: https://develop.svn.wordpress.org/trunk@28526 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 15:35:29 +00:00
Scott Taylor
4bddd84276 In wpdb, remove dead code:
* In `->tables()`, `break` is unreachable after `return`
* In `->query()`, `$return` is always set, so doesn't need an initial value of `0`
* In `->delete()`, `$bits` is unused

See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28339 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-07 03:55:32 +00:00
Drew Jaynes (DrewAPicture)
5ad1751132 Improve inline documentation for the wpdb::$show_errors property.
Note that SQL/DB errors are displayed by default if both WP_DEBUG and WP_DEBUG_DISPLAY evaluate to true.

Props ericlewis.
Fixes #16615.


git-svn-id: https://develop.svn.wordpress.org/trunk@28243 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-02 12:18:07 +00:00
Andrew Nacin
82bc9c1142 Rename USE_EXT_MYSQL to WP_USE_EXT_MYSQL. see #21663.
git-svn-id: https://develop.svn.wordpress.org/trunk@28022 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-07 22:26:19 +00:00
Drew Jaynes (DrewAPicture)
aba414af7e PHPDoc fixes for functionality in wp-includes/wp-db.php added in 3.9.
See #27700.


git-svn-id: https://develop.svn.wordpress.org/trunk@28016 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-07 22:01:37 +00:00
Andrew Nacin
f9e150c068 wpdb: Don't pass a second argument to mysqli_fetch_field().
props pento.
fixes #27693.


git-svn-id: https://develop.svn.wordpress.org/trunk@28002 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-07 20:21:16 +00:00
Andrew Nacin
ccb4f3714a Database: Fall back from ext/mysqli to ext/mysql if the connection fails.
This allows us to avoid breaking a site that works under ext/mysql but is misconfigured for ext/mysqli.

props pento.
see #21663.


git-svn-id: https://develop.svn.wordpress.org/trunk@27935 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-03 21:57:22 +00:00
Andrew Nacin
0faaacc7c8 Database: Add $allow_bail argument to wpdb::check_connection() to match the connect method.
props DrProtocols, pento.
fixes #27240.


git-svn-id: https://develop.svn.wordpress.org/trunk@27925 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-03 04:05:31 +00:00
Sergey Biryukov
28dd458547 Avoid a warning in wpdb::db_connect(). before_needle parameter of strstr() was added in PHP 5.3.
props klihelp, pento.
fixes #27277.

git-svn-id: https://develop.svn.wordpress.org/trunk@27503 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-11 19:26:02 +00:00
Andrew Nacin
79143bfed1 Make OBJECT a case sensitive constant, for HHVM compatibility and general sanity.
Support `object` explicitly, and other forms using a fallback in wpdb.

fixes #27231.


git-svn-id: https://develop.svn.wordpress.org/trunk@27377 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-03 17:35:12 +00:00
Andrew Nacin
f3a23fb43f Reference https://wordpress.org rather than http://wordpress.org in strings, links, comments, etc.
props Ipstenu, markjaquith.
see #27115.


git-svn-id: https://develop.svn.wordpress.org/trunk@27369 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-03 02:33:24 +00:00
Andrew Nacin
544b73ec4c When failing to reconnect to a server that has gone away, simply fail the query once we've passed template_redirect, rather than wp_die().
props pento.
see #5932.


git-svn-id: https://develop.svn.wordpress.org/trunk@27279 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-26 04:53:21 +00:00
Andrew Nacin
73ad0a310a Add a constant to disable mysqli for testing purposes. see #21663.
git-svn-id: https://develop.svn.wordpress.org/trunk@27278 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-26 04:19:45 +00:00
Andrew Nacin
b84ed60fa9 wpdb: set dbh to null when the mysqli connection fails. see #21663.
git-svn-id: https://develop.svn.wordpress.org/trunk@27277 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-26 04:14:54 +00:00
Andrew Nacin
19d7d1dd09 Use mysqli for WordPress development versions, regardless of PHP version, to increase testing footprint.
Allow the lack of ext/mysql to pass wp_check_php_mysql_versions().

see #21663.


git-svn-id: https://develop.svn.wordpress.org/trunk@27257 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-25 15:52:48 +00:00
Andrew Nacin
f8af178264 Use ext/mysqli in PHP 5.5 or greater. Expect minor explosions.
props aaroncampbell, pento.
see #21663.


git-svn-id: https://develop.svn.wordpress.org/trunk@27250 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-25 00:39:28 +00:00
Andrew Nacin
c61accb146 Declare $wpdb->base_prefix.
props DavidAnderson.
fixes #16762.


git-svn-id: https://develop.svn.wordpress.org/trunk@27249 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-25 00:29:01 +00:00
Drew Jaynes
b013aaf4c9 Fixes for hooks documentation in wp-includes/wp-db.php.
See #26869, #25229 and [25284].


git-svn-id: https://develop.svn.wordpress.org/trunk@27147 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-09 20:50:42 +00:00
Andrew Nacin
194d6a94b7 When the MySQL server has "gone away," attempt to reconnect and retry the query.
props pento.
see #5932.


git-svn-id: https://develop.svn.wordpress.org/trunk@27075 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-02 22:06:42 +00:00
Andrew Nacin
e993ef0249 Add a comment for [27073] as someone will inevitably complain it is tricked by % in a string. see #25604.
git-svn-id: https://develop.svn.wordpress.org/trunk@27074 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-02 21:47:58 +00:00
Andrew Nacin
435df55864 Throw an incorrect usage notice when the query argument of wpdb::prepare() does not include a placeholder.
props ounziw.
fixes #25604.


git-svn-id: https://develop.svn.wordpress.org/trunk@27073 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-02 21:46:07 +00:00
Andrew Nacin
0558df56ce Ensure compatibility with MySQL 5.6 which has stricter SQL modes by default.
Disables NO_ZERO_DATE, ONLY_FULL_GROUP_BY, STRICT_TRANS_TABLES, STRICT_ALL_TABLES, TRADITIONAL. Introduces wpdb::set_sql_mode() with an incompatible_sql_modes filter so a plugin can alter the set mode after the fact.

props pento.
fixes #26847.


git-svn-id: https://develop.svn.wordpress.org/trunk@27072 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-02 21:38:34 +00:00
Scott Taylor
62b57d8899 In wpdb::db_connect(), allow the loading of a custom database error template - this is already allowed in dead_db().
In `dead_db()`, move the call to `wp_load_translations_early()` before the inclusion of the `db-error.php` file to allow translation in both locations before the template is loaded.

Props sbruner, kovshenin.
Fixes #25703.



git-svn-id: https://develop.svn.wordpress.org/trunk@27056 602fd350-edb4-49c9-b593-d223f7449a82
2014-01-29 05:27:24 +00:00
Scott Taylor
50edc63cc9 When WP_DEBUG is set to true, suppress deprecated errors from firing when calling mysql_connect(), which is officially deprecated in PHP 5.5. We will remove this shameful code as soon as is humanly possible.
Props wonderboymusic. Extra love to tierra and nacin.
Fixes #26322.



git-svn-id: https://develop.svn.wordpress.org/trunk@26512 602fd350-edb4-49c9-b593-d223f7449a82
2013-12-02 00:08:57 +00:00
Andrew Nacin
8a0ac73f60 Document the 'query' filter in wp-db.
props natejacobs.
see #25229.


git-svn-id: https://develop.svn.wordpress.org/trunk@25284 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-06 17:07:00 +00:00
Andrew Nacin
b43712e0f7 New develop.svn.wordpress.org repository based on the old core.svn repository.
* All WordPress files move to a src/ directory.
 * New task runner (Grunt), configured to copy a built WordPress to build/.
 * svn:ignore and .gitignore for Gruntfile.js, wp-config.php, and node.js.
 * Remove Akismet external from develop.svn. Still exists in core.svn.
 * Drop minified files from src/. The build process will now generate these.

props koop.
see #24976.

and see http://wp.me/p2AvED-1AI.



git-svn-id: https://develop.svn.wordpress.org/trunk@25001 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-07 05:25:25 +00:00