Matanya has uploaded a new change for review.
https://gerrit.wikimedia.org/r/108917
Change subject: bugzilla: remove hardcoded db host
......................................................................
bugzilla: remove hardcoded db host
Change-Id: Ib94e48c6684f3d6f915690701c4c0cd217e06619
---
M modules/bugzilla/files/bugzilla_report.php
M modules/bugzilla/manifests/reporter.pp
2 files changed, 1 insertion(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/17/108917/1
diff --git a/modules/bugzilla/files/bugzilla_report.php
b/modules/bugzilla/files/bugzilla_report.php
index b1cd72e..b87f969 100755
--- a/modules/bugzilla/files/bugzilla_report.php
+++ b/modules/bugzilla/files/bugzilla_report.php
@@ -302,8 +302,7 @@
print "MediaWiki Bugzilla Report for " . date('F d, Y', $begin_date) . " - " .
date('F d, Y', $end_date) . "\n\n";
-/* TODO: mysql_connect is deprecated - switch to MySQLi or PDO */
-$ok = mysql_connect("db9.pmtpa.wmnet", "bugs", "<%=
scope.lookupvar('passwords::bugzilla::bugzilla_db_pass') %>");
+$ok = mysqli_connect('<%=scope.lookupvar('bugzilla::db_host') %>', 'bugs',
'<%= scope.lookupvar('passwords::bugzilla::bugzilla_db_pass') %>;);
if (!$ok)
reportFailure("DB connection failure");
diff --git a/modules/bugzilla/manifests/reporter.pp
b/modules/bugzilla/manifests/reporter.pp
index e16dbbc..3af0914 100644
--- a/modules/bugzilla/manifests/reporter.pp
+++ b/modules/bugzilla/manifests/reporter.pp
@@ -1,7 +1,6 @@
# sets up a user and file for the 'bugzilla_report.php' script
# only parameter: user name that will run this (also used for group)
# requires: passwords::bugzilla for the PHP script to connect to db
-# fix me: the historic PHP script contains a hardcoded "db9" value
class bugzilla::reporter ($bz_report_user = 'reporter') {
generic::systemuser { 'bzreporter':
--
To view, visit https://gerrit.wikimedia.org/r/108917
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib94e48c6684f3d6f915690701c4c0cd217e06619
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Matanya <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits