Skip to:
Content

bbPress.org

Changeset 2451


Ignore:
Timestamp:
06/30/2010 05:16:12 AM (16 years ago)
Author:
chrishajer
Message:

Improvements to bb_log_deprecated. Fixes #1295. Props Nightgunner5

Location:
trunk/bb-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bb-includes/functions.bb-core.php

    r2445 r2451  
    2525    global $bb_log;
    2626    $bb_log->notice( sprintf( __( 'Using deprecated bbPress %1$s - %2$s - replace with - %3$s' ), $type, $name, $replacement ) );
     27
     28    if ( $bb_log->level & BP_LOG_DEBUG && $bb_log->level & BP_LOG_NOTICE ) { // Only compute the location if we're going to log it.
     29        $backtrace = debug_backtrace();
     30
     31        $file = $backtrace[2]['file'];
     32
     33        if ( substr( $file, 0, strlen( BB_PATH ) - 1 ) == rtrim( BB_PATH, '\\/') )
     34            $file = substr( $file, strlen( BB_PATH ) );
     35
     36        $file = str_replace( '\\', '/', $file );
     37
     38        // 0 = this function, 1 = the deprecated function
     39        $bb_log->notice( '    ' . sprintf( __( 'on line %1$d of file %2$s' ), $backtrace[2]['line'], $file ) );
     40    }
    2741}
    2842
  • trunk/bb-includes/functions.bb-meta.php

    r2449 r2451  
    298298            break;
    299299        case 'version':
    300             return '1.1-alpha-2449'; // Don't filter
     300            return '1.1-alpha-2451'; // Don't filter
    301301            break;
    302302        case 'bb_db_version' :
Note: See TracChangeset for help on using the changeset viewer.