aboutsummaryrefslogtreecommitdiff
path: root/actions/photos
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-11-23 15:25:48 -0500
committerCash Costello <cash.costello@gmail.com>2011-11-23 15:25:48 -0500
commit4bfbb194ec1f9fc2647d1cb4e946fb95492076d6 (patch)
tree2e818635b8ae236cbefe0ccf55e29b23f369d6b7 /actions/photos
parent9b814dd2124a8c71dec3a8d510d288f040b03b9e (diff)
downloadelgg-4bfbb194ec1f9fc2647d1cb4e946fb95492076d6.tar.gz
elgg-4bfbb194ec1f9fc2647d1cb4e946fb95492076d6.tar.bz2
settings are good enough for a preview release now
Diffstat (limited to 'actions/photos')
-rw-r--r--actions/photos/admin/settings.php66
1 files changed, 10 insertions, 56 deletions
diff --git a/actions/photos/admin/settings.php b/actions/photos/admin/settings.php
index a401d9bf3..1a4a4bdda 100644
--- a/actions/photos/admin/settings.php
+++ b/actions/photos/admin/settings.php
@@ -16,62 +16,16 @@ foreach ($params as $k => $v) {
}
}
-system_message(elgg_echo('tidypics:settings:save:ok'));
-forward(REFERER);
-
-// check boxes
-if (is_array(get_input('download_link'))) { // this can be done due to way Elgg uses checkboxes
- set_plugin_setting('download_link', 'enabled', 'tidypics');
-} else {
- set_plugin_setting('download_link', 'disabled', 'tidypics');
-}
-
-if (is_array(get_input('tagging'))) {
- set_plugin_setting('tagging', 'enabled', 'tidypics');
-} else {
- set_plugin_setting('tagging', 'disabled', 'tidypics');
-}
-
-if (is_array(get_input('photo_ratings'))) {
- set_plugin_setting('photo_ratings', 'enabled', 'tidypics');
-} else {
- set_plugin_setting('photo_ratings', 'disabled', 'tidypics');
-}
-
-if (is_array(get_input('exif'))) {
- set_plugin_setting('exif', 'enabled', 'tidypics');
-} else {
- set_plugin_setting('exif', 'disabled', 'tidypics');
-}
-
-if (is_array(get_input('view_count'))) {
- set_plugin_setting('view_count', 'enabled', 'tidypics');
-} else {
- set_plugin_setting('view_count', 'disabled', 'tidypics');
-}
-
-if (is_array(get_input('uploader'))) {
- set_plugin_setting('uploader', 'enabled', 'tidypics');
-} else {
- set_plugin_setting('uploader', 'disabled', 'tidypics');
-}
-
-if (is_array(get_input('grp_perm_override'))) {
- set_plugin_setting('grp_perm_override', 'enabled', 'tidypics');
-} else {
- set_plugin_setting('grp_perm_override', 'disabled', 'tidypics');
-}
-
-
// image sizes
$image_sizes = array();
-$image_sizes['large_image_width'] = get_input('large_thumb_width');
-$image_sizes['large_image_height'] = get_input('large_thumb_height');
-$image_sizes['small_image_width'] = get_input('small_thumb_width');
-//$image_sizes['small_image_height'] = get_input('small_thumb_height');
-$image_sizes['small_image_height'] = get_input('small_thumb_width');
-$image_sizes['thumb_image_width'] = get_input('thumb_width');
-//$image_sizes['thumb_image_height'] = get_input('thumb_height');
-$image_sizes['thumb_image_height'] = get_input('thumb_width');
-set_plugin_setting('image_sizes', serialize($image_sizes), 'tidypics');
+$image_sizes['large_image_width'] = get_input('large_image_width');
+$image_sizes['large_image_height'] = get_input('large_image_height');
+$image_sizes['small_image_width'] = get_input('small_image_width');
+$image_sizes['small_image_height'] = get_input('small_image_height');
+$image_sizes['tiny_image_width'] = get_input('tiny_image_width');
+$image_sizes['tiny_image_height'] = get_input('tiny_image_height');
+$plugin->setSetting('image_sizes', serialize($image_sizes));
+
+system_message(elgg_echo('tidypics:settings:save:ok'));
+forward(REFERER);