[dw-free] Fix whitespace; put it at the same whitespace level as indicated by braces.
[commit: http://hg.dwscoalition.org/dw-free/rev/75e2a7c9b3e5]
Fix whitespace; put it at the same whitespace level as indicated by braces.
Patch by
fu.
Files modified:
Fix whitespace; put it at the same whitespace level as indicated by braces.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- bin/upgrading/update-db.pl
-------------------------------------------------------------------------------- diff -r 1bcdca023b48 -r 75e2a7c9b3e5 bin/upgrading/update-db.pl --- a/bin/upgrading/update-db.pl Thu Sep 23 16:50:43 2010 +0800 +++ b/bin/upgrading/update-db.pl Thu Sep 23 16:59:32 2010 +0800 @@ -417,38 +417,38 @@ sub populate_s2 { close SL; } - if ($LJ::IS_DEV_SERVER) { - # now, delete any system layers that don't below (from previous imports?) - my @del_ids; - my $sth = $dbh->prepare("SELECT s2lid FROM s2layers WHERE userid=? AND NOT type='user'"); - $sth->execute($sysid); - while (my $id = $sth->fetchrow_array) { - next if $known_id{$id}; - push @del_ids, $id; - } - - # if we need to delete things, prompt before blowing away system layers - if (@del_ids) { - print "\nWARNING: The following S2 layer ids are known as system layers but are no longer\n" . - "present in the import files. If this is expected and you really want to DELETE\n" . - "these layers, type 'YES' (in all capitals).\n\nType YES to delete layers " . - join(', ', @del_ids) . ": "; - my $inp = <STDIN>; - if ($inp =~ /^YES$/) { - print "\nOkay, I am PERMANENTLY DELETING the layers.\n"; - LJ::S2::delete_layer($_) foreach @del_ids; - } else { - print "\nOkay, I am NOT deleting the layers.\n"; + if ($LJ::IS_DEV_SERVER) { + # now, delete any system layers that don't below (from previous imports?) + my @del_ids; + my $sth = $dbh->prepare("SELECT s2lid FROM s2layers WHERE userid=? AND NOT type='user'"); + $sth->execute($sysid); + while (my $id = $sth->fetchrow_array) { + next if $known_id{$id}; + push @del_ids, $id; + } + + # if we need to delete things, prompt before blowing away system layers + if (@del_ids) { + print "\nWARNING: The following S2 layer ids are known as system layers but are no longer\n" . + "present in the import files. If this is expected and you really want to DELETE\n" . + "these layers, type 'YES' (in all capitals).\n\nType YES to delete layers " . + join(', ', @del_ids) . ": "; + my $inp = <STDIN>; + if ($inp =~ /^YES$/) { + print "\nOkay, I am PERMANENTLY DELETING the layers.\n"; + LJ::S2::delete_layer($_) foreach @del_ids; + } else { + print "\nOkay, I am NOT deleting the layers.\n"; + } + } + + if ( $has_new_layer ) { + $LJ::CACHED_PUBLIC_LAYERS = undef; + LJ::MemCache::delete( "s2publayers" ); + + print "\nCleared styles cache.\n"; } } - - if ( $has_new_layer ) { - $LJ::CACHED_PUBLIC_LAYERS = undef; - LJ::MemCache::delete( "s2publayers" ); - - print "\nCleared styles cache.\n"; - } - } } } --------------------------------------------------------------------------------