Plugin Directory

Changeset 1268935


Ignore:
Timestamp:
10/19/2015 09:16:29 PM (10 years ago)
Author:
DobsonDev
Message:

Tagging version 1.1.10. Fixed a bug with the GitHub File Contents Shortcode.

Location:
dobsondev-shortcodes
Files:
3 edited
7 copied

Legend:

Unmodified
Added
Removed
  • dobsondev-shortcodes/tags/1.1.10/changelog.txt

    r1265965 r1268935  
    99Bug Fixes
    1010
     11* Fixed a bug where the GitHub File Contents shortcode didn't work. When changing from version 1.1.8 to 1.1.9 the API call was mistakenly switched to the README file but this has now been fixed. Thanks to [Igor Pečovnik](https://github.com/igorpecovnik) for finding the error and letting me know. (1.1.10)
    1112* Found a bug where the GitHub Readme and GitHub File Contents shortcodes would not return anything because cURL was unable to verify the certificate provided by the server. This can now be avoided using the insecure="true" attribute on the shortcode. Thanks to [JacobD10](https://profiles.wordpress.org/jacobd10/) for finding the error. (1.1.9)
    1213* More substantial error handling has been added to both the GitHub Readme and GitHub File Contents shortcodes which should help users identify what kind of cURL error they are getting. (1.1.9)
  • dobsondev-shortcodes/tags/1.1.10/dobsondev-shortcodes.php

    r1265965 r1268935  
    44 * Plugin URI: http://dobsondev.com/portfolio/dobsondev-shortcodes/
    55 * Description: A collection of helpful shortcodes.
    6  * Version: 1.1.9
     6 * Version: 1.1.10
    77 * Author: Alex Dobson
    88 * Author URI: http://dobsondev.com/
     
    136136      $parsedown = new Parsedown();
    137137      $output_readme = $parsedown->text(base64_decode($response_array->content));
    138       if ( $cache_id !== "NULL" ) {
     138      if ( $cache_id !== "NULL" || !empty( $cache_id ) ) {
    139139        // set the transient so we can use it later for faster loading times
    140140        set_transient(  'ddghr-' . md5( $owner . $repo . $cache_id ), $output_readme, DAY_IN_SECONDS );
     
    170170        curl_setopt_array($curl, array(
    171171          CURLOPT_RETURNTRANSFER => 1,
    172           CURLOPT_URL => 'https://api.github.com/repos/' . $owner . '/' . $repo . '/readme',
     172          CURLOPT_URL => 'https://api.github.com/repos/' . $owner . '/' . $repo . '/contents/' . $path,
    173173          CURLOPT_USERAGENT => $repo,
    174174          CURLOPT_HEADER => false,
     
    179179        curl_setopt_array($curl, array(
    180180          CURLOPT_RETURNTRANSFER => 1,
    181           CURLOPT_URL => 'https://api.github.com/repos/' . $owner . '/' . $repo . '/readme',
     181          CURLOPT_URL => 'https://api.github.com/repos/' . $owner . '/' . $repo . '/contents/' . $path,
    182182          CURLOPT_USERAGENT => $repo,
    183183          CURLOPT_HEADER => false
     
    197197        $parsedown = new Parsedown();
    198198        $output_md_file = $parsedown->text(base64_decode($response_array->content));
    199         if ( $cache_id !== "NULL" ) {
     199        if ( $cache_id !== "NULL" || !empty( $cache_id ) ) {
    200200          // set the transient if the cache_id is set so we can use it later for faster loading time
    201201          set_transient(  'ddghf-' . md5( $owner . $repo . $path . $cache_id ), $output_md_file, DAY_IN_SECONDS );
    202202        }
     203        var_dump("DID NOT get Transient");
    203204        return $output_md_file;
    204205      } else {
    205206        $output_file = nl2br(base64_decode($response_array->content));
    206         if ( $cache_id !== "NULL" ) {
     207        if ( $cache_id !== "NULL" || !empty( $cache_id ) ) {
    207208          // set the transient if the cache_id is set so we can use it later for faster loading time
    208209          set_transient( 'ddghf-' . md5( $owner . $repo . $path . $cache_id ), $output_file, DAY_IN_SECONDS );
  • dobsondev-shortcodes/tags/1.1.10/readme.txt

    r1265965 r1268935  
    77Requires at least: 2.5
    88Tested up to: 4.3
    9 Stable tag: 1.1.9
     9Stable tag: 1.1.10
    1010
    1111Add a collection of helpful shortcodes to your site.
     
    165165Bug Fixes
    166166
     167* Fixed a bug where the GitHub File Contents shortcode didn't work. When changing from version 1.1.8 to 1.1.9 the API call was mistakenly switched to the README file but this has now been fixed. Thanks to [Igor Pečovnik](https://github.com/igorpecovnik) for finding the error and letting me know. (1.1.10)
    167168* Found a bug where the GitHub Readme and GitHub File Contents shortcodes would not return anything because cURL was unable to verify the certificate provided by the server. This can now be avoided using the insecure="true" attribute on the shortcode. Thanks to [JacobD10](https://profiles.wordpress.org/jacobd10/) for finding the error. (1.1.9)
    168169* More substantial error handling has been added to both the GitHub Readme and GitHub File Contents shortcodes which should help users identify what kind of cURL error they are getting. (1.1.9)
  • dobsondev-shortcodes/trunk/changelog.txt

    r1265965 r1268935  
    99Bug Fixes
    1010
     11* Fixed a bug where the GitHub File Contents shortcode didn't work. When changing from version 1.1.8 to 1.1.9 the API call was mistakenly switched to the README file but this has now been fixed. Thanks to [Igor Pečovnik](https://github.com/igorpecovnik) for finding the error and letting me know. (1.1.10)
    1112* Found a bug where the GitHub Readme and GitHub File Contents shortcodes would not return anything because cURL was unable to verify the certificate provided by the server. This can now be avoided using the insecure="true" attribute on the shortcode. Thanks to [JacobD10](https://profiles.wordpress.org/jacobd10/) for finding the error. (1.1.9)
    1213* More substantial error handling has been added to both the GitHub Readme and GitHub File Contents shortcodes which should help users identify what kind of cURL error they are getting. (1.1.9)
  • dobsondev-shortcodes/trunk/dobsondev-shortcodes.php

    r1265965 r1268935  
    44 * Plugin URI: http://dobsondev.com/portfolio/dobsondev-shortcodes/
    55 * Description: A collection of helpful shortcodes.
    6  * Version: 1.1.9
     6 * Version: 1.1.10
    77 * Author: Alex Dobson
    88 * Author URI: http://dobsondev.com/
     
    136136      $parsedown = new Parsedown();
    137137      $output_readme = $parsedown->text(base64_decode($response_array->content));
    138       if ( $cache_id !== "NULL" ) {
     138      if ( $cache_id !== "NULL" || !empty( $cache_id ) ) {
    139139        // set the transient so we can use it later for faster loading times
    140140        set_transient(  'ddghr-' . md5( $owner . $repo . $cache_id ), $output_readme, DAY_IN_SECONDS );
     
    170170        curl_setopt_array($curl, array(
    171171          CURLOPT_RETURNTRANSFER => 1,
    172           CURLOPT_URL => 'https://api.github.com/repos/' . $owner . '/' . $repo . '/readme',
     172          CURLOPT_URL => 'https://api.github.com/repos/' . $owner . '/' . $repo . '/contents/' . $path,
    173173          CURLOPT_USERAGENT => $repo,
    174174          CURLOPT_HEADER => false,
     
    179179        curl_setopt_array($curl, array(
    180180          CURLOPT_RETURNTRANSFER => 1,
    181           CURLOPT_URL => 'https://api.github.com/repos/' . $owner . '/' . $repo . '/readme',
     181          CURLOPT_URL => 'https://api.github.com/repos/' . $owner . '/' . $repo . '/contents/' . $path,
    182182          CURLOPT_USERAGENT => $repo,
    183183          CURLOPT_HEADER => false
     
    197197        $parsedown = new Parsedown();
    198198        $output_md_file = $parsedown->text(base64_decode($response_array->content));
    199         if ( $cache_id !== "NULL" ) {
     199        if ( $cache_id !== "NULL" || !empty( $cache_id ) ) {
    200200          // set the transient if the cache_id is set so we can use it later for faster loading time
    201201          set_transient(  'ddghf-' . md5( $owner . $repo . $path . $cache_id ), $output_md_file, DAY_IN_SECONDS );
    202202        }
     203        var_dump("DID NOT get Transient");
    203204        return $output_md_file;
    204205      } else {
    205206        $output_file = nl2br(base64_decode($response_array->content));
    206         if ( $cache_id !== "NULL" ) {
     207        if ( $cache_id !== "NULL" || !empty( $cache_id ) ) {
    207208          // set the transient if the cache_id is set so we can use it later for faster loading time
    208209          set_transient( 'ddghf-' . md5( $owner . $repo . $path . $cache_id ), $output_file, DAY_IN_SECONDS );
  • dobsondev-shortcodes/trunk/readme.txt

    r1265965 r1268935  
    77Requires at least: 2.5
    88Tested up to: 4.3
    9 Stable tag: 1.1.9
     9Stable tag: 1.1.10
    1010
    1111Add a collection of helpful shortcodes to your site.
     
    165165Bug Fixes
    166166
     167* Fixed a bug where the GitHub File Contents shortcode didn't work. When changing from version 1.1.8 to 1.1.9 the API call was mistakenly switched to the README file but this has now been fixed. Thanks to [Igor Pečovnik](https://github.com/igorpecovnik) for finding the error and letting me know. (1.1.10)
    167168* Found a bug where the GitHub Readme and GitHub File Contents shortcodes would not return anything because cURL was unable to verify the certificate provided by the server. This can now be avoided using the insecure="true" attribute on the shortcode. Thanks to [JacobD10](https://profiles.wordpress.org/jacobd10/) for finding the error. (1.1.9)
    168169* More substantial error handling has been added to both the GitHub Readme and GitHub File Contents shortcodes which should help users identify what kind of cURL error they are getting. (1.1.9)
Note: See TracChangeset for help on using the changeset viewer.