Plugin Directory

Changeset 514461


Ignore:
Timestamp:
03/05/2012 05:03:42 AM (14 years ago)
Author:
ichurakov
Message:
 
Location:
paid-downloads
Files:
2 deleted
2 edited
8 copied

Legend:

Unmodified
Added
Removed
  • paid-downloads/tags/3.14/paid-downloads.php

    r512923 r514461  
    44Plugin URI: http://www.icprojects.net/paid-downloads-plugin.html
    55Description: The plugin easily allows you to sell any digital content. The only actions you have do are to upload files and insert shortcode like <em>[paiddownloads id="XXX"]</em> into your posts or pages.
    6 Version: 3.13
     6Version: 3.14
    77Author: Ivan Churakov
    88Author URI: http://www.icprojects.net/about
    99*/
    1010define('PD_RECORDS_PER_PAGE', '20');
    11 define('PD_VERSION', 3.13);
     11define('PD_VERSION', 3.14);
    1212wp_enqueue_script("jquery");
    1313register_activation_hook(__FILE__, array("paiddownloads_class", "install"));
     
    221221        if ($this->options['enable_alertpay'] != "on" && $this->options['enable_paypal'] != "on" && $this->options['enable_interkassa'] != "on") $errors[] = __('Select at least one payment method', 'paiddownloads');
    222222        if ($this->options['enable_paypal'] == "on") {
    223             if ((!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $this->options['paypal_id']) && !eregi("^([A-Z0-9]+)$", $this->options['paypal_id'])) || strlen($this->options['paypal_id']) == 0) $errors[] = __('PayPal ID must be valid e-mail address or Merchant ID', 'paiddownloads');
     223            if ((!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/i", $this->options['paypal_id']) && !preg_match("/^([A-Z0-9]+)$/i", $this->options['paypal_id'])) || strlen($this->options['paypal_id']) == 0) $errors[] = __('PayPal ID must be valid e-mail address or Merchant ID', 'paiddownloads');
    224224        }
    225225        if ($this->options['enable_alertpay'] == "on") {
    226             if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $this->options['alertpay_id']) || strlen($this->options['alertpay_id']) == 0) $errors[] = __('AlertPay ID must be valid e-mail address', 'paiddownloads');
     226            if (!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/i", $this->options['alertpay_id']) || strlen($this->options['alertpay_id']) == 0) $errors[] = __('AlertPay ID must be valid e-mail address', 'paiddownloads');
    227227        }
    228228        if ($this->options['enable_interkassa'] == "on") {
     
    230230            if (strlen($this->options['interkassa_secret_key']) < 3) $errors[] = __('InterKassa Secret Key is required', 'paiddownloads');
    231231        }
    232         if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $this->options['seller_email']) || strlen($this->options['seller_email']) == 0) $errors[] = __('E-mail for notifications must be valid e-mail address', 'paiddownloads');
    233         if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $this->options['from_email']) || strlen($this->options['from_email']) == 0) $errors[] = __('Sender e-mail must be valid e-mail address', 'paiddownloads');
     232        if (!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/i", $this->options['seller_email']) || strlen($this->options['seller_email']) == 0) $errors[] = __('E-mail for notifications must be valid e-mail address', 'paiddownloads');
     233        if (!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/i", $this->options['from_email']) || strlen($this->options['from_email']) == 0) $errors[] = __('Sender e-mail must be valid e-mail address', 'paiddownloads');
    234234        if (strlen($this->options['from_name']) < 3) $errors[] = __('Sender name is too short', 'paiddownloads');
    235235        if (strlen($this->options['success_email_subject']) < 3) $errors[] = __('Successful purchasing e-mail subject must contain at least 3 characters', 'paiddownloads');
     
    11051105                case 'paiddownloads_update_link':
    11061106                    $link_owner = trim(stripslashes($_POST["paiddownloads_link_owner"]));
    1107                     if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $link_owner) || strlen($link_owner) == 0) {
     1107                    if (!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/i", $link_owner) || strlen($link_owner) == 0) {
    11081108                        setcookie("paiddownloads_error", __('Link owner must be valid e-mail address.', 'paiddownloads'), time()+30, "/", ".".str_replace("www.", "", $_SERVER["SERVER_NAME"]));
    11091109                        header('Location: '.get_bloginfo("wpurl").'/wp-admin/admin.php?page=paid-downloads-add-link');
     
    17891789                    <input type="hidden" name="currency_code" value="'.$file_details["currency"].'">
    17901790                    <input type="hidden" name="custom" value="">
     1791                    <input type="hidden" name="charset" value="utf-8">                 
    17911792                    <input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynow_LG.gif:NonHostedGuest">
    17921793                    <input type="hidden" name="return" value="'.$return_url.'">
  • paid-downloads/tags/3.14/readme.txt

    r513354 r514461  
    99Requires at least: 3.0
    1010Tested up to: 3.3.1
    11 Stable tag: 3.13
     11Stable tag: 3.14
    1212
    1313The plugin allows to sell digital content and accept payments via PayPal, AlertPay or InterKassa. It delivers download link after completed payment.
     
    4747
    4848== Changelog ==
     49
     50= 3.14 =
     51* Obsolete php function "eregi" replaced by "preg_match".
     52* Fixed problem with UTF-8 characters submitted to PayPal.
    4953
    5054= 3.13 =
  • paid-downloads/trunk/paid-downloads.php

    r512923 r514461  
    44Plugin URI: http://www.icprojects.net/paid-downloads-plugin.html
    55Description: The plugin easily allows you to sell any digital content. The only actions you have do are to upload files and insert shortcode like <em>[paiddownloads id="XXX"]</em> into your posts or pages.
    6 Version: 3.13
     6Version: 3.14
    77Author: Ivan Churakov
    88Author URI: http://www.icprojects.net/about
    99*/
    1010define('PD_RECORDS_PER_PAGE', '20');
    11 define('PD_VERSION', 3.13);
     11define('PD_VERSION', 3.14);
    1212wp_enqueue_script("jquery");
    1313register_activation_hook(__FILE__, array("paiddownloads_class", "install"));
     
    221221        if ($this->options['enable_alertpay'] != "on" && $this->options['enable_paypal'] != "on" && $this->options['enable_interkassa'] != "on") $errors[] = __('Select at least one payment method', 'paiddownloads');
    222222        if ($this->options['enable_paypal'] == "on") {
    223             if ((!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $this->options['paypal_id']) && !eregi("^([A-Z0-9]+)$", $this->options['paypal_id'])) || strlen($this->options['paypal_id']) == 0) $errors[] = __('PayPal ID must be valid e-mail address or Merchant ID', 'paiddownloads');
     223            if ((!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/i", $this->options['paypal_id']) && !preg_match("/^([A-Z0-9]+)$/i", $this->options['paypal_id'])) || strlen($this->options['paypal_id']) == 0) $errors[] = __('PayPal ID must be valid e-mail address or Merchant ID', 'paiddownloads');
    224224        }
    225225        if ($this->options['enable_alertpay'] == "on") {
    226             if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $this->options['alertpay_id']) || strlen($this->options['alertpay_id']) == 0) $errors[] = __('AlertPay ID must be valid e-mail address', 'paiddownloads');
     226            if (!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/i", $this->options['alertpay_id']) || strlen($this->options['alertpay_id']) == 0) $errors[] = __('AlertPay ID must be valid e-mail address', 'paiddownloads');
    227227        }
    228228        if ($this->options['enable_interkassa'] == "on") {
     
    230230            if (strlen($this->options['interkassa_secret_key']) < 3) $errors[] = __('InterKassa Secret Key is required', 'paiddownloads');
    231231        }
    232         if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $this->options['seller_email']) || strlen($this->options['seller_email']) == 0) $errors[] = __('E-mail for notifications must be valid e-mail address', 'paiddownloads');
    233         if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $this->options['from_email']) || strlen($this->options['from_email']) == 0) $errors[] = __('Sender e-mail must be valid e-mail address', 'paiddownloads');
     232        if (!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/i", $this->options['seller_email']) || strlen($this->options['seller_email']) == 0) $errors[] = __('E-mail for notifications must be valid e-mail address', 'paiddownloads');
     233        if (!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/i", $this->options['from_email']) || strlen($this->options['from_email']) == 0) $errors[] = __('Sender e-mail must be valid e-mail address', 'paiddownloads');
    234234        if (strlen($this->options['from_name']) < 3) $errors[] = __('Sender name is too short', 'paiddownloads');
    235235        if (strlen($this->options['success_email_subject']) < 3) $errors[] = __('Successful purchasing e-mail subject must contain at least 3 characters', 'paiddownloads');
     
    11051105                case 'paiddownloads_update_link':
    11061106                    $link_owner = trim(stripslashes($_POST["paiddownloads_link_owner"]));
    1107                     if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $link_owner) || strlen($link_owner) == 0) {
     1107                    if (!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/i", $link_owner) || strlen($link_owner) == 0) {
    11081108                        setcookie("paiddownloads_error", __('Link owner must be valid e-mail address.', 'paiddownloads'), time()+30, "/", ".".str_replace("www.", "", $_SERVER["SERVER_NAME"]));
    11091109                        header('Location: '.get_bloginfo("wpurl").'/wp-admin/admin.php?page=paid-downloads-add-link');
     
    17891789                    <input type="hidden" name="currency_code" value="'.$file_details["currency"].'">
    17901790                    <input type="hidden" name="custom" value="">
     1791                    <input type="hidden" name="charset" value="utf-8">                 
    17911792                    <input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynow_LG.gif:NonHostedGuest">
    17921793                    <input type="hidden" name="return" value="'.$return_url.'">
  • paid-downloads/trunk/readme.txt

    r513354 r514461  
    99Requires at least: 3.0
    1010Tested up to: 3.3.1
    11 Stable tag: 3.13
     11Stable tag: 3.14
    1212
    1313The plugin allows to sell digital content and accept payments via PayPal, AlertPay or InterKassa. It delivers download link after completed payment.
     
    4747
    4848== Changelog ==
     49
     50= 3.14 =
     51* Obsolete php function "eregi" replaced by "preg_match".
     52* Fixed problem with UTF-8 characters submitted to PayPal.
    4953
    5054= 3.13 =
Note: See TracChangeset for help on using the changeset viewer.