aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authormartinp <martinp@f38db490-d61c-443f-a65b-d21fe96a405b>2003-07-28 16:19:21 +0000
committermartinp <martinp@f38db490-d61c-443f-a65b-d21fe96a405b>2003-07-28 16:19:21 +0000
commit37312e1c31e5b5037a3024dd42dbf9c2b0148ef3 (patch)
tree308863bd1351a2eb3333d4421b3bb77b20db5605 /contrib
parenta24f81275262b283e59c20cf00b1b1f9bfa4bb31 (diff)
Fix couple of bugs
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1234 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/scripts/retrieve_extensions_from_mysql.pl24
1 files changed, 12 insertions, 12 deletions
diff --git a/contrib/scripts/retrieve_extensions_from_mysql.pl b/contrib/scripts/retrieve_extensions_from_mysql.pl
index 78a7777e4..9368efbec 100755
--- a/contrib/scripts/retrieve_extensions_from_mysql.pl
+++ b/contrib/scripts/retrieve_extensions_from_mysql.pl
@@ -45,13 +45,13 @@ $statement = "SELECT * from $global_table_name order by variable";
my $result = $dbh->selectall_arrayref($statement);
unless ($result) {
# check for errors after every single database call
- print EXTEN "dbh->selectall_arrayref($statement) failed!\n";
- print EXTEN "DBI::err=[$DBI::err]\n";
- print EXTEN "DBI::errstr=[$DBI::errstr]\n";
+ print "dbh->selectall_arrayref($statement) failed!\n";
+ print "DBI::err=[$DBI::err]\n";
+ print "DBI::errstr=[$DBI::errstr]\n";
exit;
}
my @resultSet = @{$result};
-if ( $#resultSet > 0 ) {
+if ( $#resultSet > -1 ) {
print EXTEN "[globals]\n";
foreach $row (@{ $result }) {
my @result = @{ $row };
@@ -65,14 +65,14 @@ $statement = "SELECT context from $table_name group by context";
$result = $dbh->selectall_arrayref($statement);
unless ($result) {
# check for errors after every single database call
- print EXTEN "dbh->selectall_arrayref($statement) failed!\n";
- print EXTEN "DBI::err=[$DBI::err]\n";
- print EXTEN "DBI::errstr=[$DBI::errstr]\n";
+ print "dbh->selectall_arrayref($statement) failed!\n";
+ print "DBI::err=[$DBI::err]\n";
+ print "DBI::errstr=[$DBI::errstr]\n";
}
@resultSet = @{$result};
if ( $#resultSet == -1 ) {
- print EXTEN "No extensions defined in $table_name\n";
+ print "No extensions defined in $table_name\n";
exit;
}
@@ -83,15 +83,15 @@ foreach my $row ( @{ $result } ) {
my $result = $dbh->selectall_arrayref($statement);
unless ($result) {
# check for errors after every single database call
- print EXTEN "dbh->selectall_arrayref($statement) failed!\n";
- print EXTEN "DBI::err=[$DBI::err]\n";
- print EXTEN "DBI::errstr=[$DBI::errstr]\n";
+ print "dbh->selectall_arrayref($statement) failed!\n";
+ print "DBI::err=[$DBI::err]\n";
+ print "DBI::errstr=[$DBI::errstr]\n";
exit;
}
my @resSet = @{$result};
if ( $#resSet == -1 ) {
- print EXTEN "no results\n";
+ print "no results\n";
exit;
}
foreach my $row ( @{ $result } ) {