Skip to content

Commit a57f8ee

Browse files
committed
2.0.3
1 parent c550cf9 commit a57f8ee

7 files changed

+17
-17
lines changed

code/ActivityCharts.class.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use FormTools\General as CoreGeneral;
88
use FormTools\Modules;
99
use FormTools\ViewFilters;
10-
use PDO, PDOException;
10+
use PDO, Exception;
1111

1212

1313
class ActivityCharts
@@ -66,7 +66,7 @@ public static function addActivityChart($info, $L)
6666
"line_width" => $line_width
6767
));
6868
$db->execute();
69-
} catch (PDOException $e) {
69+
} catch (Exception $e) {
7070
return array(false, $L["notify_error_creating_activity_chart"] . $e->getMessage(), "");
7171
}
7272

@@ -93,7 +93,7 @@ public static function updateActivityChart($vis_id, $tab, $info, $L)
9393

9494
// always clear the cache
9595
Visualizations::clearVisualizationCache($vis_id);
96-
} catch (PDOException $e) {
96+
} catch (Exception $e) {
9797
return array(false, $L["notify_error_updating_activity_chart"], "");
9898
}
9999

@@ -293,7 +293,6 @@ public static function getActivityAccountSelectQueryInfo($submission_count_group
293293
// if no date range clause was specified, the user wants to return everything. In which case, the start date
294294
// is dependant on what's stored in the database. [The end date is ALWAYS today - regardless of how messed up the
295295
// submission data info actually is]
296-
$first_day = "";
297296
if (empty($date_range_clause)) {
298297
$where_clause = "";
299298
if (!empty($filter_sql_clause)) {

code/FieldCharts.class.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use FormTools\OptionLists;
1111
use FormTools\Modules;
1212
use FormTools\ViewFilters;
13-
use PDOException;
13+
use Exception;
1414

1515

1616
class FieldCharts
@@ -62,7 +62,7 @@ public static function addFieldChart($info, $L)
6262
"include_legend_full_size" => $include_legend_full_size
6363
));
6464
$db->execute();
65-
} catch (PDOException $e) {
65+
} catch (Exception $e) {
6666
return array(false, $L["notify_error_creating_field_chart"], "");
6767
}
6868

@@ -268,7 +268,7 @@ private static function updateFieldChartMainTab($vis_id, $info)
268268
"vis_id" => $vis_id
269269
));
270270
$db->execute();
271-
} catch (PDOException $e) {
271+
} catch (Exception $e) {
272272
return array(false, $e->getMessage());
273273
}
274274

@@ -313,7 +313,7 @@ private static function updateFieldChartAppearanceTab($vis_id, $info)
313313
"vis_id" => $vis_id
314314
));
315315
$db->execute();
316-
} catch (PDOException $e) {
316+
} catch (Exception $e) {
317317
return array(false, $e->getMessage());
318318
}
319319

code/General.class.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use FormTools\Forms;
77
use FormTools\General as CoreGeneral;
88
use FormTools\Views;
9-
use PDO, PDOException;
9+
use PDO, Exception;
1010

1111

1212
class General
@@ -200,7 +200,7 @@ public static function updateVisualizationCache($vis_id, $data)
200200
"data" => $data
201201
));
202202
$db->execute();
203-
} catch (PDOException $e) {
203+
} catch (Exception $e) {
204204
// TODO
205205
}
206206
}

code/Module.class.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use FormTools\Hooks;
88
use FormTools\Settings;
99
use FormTools\Module as FormToolsModule;
10-
use PDO, PDOException;
10+
use Exception;
1111

1212

1313
class Module extends FormToolsModule
@@ -17,8 +17,8 @@ class Module extends FormToolsModule
1717
protected $author = "Ben Keen";
1818
protected $authorEmail = "[email protected]";
1919
protected $authorLink = "http://formtools.org";
20-
protected $version = "2.0.2";
21-
protected $date = "2017-11-07";
20+
protected $version = "2.0.3";
21+
protected $date = "2017-11-22";
2222
protected $originLanguage = "en_us";
2323
protected $jsFiles = array(
2424
"https://www.gstatic.com/charts/loader.js",
@@ -92,7 +92,7 @@ public function install($module_id)
9292
$db->execute();
9393
}
9494
$db->processTransaction();
95-
} catch (PDOException $e) {
95+
} catch (Exception $e) {
9696
$db->rollbackTransaction();
9797
$L = $this->getLangStrings();
9898
return array(false, $L["notify_installation_problem_c"] . " <b>" . $e->getMessage() . "</b>");

code/Visualizations.class.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use FormTools\Core;
66
use FormTools\Menus;
77
use FormTools\Modules;
8-
use PDO, PDOException;
8+
use PDO, Exception;
99

1010
class Visualizations
1111
{
@@ -35,7 +35,7 @@ public static function addVisualization($info, $L)
3535
));
3636
$db->execute();
3737

38-
} catch (PDOException $e) {
38+
} catch (Exception $e) {
3939
return array(true, $L["notify_visualization_not_added"]);
4040
}
4141

lang/en_us.php

+1
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@
214214
$L["notify_visualization_cache_cleared"] = "The visualization cache has been cleared.";
215215
$L["notify_specific_visualization_cache_cleared"] = "The cache for this visualization has been cleared.";
216216
$L["notify_no_internet_connection"] = "Sorry, we cannot load the Google Charts library. This is most likely caused by there being no internet connection available.";
217+
$L["notify_installation_problem_c"] = "There was a problem installing the module: ";
217218

218219
$L["confirm_delete_visualization"] = "Are you sure you want to delete this visualization?";
219220

module_config.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@
220220
"activity_charts/page_permissions.php",
221221
"activity_charts/settings.php",
222222
"code/ActivityCharts.class.php",
223-
"code/FIeldCharts.class.php",
223+
"code/FieldCharts.class.php",
224224
"code/General.class.php",
225225
"code/Module.class.php",
226226
"code/Visualizations.class.php",

0 commit comments

Comments
 (0)