Plugin Directory

Changeset 401798


Ignore:
Timestamp:
06/27/2011 06:47:23 PM (15 years ago)
Author:
roggie
Message:

3.96.3 fixed bug: validation of photo filename failed if no filename supplied

Location:
sfce-create-event
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • sfce-create-event/tags/3.96.3/readme.txt

    r401168 r401798  
    66Requires at least: 2.7
    77Tested up to: 3.1.3
    8 Stable tag:3.96.2
     8Stable tag:3.96.3
    99
    1010Create Facebook events automatically when you create Wordpress posts. This plugin requires the Simple Facebook Connect plugin by Otto.
  • sfce-create-event/tags/3.96.3/sfce-create-event.php

    r401168 r401798  
    22/*
    33Plugin Name: SFCe - Create Event
    4 Version: 3.96.2
     4Version: 3.96.3
    55Author: Roger Howorth
    66Author URI: http://www.thehypervisor.com
     
    9292        if ( substr($args['photo'],0,4) == 'http' ) wp_die(_e('The path to your photo cannot begin with \'http\'. The photo must be stored on your Wordpress server, and the path must be in the local file system - e.g. /var/www/wordpress/photo.jpg. Your post has been saved but no event created. Press the browser\'s back button to go back and edit your post', 'sfce-create-event'));
    9393
    94         if (!file_exists($args['photo'])) wp_die(_e('The path to your event image does not point to a valid file. Please check your path and try again. Your post has been saved but no event created. Press the browser\'s back button to go back and edit your post.', 'sfce-create-event'));
     94        if ( $_POST['sfce_event_photo'] <> '' ) {
     95            if (!file_exists($args['photo'])) wp_die(_e('The path to your event image does not point to a valid file. Please check your path and try again. Your post has been saved but no event created. Press the browser\'s back button to go back and edit your post.', 'sfce-create-event'));
    9596
    96         $pic_dims = getimagesize( $args['photo'] );
    97         if ( $pic_dims[0] < 100 || $pic_dims[1] < 100 ) wp_die(_e('Your event image is too small. Facebook requires event images to be at least 100 pixels wide and 100 pixels tall. Please remove the current image from your event parameters and try again. You post has been saved but no event created. Press the browser\'s back button to go back and edit your post', 'sfce-create-event'));
     97            $pic_dims = getimagesize( $args['photo'] );
     98            if ( $pic_dims[0] < 100 || $pic_dims[1] < 100 ) wp_die(_e('Your event image is too small. Facebook requires event images to be at least 100 pixels wide and 100 pixels tall. Please remove the current image from your event parameters and try again. You post has been saved but no event created. Press the browser\'s back button to go back and edit your post', 'sfce-create-event'));
     99        }
    98100
    99101        try{
  • sfce-create-event/tags/3.96.3/sfce_create_event_post.php

    r401168 r401798  
    221221        }
    222222
    223         if ( substr($_POST['sfce_event_photo'],0,4) == 'http' ) wp_die(_e('The path to your photo cannot begin with \'http\'. The photo must be stored on your Wordpress server, and the path must be in the local file system - e.g. /var/www/wordpress/photo.jpg. Your post has been saved but no event created. Press the browser\'s back button to go back and edit your post', 'sfce-create-event'));
    224 
    225         if (!file_exists($_POST['sfce_event_photo'])) wp_die(_e('The path to your event image does not point to a valid file. Please check your path and try again. Your post has been saved but no event created. Press the browser\'s back button to go back and edit your post.', 'sfce-create-event'));
    226 
    227 
    228         $pic_dims = getimagesize( $_POST['sfce_event_photo'] );
    229         if ( $pic_dims[0] < 100 || $pic_dims[1] < 100 ) wp_die(_e('Your event image is too small. Facebook requires event images to be at least 100 pixels wide and 100 pixels tall. Please remove the current image from your event parameters and try again. You post has been saved but no event created. Press the browser\'s back button to go back and edit your post', 'sfce-create-event'));
    230223
    231224        foreach ( $sfce_text_inputs as $input )
  • sfce-create-event/trunk/readme.txt

    r401168 r401798  
    66Requires at least: 2.7
    77Tested up to: 3.1.3
    8 Stable tag:3.96.2
     8Stable tag:3.96.3
    99
    1010Create Facebook events automatically when you create Wordpress posts. This plugin requires the Simple Facebook Connect plugin by Otto.
  • sfce-create-event/trunk/sfce-create-event.php

    r401168 r401798  
    22/*
    33Plugin Name: SFCe - Create Event
    4 Version: 3.96.2
     4Version: 3.96.3
    55Author: Roger Howorth
    66Author URI: http://www.thehypervisor.com
     
    9292        if ( substr($args['photo'],0,4) == 'http' ) wp_die(_e('The path to your photo cannot begin with \'http\'. The photo must be stored on your Wordpress server, and the path must be in the local file system - e.g. /var/www/wordpress/photo.jpg. Your post has been saved but no event created. Press the browser\'s back button to go back and edit your post', 'sfce-create-event'));
    9393
    94         if (!file_exists($args['photo'])) wp_die(_e('The path to your event image does not point to a valid file. Please check your path and try again. Your post has been saved but no event created. Press the browser\'s back button to go back and edit your post.', 'sfce-create-event'));
     94        if ( $_POST['sfce_event_photo'] <> '' ) {
     95            if (!file_exists($args['photo'])) wp_die(_e('The path to your event image does not point to a valid file. Please check your path and try again. Your post has been saved but no event created. Press the browser\'s back button to go back and edit your post.', 'sfce-create-event'));
    9596
    96         $pic_dims = getimagesize( $args['photo'] );
    97         if ( $pic_dims[0] < 100 || $pic_dims[1] < 100 ) wp_die(_e('Your event image is too small. Facebook requires event images to be at least 100 pixels wide and 100 pixels tall. Please remove the current image from your event parameters and try again. You post has been saved but no event created. Press the browser\'s back button to go back and edit your post', 'sfce-create-event'));
     97            $pic_dims = getimagesize( $args['photo'] );
     98            if ( $pic_dims[0] < 100 || $pic_dims[1] < 100 ) wp_die(_e('Your event image is too small. Facebook requires event images to be at least 100 pixels wide and 100 pixels tall. Please remove the current image from your event parameters and try again. You post has been saved but no event created. Press the browser\'s back button to go back and edit your post', 'sfce-create-event'));
     99        }
    98100
    99101        try{
  • sfce-create-event/trunk/sfce_create_event_post.php

    r401168 r401798  
    221221        }
    222222
    223         if ( substr($_POST['sfce_event_photo'],0,4) == 'http' ) wp_die(_e('The path to your photo cannot begin with \'http\'. The photo must be stored on your Wordpress server, and the path must be in the local file system - e.g. /var/www/wordpress/photo.jpg. Your post has been saved but no event created. Press the browser\'s back button to go back and edit your post', 'sfce-create-event'));
    224 
    225         if (!file_exists($_POST['sfce_event_photo'])) wp_die(_e('The path to your event image does not point to a valid file. Please check your path and try again. Your post has been saved but no event created. Press the browser\'s back button to go back and edit your post.', 'sfce-create-event'));
    226 
    227 
    228         $pic_dims = getimagesize( $_POST['sfce_event_photo'] );
    229         if ( $pic_dims[0] < 100 || $pic_dims[1] < 100 ) wp_die(_e('Your event image is too small. Facebook requires event images to be at least 100 pixels wide and 100 pixels tall. Please remove the current image from your event parameters and try again. You post has been saved but no event created. Press the browser\'s back button to go back and edit your post', 'sfce-create-event'));
    230223
    231224        foreach ( $sfce_text_inputs as $input )
Note: See TracChangeset for help on using the changeset viewer.