| 1 |
<?php |
<?php |
| 2 |
|
|
| 3 |
// $Id: mm_s3.module,v 1.1.2.2.2.19 2009/10/04 21:55:27 arthuregg Exp $ |
// $Id: mm_s3.module,v 1.1.2.2.2.20 2009/10/05 01:26:30 arthuregg Exp $ |
| 4 |
|
|
| 5 |
define('ACL_PRIVATE', 'private'); |
define('ACL_PRIVATE', 'private'); |
| 6 |
define('ACL_PUBLIC_READ', 'public-read'); |
define('ACL_PUBLIC_READ', 'public-read'); |
| 165 |
'#type' => 'textfield', |
'#type' => 'textfield', |
| 166 |
'#title' => t('S3 URL'), |
'#title' => t('S3 URL'), |
| 167 |
'#default_value' => variable_get('mm_s3_server_url', "https://s3.amazonaws.com/"), |
'#default_value' => variable_get('mm_s3_server_url', "https://s3.amazonaws.com/"), |
| 168 |
'#description' => t("URL to send to amazon. You probably do not need to change this."), |
'#description' => t('URL to send to amazon. You probably do not need to change this.'), |
| 169 |
); |
); |
| 170 |
|
|
| 171 |
$form['mm_s3']['mm_s3_key'] = array( |
$form['mm_s3']['mm_s3_key'] = array( |
| 226 |
'#type' => 'textfield', |
'#type' => 'textfield', |
| 227 |
'#title' => t('S3 Bucket'), |
'#title' => t('S3 Bucket'), |
| 228 |
'#default_value' => $configuration['mm_s3_bucket'] ? $configuration['mm_s3_bucket'] : variable_get('mm_s3_bucket', str_replace(" ", "_", variable_get('site_name', 'my_site'))), |
'#default_value' => $configuration['mm_s3_bucket'] ? $configuration['mm_s3_bucket'] : variable_get('mm_s3_bucket', str_replace(" ", "_", variable_get('site_name', 'my_site'))), |
| 229 |
'#description' => t("Name of the S3 bucket, note this has to be unique on Amazon's servers"), |
'#description' => t('Name of the S3 bucket, note this has to be unique on Amazon\'s servers'), |
| 230 |
); |
); |
| 231 |
|
|
| 232 |
$form['mm_s3']['mm_s3_perm'] = array( |
$form['mm_s3']['mm_s3_perm'] = array( |
| 234 |
'#title' => t('S3 File Permissions'), |
'#title' => t('S3 File Permissions'), |
| 235 |
'#options' => mm_s3_file_perms(), |
'#options' => mm_s3_file_perms(), |
| 236 |
'#default_value' => $configuration['mm_s3_perm'] ? $configuration['mm_s3_perm'] : ACL_PUBLIC_READ, |
'#default_value' => $configuration['mm_s3_perm'] ? $configuration['mm_s3_perm'] : ACL_PUBLIC_READ, |
| 237 |
'#description' => t("Set the permissions on your uploaded files."), |
'#description' => t('Set the permissions on your uploaded files.'), |
| 238 |
); |
); |
| 239 |
|
|
| 240 |
$form['mm_s3']['mm_s3_delete_source'] = array( |
$form['mm_s3']['mm_s3_delete_source'] = array( |