Changeset 495105
- Timestamp:
- 01/25/2012 10:27:58 AM (14 years ago)
- Location:
- amazon-s3-uploads/trunk
- Files:
-
- 3 edited
-
asssu-models.php (modified) (3 diffs)
-
asssu.php (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
amazon-s3-uploads/trunk/asssu-models.php
r493910 r495105 141 141 } 142 142 143 function find_files($path, &$limit, $dir='') {143 function find_files($path, $limit, $dir='') { 144 144 $out = array(); 145 145 $dir_path = $path.$dir; 146 146 if ($handle = opendir($dir_path)) { 147 147 while (false !== ($entry = readdir($handle)) && $limit > 0) { 148 if (!in_array($entry, array('.', '..', '.htaccess')) && $this->scheduled_files < 100) {148 if (!in_array($entry, array('.', '..', '.htaccess'))) { 149 149 $entry_path = $dir_path.'/'.$entry; 150 150 if (is_file($entry_path)) { … … 195 195 } 196 196 197 function configure($wpdb=null) { 198 if (!is_null($wpdb)) 199 $this->db = $wpdb; 197 function configure($wpdb) { 198 $this->db = $wpdb; 200 199 $this->enabled = false; 201 200 … … 234 233 $this->config = $config; 235 234 $this->config->endpoint = $this->get_endpoint(); 235 if (empty($this->config->endpoint)) { 236 $error_log = 'endpoint could not be found'."\n"; 237 require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'tpyo-amazon-s3-php-class'.DIRECTORY_SEPARATOR.'S3.php'; 238 $adapter = new S3($config->access_key, $config->secret_key, $config->use_ssl); 239 if (empty($adapter)) 240 $error_log .= 'could not connect to S3'."\n"; 241 $buckets = $adapter->listBuckets(); 242 if (empty($buckets)) 243 $error_log .= 'no buckets found'."\n"; 244 if (!in_array($config->bucket_name, $buckets)) 245 $error_log .= 'selected bucket not found'."\n"; 246 $location = $adapter->getBucketLocation($config->bucket_name); 247 $error_log .= 'bucket location '.$location."\n"; 248 if (file_put_contents(dirname(__FILE__).'/asssu-errorlog.txt', $error_log) !== true) 249 error_log($error_log); 250 } 236 251 } 237 252 -
amazon-s3-uploads/trunk/asssu.php
r493910 r495105 6 6 Author URI: http://code.google.com/u/117859515361389646005/ 7 7 Description: Moves your uploads to Amazon S3 via cron jobs. 8 Version: 1.0 68 Version: 1.07 9 9 */ 10 10 -
amazon-s3-uploads/trunk/readme.txt
r493910 r495105 5 5 Requires at least: 2.3 6 6 Tested up to: 3.3 7 Stable tag: 1.0 67 Stable tag: 1.07 8 8 9 9 Moves your uploads to Amazon S3 via cron jobs. … … 52 52 == Changelog == 53 53 54 = 1.0 6=54 = 1.05 - 1.07 = 55 55 * Minor bug fixes 56 57 = 1.05 =58 * Minor fixes59 56 60 57 = 1.04 = … … 78 75 == Upgrade Notice == 79 76 80 = 1.0 6=77 = 1.05 - 1.07 = 81 78 Minor bug fixes 82 83 = 1.05 =84 Minor fixes85 79 86 80 = 1.04 =
Note: See TracChangeset
for help on using the changeset viewer.