summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-11-19 08:48:23 -0800
committerTim Almdal <tnalmdal@shaw.ca>2009-11-19 11:55:45 -0800
commite97617750d73652c6945b19520702a54833b4766 (patch)
tree5b38f78eaf9dd974deaeb4307a29239a472b2585 /modules
parent1ab07b308f0739efed99755c99b2a92776a7c097 (diff)
Make sure that calls to the theme::get_var() have sane defaults in the event that the theme does not supply them.
Diffstat (limited to 'modules')
-rw-r--r--modules/g2_import/controllers/admin_g2_import.php4
-rw-r--r--modules/g2_import/helpers/g2_import.php4
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/g2_import/controllers/admin_g2_import.php b/modules/g2_import/controllers/admin_g2_import.php
index 6ed92c37..99d28fd7 100644
--- a/modules/g2_import/controllers/admin_g2_import.php
+++ b/modules/g2_import/controllers/admin_g2_import.php
@@ -35,8 +35,8 @@ class Admin_g2_import_Controller extends Admin_Controller {
if (g2_import::is_initialized()) {
$view->content->g2_stats = $g2_stats;
$view->content->g2_sizes = $g2_sizes;
- $view->content->thumb_size = theme::get_var("thumb_size");
- $view->content->resize_size = theme::get_var("resize_size");
+ $view->content->thumb_size = theme::get_var("thumb_size", 200);
+ $view->content->resize_size = theme::get_var("resize_size", 640);
}
print $view;
}
diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php
index 61a7ef85..519da40f 100644
--- a/modules/g2_import/helpers/g2_import.php
+++ b/modules/g2_import/helpers/g2_import.php
@@ -671,8 +671,8 @@ class g2_import_Core {
$g2_item_id = self::$current_g2_item->getId();
$derivatives = g2(GalleryCoreApi::fetchDerivativesByItemIds(array($g2_item_id)));
- $target_thumb_size = theme::get_var("thumb_size");
- $target_resize_size = theme::get_var("resize_size");
+ $target_thumb_size = theme::get_var("thumb_size", 200);
+ $target_resize_size = theme::get_var("resize_size", 640);
if (!empty($derivatives[$g2_item_id])) {
foreach ($derivatives[$g2_item_id] as $derivative) {
if ($derivative->getPostFilterOperations()) {