diff --git a/mozilla/webtools/PLIF/PLIF.pm b/mozilla/webtools/PLIF/PLIF.pm index dbae1f56701..71e155d3a86 100644 --- a/mozilla/webtools/PLIF/PLIF.pm +++ b/mozilla/webtools/PLIF/PLIF.pm @@ -71,7 +71,7 @@ sub create { } else { $class->dump(10, "Called constructor of class $class, creating object..."); my $self = $class->bless(@_); # call our real constructor - $self->init(@_); + $self->serviceInit(@_); return $self; } } @@ -85,12 +85,22 @@ sub serviceCreate { } $class->dump(10, "Called service constructor of class $class, creating object..."); my $self = $class->bless(@_); # call our real constructor - $self->init(@_); + $self->serviceInstanceInit(@_); return $self; } sub init {} # stub for services +sub serviceInit { + my $self = shift; + $self->init(@_); +} + +sub serviceInstanceInit { + my $self = shift; + $self->init(@_); +} + # provide a constructor that always constructs a new copy of the # class. This is used by services that implement factories for objects # implemented in the same class (e.g., session objects do this). diff --git a/mozilla/webtools/PLIF/PLIF/DataSource/DebugStrings.pm b/mozilla/webtools/PLIF/PLIF/DataSource/DebugStrings.pm index 09f2bee05ff..8fc920675d2 100644 --- a/mozilla/webtools/PLIF/PLIF/DataSource/DebugStrings.pm +++ b/mozilla/webtools/PLIF/PLIF/DataSource/DebugStrings.pm @@ -44,7 +44,7 @@ sub getDefaultString { my($app, $protocol, $string) = @_; # this is protocol agnostic stuff :-) if ($string eq 'debug.dumpVars') { - return ('COSES', <assert(open(FILE, "<$filename"), 1, "Could not open output template file '$filename' for reading: $!"); # get the data type (platform's line delimiter) local $/ = "\n"; - my $type = ; - chomp($type); + my @data; + my $line; + while (defined($line = )) { + chomp($line); + if ($line eq '') { + # stop this when we reach the first blank line + last; + } + push(@data, $line); + } # and then slurp entire file (no record delimiter) local $/ = undef; - my $data = ; + push(@data, ); $self->assert(close(FILE), 3, "Could not close output template file '$filename': $!"); - return ($type, $data); + return @data; } else { # file does not exist - $self->dump(9, "No file for string '$string' in protocol '$protocol' (looking for '$filename')4"); + $self->dump(9, "No file for string '$string' in protocol '$protocol' (looking for '$filename')"); return; # no can do, sir } } diff --git a/mozilla/webtools/PLIF/PLIF/DataSource/Strings.pm b/mozilla/webtools/PLIF/PLIF/DataSource/Strings.pm index 32ea7701edc..87d28375d5e 100644 --- a/mozilla/webtools/PLIF/PLIF/DataSource/Strings.pm +++ b/mozilla/webtools/PLIF/PLIF/DataSource/Strings.pm @@ -39,10 +39,13 @@ sub provides { my $class = shift; my($service) = @_; # XXX this class should provide a 'clear caches' service (as should some others) - return ($service eq 'dataSource.strings' or - $service eq 'setup.install' or + return ($service eq 'dataSource.strings.customised' or $service eq 'setup.events.start' or $service eq 'setup.events.end' or + $service eq 'setup.install' or + $service eq 'dispatcher.output.generic' or + $service eq 'dispatcher.output' or + $service eq 'dataSource.strings.default' or $class->SUPER::provides($service)); } @@ -58,8 +61,8 @@ sub databaseName { return 'default'; } -# returns ($type, $string) -sub get { +# returns ($type, $version, $string) +sub getCustomisedString { my $self = shift; my($app, $session, $protocol, $string) = @_; # error handling makes code ugly :-) @@ -86,19 +89,19 @@ sub get { # XXX do we want to do an error here or something? $self->warn(4, "While I was looking for the string '$string' in protocol '$protocol' using variant '$variant', I failed with: $@"); } - if (not scalar(@results)) { - $self->dump(9, "Did not find a string for '$string', going to look in the defaults..."); - @results = $self->getDefaultString($app, $protocol, $string); - $self->assert(scalar(@results), 1, "Couldn't find a string to display for '$string' in protocol '$protocol'"); + if (scalar(@results)) { + $self->stringsCache->{$variant}->{$string} = \@results; + return @results; + } else { + $self->dump(9, "Did not find a customised string for '$string' in protocol '$protocol'"); + return; } - $self->stringsCache->{$variant}->{$string} = \@results; - return @results; } else { return @{$self->stringsCache->{$variant}->{$string}}; } } else { - $self->dump(9, "String datasource is disabled, going to use default for string '$string'."); - return $self->getDefaultString($app, $protocol, $string); + $self->dump(9, "String datasource is disabled, skipping"); + return; } } @@ -168,6 +171,65 @@ sub setupEnding { $self->enabled(1); } +# setup.install +sub setupInstall { + my $self = shift; + my($app) = @_; + my $oldStrings = []; + # get all strings (variant id, variant name, variant protocol, string name, string version) + $app->output->setupProgress('strings.versionCheck'); + my $strings = $self->getAllStringVersions($app); # arrayref of arrayrefs + foreach my $string (@$strings) { + # get version of default for $string->name in $string->protocol + my($variantID, $variantName, $variantProtocol, $stringName, $stringVersion) = @$string; + my($defaultStringType, $defaultStringVersion, $defaultStringData) = $app->getSelectingService('dataSource.strings.default')->getDefaultString($app, $variantProtocol, $stringName); + # if version < default string's version + if ($stringVersion < $defaultStringVersion) { + # XXX this is a numeric comparison because I am assuming + # that versions are simply integers. There is no reason + # this should actually be the case, so we may wish to + # implement a service for comparing versions and then use + # that here. + push(@$oldStrings, [@$string, $defaultStringVersion]); + } + } + if (scalar(@$oldStrings) > 0) { + # output array + $app->output->setupNewStringReport($oldStrings); + } + return; +} + +# dispatcher.output.generic (used by the setupInstall method above +# assuming you are using a generic output system) +sub outputSetupNewStringReport { + my $self = shift; + my($app, $output, $oldStrings) = @_; + $output->output('setup.newStringReport', { + 'oldStrings' => $oldStrings, + }); +} + +# dispatcher.output +sub strings { + return ( + 'setup.newStringsReport' => 'If some of the strings that are customised in this local installation have had their defaults changed, then this output will be triggered in addition to the various setup.progress calls and so on. It has one entry in the data hash. oldStrings, which is an array of arrays containing the variant id, the variant name, the variant protocol, the string name, the string version number, and the new version number of the default string. Details about exactly what changed should be found in the documentation.', + ); +} + +# dataSource.strings.default +sub getDefaultString { + my $self = shift; + my($app, $protocol, $string) = @_; + if ($protocol eq 'stdout') { + if ($string eq 'setup.newStringsReport') { + return ('COSES', '1', 'Note: The following strings have had their defaults updated since you last customised them:
(): yours=, new=
') + } + } + return; # nope, sorry +} + + # XXX The next four SO have to change... sub acceptType { @@ -201,13 +263,7 @@ sub getString { my $self = shift; # my($app, $variant, $string) = @_; $self->notImplemented(); - # return type, data -} - -sub getDefaultString { - my $self = shift; - my($app, $protocol, $string) = @_; - return $app->getSelectingServiceList('dataSource.strings.default')->getDefaultString($app, $protocol, $string); + # return type, version, data } sub getVariants { @@ -228,14 +284,14 @@ sub getVariantStrings { my $self = shift; # my($app, $variant) = @_; $self->notImplemented(); - # return ( string => [ type, data ] )*; + # return ( string => [ type, version, data ] )*; } sub getStringVariants { my $self = shift; # my($app, $string) = @_; $self->notImplemented(); - # return ( variant => [ type, data ] )*; + # return ( variant => [ type, version, data ] )*; } sub getDescribedVariants { @@ -245,6 +301,13 @@ sub getDescribedVariants { # return { id => { name, protocol, quality, type, encoding, charset, language, description, translator } }* } +sub getAllStringVersions { + my $self = shift; + # my($app) = @_; + $self->notImplemented(); + # return ( variant id, variant name, variant protocol, string id, string name, string version )* +} + # an undefined $id means "add me please" sub setVariant { my $self = shift; @@ -254,12 +317,7 @@ sub setVariant { sub setString { my $self = shift; - # my($app, $variant, $string, $type, $data) = @_; + # my($app, $variant, $string, $type, $version, $data) = @_; # if $data = '' then delete the relevant string from the database $self->notImplemented(); } - -sub setupInstall { - my $self = shift; - $self->notImplemented(); -} diff --git a/mozilla/webtools/PLIF/PLIF/DataSource/Strings/MySQL.pm b/mozilla/webtools/PLIF/PLIF/DataSource/Strings/MySQL.pm index 43d5fc43234..b4caf55ab5b 100644 --- a/mozilla/webtools/PLIF/PLIF/DataSource/Strings/MySQL.pm +++ b/mozilla/webtools/PLIF/PLIF/DataSource/Strings/MySQL.pm @@ -40,7 +40,7 @@ sub databaseType { sub getString { my $self = shift; my($app, $variant, $string) = @_; - return $self->database($app)->execute('SELECT type, data FROM strings WHERE variant = ? AND name = ?', $variant, $string)->row; + return $self->database($app)->execute('SELECT type, version, data FROM strings WHERE variant = ? AND name = ?', $variant, $string)->row; } sub getVariants { @@ -79,7 +79,7 @@ sub getVariantStrings { my $self = shift; my($app, $variant) = @_; my %result = (); - foreach my $string ($self->database($app)->execute('SELECT name, type, data FROM strings WHERE variant = ?', $variant)->rows) { + foreach my $string ($self->database($app)->execute('SELECT name, type, version, data FROM strings WHERE variant = ?', $variant)->rows) { $result{$string->[0]} = [$string->[1], $string->[2]]; } return %result; @@ -89,12 +89,18 @@ sub getStringVariants { my $self = shift; my($app, $string) = @_; my %result = (); - foreach my $variant ($self->database($app)->execute('SELECT variant, type, data FROM strings WHERE name = ?', $string)->rows) { + foreach my $variant ($self->database($app)->execute('SELECT variant, type, version, data FROM strings WHERE name = ?', $string)->rows) { $result{$variant->[0]} = [$variant->[1], $variant->[2]]; } return %result; } +sub getAllStringVersions { + my $self = shift; + my($app) = @_; + return $self->database($app)->execute('SELECT stringVariants.id, stringVariants.name, stringVariants.protocol, strings.name, strings.version FROM stringVariants, strings WHERE stringVariants.id = strings.variant')->rows; +} + sub setVariant { my $self = shift; my($app, $id, $name, $protocol, $quality, $type, $encoding, $charset, $language, $description, $translator) = @_; @@ -107,9 +113,9 @@ sub setVariant { sub setString { my $self = shift; - my($app, $variant, $string, $type, $data) = @_; - if ((defined($data)) and (length($data) > 0)) { - $self->database($app)->execute('REPLACE INTO stringVariants SET variant=?, string=?, type=?, data=?', $variant, $string, $type, $data); + my($app, $variant, $version, $string, $type, $data) = @_; + if (defined($data)) { + $self->database($app)->execute('REPLACE INTO stringVariants SET variant=?, string=?, type=?, version=?, data=?', $variant, $string, $type, $version, $data); } else { $self->database($app)->execute('DELETE FROM stringVariants WHERE variant = ? AND string = ?', $variant, $string); } @@ -122,7 +128,7 @@ sub setupInstall { $self->dump(9, 'about to configure string data source...'); if (not $helper->tableExists($app, $self->database($app), 'stringVariants')) { $self->debug('going to create \'stringVariants\' table'); - $app->output->setupProgress('strings data source (creating stringVariants database)'); + $app->output->setupProgress('dataSource.strings.stringVariants'); $self->database($app)->execute(' CREATE TABLE stringVariants ( id integer unsigned auto_increment NOT NULL PRIMARY KEY, @@ -143,12 +149,13 @@ sub setupInstall { } if (not $helper->tableExists($app, $self->database($app), 'strings')) { $self->debug('going to create \'strings\' table'); - $app->output->setupProgress('strings data source (creating strings database)'); + $app->output->setupProgress('dataSource.strings.strings'); $self->database($app)->execute(' CREATE TABLE strings ( variant integer unsigned NOT NULL, name varchar(32) NOT NULL, type varchar(32) NOT NULL, + version varchar(32) NOT NULL, data text, PRIMARY KEY (variant, name) ) @@ -158,7 +165,10 @@ sub setupInstall { if (not $helper->columnExists($app, $self->database($app), 'strings', 'type')) { $self->database($app)->execute('ALTER TABLE strings ADD COLUMN type varchar(32) NOT NULL'); } + if (not $helper->columnExists($app, $self->database($app), 'strings', 'version')) { + $self->database($app)->execute('ALTER TABLE strings ADD COLUMN version varchar(32) NOT NULL'); + } } $self->dump(9, 'done configuring string data source'); - return; + return $self->SUPER::setupInstall(@_); } diff --git a/mozilla/webtools/PLIF/PLIF/DataSource/User/MySQL.pm b/mozilla/webtools/PLIF/PLIF/DataSource/User/MySQL.pm index 1a10691f124..004e3ee2585 100644 --- a/mozilla/webtools/PLIF/PLIF/DataSource/User/MySQL.pm +++ b/mozilla/webtools/PLIF/PLIF/DataSource/User/MySQL.pm @@ -312,7 +312,7 @@ sub setupInstall { $self->dump(9, 'about to configure user data source...'); if (not $helper->tableExists($app, $self->database($app), 'user')) { $self->debug('going to create \'user\' table'); - $app->output->setupProgress('user data source (creating user database)'); + $app->output->setupProgress('dataSource.user.user'); $self->database($app)->execute(' CREATE TABLE user ( userID integer unsigned auto_increment NOT NULL PRIMARY KEY, @@ -340,7 +340,7 @@ sub setupInstall { } if (not $helper->tableExists($app, $self->database($app), 'userData')) { $self->debug('going to create \'userData\' table'); - $app->output->setupProgress('user data source (creating userData database)'); + $app->output->setupProgress('dataSource.user.userData'); $self->database($app)->execute(' CREATE TABLE userData ( userID integer unsigned NOT NULL, @@ -361,7 +361,7 @@ sub setupInstall { } if (not $helper->tableExists($app, $self->database($app), 'userDataTypes')) { $self->debug('going to create \'userDataTypes\' table'); - $app->output->setupProgress('user data source (creating userDataTypes database)'); + $app->output->setupProgress('dataSource.user.userDataTypes'); $self->database($app)->execute(' CREATE TABLE userDataTypes ( fieldID integer unsigned auto_increment NOT NULL PRIMARY KEY, @@ -390,7 +390,7 @@ sub setupInstall { } if (not $helper->tableExists($app, $self->database($app), 'userGroupsMapping')) { $self->debug('going to create \'userGroupsMapping\' table'); - $app->output->setupProgress('user data source (creating userGroupsMapping database)'); + $app->output->setupProgress('dataSource.user.userGroupsMapping'); $self->database($app)->execute(' CREATE TABLE userGroupsMapping ( userID integer unsigned NOT NULL, @@ -409,7 +409,7 @@ sub setupInstall { } if (not $helper->tableExists($app, $self->database($app), 'groups')) { $self->debug('going to create \'groups\' table'); - $app->output->setupProgress('user data source (creating groups database)'); + $app->output->setupProgress('dataSource.user.groups'); $self->database($app)->execute(' CREATE TABLE groups ( groupID integer unsigned auto_increment NOT NULL PRIMARY KEY, @@ -428,7 +428,7 @@ sub setupInstall { } if (not $helper->tableExists($app, $self->database($app), 'groupRightsMapping')) { $self->debug('going to create \'groupRightsMapping\' table'); - $app->output->setupProgress('user data source (creating groupRightsMapping database)'); + $app->output->setupProgress('dataSource.user.groupRightsMapping'); $self->database($app)->execute(' CREATE TABLE groupRightsMapping ( groupID integer unsigned NOT NULL, @@ -447,7 +447,7 @@ sub setupInstall { } if (not $helper->tableExists($app, $self->database($app), 'rights')) { $self->debug('going to create \'rights\' table'); - $app->output->setupProgress('user data source (creating rights database)'); + $app->output->setupProgress('dataSource.user.rights'); $self->database($app)->execute(' CREATE TABLE rights ( rightID integer unsigned auto_increment NOT NULL PRIMARY KEY, diff --git a/mozilla/webtools/PLIF/PLIF/Output/Generic.pm b/mozilla/webtools/PLIF/PLIF/Output/Generic.pm index 8c647b76300..d3b80eba763 100644 --- a/mozilla/webtools/PLIF/PLIF/Output/Generic.pm +++ b/mozilla/webtools/PLIF/PLIF/Output/Generic.pm @@ -73,14 +73,16 @@ use PLIF::Output; # database which looks up the name of the database, which is used to # look up the list of variants and the specific string which should be # used from those variants. If that fails, then the string data source -# will instead ask each of the default string data sources in turn for -# a suitable string. +# will just return a "nope, sorry, not me" response. +# +# If that happens, then the output method instead asks the default +# string datasources. # # The output method then calls for an appropriate string expander # service, passes it the string and the data hash, and waits for # another string in return. # -# The string expander tytpically passes this string to an XML service +# The string expander typically passes this string to an XML service # (which typically calls expat) to get it parsed and then handles it # as appropriate to get some string output. # @@ -96,11 +98,18 @@ use PLIF::Output; # To find the list of strings required, do this: # my %strings = @{$app->getCollectingServiceList('dispatcher.output')->strings}; +sub provides { + my $class = shift; + my($service) = @_; + return ($service eq 'dataSource.strings' or + $class->SUPER::provides($service)); +} + sub protocol { return 'generic'; } -sub init { +sub serviceInstanceInit { my $self = shift; $self->SUPER::init(@_); my($app, $session, $protocol) = @_; @@ -109,6 +118,7 @@ sub init { $self->propertySet('outputter', $self->app->getService('output.generic.'.$self->actualProtocol)); } +# output.generic service instance method sub output { my $self = shift; my($string, $data, $session) = @_; @@ -116,21 +126,11 @@ sub output { $session = $self->actualSession; } $self->fillData($data); - $self->outputter->output($self->app, $session, $self->getString($session, $string, $data)); -} - -sub getString { - my $self = shift; - my($session, $name, $data) = @_; - my($type, $string) = $self->app->getService('dataSource.strings')->get($self->app, $session, $self->actualProtocol, $name); - my $expander = $self->app->getService("string.expander.named.$name"); - if (not defined($expander)) { - $expander = $self->app->getService("string.expander.$type"); - $self->assert($expander, 1, "Could not find a string expander for string '$name' of type '$type'"); - } - return $expander->expand($self->app, $self, $session, $self->actualProtocol, $string, $data); + $self->outputter->output($self->app, $session, + $self->app->getService('dataSource.strings')->getExpandedString($self->app, $session, $self->actualProtocol, $string, $data)); } +# output.generic service instance method # If we don't implement the output handler directly, let's see if some # specific output dispatcher service for this protocol does. # Note: We pass ourselves as the 'output object for this protocol' @@ -145,6 +145,7 @@ sub methodMissing { } } +# output.generic service instance method sub fillData { my $self = shift; my($data) = @_; @@ -155,3 +156,28 @@ sub fillData { $data->{'input'} = $self->app->input->hash; $data->{'output'} = $self->outputter->hash; } + +# dataSource.strings default implementation +sub getExpandedString { + my $self = shift; + my($app, $session, $protocol, $name, $data) = @_; + my($type, $version, $string) = $self->getString($app, $session, $protocol, $name); + my $expander = $app->getService("string.expander.named.$name"); + if (not defined($expander)) { + $expander = $app->getService("string.expander.$type"); + $self->assert($expander, 1, "Could not find a string expander for string '$name' of type '$type'"); + } + return $expander->expand($app, $self, $session, $protocol, $string, $data); +} + +# dataSource.strings default implementation +sub getString { + my $self = shift; + my($app, $session, $protocol, $name) = @_; + my @string = $app->getSelectingServiceList('dataSource.strings.customised')->getCustomisedString($app, $session, $protocol, $name); + if (not scalar(@string)) { + @string = $app->getSelectingServiceList('dataSource.strings.default')->getDefaultString($app, $protocol, $name); + $self->assert(scalar(@string), 1, "No suitable '$name' string available for the '$protocol' protocol"); + } + return @string; +} diff --git a/mozilla/webtools/PLIF/PLIF/Service/Components/AdminCommands.pm b/mozilla/webtools/PLIF/PLIF/Service/Components/AdminCommands.pm index 6fcc0055df3..09107fc6d55 100644 --- a/mozilla/webtools/PLIF/PLIF/Service/Components/AdminCommands.pm +++ b/mozilla/webtools/PLIF/PLIF/Service/Components/AdminCommands.pm @@ -137,9 +137,9 @@ sub getDefaultString { my($app, $protocol, $string) = @_; if ($protocol eq 'stdout') { if ($string eq 'setup') { - return ('COSES', 'Failed with:
Succeeded!
'); + return ('COSES', '1', 'Can\'t continue: argument is missing.Succeeded!
'); } elsif ($string eq 'setup.progress') { - return ('COSES', 'Setup: configuring ...
'); + return ('COSES', '1', 'Setup: configuring ...
'); } } return; # nope, sorry diff --git a/mozilla/webtools/PLIF/PLIF/Service/Components/CosesEditor.pm b/mozilla/webtools/PLIF/PLIF/Service/Components/CosesEditor.pm index 939f6c6243d..98e86c3af04 100644 --- a/mozilla/webtools/PLIF/PLIF/Service/Components/CosesEditor.pm +++ b/mozilla/webtools/PLIF/PLIF/Service/Components/CosesEditor.pm @@ -44,7 +44,6 @@ sub provides { $service eq 'dispatcher.commands' or $service eq 'dispatcher.output.generic' or $service eq 'dispatcher.output' or - $service eq 'dataSource.strings.default' or $service eq 'setup.install' or $class->SUPER::provides($service)); } @@ -56,15 +55,15 @@ sub cmdCosesEditor { my($app) = @_; my $user = $app->getService('user.login')->hasRight($app, 'cosesEditor'); if (defined($user)) { - my %variants = $app->getService('dataSource.strings')->getDescribedVariants(); + my $variants = $self->getDescribedVariants($app); my $variantsSortColumn = $app->input->getArgument('cosesEditorVariantsSortColumn'); - my %strings = @{$app->getCollectingServiceList('dispatcher.output')->strings}; + my $strings = $self->getExpectedStrings($app); my $stringsSortColumn = $app->input->getArgument('cosesEditorStringsSortColumn'); # if (defined($user)) { $user->setting(\$variantsSortColumn, 'cosesEditor.index.variantsSortColumn'); $user->setting(\$stringsSortColumn, 'cosesEditor.index.stringsSortColumn'); # } - $app->output->cosesEditorIndex(\%variants, $variantsSortColumn, \%strings, $stringsSortColumn); + $app->output->cosesEditorIndex($variants, $variantsSortColumn, $strings, $stringsSortColumn); } # else, user has been notified } @@ -74,10 +73,11 @@ sub cmdCosesVariantAdd { my($app) = @_; my $user = $app->getService('user.login')->hasRight($app, 'cosesEditor'); if (defined($user)) { - my @data = ('', '', 1.0, '', '', '', '', '', ''); + my $protocol = $app->input->getArgument('cosesEditorVariantProtocol'); + my @data = ('', $protocol, 1.0, '', '', '', '', '', ''); my $id = $app->getService('dataSource.strings')->setVariant($app, undef, @data); - my %expectedStrings = @{$app->getCollectingServiceList('dispatcher.output')->strings}; - $app->output->cosesEditorVariant($id, @data, \%expectedStrings, {}); + my $expectedStrings = $self->getExpectedStrings($app, $protocol); + $app->output->cosesEditorVariant($id, @data, $expectedStrings, {}); } # else, user has been notified } @@ -90,9 +90,9 @@ sub cmdCosesVariantEdit { my $id = $app->input->getArgument('cosesEditorVariantID'); my $dataSource = $app->getService('dataSource.strings'); my @data = $dataSource->getVariant($app, $id); - my %expectedStrings = @{$app->getCollectingServiceList('dispatcher.output')->strings}; - my %variantStrings = $dataSource->getVariantStrings($app, $id); - $app->output->cosesEditorVariant($id, @data, \%expectedStrings, \%variantStrings); + my $expectedStrings = $self->getExpectedStrings($app, $data[1]); + my $variantStrings = \$dataSource->getVariantStrings($app, $id); + $app->output->cosesEditorVariant($id, @data, $expectedStrings, $variantStrings); } # else, user has been notified } @@ -102,9 +102,9 @@ sub cmdCosesVariantAddString { my($app) = @_; my $user = $app->getService('user.login')->hasRight($app, 'cosesEditor'); if (defined($user)) { - my %expectedStrings = @{$app->getCollectingServiceList('dispatcher.output')->strings}; my($id, $data, $variantStrings) = $self->getVariantEditorArguments($app); - $app->output->cosesEditorVariant($id, @$data, \%expectedStrings, $variantStrings); + my $expectedStrings = $self->getExpectedStrings($app, $data->[1]); + $app->output->cosesEditorVariant($id, @$data, $expectedStrings, $variantStrings); } # else, user has been notified } @@ -131,11 +131,10 @@ sub cmdCosesStringEdit { my $user = $app->getService('user.login')->hasRight($app, 'cosesEditor'); if (defined($user)) { my $id = $app->input->getArgument('cosesEditorStringID'); - my %strings = @{$app->getCollectingServiceList('dispatcher.output')->strings}; - my $dataSource = $app->getService('dataSource.strings'); - my %expectedVariants = $dataSource->getDescribedVariants(); - my %stringVariants = $dataSource->getStringVariants($app, $id); - $app->output->cosesEditorString($id, $strings{$id}, \%expectedVariants, \%stringVariants); + my $strings = $self->getExpectedStrings($app); + my $expectedVariants = $self->getDescribedVariants($app, $id); + my $stringVariants = \$app->getService('dataSource.strings')->getStringVariants($app, $id); + $app->output->cosesEditorString($id, $strings->{$id}, $expectedVariants, $stringVariants); } # else, user has been notified } @@ -147,10 +146,11 @@ sub cmdCosesStringCommit { if (defined($user)) { my $input = $app->input; my $id = $input->getArgument('cosesEditorStringID'); - my %variants = (); + my %variants; my $index = 0; while (defined(my $name = $input->getArgument('cosesEditorStringVariant${index}Name'))) { - $variants{$name} = [$input->getArgument('cosesEditorStringVariant${index}Type'), + $variants{$name} = [$input->getArgument('cosesEditorStringVariant${index}Type'), + $input->getArgument('cosesEditorStringVariant${index}Version'), $input->getArgument('cosesEditorStringVariant${index}Value')]; $index += 1; } @@ -186,8 +186,9 @@ sub cmdCosesVariantExport { foreach my $string (keys(%strings)) { my $name = $XML->escape($string); my $type = $XML->escape($strings{$string}->[0]); - my $value = $XML->escape($strings{$string}->[1]); - $result.= " $value\n"; + my $version = $XML->escape($strings{$string}->[1]); + my $value = $XML->escape($strings{$string}->[2]); + $result.= " $value\n"; } $result .= ''; $app->output->cosesEditorExport($id, $result); @@ -207,8 +208,9 @@ sub cmdCosesVariantImport { my $XML = $app->getService('service.xml'); my $data = { 'depth' => 0, - 'string' => undef, + 'name' => undef, 'type' => undef, + 'version' => undef, 'variant' => [], # same at all scopes (because walkNesting() is not a deep copy) 'strings' => {}, # same at all scopes (because walkNesting() is not a deep copy) }; @@ -222,7 +224,7 @@ sub cmdCosesVariantImport { } # display data - my %expectedStrings = @{$app->getCollectingServiceList('dispatcher.output')->strings}; + my %expectedStrings = $self->getExpectedStrings($app); my %variantStrings = $dataSource->getVariantStrings($app, $id); $app->output->cosesEditorVariant($id, @{$data->{'variant'}}, \%expectedStrings, \%variantStrings); } # else, user has been notified @@ -246,11 +248,12 @@ sub walkElement { } } elsif ($tagName eq '{http://bugzilla.mozilla.org/variant/1}string') { if ($data->{'depth'} == 1) { - if (exists($attributes->{'name'})) { - $data->{'string'} = $attributes->{'name'}; - $data->{'type'} = $attributes->{'type'}; - } else { - $self->error(1, 'invalid variant document format - missing attribute \'name\' on '); + foreach my $name (qw(name type version)) { + if (exists($attributes->{$name})) { + $data->{$name} = $attributes->{$name}; + } else { + $self->error(1, "invalid variant document format - missing attribute '$name' on "); + } } } else { $self->error(1, 'invalid variant document format - not child of '); @@ -266,7 +269,7 @@ sub walkText { my $self = shift; my($text, $data) = @_; if (defined($data->{'string'})) { - $data->{'strings'}->{$data->{'string'}} = [$data->{'type'}, $text]; + $data->{'strings'}->{$data->{'name'}} = [$data->{'type'}, $data->{'version'}, $text]; } elsif ($text !~ /^\w*$/o) { $self->error(1, "invalid variant document format - unexpected text"); } @@ -337,41 +340,13 @@ sub outputCosesEditorExport { # dispatcher.output sub strings { return ( - 'cosesEditor.index' => 'The COSES editor index. The data.variants hash (variant ID => hash with keys name, protocol, quality, type, encoding, charset, language, description, and translator) should be sorted by the data.variantsSortColumn, and the data.strings hash (name=>description) should be sorted by the data.stringsSortColumn (these are typically set by the cosesEditorVariantsSortColumn and cosesEditorStringsSortColumn arguments). Typical commands that this should lead to: cosesVariantAdd (no arguments), cosesVariantEdit (cosesEditorVariantID), cosesStringEdit (cosesEditorStringID), cosesVariantExport (cosesEditorVariantID), cosesVariantImport (cosesEditorImportData, the contents of an XML file)', - 'cosesEditor.variant' => 'The COSES variant editor. The data hash contains: protocol, quality, type, encoding, charset, language, description and translator (hereon "the variant data"), variant, an expectedStrings hash (name=>description), and a variantStrings hash (name=>[type,value]). The two hashes are likely to overlap. Typical commands that this should lead to: cosesVariantCommit and cosesVariantAddString (cosesEditorVariantID, cosesEditorVariantX where X is each of the variant data, cosesEditorVariantStringNName, cosesEditorVariantStringNType and cosesEditorVariantStringNValue where N is a number from 0 to as high as required, and cosesEditorStringNewName, cosesEditorStringNewType and cosesEditorVariantStringNewValue)', - 'cosesEditor.string' => 'The COSES string editor. The name of the string being edited and its description are in data.string and data.description. The data.expectedVariants contains a list of all variants (variant ID => hash with keys name, protocol, quality, type, encoding, charset, language, description, and translator), and data.stringVariants hosts the currently set strings (variant=>value). The main command that this should lead to is: cosesStringCommit (cosesEditorStringID, cosesEditorStringVariantNName, cosesEditorStringVariantNType and cosesEditorStringVariantNValue where N is a number from 0 to as high as required)', + 'cosesEditor.index' => 'The COSES editor index. The data.variants hash (variant ID => hash with keys name, protocol, quality, type, encoding, charset, language, description, and translator) should be sorted by the data.variantsSortColumn, and the data.strings hash (name=>description) should be sorted by the data.stringsSortColumn (these are typically set by the cosesEditorVariantsSortColumn and cosesEditorStringsSortColumn arguments). Typical commands that this should lead to: cosesVariantAdd (optional cosesEditorVariantProtocol), cosesVariantEdit (cosesEditorVariantID), cosesStringEdit (cosesEditorStringID), cosesVariantExport (cosesEditorVariantID), cosesVariantImport (cosesEditorImportData, the contents of an XML file)', + 'cosesEditor.variant' => 'The COSES variant editor. The data hash contains: protocol, quality, type, encoding, charset, language, description and translator (hereon "the variant data"), variant, an expectedStrings hash (name=>description), and a variantStrings hash (name=>[type,version,value]). The two hashes are likely to overlap. Typical commands that this should lead to: cosesVariantCommit and cosesVariantAddString (cosesEditorVariantID, cosesEditorVariantX where X is each of the variant data, cosesEditorVariantStringNName, cosesEditorVariantStringNType, cosesEditorVariantStringNVersion, and cosesEditorVariantStringNValue where N is a number from 0 to as high as required, and cosesEditorStringNewName, cosesEditorStringNewType, cosesEditorStringNewVersion and cosesEditorVariantStringNewValue)', + 'cosesEditor.string' => 'The COSES string editor. The name of the string being edited and its description are in data.string and data.description. The data.expectedVariants contains a list of all variants (variant ID => hash with keys name, protocol, quality, type, encoding, charset, language, description, and translator), and data.stringVariants hosts the currently set strings (variant=>value). The main command that this should lead to is: cosesStringCommit (cosesEditorStringID, cosesEditorStringVariantNName, cosesEditorStringVariantNType, cosesEditorStringVariantNVersion and cosesEditorStringVariantNValue where N is a number from 0 to as high as required)', 'cosesEditor.export' => 'The COSES variant export feature. data.variant holds the id of the variant, and data.output holds the XML representation of the variant.', ); } -# dataSource.strings.default -sub getDefaultString { - my $self = shift; - my($app, $protocol, $string) = @_; - if ($protocol eq 'stdout') { - if ($string eq 'cosesEditor.index') { - return ('COSES', 'COSES Editor
'); - } elsif ($string eq 'cosesEditor.variant') { - return ('COSES', 'COSES Editor
Variant Editor
'); - } elsif ($string eq 'cosesEditor.string') { - return ('COSES', 'COSES Editor
String Editor
'); - } elsif ($string eq 'cosesEditor.export') { - return ('COSES', '
'); - } - } elsif ($protocol eq 'http') { - if ($string eq 'cosesEditor.index') { - return ('COSES', 'HTTP/1.1 200 OK
Content-Type: text/plain

COSES Editor: Index
'); - } elsif ($string eq 'cosesEditor.variant') { - return ('COSES', 'HTTP/1.1 200 OK
Content-Type: text/plain

COSES Editor: Variant Editor
'); - } elsif ($string eq 'cosesEditor.string') { - return ('COSES', 'HTTP/1.1 200 OK
Content-Type: text/plain

COSES Editor: String Editor
'); - } elsif ($string eq 'cosesEditor.export') { - return ('COSES', 'HTTP/1.1 200 OK
Content-Type: text/xml

'); - } - } - return; # nope, sorry -} - # setup.install # XXX at least part of this could also be implemented as a user field # factory registerer hook -- does this matter? @@ -405,13 +380,44 @@ sub getVariantEditorArguments { my $index = 0; while (defined(my $name = $input->getArgument('cosesEditorVariantString${index}Name'))) { $variantStrings{$name} = [$input->getArgument('cosesEditorVariantString${index}Type'), + $input->getArgument('cosesEditorVariantString${index}Version'), $input->getArgument('cosesEditorVariantString${index}Value')]; $index += 1; } my $newName = $input->getArgument('cosesEditorVariantStringNewName'); if ((defined($newName)) and ($newName ne '')) { $variantStrings{$newName} = [$input->getArgument('cosesEditorVariantStringNewType'), + $input->getArgument('cosesEditorVariantStringNewVersion'), $input->getArgument('cosesEditorVariantStringNewValue')]; } return ($id, \@data, \%variantStrings); } + +sub getExpectedStrings { + my $self = shift; + my($app, $protocol) = @_; + my $strings = $app->getCollectingServiceList('dispatcher.output')->strings(); + if (defined($protocol)) { + my $defaults = $app->getSelectingService('dataSource.strings.default'); + foreach my $string (keys(%$strings)) { + $strings->{$string} = { + 'description' => $strings->{$string}, + 'default' => $defaults->getDefaultString($app, $protocol, $string), + }; + } + } + return $strings; +} + +sub getDescribedVariants { + my $self = shift; + my($app, $string) = @_; + my $variants = \$app->getService('dataSource.strings')->getDescribedVariants($app); + if (defined($string)) { + my $defaults = $app->getSelectingService('dataSource.strings.default'); + foreach my $variant (keys(%$variants)) { + push(@{$variants->{$variant}}, $defaults->getDefaultString($app, $variants->{$variant}->[1], $string)); + } + } + return $variants; +} diff --git a/mozilla/webtools/PLIF/PLIF/Service/Components/Login.pm b/mozilla/webtools/PLIF/PLIF/Service/Components/Login.pm index 9e8343cb2d3..a1bc0e2e272 100644 --- a/mozilla/webtools/PLIF/PLIF/Service/Components/Login.pm +++ b/mozilla/webtools/PLIF/PLIF/Service/Components/Login.pm @@ -43,7 +43,6 @@ sub provides { $service eq 'dispatcher.commands' or $service eq 'dispatcher.output.generic' or $service eq 'dispatcher.output' or - $service eq 'dataSource.strings.default' or $class->SUPER::provides($service)); } @@ -195,30 +194,6 @@ sub strings { ); } -# dataSource.strings.default -sub getDefaultString { - my $self = shift; - my($app, $protocol, $string) = @_; - if ($protocol eq 'stdout') { - if ($string eq 'login.accessDenied') { - return ('COSES', 'Access Denied
'); - } elsif ($string eq 'login.failed') { - return ('COSES', 'Wrong username or password.You must give your username or password.

'); - } elsif ($string eq 'login.detailsSent') { - return ('COSES', 'Login details were sent. (Protocol: ; Address: )
'); - } - } elsif ($protocol eq 'http') { - if ($string eq 'login.accessDenied') { - return ('COSES', 'HTTP/1.1 401 Access Denied
Content-Type: text/plain

Access Denied
'); - } elsif ($string eq 'login.failed') { - return ('COSES', 'HTTP/1.1 401 Login Required
WWW-Authenticate: Basic realm=""
Content-Type: text/plain

Wrong username or password.You must give your username or password.
'); - } elsif ($string eq 'login.detailsSent') { - return ('COSES', 'HTTP/1.1 200 OK
Content-Type: text/plain

Login details were sent.
Protocol:
Address: '); - } - } - return; # nope, sorry -} - # internal routines diff --git a/mozilla/webtools/PLIF/PLIF/Service/Coses.pm b/mozilla/webtools/PLIF/PLIF/Service/Coses.pm index 93079f140a3..92d3a4217d8 100644 --- a/mozilla/webtools/PLIF/PLIF/Service/Coses.pm +++ b/mozilla/webtools/PLIF/PLIF/Service/Coses.pm @@ -170,17 +170,18 @@ sub expand { push(@index, $index); push(@stack, $stack); $index = 0; - $stack = $xmlService->parseNS($self->getString($app, $session, $protocol, - $self->evaluateExpression($attributes->{'href'}, $scope))); + my($type, $version, $string) = $app->getService('dataSource.strings')->getString($app, $session, $protocol, $self->evaluateExpression($attributes->{'href'}, $scope)); + $self->assert($type eq 'COSES', 1, 'Tried to include a non-COSES string as COSES data. Set the \'parse\' attribute to \'text\' or \'x-auto\' to handle this correctly.'); + $stack = $xmlService->parseNS($string); push(@scope, $superscope); } elsif ($attributes->{'parse'} eq 'text') { # raw text inclusion - $result .= $self->escape($app, $self->getString($app, $session, $protocol, - $self->evaluateExpression($attributes->{'href'}, $scope)), $scope); + my($type, $version, $string) = $app->getService('dataSource.strings')->getString($app, $session, $protocol, $self->evaluateExpression($attributes->{'href'}, $scope)); + $result .= $self->escape($app, $string, $scope); } elsif ($attributes->{'parse'} eq 'x-auto') { # Get the string expanded automatically and # insert it into the result. - $result .= $self->escape($app, $output->getString($session, $self->evaluateExpression($attributes->{'href'}, $scope), $scope), $scope); + $result .= $self->escape($app, $app->getService('dataSource.strings')->getExpandedString($app, $session, $protocol, $self->evaluateExpression($attributes->{'href'}, $scope), $scope), $scope); } next node; # skip default handling } elsif ($node eq '{http://bugzilla.mozilla.org/coses}else') { @@ -283,13 +284,6 @@ sub expand { } } -sub getString { - my $self = shift; - my($app, $session, $protocol, $name) = @_; - my($type, $string) = $app->getService('dataSource.strings')->get($app, $session, $protocol, $name); - return $string; -} - sub evaluateVariable { my $self = shift; my($variable, $scope) = @_; diff --git a/mozilla/webtools/PLIF/PLIF/Service/GenericOutputs.pm b/mozilla/webtools/PLIF/PLIF/Service/GenericOutputs.pm index 281f9966220..173335a967e 100644 --- a/mozilla/webtools/PLIF/PLIF/Service/GenericOutputs.pm +++ b/mozilla/webtools/PLIF/PLIF/Service/GenericOutputs.pm @@ -75,17 +75,18 @@ sub strings { sub getDefaultString { my $self = shift; my($app, $protocol, $string) = @_; + if ($string eq 'error') { + $self->dump(9, 'Looks like an error occured, because the string \'error\' is being requested'); + } if ($protocol eq 'stdout') { if ($string eq 'request') { - return ('COSES', '\'\' (default: \'\', \'\')? '); + return ('COSES', '1', '\'\' (default: \'\', \'\')? '); } elsif ($string eq 'error') { - $self->dump(9, 'Looks like an error occured, because the string \'error\' is being requested'); - return ('COSES', 'Error:

'); + return ('COSES', '1', 'Error:

'); } } elsif ($protocol eq 'http') { if ($string eq 'error') { - $self->dump(9, 'Looks like an error occured, because the string \'error\' is being requested'); - return ('COSES', 'HTTP/1.1 500 Internal Error
Content-Type: text/plain

Error:
'); + return ('COSES', '1', 'HTTP/1.1 500 Internal Error
Content-Type: text/plain

Error:
'); } } return; # nope, sorry diff --git a/mozilla/webtools/PLIF/PLIF/Service/UserFieldFactory.pm b/mozilla/webtools/PLIF/PLIF/Service/UserFieldFactory.pm index 051949d9603..a212feceb35 100644 --- a/mozilla/webtools/PLIF/PLIF/Service/UserFieldFactory.pm +++ b/mozilla/webtools/PLIF/PLIF/Service/UserFieldFactory.pm @@ -130,7 +130,7 @@ sub removeField { sub setupInstall { my $self = shift; my($app) = @_; - $app->output->setupProgress('user fields'); + $app->output->setupProgress('user.fieldFactory'); $app->getCollectingServiceList('user.fieldRegisterer')->register($app, $self); return; } diff --git a/mozilla/webtools/bugzilla3/tests/DataSource/ConsoleStrings.pm b/mozilla/webtools/bugzilla3/tests/DataSource/ConsoleStrings.pm deleted file mode 100644 index 03c6cded608..00000000000 --- a/mozilla/webtools/bugzilla3/tests/DataSource/ConsoleStrings.pm +++ /dev/null @@ -1,53 +0,0 @@ -# -*- Mode: perl; tab-width: 4; indent-tabs-mode: nil; -*- -# -# This file is MPL/GPL dual-licensed under the following terms: -# -# The contents of this file are subject to the Mozilla Public License -# Version 1.1 (the "License"); you may not use this file except in -# compliance with the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -# the License for the specific language governing rights and -# limitations under the License. -# -# The Original Code is PLIF 1.0. -# The Initial Developer of the Original Code is Ian Hickson. -# -# Alternatively, the contents of this file may be used under the terms -# of the GNU General Public License Version 2 or later (the "GPL"), in -# which case the provisions of the GPL are applicable instead of those -# above. If you wish to allow use of your version of this file only -# under the terms of the GPL and not to allow others to use your -# version of this file under the MPL, indicate your decision by -# deleting the provisions above and replace them with the notice and -# other provisions required by the GPL. If you do not delete the -# provisions above, a recipient may use your version of this file -# under either the MPL or the GPL. - -package DataSource::ConsoleStrings; -use strict; -use vars qw(@ISA); -use PLIF::DataSource; -@ISA = qw(PLIF::DataSource); -1; - -sub provides { - my $class = shift; - my($service) = @_; - return ($service eq 'dataSource.strings.default' or $class->SUPER::provides($service)); -} - -sub getDefaultString { - my $self = shift; - my($app, $protocol, $string) = @_; - if ($protocol ne 'stdout') { - return; # ``we don't do duvets!!!'' - } - if ($string eq 'hello') { - return ('COSES', 'Hello user #World!
'); - } else { - return ('COSES', 'Er. '); - } -} diff --git a/mozilla/webtools/bugzilla3/tests/DataSource/HTTPStrings.pm b/mozilla/webtools/bugzilla3/tests/DataSource/HTTPStrings.pm deleted file mode 100644 index a7d8d2e5e4b..00000000000 --- a/mozilla/webtools/bugzilla3/tests/DataSource/HTTPStrings.pm +++ /dev/null @@ -1,53 +0,0 @@ -# -*- Mode: perl; tab-width: 4; indent-tabs-mode: nil; -*- -# -# This file is MPL/GPL dual-licensed under the following terms: -# -# The contents of this file are subject to the Mozilla Public License -# Version 1.1 (the "License"); you may not use this file except in -# compliance with the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -# the License for the specific language governing rights and -# limitations under the License. -# -# The Original Code is PLIF 1.0. -# The Initial Developer of the Original Code is Ian Hickson. -# -# Alternatively, the contents of this file may be used under the terms -# of the GNU General Public License Version 2 or later (the "GPL"), in -# which case the provisions of the GPL are applicable instead of those -# above. If you wish to allow use of your version of this file only -# under the terms of the GPL and not to allow others to use your -# version of this file under the MPL, indicate your decision by -# deleting the provisions above and replace them with the notice and -# other provisions required by the GPL. If you do not delete the -# provisions above, a recipient may use your version of this file -# under either the MPL or the GPL. - -package DataSource::HTTPStrings; -use strict; -use vars qw(@ISA); -use PLIF::DataSource; -@ISA = qw(PLIF::DataSource); -1; - -sub provides { - my $class = shift; - my($service) = @_; - return ($service eq 'dataSource.strings.default' or $class->SUPER::provides($service)); -} - -sub getDefaultString { - my $self = shift; - my($app, $protocol, $string) = @_; - if ($protocol ne 'http') { - return; # ``we don't do CDs!!!'' - } - if ($string eq 'hello') { - return ('COSES', 'HTTP/1.1 200 OK
Content-Type: text/plain

Hello user #World!

visit nph-Main?command=Login to log in if you haven\'t already.
At the moment to create a username and password, you have to ask Hixie to edit the database... :-/ (use open/sesame to test)







Welcome To The URI World
Welcome To The <HTML> World
Welcome To > The HTML+URI+XML+foo World
'); - } else { - return ('COSES', 'HTTP/1.1 200 OK
Content-Type: text/plain

Er.
'); - } -} diff --git a/mozilla/webtools/bugzilla3/tests/Main b/mozilla/webtools/bugzilla3/tests/Main index 79478217149..1e8b2d16715 100755 --- a/mozilla/webtools/bugzilla3/tests/Main +++ b/mozilla/webtools/bugzilla3/tests/Main @@ -67,8 +67,6 @@ sub registerServices { PLIF::Service::ContactMethod::AIM Output Configuration - DataSource::ConsoleStrings - DataSource::HTTPStrings )); } diff --git a/mozilla/webtools/bugzilla3/tests/output/aim/login.details b/mozilla/webtools/bugzilla3/tests/output/aim/login.details index cc4a30a8789..c29fbf99406 100644 --- a/mozilla/webtools/bugzilla3/tests/output/aim/login.details +++ b/mozilla/webtools/bugzilla3/tests/output/aim/login.details @@ -1,2 +1,4 @@ COSES +1 + diff --git a/mozilla/webtools/bugzilla3/tests/output/email/login.details b/mozilla/webtools/bugzilla3/tests/output/email/login.details index 5f70fe08162..b5d2d8cea7d 100644 --- a/mozilla/webtools/bugzilla3/tests/output/email/login.details +++ b/mozilla/webtools/bugzilla3/tests/output/email/login.details @@ -1,4 +1,6 @@ COSES +1 + diff --git a/mozilla/webtools/bugzilla3/tests/output/http/hello b/mozilla/webtools/bugzilla3/tests/output/http/hello index a71d59d8eb5..e60033062ac 100644 --- a/mozilla/webtools/bugzilla3/tests/output/http/hello +++ b/mozilla/webtools/bugzilla3/tests/output/http/hello @@ -1,4 +1,6 @@ COSES +1 + diff --git a/mozilla/webtools/bugzilla3/tests/output/http/login.accessDenied b/mozilla/webtools/bugzilla3/tests/output/http/login.accessDenied index 71fe3fdfa35..3a9adf8630b 100644 --- a/mozilla/webtools/bugzilla3/tests/output/http/login.accessDenied +++ b/mozilla/webtools/bugzilla3/tests/output/http/login.accessDenied @@ -1,4 +1,6 @@ COSES +1 + diff --git a/mozilla/webtools/bugzilla3/tests/output/http/login.detailsSent b/mozilla/webtools/bugzilla3/tests/output/http/login.detailsSent index 85c6438054d..b1d61f2b50b 100644 --- a/mozilla/webtools/bugzilla3/tests/output/http/login.detailsSent +++ b/mozilla/webtools/bugzilla3/tests/output/http/login.detailsSent @@ -1,4 +1,6 @@ COSES +1 + diff --git a/mozilla/webtools/bugzilla3/tests/output/http/login.failed b/mozilla/webtools/bugzilla3/tests/output/http/login.failed index 81824638208..458bdcb447e 100644 --- a/mozilla/webtools/bugzilla3/tests/output/http/login.failed +++ b/mozilla/webtools/bugzilla3/tests/output/http/login.failed @@ -1,4 +1,6 @@ COSES +1 + diff --git a/mozilla/webtools/bugzilla3/tests/output/http/template.html.footer b/mozilla/webtools/bugzilla3/tests/output/http/template.html.footer index 87f8bc7087a..eaabff4b3b4 100644 --- a/mozilla/webtools/bugzilla3/tests/output/http/template.html.footer +++ b/mozilla/webtools/bugzilla3/tests/output/http/template.html.footer @@ -1,4 +1,6 @@ COSES +1 +