1 |
jpp |
1.1 |
diff -Nur smeserver-sme9admin-1.5.old/root/usr/bin/sme9admind smeserver-sme9admin-1.5/root/usr/bin/sme9admind |
2 |
|
|
--- smeserver-sme9admin-1.5.old/root/usr/bin/sme9admind 2014-12-24 01:41:01.000000000 -0500 |
3 |
|
|
+++ smeserver-sme9admin-1.5/root/usr/bin/sme9admind 2016-11-23 16:46:55.638000000 -0500 |
4 |
|
|
@@ -1021,10 +1021,17 @@ |
5 |
|
|
#rewritten |
6 |
|
|
sub execute_sql_query { |
7 |
|
|
my ($requete)=(@_); |
8 |
|
|
- my $rq=$bd->prepare("$requete"); |
9 |
|
|
- my $rslt=$rq->execute(); |
10 |
|
|
- print "RQT MySQL : $requete , Reslt : $rslt/$!\n"; |
11 |
|
|
- return $rslt; |
12 |
|
|
+ if (defined ($bd)) { |
13 |
|
|
+ my $rq=$bd->prepare("$requete") or |
14 |
|
|
+ warn "MYSQL error $DBI::errstr\n"; |
15 |
|
|
+ my $rslt=$rq->execute() or |
16 |
|
|
+ warn "MYSQL error $DBI::errstr\n"; |
17 |
|
|
+ print "RQT MySQL : $requete , Reslt : $rslt/$!\n"; |
18 |
|
|
+ return $rslt; |
19 |
|
|
+ } |
20 |
|
|
+ else |
21 |
|
|
+ { print "mysql : no active connection to Mysql"; return 0;} |
22 |
|
|
+ |
23 |
|
|
} |
24 |
|
|
|
25 |
|
|
sub samba_status { |