<!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>[13426] trunk/wp-includes/wp-db.php: @
 since version numbers and other docs for wp-db.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/13426">13426</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2010-02-26 06:14:26 +0000 (Fri, 26 Feb 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>@since version numbers and other docs for wp-db. props hakre see <a href="http://trac.wordpress.org/ticket/12362">#12362</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludeswpdbphp">trunk/wp-includes/wp-db.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludeswpdbphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/wp-db.php (13425 => 13426)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/wp-db.php        2010-02-26 05:46:08 UTC (rev 13425)
+++ trunk/wp-includes/wp-db.php        2010-02-26 06:14:26 UTC (rev 13426)
</span><span class="lines">@@ -20,7 +20,7 @@
</span><span class="cx"> define( 'OBJECT', 'OBJECT', true );
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * @since {@internal Version Unknown}}
</del><ins>+ * @since 2.5.0
</ins><span class="cx">  */
</span><span class="cx"> define( 'OBJECT_K', 'OBJECT_K', false );
</span><span class="cx"> 
</span><span class="lines">@@ -119,7 +119,7 @@
</span><span class="cx">         /**
</span><span class="cx">          * Results of the last query made
</span><span class="cx">          *
</span><del>-         * @since {@internal Version Unknown}}
</del><ins>+         * @since 1.0.0
</ins><span class="cx">          * @access private
</span><span class="cx">          * @var array|null
</span><span class="cx">          */
</span><span class="lines">@@ -186,7 +186,7 @@
</span><span class="cx">         /**
</span><span class="cx">          * List of WordPress per-blog tables
</span><span class="cx">          *
</span><del>-         * @since {@internal Version Unknown}}
</del><ins>+         * @since 2.5.0
</ins><span class="cx">          * @access private
</span><span class="cx">          * @see wpdb::tables()
</span><span class="cx">          * @var array
</span><span class="lines">@@ -266,7 +266,7 @@
</span><span class="cx">         /**
</span><span class="cx">          * WordPress Post Metadata table
</span><span class="cx">          *
</span><del>-         * @since {@internal Version Unknown}}
</del><ins>+         * @since 1.5.0
</ins><span class="cx">          * @access public
</span><span class="cx">          * @var string
</span><span class="cx">          */
</span><span class="lines">@@ -470,6 +470,7 @@
</span><span class="cx">          * the actual setting up of the class properties and connection
</span><span class="cx">          * to the database.
</span><span class="cx">          *
</span><ins>+         * @link http://core.trac.wordpress.org/ticket/3354
</ins><span class="cx">          * @since 2.0.8
</span><span class="cx">          *
</span><span class="cx">          * @param string $dbuser MySQL database user
</span><span class="lines">@@ -533,6 +534,7 @@
</span><span class="cx">         /**
</span><span class="cx">          * PHP5 style destructor and will run when database object is destroyed.
</span><span class="cx">          *
</span><ins>+         * @see wpdb::__construct()
</ins><span class="cx">          * @since 2.0.8
</span><span class="cx">          * @return bool true
</span><span class="cx">          */
</span><span class="lines">@@ -634,9 +636,9 @@
</span><span class="cx">          * The scope argument can take one of the following:
</span><span class="cx">          *
</span><span class="cx">          * 'all' - returns 'all' and 'global' tables. No old tables are returned.
</span><ins>+         * 'blog' - returns the blog-level tables for the queried blog.
</ins><span class="cx">          * 'global' - returns the global tables for the installation, returning multisite tables only if running multisite.
</span><span class="cx">          * 'ms_global' - returns the multisite global tables, regardless if current installation is multisite.
</span><del>-         * 'blog' - returns the blog-level tables for the queried blog.
</del><span class="cx">          * 'old' - returns tables which are deprecated.
</span><span class="cx">          *
</span><span class="cx">          * @since 3.0.0
</span><span class="lines">@@ -649,7 +651,7 @@
</span><span class="cx">          * @param string $scope Optional. Can be all, global, ms_global, blog, or old tables. Defaults to all.
</span><span class="cx">          * @param bool $prefix Optional. Whether to include table prefixes. Default true. If blog
</span><span class="cx">          *         prefix is requested, then the custom users and usermeta tables will be mapped.
</span><del>-         * @param int $blog_id Optional. The blog_id to prefix. Defaults to wpdb::blogid. Used only when prefix is requested.
</del><ins>+         * @param int $blog_id Optional. The blog_id to prefix. Defaults to wpdb::$blogid. Used only when prefix is requested.
</ins><span class="cx">          * @return array Table names. When a prefix is requested, the key is the unprefixed table name.
</span><span class="cx">          */
</span><span class="cx">         function tables( $scope = 'all', $prefix = true, $blog_id = 0 ) {
</span><span class="lines">@@ -659,6 +661,9 @@
</span><span class="cx">                                 if ( is_multisite() )
</span><span class="cx">                                         $tables = array_merge( $tables, $this-&gt;ms_global_tables );
</span><span class="cx">                                 break;
</span><ins>+                        case 'blog' :
+                                $tables = $this-&gt;tables;
+                                break;
</ins><span class="cx">                         case 'global' :
</span><span class="cx">                                 $tables = $this-&gt;global_tables;
</span><span class="cx">                                 if ( is_multisite() )
</span><span class="lines">@@ -667,9 +672,6 @@
</span><span class="cx">                         case 'ms_global' :
</span><span class="cx">                                 $tables = $this-&gt;ms_global_tables;
</span><span class="cx">                                 break;
</span><del>-                        case 'blog' :
-                                $tables = $this-&gt;tables;
-                                break;
</del><span class="cx">                         case 'old' :
</span><span class="cx">                                 $tables = $this-&gt;old_tables;
</span><span class="cx">                                 break;
</span><span class="lines">@@ -733,10 +735,10 @@
</span><span class="cx">          * Weak escape, using addslashes()
</span><span class="cx">          *
</span><span class="cx">          * @see addslashes()
</span><del>-         * @since {@internal Version Unknown}}
</del><ins>+         * @since 2.8.0
</ins><span class="cx">          * @access private
</span><span class="cx">          *
</span><del>-         * @param  string $string
</del><ins>+         * @param string $string
</ins><span class="cx">          * @return string
</span><span class="cx">          */
</span><span class="cx">         function _weak_escape( $string ) {
</span><span class="lines">@@ -871,7 +873,7 @@
</span><span class="cx">                         $args = $args[0];
</span><span class="cx">                 $query = str_replace( &quot;'%s'&quot;, '%s', $query ); // in case someone mistakenly already singlequoted it
</span><span class="cx">                 $query = str_replace( '&quot;%s&quot;', '%s', $query ); // doublequote unquoting
</span><del>-                $query = preg_replace('|(?&lt;!%)%s|', &quot;'%s'&quot;, $query); // quote the strings, avoiding escaped strings like %%s
</del><ins>+                $query = preg_replace( '|(?&lt;!%)%s|', &quot;'%s'&quot;, $query ); // quote the strings, avoiding escaped strings like %%s
</ins><span class="cx">                 array_walk( $args, array( &amp;$this, 'escape_by_ref' ) );
</span><span class="cx">                 return @vsprintf( $query, $args );
</span><span class="cx">         }
</span><span class="lines">@@ -896,14 +898,17 @@
</span><span class="cx">                         return false;
</span><span class="cx"> 
</span><span class="cx">                 if ( $caller = $this-&gt;get_caller() )
</span><del>-                        $error_str = sprintf(/*WP_I18N_DB_QUERY_ERROR_FULL*/'WordPress database error %1$s for query %2$s made by %3$s'/*/WP_I18N_DB_QUERY_ERROR_FULL*/, $str, $this-&gt;last_query, $caller);
</del><ins>+                        $error_str = sprintf( /*WP_I18N_DB_QUERY_ERROR_FULL*/'WordPress database error %1$s for query %2$s made by %3$s'/*/WP_I18N_DB_QUERY_ERROR_FULL*/, $str, $this-&gt;last_query, $caller );
</ins><span class="cx">                 else
</span><del>-                        $error_str = sprintf(/*WP_I18N_DB_QUERY_ERROR*/'WordPress database error %1$s for query %2$s'/*/WP_I18N_DB_QUERY_ERROR*/, $str, $this-&gt;last_query);
</del><ins>+                        $error_str = sprintf( /*WP_I18N_DB_QUERY_ERROR*/'WordPress database error %1$s for query %2$s'/*/WP_I18N_DB_QUERY_ERROR*/, $str, $this-&gt;last_query );
</ins><span class="cx"> 
</span><del>-                if ( function_exists('error_log') &amp;&amp; $log_file = @ini_get('error_log') &amp;&amp; ( 'syslog' == $log_file || is_writable( $log_file ) ) )
-                        @error_log( $error_str, 0 );
</del><ins>+                if ( function_exists( 'error_log' )
+                        &amp;&amp; $log_file = @ini_get( 'error_log' )
+                        &amp;&amp; ( 'syslog' == $log_file || @is_writable( $log_file ) )
+                        )
+                        @error_log( $error_str );
</ins><span class="cx"> 
</span><del>-                // Is error output turned on or not..
</del><ins>+                // Are we showing errors?
</ins><span class="cx">                 if ( ! $this-&gt;show_errors )
</span><span class="cx">                         return false;
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>