Changeset 32586 for main


Ignore:
Timestamp:
2018-11-08T18:54:56+13:00 (5 years ago)
Author:
ak19
Message:

Renaming 'site_name' parameter used by GS SQL Plugout and Plugin to 'site' for consistency with existing uses of site.

Location:
main/trunk/greenstone2/perllib
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/inexport.pm

    r32563 r32586  
    680680    push @$plugout,("-gzip_output")                if ($gzip);
    681681    push @$plugout,("-output_handle",$out)         if (defined $out);
    682     push @$plugout,("-site_name",$self->{'site'})  if (defined $self->{'site'});
     682    push @$plugout,("-site",$self->{'site'})  if (defined $self->{'site'});
    683683
    684684    push @$plugout,("-xslt_file",$xsltfile)        if (defined $xsltfile && $xsltfile ne "");
  • main/trunk/greenstone2/perllib/plugins/GreenstoneSQLPlugin.pm

    r32584 r32586  
    161161    'type' => "enum",
    162162    'list' => $rollback_on_cancel_list,
    163     'deft' => "true", # TODO Q: what's the better default? If "true", any memory concerns?
     163    'deft' => "false", # TODO Q: what's the better default? If "true", any memory concerns?
    164164    'reqd' => "no",
    165165    'hiddengli' => "no"},
     
    236236
    237237    ####################
    238 #    print "@@@ SITE NAME: ". $self->{'site_name'} . "\n" if defined $self->{'site_name'};
     238#    print "@@@ SITE NAME: ". $self->{'site'} . "\n" if defined $self->{'site'};
    239239#    print "@@@ COLL NAME: ". $ENV{'GSDLCOLLECTION'} . "\n";
    240240
     
    270270    }
    271271   
    272     my $db_name = $self->{'site_name'} || "greenstone2"; # one database per GS3 site, for GS2 the db is called greenstone2
     272    my $db_name = $self->{'site'} || "greenstone2"; # one database per GS3 site, for GS2 the db is called greenstone2
    273273
    274274    # Attempt to use the db, create it if it doesn't exist (but don't create the tables yet)
     
    332332    print STDERR "   Building with removeold option set, so deleting current collection's tables if they exist\n" if($self->{'verbosity'});
    333333   
    334     # if we're in here, we'd already have run 'use database <site_name>;' during sub init()
     334    # if we're in here, we'd already have run 'use database <site>;' during sub init()
    335335    # so we can go ahead and delete the collection's tables
    336336    my $gs_sql = $self->{'gs_sql'};
  • main/trunk/greenstone2/perllib/plugins/PrintInfo.pm

    r32539 r32586  
    5353      'reqd' => "no",
    5454      'hiddengli' => "yes" },
    55     { 'name' => "site_name",
    56       'desc' => "{PrintInfo.site_name}",
     55    { 'name' => "site",
     56      'desc' => "{PrintInfo.site}",
    5757      'type' => "string",
    5858      'reqd' => "no",
     
    8686    # the args, just return the object.
    8787    # gsdlinfo must come before gs_version. both are set by plugin.pm
    88     # The optional -site_name <site> (present only for GS3 and when not doing gsdlinfo),
     88    # The optional -site <site-name> (present only for GS3 and when not doing gsdlinfo),
    8989    # if it is there, also appears before gs_version and is also set by plugin.pm
    9090    my $v=0;
    9191    foreach my $strArg (@{$args})
    9292    {
    93     if($v eq "-site_name") {
    94         $self->{'site_name'} = $strArg;
     93    if($v eq "-site") {
     94        $self->{'site'} = $strArg;
    9595    }
    9696    elsif($v eq "-gs_version") {
     
    103103        #return bless $self, $class;
    104104    }
    105     elsif ($strArg eq "-gs_version" || $strArg eq "-site_name") {       
     105    elsif ($strArg eq "-gs_version" || $strArg eq "-site") {       
    106106        $v = $strArg;
    107107    }
  • main/trunk/greenstone2/perllib/plugouts/BasePlugout.pm

    r32564 r32586  
    4545
    4646my $arguments = [
    47         { 'name' => "site_name",
    48       'desc' => "{BasPlugout.site_name}",
     47        { 'name' => "site",
     48      'desc' => "{BasPlugout.site}",
    4949      'type' => "string",
    5050      'reqd' => "no",
     
    149149        return bless $self, $class;
    150150        }       
    151         elsif ($strArg eq "-site_name") {
     151        elsif ($strArg eq "-site") {
    152152        $v = $strArg;
    153153        }
    154         elsif($v eq "-site_name") {
    155         $self->{'site_name'} = $strArg;
     154        elsif($v eq "-site") {
     155        $self->{'site'} = $strArg;
    156156        }
    157157    }
  • main/trunk/greenstone2/perllib/plugouts/GreenstoneSQLPlugout.pm

    r32584 r32586  
    4141# + TODO: SIGTERM rollback and disconnect?
    4242# + TODO Q: what about verbosity for debugging, instead of current situation of printing out upon debug set at the expense of writing to db
    43 # TODO Q: introduced site_name param to plugins and plugouts. Did I do it right? And should they have hiddengli = "yes"
     43#X TODO Q: introduced site param to plugins and plugouts. Did I do it right? And should they have hiddengli = "yes". No longer a param
    4444# Did I do the pass by ref in docprint's escape and unescape textref functions correctly, and how they're called here?
    4545#   Any more optimisation I can do around this?
     
    8888      'type' => "enum",
    8989      'list' => $rollback_on_cancel_list,
    90       'deft' => "true", # TODO Q: what's the better default? If "true", any memory concerns?
     90      'deft' => "false", # TODO Q: what's the better default? If "true", any memory concerns?
    9191      'reqd' => "no",
    9292      'hiddengli' => "no"},
     
    155155
    156156    ############ LOAD NECESSARY OPTIONS ###########
    157     #print "@@@ plugout SITE NAME: ". $self->{'site_name'} . "\n" if defined $self->{'site_name'};
     157    #print "@@@ plugout SITE NAME: ". $self->{'site'} . "\n" if defined $self->{'site'};
    158158    #print STDERR "########## COLLECTION: ". $ENV{'GSDLCOLLECTION'}."\n";
    159159
     
    189189    #die("@@@@ TEST. Connected successfully. Testing gssql::destructor.\n"); # WORKS
    190190   
    191     my $db_name = $self->{'site_name'} || "greenstone2"; # one database per GS3 site, for GS2 the db is called greenstone2
     191    my $db_name = $self->{'site'} || "greenstone2"; # one database per GS3 site, for GS2 the db is called greenstone2
    192192    my $proc_mode = $self->{'process_mode'};
    193193   
  • main/trunk/greenstone2/perllib/strings.properties

    r32582 r32586  
    12341234PrintInfo.desc:Most base plugin, handles printing info (using pluginfo.pl) and parsing of the arguments.
    12351235
    1236 PrintInfo.site_name:The name of the Greenstone 3 site. The default site for a GS3 installation is localsite.
     1236PrintInfo.site:The name of the Greenstone 3 site. The default site for a GS3 installation is localsite.
    12371237
    12381238ProCitePlugin.desc:A plugin for (exported) ProCite databases
     
    14181418BasPlugout.no_auxiliary_databases:Don't generate archivesinf databases - useful when exporting.
    14191419# '
    1420 BasPlugout.site_name:The name of the Greenstone 3 site. The default site for a GS3 installation is localsite.
     1420BasPlugout.site:The name of the Greenstone 3 site. The default site for a GS3 installation is localsite.
    14211421BasPlugout.output_handle: the file descriptor used to receive output data
    14221422BasPlugout.output_info:The reference to an arcinfo object used to store information about the archives.
Note: See TracChangeset for help on using the changeset viewer.