~canonical-sysadmins/wordpress/4.8

« back to all changes in this revision

Viewing changes to wp-admin/includes/class-wp-upgrader.php

  • Committer: Haw Loeung
  • Date: 2016-12-13 06:56:21 UTC
  • mfrom: (1.1.20 upstream)
  • Revision ID: haw.loeung@canonical.com-20161213065621-8tcu7u7vlxgs2s81
Merge WP4.7 from upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
833
833
         * @param string $lock_name       The name of this unique lock.
834
834
         * @param int    $release_timeout Optional. The duration in seconds to respect an existing lock.
835
835
         *                                Default: 1 hour.
836
 
         * @return bool False if a lock couldn't be created or if the lock is no longer valid. True otherwise.
 
836
         * @return bool False if a lock couldn't be created or if the lock is still valid. True otherwise.
837
837
         */
838
838
        public static function create_lock( $lock_name, $release_timeout = null ) {
839
839
                global $wpdb;
853
853
                                return false;
854
854
                        }
855
855
 
856
 
                        // Check to see if the lock is still valid. If not, bail.
 
856
                        // Check to see if the lock is still valid. If it is, bail.
857
857
                        if ( $lock_result > ( time() - $release_timeout ) ) {
858
858
                                return false;
859
859
                        }