<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[16353] trunk: Kill WP_Object_Query.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/16353">16353</a></dd>
<dt>Author</dt> <dd>scribu</dd>
<dt>Date</dt> <dd>2010-11-13 18:32:43 +0000 (Sat, 13 Nov 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Kill WP_Object_Query. See <a href="http://trac.wordpress.org/ticket/15032">#15032</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludescommentphp">trunk/wp-includes/comment.php</a></li>
<li><a href="#trunkwpincludesmetaphp">trunk/wp-includes/meta.php</a></li>
<li><a href="#trunkwpincludesqueryphp">trunk/wp-includes/query.php</a></li>
<li><a href="#trunkwpincludesuserphp">trunk/wp-includes/user.php</a></li>
<li><a href="#trunkwpsettingsphp">trunk/wp-settings.php</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkwpincludesclasswpobjectqueryphp">trunk/wp-includes/class-wp-object-query.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludesclasswpobjectqueryphp"></a>
<div class="delfile"><h4>Deleted: trunk/wp-includes/class-wp-object-query.php (16352 => 16353)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/class-wp-object-query.php        2010-11-13 18:26:15 UTC (rev 16352)
+++ trunk/wp-includes/class-wp-object-query.php        2010-11-13 18:32:43 UTC (rev 16353)
</span><span class="lines">@@ -1,36 +0,0 @@
</span><del>-&lt;?php
-/**
- * WordPress Query class.
- *
- * Abstract class for handling advanced queries
- *
- * @package WordPress
- * @since 3.1.0
- */
-class WP_Object_Query {
-        /*
-         * Populates the $meta_query property
-         *
-         * @access protected
-         * @since 3.1.0
-         *
-         * @param array $qv The query variables
-         */
-        function parse_meta_query( &amp;$qv ) {
-                $meta_query = array();
-
-                // Simple query needs to be first for orderby=meta_value to work correctly
-                foreach ( array( 'key', 'value', 'compare', 'type' ) as $key ) {
-                        if ( !empty( $qv[ &quot;meta_$key&quot; ] ) )
-                                $meta_query[0][ $key ] = $qv[ &quot;meta_$key&quot; ];
-                }
-
-                if ( !empty( $qv['meta_query'] ) &amp;&amp; is_array( $qv['meta_query'] ) ) {
-                        $meta_query = array_merge( $meta_query, $qv['meta_query'] );
-                }
-
-                $qv['meta_query'] = $meta_query;
-        }
-}
-
-?&gt;
</del></span></pre></div>
<a id="trunkwpincludescommentphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/comment.php (16352 => 16353)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/comment.php        2010-11-13 18:26:15 UTC (rev 16352)
+++ trunk/wp-includes/comment.php        2010-11-13 18:32:43 UTC (rev 16353)
</span><span class="lines">@@ -197,7 +197,7 @@
</span><span class="cx">  *
</span><span class="cx">  * @since 3.1.0
</span><span class="cx">  */
</span><del>-class WP_Comment_Query extends WP_Object_Query {
</del><ins>+class WP_Comment_Query {
</ins><span class="cx"> 
</span><span class="cx">         /**
</span><span class="cx">          * Execute the query
</span></span></pre></div>
<a id="trunkwpincludesmetaphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/meta.php (16352 => 16353)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/meta.php        2010-11-13 18:26:15 UTC (rev 16352)
+++ trunk/wp-includes/meta.php        2010-11-13 18:32:43 UTC (rev 16353)
</span><span class="lines">@@ -444,6 +444,30 @@
</span><span class="cx">         return apply_filters_ref_array( 'get_meta_sql', array( compact( 'join', 'where' ), $meta_query, $meta_type, $primary_table, $primary_id_column, &amp;$context ) );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/*
+ * Populates the $meta_query property
+ *
+ * @access private
+ * @since 3.1.0
+ *
+ * @param array $qv The query variables
+ */
+function _parse_meta_query( &amp;$qv ) {
+        $meta_query = array();
+
+        // Simple query needs to be first for orderby=meta_value to work correctly
+        foreach ( array( 'key', 'value', 'compare', 'type' ) as $key ) {
+                if ( !empty( $qv[ &quot;meta_$key&quot; ] ) )
+                        $meta_query[0][ $key ] = $qv[ &quot;meta_$key&quot; ];
+        }
+
+        if ( !empty( $qv['meta_query'] ) &amp;&amp; is_array( $qv['meta_query'] ) ) {
+                $meta_query = array_merge( $meta_query, $qv['meta_query'] );
+        }
+
+        $qv['meta_query'] = $meta_query;
+}
+
</ins><span class="cx"> /**
</span><span class="cx">  * Retrieve the name of the metadata table for the specified object type.
</span><span class="cx">  *
</span></span></pre></div>
<a id="trunkwpincludesqueryphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/query.php (16352 => 16353)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/query.php        2010-11-13 18:26:15 UTC (rev 16352)
+++ trunk/wp-includes/query.php        2010-11-13 18:32:43 UTC (rev 16353)
</span><span class="lines">@@ -688,7 +688,7 @@
</span><span class="cx">  *
</span><span class="cx">  * @since 1.5.0
</span><span class="cx">  */
</span><del>-class WP_Query extends WP_Object_Query {
</del><ins>+class WP_Query {
</ins><span class="cx"> 
</span><span class="cx">         /**
</span><span class="cx">          * Query vars set by the user
</span><span class="lines">@@ -1347,7 +1347,7 @@
</span><span class="cx"> 
</span><span class="cx">                         $this-&gt;parse_tax_query( $qv );
</span><span class="cx"> 
</span><del>-                        $this-&gt;parse_meta_query( $qv );
</del><ins>+                        _parse_meta_query( $qv );
</ins><span class="cx"> 
</span><span class="cx">                         if ( empty($qv['author']) || ($qv['author'] == '0') ) {
</span><span class="cx">                                 $this-&gt;is_author = false;
</span></span></pre></div>
<a id="trunkwpincludesuserphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/user.php (16352 => 16353)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/user.php        2010-11-13 18:26:15 UTC (rev 16352)
+++ trunk/wp-includes/user.php        2010-11-13 18:32:43 UTC (rev 16353)
</span><span class="lines">@@ -330,7 +330,7 @@
</span><span class="cx">  *
</span><span class="cx">  * @since 3.1.0
</span><span class="cx">  */
</span><del>-class WP_User_Query extends WP_Object_Query {
</del><ins>+class WP_User_Query {
</ins><span class="cx"> 
</span><span class="cx">         /**
</span><span class="cx">          * List of found user ids
</span><span class="lines">@@ -463,7 +463,7 @@
</span><span class="cx">                         $this-&gt;query_where .= $this-&gt;get_search_sql( $search, $search_columns, $wild );
</span><span class="cx">                 }
</span><span class="cx"> 
</span><del>-                $this-&gt;parse_meta_query( $qv );
</del><ins>+                _parse_meta_query( $qv );
</ins><span class="cx"> 
</span><span class="cx">                 $role = trim( $qv['role'] );
</span><span class="cx">                 $blog_id = absint( $qv['blog_id'] );
</span></span></pre></div>
<a id="trunkwpsettingsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-settings.php (16352 => 16353)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-settings.php        2010-11-13 18:26:15 UTC (rev 16352)
+++ trunk/wp-settings.php        2010-11-13 18:32:43 UTC (rev 16353)
</span><span class="lines">@@ -103,7 +103,6 @@
</span><span class="cx"> // Load most of WordPress.
</span><span class="cx"> require( ABSPATH . WPINC . '/class-wp-walker.php' );
</span><span class="cx"> require( ABSPATH . WPINC . '/class-wp-ajax-response.php' );
</span><del>-require( ABSPATH . WPINC . '/class-wp-object-query.php' );
</del><span class="cx"> require( ABSPATH . WPINC . '/formatting.php' );
</span><span class="cx"> require( ABSPATH . WPINC . '/capabilities.php' );
</span><span class="cx"> require( ABSPATH . WPINC . '/query.php' );
</span></span></pre>
</div>
</div>

</body>
</html>