WordPress.org

Plugin Directory

Changeset 616038


Ignore:
Timestamp:
10/23/12 09:51:30 (18 months ago)
Author:
simonwheatley
Message:

Fixed some issues causing notices.

Location:
tweet-images/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tweet-images/trunk/readme.txt

    r616026 r616038  
    9595== Upgrade Notice == 
    9696 
     97= 1.1 = 
     98 
     99* BUGFIX: Fixed some issues causing PHP notices. 
     100 
    97101= 1.0 = 
    98102 
    99 Added $attachment_id to `wpti_published_post` action to make it easier for devs to do stuff on this hook. 
     103* Added $attachment_id to `wpti_published_post` action to make it easier for devs to do stuff on this hook. 
    100104 
    101105= 0.9 = 
    102106 
    103 Should reduce the load on your server a bit. 
     107* Should reduce the load on your server a bit. 
    104108 
    105109= 0.8 = 
    106110 
    107 Fixes posting from Tweetbot, thanks to Steve Bullen for identifying the issue and [providing a fix](https://twitter.com/stevenbullen/status/79161817829613568) 
     111* Fixes posting from Tweetbot, thanks to Steve Bullen for identifying the issue and [providing a fix](https://twitter.com/stevenbullen/status/79161817829613568) 
    108112 
    109113== Changelog == 
  • tweet-images/trunk/wp-twitpics.php

    r616026 r616038  
    154154    public function settings() { 
    155155        $vars = array(); 
    156         $vars[ 'api_endpoint' ] = site_url( "/tweetimage/1/{$profileuser->user_login}/{$profileuser->wpti_secret}/upload.xml" ); 
    157156        $vars[ 'options' ] = $this->get_all_options(); 
    158157        $this->render_admin( 'settings.php', $vars ); 
     
    170169        if ( ! $user->has_cap( 'publish_posts' ) ) 
    171170            return; 
    172         if ( empty( $profileuser->wpti_secret ) ) { 
    173             $profileuser->wpti_secret = md5( uniqid() ); 
    174             update_user_meta( $profileuser->ID, 'wpti_secret', $profileuser->wpti_secret ); 
     171        if ( empty( $user->wpti_secret ) ) { 
     172            $user->wpti_secret = md5( uniqid() ); 
     173            update_user_meta( $user->ID, 'wpti_secret', $user->wpti_secret ); 
    175174        } 
    176175 
    177176        $vars = array(); 
    178         $vars[ 'api_endpoint' ] = home_url( "/tweetimage/1/{$profileuser->user_login}/{$profileuser->wpti_secret}/upload.xml" ); 
    179         $vars[ 'allow_tweet_image' ] = get_user_meta( $profileuser->ID, 'wpti_allow_tweet_image', true ); 
     177        $vars[ 'api_endpoint' ] = home_url( "/tweetimage/1/{$user->user_login}/{$user->wpti_secret}/upload.xml" ); 
     178        $vars[ 'allow_tweet_image' ] = get_user_meta( $user->ID, 'wpti_allow_tweet_image', true ); 
    180179        $this->render_admin( 'user-profile.php', $vars ); 
    181180    } 
Note: See TracChangeset for help on using the changeset viewer.