[bugzilla-gnome-org-extensions: 2/3] Move check for overridden templates to different hook
- From: Krzesimir Nowak <krnowak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bugzilla-gnome-org-extensions: 2/3] Move check for overridden templates to different hook
- Date: Fri, 10 Oct 2014 08:06:22 +0000 (UTC)
commit 6b16904f14801ea93682218ebb1e00b87d62f80f
Author: Krzesimir Nowak <krzesimir endocode com>
Date: Fri Oct 10 10:02:59 2014 +0200
Move check for overridden templates to different hook
db_schema_abstract_schema hook is ran on every request. The override
check is supposed to be ran once during checksetup
only. install_before_final_checks hook suits well for this purpose.
GnomeAttachmentStatus/Extension.pm | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/GnomeAttachmentStatus/Extension.pm b/GnomeAttachmentStatus/Extension.pm
index 9914d01..8ccd028 100644
--- a/GnomeAttachmentStatus/Extension.pm
+++ b/GnomeAttachmentStatus/Extension.pm
@@ -35,16 +35,11 @@ sub new {
#
# It would be better to have a hook for adding more enum initial
# values instead (see Bugzilla::DB::bz_populate_enum_tables).
-#
-# Also check if overriden templates didn't change since last
-# time. This check is for us to maybe backport the changes to our
-# overrides.
sub db_schema_abstract_schema {
my ($self, $args) = @_;
my $schema = $args->{'schema'};
add_gnome_attachment_status_table_to_schema($schema);
- check_overriden_templates;
}
sub object_columns {
@@ -102,9 +97,14 @@ sub template_before_process {
# key removed, we are getting errors when dropping a column.
#
# In short: argh!
+#
+# Also check if overriden templates didn't change since last
+# time. This check is for us to maybe backport the changes to our
+# overrides.
sub install_before_final_checks
{
- perform_migration
+ perform_migration;
+ check_overriden_templates;
}
sub enabled {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]