Plugin Directory

Changeset 1603693


Ignore:
Timestamp:
02/26/2017 02:36:19 AM (9 years ago)
Author:
raynfall
Message:

Fixes issues with the sales links

Location:
author-showcase
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • author-showcase/tags/1.3/author_showcase.php

    r1596206 r1603693  
    22/**
    33 * @package Author_Showcase
    4  * @version 1.3
     4 * @version 1.3.2
    55 */
    66/*
     
    99Description: The Author Showcase is an all-in-one plugin for displaying an author's books on their site in a variety of convenient formats, using shortcodes or widgets.
    1010Author: Claire Ryan
    11 Version: 1.3
     11Version: 1.3.2
    1212Author URI: http://raynfall.com/
    1313License: GPL v.2
     
    303303        dbDelta($sql);
    304304    }
    305     add_option( 'buybook_db_version', '1.3' );
     305    add_option( 'buybook_db_version', '1.3.2' );
    306306}
    307307
  • author-showcase/tags/1.3/btbe_add.php

    r1596206 r1603693  
    1414    }
    1515    else {
     16        if(isset($_REQUEST['cover'])) {
     17            $spliturl = parse_url(esc_url($_REQUEST['cover']));
     18            $path = $spliturl['path'];
     19        }
     20        else {
     21            $path = '';
     22        }
    1623        $book = array(
    1724            'created' => date('Y-m-d H:i:s', time()),
     
    2330            'series_num' => isset($_REQUEST['series_num']) ? esc_attr(@$_REQUEST['series_num']) : '',
    2431            'blurb' => isset($_REQUEST['blurb']) ? esc_textarea(@$_REQUEST['blurb']) : '',
    25             'cover' => isset($_REQUEST['cover']) ? esc_url(@$_REQUEST['cover']) : '',
     32            'cover' => $path,
    2633            'asin' => isset($_REQUEST['asin']) ? esc_attr(@$_REQUEST['asin']) : '',
    2734            'isbn' => isset($_REQUEST['isbn']) ? esc_attr(@$_REQUEST['isbn']) : '',
     
    3138
    3239        $services = array();
    33 
     40       
    3441        foreach ($_REQUEST as $idx => $r) {
    3542            if(strpos($idx, 'sername') !== false) {
    3643                $int = filter_var($idx, FILTER_SANITIZE_NUMBER_INT);
    37                 $services[$int]['name'] = stripslashes($r);
    38             }
    39             if(strpos($idx, 'sericon') !== false) {
    40                 $int = filter_var($idx, FILTER_SANITIZE_NUMBER_INT);
    41                 $services[$int]['icon'] = $r;
    42             }
    43             if(strpos($idx, 'serlink') !== false) {
    44                 $int = filter_var($idx, FILTER_SANITIZE_NUMBER_INT);
    45                 $services[$int]['link'] = $r;
     44                $name = isset($_REQUEST['sername'.$int]) ? esc_attr(@$_REQUEST['sername'.$int]) : '';
     45                $icon = isset($_REQUEST['sericon'.$int]) ? esc_attr(@$_REQUEST['sericon'.$int]) : '';
     46                $link = isset($_REQUEST['serlink'.$int]) ? esc_url(@$_REQUEST['serlink'.$int]) : '';
     47                $services[] = array(
     48                    'name' => $name,
     49                    'icon' => $icon,
     50                    'link' => $link
     51                );
    4652            }
    4753        }
     
    6167    $record = $wpdb->get_row("SELECT * FROM {$wpdb->prefix}buybooks WHERE id = '".esc_sql($_REQUEST['btbe_id'])."'", ARRAY_A);
    6268    if(!$record) { echo 'Book not found!'; exit; }
    63     $_REQUEST = array_merge($_REQUEST, $record);
     69    $_REQUEST = array_merge($_REQUEST, $record);   
    6470    $services = json_decode($record['services'], true);
    6571}
     
    244250            </td>
    245251        </tr>
    246         <tr valign="top"><th scope="row">Selling Links<br /><small>(Click add to create more)</small></th>
    247             <td>
     252        <tr valign="top"><th scope="row">Selling Links<br /><small>(Click add to create more)</small></th></tr>
     253        <tr>
     254            <td colspan="2">
    248255              <table id="btbe_services_table" class="btbe_services">
    249256                <tr>
  • author-showcase/tags/1.3/readme.txt

    r1596206 r1603693  
    55Requires at least: 4.0
    66Tested up to: 4.5
    7 Stable tag: 1.3
     7Stable tag: 1.3.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5151== Changelog ==
    5252
     53= 1.3.2 =
     54* Fixed a bug which caused sales links to be improperly loaded, added and deleted
     55
     56= 1.3.1 =
     57* Fixed an issue with absolute URLs being saved for icons and covers; images now save relative URLs
     58
    5359= 1.3 =
    5460* Added a new 'links_only' mode to the display shortcode in order to display a set of text buy links
  • author-showcase/trunk/author_showcase.php

    r1597775 r1603693  
    22/**
    33 * @package Author_Showcase
    4  * @version 1.3.1
     4 * @version 1.3.2
    55 */
    66/*
     
    99Description: The Author Showcase is an all-in-one plugin for displaying an author's books on their site in a variety of convenient formats, using shortcodes or widgets.
    1010Author: Claire Ryan
    11 Version: 1.3.1
     11Version: 1.3.2
    1212Author URI: http://raynfall.com/
    1313License: GPL v.2
     
    303303        dbDelta($sql);
    304304    }
    305     add_option( 'buybook_db_version', '1.3.1' );
     305    add_option( 'buybook_db_version', '1.3.2' );
    306306}
    307307
  • author-showcase/trunk/btbe_add.php

    r1597775 r1603693  
    3838
    3939        $services = array();
    40 
     40       
    4141        foreach ($_REQUEST as $idx => $r) {
    4242            if(strpos($idx, 'sername') !== false) {
    4343                $int = filter_var($idx, FILTER_SANITIZE_NUMBER_INT);
    44                 $services[$int]['name'] = stripslashes($r);
    45             }
    46             if(strpos($idx, 'sericon') !== false) {
    47                 $int = filter_var($idx, FILTER_SANITIZE_NUMBER_INT);
    48                 $spliturl = parse_url($r);
    49                 $services[$int]['icon'] = $spliturl['path'];
    50             }
    51             if(strpos($idx, 'serlink') !== false) {
    52                 $int = filter_var($idx, FILTER_SANITIZE_NUMBER_INT);
    53                 $services[$int]['link'] = $r;
     44                $name = isset($_REQUEST['sername'.$int]) ? esc_attr(@$_REQUEST['sername'.$int]) : '';
     45                $icon = isset($_REQUEST['sericon'.$int]) ? esc_attr(@$_REQUEST['sericon'.$int]) : '';
     46                $link = isset($_REQUEST['serlink'.$int]) ? esc_url(@$_REQUEST['serlink'.$int]) : '';
     47                $services[] = array(
     48                    'name' => $name,
     49                    'icon' => $icon,
     50                    'link' => $link
     51                );
    5452            }
    5553        }
     
    6967    $record = $wpdb->get_row("SELECT * FROM {$wpdb->prefix}buybooks WHERE id = '".esc_sql($_REQUEST['btbe_id'])."'", ARRAY_A);
    7068    if(!$record) { echo 'Book not found!'; exit; }
    71     $_REQUEST = array_merge($_REQUEST, $record);
     69    $_REQUEST = array_merge($_REQUEST, $record);   
    7270    $services = json_decode($record['services'], true);
    7371}
     
    252250            </td>
    253251        </tr>
    254         <tr valign="top"><th scope="row">Selling Links<br /><small>(Click add to create more)</small></th>
    255             <td>
     252        <tr valign="top"><th scope="row">Selling Links<br /><small>(Click add to create more)</small></th></tr>
     253        <tr>
     254            <td colspan="2">
    256255              <table id="btbe_services_table" class="btbe_services">
    257256                <tr>
  • author-showcase/trunk/readme.txt

    r1597775 r1603693  
    55Requires at least: 4.0
    66Tested up to: 4.5
    7 Stable tag: 1.3.1
     7Stable tag: 1.3.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5151== Changelog ==
    5252
     53= 1.3.2 =
     54* Fixed a bug which caused sales links to be improperly loaded, added and deleted
     55
    5356= 1.3.1 =
    5457* Fixed an issue with absolute URLs being saved for icons and covers; images now save relative URLs
Note: See TracChangeset for help on using the changeset viewer.