aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actions/photos/admin/settings.php8
-rw-r--r--activate.php4
-rw-r--r--lib/resize.php2
-rw-r--r--views/default/forms/photos/admin/settings.php2
4 files changed, 7 insertions, 9 deletions
diff --git a/actions/photos/admin/settings.php b/actions/photos/admin/settings.php
index 1a4a4bdda..aa607756d 100644
--- a/actions/photos/admin/settings.php
+++ b/actions/photos/admin/settings.php
@@ -6,12 +6,10 @@
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2
*/
-$plugin = elgg_get_plugin_from_id('tidypics');
-
$params = get_input('params');
foreach ($params as $k => $v) {
- if (!$plugin->setSetting($k, $v)) {
- register_error(elgg_echo('plugins:settings:save:fail', array('tidypics')));
+ if (!elgg_set_plugin_setting($k, $v, 'lightpics')) {
+ register_error(elgg_echo('plugins:settings:save:fail', array('lightpics')));
forward(REFERER);
}
}
@@ -24,7 +22,7 @@ $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));
+elgg_set_plugin_setting('image_sizes', serialize($image_sizes), 'lightpics');
system_message(elgg_echo('tidypics:settings:save:ok'));
diff --git a/activate.php b/activate.php
index b0f4a0c7f..752420a4c 100644
--- a/activate.php
+++ b/activate.php
@@ -45,7 +45,7 @@ $defaults = array(
);
foreach ($defaults as $name => $value) {
- if (elgg_get_plugin_setting($name, 'tidypics') === null) {
- elgg_set_plugin_setting($name, $value, 'tidypics');
+ if (elgg_get_plugin_setting($name, 'lightpics') === null) {
+ elgg_set_plugin_setting($name, $value, 'lightpics');
}
}
diff --git a/lib/resize.php b/lib/resize.php
index 380e0c406..aa2eabea1 100644
--- a/lib/resize.php
+++ b/lib/resize.php
@@ -17,7 +17,7 @@
function tp_create_gd_thumbnails($file, $prefix, $filestorename) {
global $CONFIG;
- $image_sizes = elgg_get_plugin_setting('image_sizes', 'tidypics');
+ $image_sizes = elgg_get_plugin_setting('image_sizes', 'lightpics');
if (!$image_sizes) {
// move this out of library
register_error(elgg_echo('tidypics:nosettings'));
diff --git a/views/default/forms/photos/admin/settings.php b/views/default/forms/photos/admin/settings.php
index 403203f69..e0b8a9880 100644
--- a/views/default/forms/photos/admin/settings.php
+++ b/views/default/forms/photos/admin/settings.php
@@ -5,7 +5,7 @@
* @todo remove original image, group only upload not delete
*/
-$plugin = elgg_get_plugin_from_id('tidypics');
+$plugin = elgg_get_plugin_from_id('lightpics');
$title = elgg_echo('tidypics:settings:main');
$content = elgg_view('forms/photos/admin/settings/main', array('plugin' => $plugin));