Home : Products : DBMan : Customization :

Products: DBMan: Customization: Re: [knue] Updating many cfg files at once.: Edit Log

Here is the list of edits for this post
Re: [knue] Updating many cfg files at once.
EDIT: copy and paste got me in trouble. take out the line about user-list. i've removed it below

great! so basically change the following in sub build_external_select field
from
$external_db=$db_script_path . '/' . lc($column) . '.db';
open (DB, "<$external_db") or &cgierr("unable to open $column.db. Reason: $!");
if ($db_use_flock) { flock(DB, 1); }
LINE: while (<DB> ) {
next if /^#/;
next if /^\s*$/;
$line = $_;
chomp ($line);
push (@selectfields, $line);
}


to

open (PASS, "<$auth_pw_file") or &cgierr ("unable to open: $auth_pw_file.\nReason: $!");
if ($db_use_flock) { flock(PASS, 1); }
@lines = <PASS>;
close PASS;

# If we are inquiring, let's look for the specified user.
my (@data);

LINE: foreach $line (@lines) {
$line =~ /^#/ and next LINE;
$line =~ /^\s*$/ and next LINE;
chomp $line;
@data = split (/:/, $line);
push (@selectfields, $data[0]);
}

since i'm just working on excerpt, i may be missing a bracket somewhere...

Last edited by:

delicia: Dec 1, 2015, 6:02 PM

Edit Log: