Plugin Directory

Changeset 2777043


Ignore:
Timestamp:
08/29/2022 08:27:09 AM (4 years ago)
Author:
allanjardine
Message:

Fix for api key which was reusing a variable

Location:
cloudtables/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cloudtables/trunk/cloudtables.php

    r2776279 r2777043  
    77 * Requires PHP: 5.4
    88 * Author: SpryMedia Ltd
    9  * Version: 1.2.0
     9 * Version: 1.2.1
    1010 * License: GPLv2 or later
    1111 */
     
    424424     * Get a CloudTables API instance
    425425     */
    426     private function _api_inst($apikey = null) {
     426    private function _api_inst($apikeyAttr = null) {
    427427        $options = get_option( 'cloudtables_option_name' );
    428428        $subdomain = isset($options['subdomain'])
     
    455455        }
    456456
    457         if ($apikey === null) {
    458             if (current_user_can( 'edit_posts' )) {
    459                 $active_key = isset($options['apikey_editor'])
    460                     ? $options['apikey_editor']
    461                     : '';
    462             }
    463             else {
    464                 $active_key = isset($options['apikey'])
    465                     ? $options['apikey']
    466                     : '';
    467             }
     457        if (! $apikeyAttr) {
     458            $active_key = current_user_can( 'edit_posts' )
     459                ? $apikey_editor
     460                : $apikey;
    468461        }
    469462        else {
    470             $active_key = $apikey;
     463            $active_key = $apikeyAttr;
    471464        }
    472465
  • cloudtables/trunk/package.json

    r2776279 r2777043  
    11{
    22  "name": "cloudtables-wordpress",
    3   "version": "1.2.0",
     3  "version": "1.2.1",
    44  "description": "CloudTables easy integration plug-in for WordPress",
    55  "main": "block.js",
  • cloudtables/trunk/readme.txt

    r2776279 r2777043  
    33Requires at least: 5.0
    44Tested up to: 6.0
    5 Stable tag: 1.2.0
     5Stable tag: 1.2.1
    66Requires PHP: 5.5.0
    77License: GPLv2 or later
Note: See TracChangeset for help on using the changeset viewer.