Make WordPress Core


Ignore:
Timestamp:
07/12/2013 02:01:39 PM (13 years ago)
Author:
markjaquith
Message:

Revisions: Cleanup, bug fixes, refactoring, polish.

  • Hide the tooltip initially.
  • Fix a bug with routing.
  • Further separate the Slider model and view, refactoring its code.
  • More reliance on events than direct calls between areas.
  • Smarter background diff loading (single mode). Loads the diffs closest to your position first.
  • Removed a bunch of manual templating and render() methods. Now relies more on the WP Backbone Views functionality.
  • include the requested id in ensure:load.
  • new trigger: ensure, for ensure() attempts, regardless of whether they are already loaded.
  • pass along a promise in both ensure and ensure:load.
  • in ensure, remove requests for diffs we aready have

See #24425.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/revision.php

    r24670 r24671  
    100100
    101101        // Now, grab the initial diff
    102         $compare_two_mode = (bool) $from;
    103         if ( ! $from ) // Single mode
     102        $compare_two_mode = is_numeric( $from );
     103        if ( ! $compare_two_mode ) {
    104104                $from = array_keys( array_slice( $revisions, array_search( $selected_revision_id, array_keys( $revisions ) ) - 1, 1, true ) );
    105105                $from = $from[0];
     106        }
     107
     108        $from = absint( $from );
    106109
    107110        $diffs = array( array(
Note: See TracChangeset for help on using the changeset viewer.