Plugin Directory

Changeset 1559531


Ignore:
Timestamp:
12/22/2016 06:23:49 AM (9 years ago)
Author:
newsplugin.com
Message:

No new version yet, but not forget: we should refresh system info on api key change (especially the change from no key to some key).

Location:
newsplugin/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • newsplugin/trunk/news-plugin-utils.php

    r1509091 r1559531  
    240240        $system_info = array(
    241241            'info_version' => self::get_system_info_version(),
     242            'api_key'      => get_option( 'news_plugin_api_key' ), /* We need to refresh on api key change ... */
    242243            'wordpress_env' => array(
    243244                'siteurl'               => get_bloginfo('url'),
  • newsplugin/trunk/news-plugin.php

    r1530579 r1559531  
    5252        register_deactivation_hook(__FILE__, array($this, 'userSystemCheck_deactivation' ));
    5353        $usc = get_option('newsPlugin_system_info');
    54         if(!$usc || !isset($usc['info_version']) || ($usc['info_version'] < News_Plugin_Utils::get_system_info_version())) {
     54        $api_key = get_option( 'news_plugin_api_key' ) ;
     55        if(!$usc ||
     56                !isset($usc['info_version']) || ($usc['info_version'] < News_Plugin_Utils::get_system_info_version()) ||
     57                !isset($usc['api_key']) || ($usc['api_key'] != $api_key)
     58          ) {
    5559            update_option( 'newsPlugin_system_info', News_Plugin_Utils::get_system_info());
    5660        }
  • newsplugin/trunk/readme.txt

    r1530579 r1559531  
    7373== Changelog ==
    7474
     75* Refresh system info after filling in api key
     76
    7577= 1.0.10 =
    7678Release Date: November 8, 2016
Note: See TracChangeset for help on using the changeset viewer.