Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b49ec094

Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt

  • ID b49ec094cbc99d74c411255b9ca882bb46e251cb
  • Vorgänger 77505215
  • Nachfolger 90bb521a

dbupgrade2_tool.pl um Mandantenoption erweitert

Unterschiede anzeigen:

scripts/dbupgrade2_tool.pl
42 42
#######
43 43

  
44 44
my ($opt_list, $opt_tree, $opt_rtree, $opt_nodeps, $opt_graphviz, $opt_help);
45
my ($opt_user, $opt_apply, $opt_applied, $opt_unapplied, $opt_format, $opt_test_utf8);
45
my ($opt_user, $opt_client, $opt_apply, $opt_applied, $opt_unapplied, $opt_format, $opt_test_utf8);
46 46
my ($opt_dbhost, $opt_dbport, $opt_dbname, $opt_dbuser, $opt_dbpassword, $opt_create, $opt_type);
47 47
my ($opt_description, $opt_encoding, @opt_depends, $opt_auth_db);
48 48

  
......
103 103
    --help               Show this help and exit.
104 104

  
105 105
  General Options:
106
    --client=id-or-name  The name (or database ID) of the client to use for
107
                         database connectivity. You must provide both a client
108
                         and a user.
106 109
    --user=name          The name of the user configuration to use for
107
                         database connectivity.
110
                         database connectivity. You must provide both a client
111
                         and a user.
108 112
    --auth-db            Work on the authentication database instead of a
109 113
                         user database.
110 114
    --dbname=name        Database connection options for the UTF-8
......
474 478
           "graphviz:s"   => \$opt_graphviz,
475 479
           "format:s"     => \$opt_format,
476 480
           "user=s"       => \$opt_user,
481
           "client=s"     => \$opt_client,
477 482
           "apply=s"      => \$opt_apply,
478 483
           "applied"      => \$opt_applied,
479 484
           "create=s"     => \$opt_create,
......
510 515
               encoding    => $opt_encoding,
511 516
               depends     => \@opt_depends) if ($opt_create);
512 517

  
518
if ($opt_client && !connect_auth()->set_client($opt_client)) {
519
  $form->error($form->format_string("The client '#1' does not exist.", $opt_client));
520
}
521

  
513 522
if ($opt_user) {
523
  $form->error("Need a client, too.") if !$auth || !$auth->client;
524

  
514 525
  %myconfig = connect_auth()->read_user(login => $opt_user);
515 526

  
516 527
  if (!$myconfig{login}) {

Auch abrufbar als: Unified diff