Plugin Directory

Changeset 334054


Ignore:
Timestamp:
01/18/2011 11:01:56 AM (15 years ago)
Author:
hameedkhan
Message:

fixed bug that was caused by making get_short_url public

Location:
wp-googl/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-googl/trunk/readme.txt

    r333634 r334054  
    2222== Changelog ==
    2323
     24= 1.2 =
     25Fixed minor bug that was causing plugin to fail.
     26
    2427= 1.1 =
    2528Fixed readme.txt file formatting.
  • wp-googl/trunk/wpgoogl.php

    r333634 r334054  
    66Author: Hameedullah Khan
    77Author URI: http://hameedullah.com
    8 Version: 1.1
     8Version: 1.2
    99*/
    1010
     
    1313
    1414    // authentication URLs
    15     private $google_auth_url = 'https://www.google.com/accounts/AuthSubRequest';
    16     private $google_session_url = 'https://www.google.com/accounts/AuthSubSessionToken';
    17     private $google_revoke_url = 'https://www.google.com/accounts/AuthSubRevokeToken';
     15    const GOOGLE_AUTH_URL = 'https://www.google.com/accounts/AuthSubRequest';
     16    const google_session_URL = 'https://www.google.com/accounts/AuthSubSessionToken';
     17    const GOOGLE_REVOKE_URL = 'https://www.google.com/accounts/AuthSubRevokeToken';
    1818
    1919    // Googl URL Shortener API URLs
    20     private $googl_scope_url = 'https://www.googleapis.com/auth/urlshortener';
    21     private $googl_api_url = 'https://www.googleapis.com/urlshortener/v1/url';
     20    const GOOGL_SCOPE_URL = 'https://www.googleapis.com/auth/urlshortener';
     21    const GOOGL_API_URL = 'https://www.googleapis.com/urlshortener/v1/url';
    2222
    2323    function WPGoogl() {
     
    6060
    6161            $http = new WP_Http();
    62             $result = $http->request( $this->googl_api_url, $params );
     62            $result = $http->request( self::GOOGL_API_URL, $params );
    6363            $result = json_decode( $result[ 'body' ] );
    6464
     
    9090        $params = array( 'method' => 'GET', 'body' => $body, 'headers' => $headers );
    9191            $http = new WP_Http();
    92             $result = $http->request( $this->google_revoke_url, $params );
     92            $result = $http->request( self::GOOGLE_REVOKE_URL, $params );
    9393        delete_option( 'wpgoogl_token' );
    9494    }
     
    136136                // lets get the session token
    137137                    $http = new WP_Http();
    138                     $result = $http->request( $this->google_session_url, $params );
     138                    $result = $http->request( self::GOOGLE_SESSION_URL, $params );
    139139
    140140                $matches = array();
     
    150150                    array(
    151151                        'next' => $this->settings_url(),
    152                         'scope' => $this->googl_scope_url,
     152                        'scope' => self::GOOGL_SCOPE_URL,
    153153                        'session' => 1
    154154                    )
    155155                );
    156                 $google_auth_url = $this->google_auth_url . '?' . $query_str;
     156                $google_auth_url = self::GOOGLE_AUTH_URL . '?' . $query_str;
    157157            }
    158158        }
Note: See TracChangeset for help on using the changeset viewer.