WordPress.org

Plugin Directory

Changeset 1776767


Ignore:
Timestamp:
11/28/17 10:24:27 (8 weeks ago)
Author:
deliciousbrains
Message:

Deploy version 1.1.1

Location:
mergebot
Files:
344 added
8 edited

Legend:

Unmodified
Added
Removed
  • mergebot/trunk/README.md

    r1763013 r1776767  
    55**Tested up to:** 4.9   
    66**Requires PHP:** 5.3.0   
    7 **Stable tag:** 1.1.0   
     7**Stable tag:** 1.1.1   
    88**License:** GPLv3   
    99 
     
    4242## Changelog ## 
    4343 
     44### 1.1.1 - 2017-11-28 ### 
     45 
     46* Bug fix: Repeat requests to update site settings on mergebot.com 
     47* Bug fix: Duplicate database calls to check if tables exist 
     48 
    4449### 1.1.0 - 2017-11-10 ### 
    4550 
  • mergebot/trunk/includes/services/admin/plugin-installer.php

    r1667002 r1776767  
    3535     */ 
    3636    protected $table_versions; 
     37 
     38    /** 
     39     * @var array 
     40     */ 
     41    protected static $installed_tables = array(); 
    3742 
    3843    /** 
     
    326331     * 
    327332     * @param string $table 
    328      * 
    329      * @return bool 
    330      */ 
    331     public static function table_exists( $table ) { 
     333     * @param bool   $cache 
     334     * 
     335     * @return bool 
     336     */ 
     337    public static function table_exists( $table, $cache = true ) { 
     338        if ( $cache && isset( self::$installed_tables[ $table ] ) ) { 
     339            return true; 
     340        } 
     341 
    332342        global $wpdb; 
    333343 
    334344        $result = $wpdb->get_var( $wpdb->prepare( "SHOW TABLES LIKE '%s'", $table ) ); 
    335345 
    336         return ( $table === $result ); 
     346        $installed = ( $table === $result ); 
     347 
     348        if ( $cache ) { 
     349            self::$installed_tables[ $table ] = $installed; 
     350        } 
     351 
     352        return $installed; 
    337353    } 
    338354 
  • mergebot/trunk/includes/services/conflict-sender.php

    r1667002 r1776767  
    228228        } 
    229229 
    230         $exists = Plugin_Installer::table_exists( $table ); 
     230        $exists = Plugin_Installer::table_exists( $table, false ); 
    231231 
    232232        $this->tables[ $table ] = $exists; 
  • mergebot/trunk/includes/services/development/query-recorder.php

    r1725633 r1776767  
    7272        add_filter( 'mergebot_before_query', array( $this, 'query_listener' ), 9999 ); 
    7373    } 
    74      
     74 
    7575    /** 
    7676     * Listen to every WordPress query and attempt to record query 
     
    9292     */ 
    9393    public function maybe_record_query( SQL_Query $query ) { 
    94         if ( false ===( $query = $this->should_record_query( $query ) ) ) { 
     94        if ( false === ( $query = $this->should_record_query( $query ) ) ) { 
    9595            // Query should not be executed, abort execution. 
    9696            return false; 
     
    191191     */ 
    192192    protected function should_record_query( SQL_Query $query ) { 
    193         $sql  = $query->sql(); 
     193        $sql = $query->sql(); 
    194194 
    195195        if ( false === $query->valid_type() ) { 
     
    210210        } 
    211211 
    212         if ( $this->maybe_process_insert_with_multiple_values( $query) ) { 
     212        if ( $this->maybe_process_insert_with_multiple_values( $query ) ) { 
    213213            // INSERT query has multiple values, abort execution, we will execute as separate queries. 
    214214            return false; 
     
    262262 
    263263        $values = $query_data->get_insert_values(); 
    264         if ( 1 === count( $values )) { 
     264        if ( 1 === count( $values ) ) { 
    265265            // Only single VALUE - stripos false positive. 
    266266            return false; 
    267267        } 
    268268 
    269         unset( $query_data->parsed['VALUES']); 
     269        unset( $query_data->parsed['VALUES'] ); 
    270270 
    271271        global $wpdb; 
    272         foreach( $values as $value ) { 
     272        foreach ( $values as $value ) { 
    273273            // Clean up delimiter and base expression 
    274274            $value['delim']     = false; 
     
    431431     * Does the query table have a partial match in the ignored queries array. 
    432432     * 
    433      * @param array $ignored_queries 
     433     * @param array  $ignored_queries 
    434434     * @param string $table 
    435435     * 
     
    437437     */ 
    438438    protected function table_match( $ignored_queries, $table ) { 
    439         foreach( $ignored_queries as $ignored_table => $ignored_query ) { 
     439        foreach ( $ignored_queries as $ignored_table => $ignored_query ) { 
    440440            if ( Query_Helper::contains( $ignored_table, $table ) ) { 
    441441                return $ignored_table; 
  • mergebot/trunk/includes/services/site-synchronizer.php

    r1667002 r1776767  
    147147        $existing_value = $this->get_current_setting( $key); 
    148148 
    149         if ( false !== $existing_value && $existing_value === $new_value ) { 
     149        if ( false !== $existing_value && $existing_value == $new_value ) { 
    150150            // Existing value is still current. 
    151151            return false; 
  • mergebot/trunk/languages/mergebot-en.pot

    r1763013 r1776767  
    99"Project-Id-Version: mergebot\n" 
    1010"Report-Msgid-Bugs-To: nom@deliciousbrains.com\n" 
    11 "POT-Creation-Date: 2017-11-10 13:55+0000\n" 
    12 "PO-Revision-Date: 2017-11-10 13:55+UTC\n" 
     11"POT-Creation-Date: 2017-11-28 10:21+0000\n" 
     12"PO-Revision-Date: 2017-11-28 10:21+UTC\n" 
    1313"Last-Translator: Delicious Brains <nom@deliciousbrains.com>\n" 
    1414"Language-Team: English <LL@li.org>\n" 
     
    279279msgstr "" 
    280280 
    281 #: includes/services/admin/plugin-installer.php:133 
     281#: includes/services/admin/plugin-installer.php:138 
    282282msgid "Update" 
    283283msgstr "" 
    284284 
    285 #: includes/services/admin/plugin-installer.php:138 
     285#: includes/services/admin/plugin-installer.php:143 
    286286#, php-format 
    287287msgid "%s Update Required" 
    288288msgstr "" 
    289289 
    290 #: includes/services/admin/plugin-installer.php:139 
     290#: includes/services/admin/plugin-installer.php:144 
    291291#, php-format 
    292292msgid "The API has changed and requires version %s of the plugin." 
  • mergebot/trunk/mergebot.php

    r1763013 r1776767  
    55Description: WordPress database merging made easy 
    66Author: Delicious Brains 
    7 Version: 1.1.0 
     7Version: 1.1.1 
    88Author URI: http://deliciousbrains.com/ 
    99Network: True 
     
    4040    // Namespaced class name as variable so it can be parsed in < PHP 5.3 
    4141    $class   = 'DeliciousBrains\\Mergebot\\Mergebot'; 
    42     $version = '1.1.0'; 
     42    $version = '1.1.1'; 
    4343 
    4444    return call_user_func( array( $class, 'get_instance' ), __FILE__, $version ); 
  • mergebot/trunk/readme.txt

    r1763013 r1776767  
    55Tested up to: 4.9 
    66Requires PHP: 5.3.0 
    7 Stable tag: 1.1.0 
     7Stable tag: 1.1.1 
    88License: GPLv3 
    99 
     
    4242== Changelog == 
    4343 
     44= 1.1.1 - 2017-11-28 = 
     45 
     46* Bug fix: Repeat requests to update site settings on mergebot.com 
     47* Bug fix: Duplicate database calls to check if tables exist 
     48 
    4449= 1.1.0 - 2017-11-10 = 
    4550 
Note: See TracChangeset for help on using the changeset viewer.