Make WordPress Core


Ignore:
Timestamp:
02/17/2012 12:02:42 AM (13 years ago)
Author:
nacin
Message:

Deprecate ancient "debugging" tools.

  • logIO() and the global $xmlrpc_logging in XML-RPC.
  • log_app() and the global $app_logging in APP.
  • debug_fwrite(), debug_fopen(), debug_fclose(), and $debug.

see #20051.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/install-helper.php

    r19712 r19935  
    1010 * needing to use these functions a lot, you might experience time outs. If you
    1111 * do, then it is advised to just write the SQL code yourself.
    12  *
    13  * You can turn debugging on, by setting $debug to 1 after you include this
    14  * file.
    1512 *
    1613 * <code>
     
    4138/** Load WordPress Bootstrap */
    4239require_once(dirname(dirname(__FILE__)).'/wp-load.php');
    43 
    44 /**
    45  * Turn debugging on or off.
    46  * @global bool|int $debug
    47  * @name $debug
    48  * @var bool|int
    49  * @since 1.0.0
    50  */
    51 $debug = 0;
    5240
    5341if ( ! function_exists('maybe_create_table') ) :
     
    9179 * @subpackage Plugin
    9280 * @uses $wpdb
    93  * @uses $debug
    9481 *
    9582 * @param string $table_name Database table name
     
    9986 */
    10087function maybe_add_column($table_name, $column_name, $create_ddl) {
    101     global $wpdb, $debug;
     88    global $wpdb;
    10289    foreach ($wpdb->get_col("DESC $table_name",0) as $column ) {
    103         if ($debug) echo("checking $column == $column_name<br />");
    10490
    10591        if ($column == $column_name) {
     
    180166 */
    181167function check_column($table_name, $col_name, $col_type, $is_null = null, $key = null, $default = null, $extra = null) {
    182     global $wpdb, $debug;
     168    global $wpdb;
    183169    $diffs = 0;
    184170    $results = $wpdb->get_results("DESC $table_name");
    185171
    186172    foreach ($results as $row ) {
    187         if ($debug > 1) print_r($row);
    188173
    189174        if ($row->Field == $col_name) {
    190175            // got our column, check the params
    191             if ($debug) echo ("checking $row->Type against $col_type\n");
    192176            if (($col_type != null) && ($row->Type != $col_type)) {
    193177                ++$diffs;
     
    206190            }
    207191            if ($diffs > 0) {
    208                 if ($debug) echo ("diffs = $diffs returning false\n");
    209192                return false;
    210193            }
Note: See TracChangeset for help on using the changeset viewer.