Plugin Directory

Changeset 491899


Ignore:
Timestamp:
01/19/2012 01:11:36 AM (14 years ago)
Author:
atvdev
Message:
 
Location:
amazon-s3-uploads/trunk
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • amazon-s3-uploads/trunk/asssu-options.php

    r477750 r491899  
    6161                    <select name="asssu_cron_interval" id="asssu_cron_interval">
    6262                        <?php
    63                             $selected_value = get_option('asssu_cron_interval', 300);
     63                            $selected_value = intval(get_option('asssu_cron_interval', 300));
    6464                            for ($counter = 300; $counter <= 1800; $counter = $counter + 300):
    6565                                $selected = $selected_value === $counter ? ' selected="selected"' : '';
     
    7676                    <select name="asssu_cron_limit" id="asssu_cron_limit">
    7777                        <?php
    78                             $selected_value = get_option('asssu_cron_limit', 20);
     78                            $selected_value = intval(get_option('asssu_cron_limit', 20));
    7979                            for ($counter = 10; $counter <= 100; $counter = $counter + 10):
    8080                                $selected = $selected_value === $counter ? ' selected="selected"' : '';
    81                                 print "\n\t".'<option value="'.$counter.'"'.$selected.'>'.$counter.' seconds</option>';
     81                                print "\n\t".'<option value="'.$counter.'"'.$selected.'>'.$counter.'</option>';
    8282                            endfor;
    8383                        ?>
  • amazon-s3-uploads/trunk/asssu.php

    r477750 r491899  
    108108    function check_htaccess() {
    109109        $amazon_path = 'http://'.$this->bucket_name.'.s3.amazonaws.com/';
    110         if (!empty($this->bucket_subdir))
     110        $amazon_path_ssl = 'https://'.$this->bucket_name.'.s3.amazonaws.com/';
     111        if (!empty($this->bucket_subdir)) {
    111112            $amazon_path .= $this->bucket_subdir.'/';
     113            $amazon_path_ssl .= $this->bucket_subdir.'/';
     114        }
    112115        $htaccess_file = $this->upload_basedir.DIRECTORY_SEPARATOR.'.htaccess';
    113116        $htaccess_contents = 'RewriteEngine On
     117RewriteCond %{HTTPS} off
    114118RewriteCond %{REQUEST_FILENAME} !-f
    115119RewriteCond %{REQUEST_FILENAME} !-d
    116 RewriteRule ^(.*)$ '.$amazon_path.'$1 [QSA,L]';
     120RewriteRule ^(.*)$ '.$amazon_path.'$1 [QSA,L]
     121RewriteCond %{HTTPS} on
     122RewriteCond %{REQUEST_FILENAME} !-f
     123RewriteCond %{REQUEST_FILENAME} !-d
     124RewriteRule ^(.*)$ '.$amazon_path_ssl.'$1 [QSA,L]';
    117125        if (is_file($htaccess_file))
    118126            $htaccess = file_get_contents($htaccess_file);
Note: See TracChangeset for help on using the changeset viewer.