Mwalker has submitted this change and it was merged.

Change subject: Don't use civi functions during installation!
......................................................................


Don't use civi functions during installation!

Change-Id: Ib48076e479c6b4082932d2fb944d03fb7d82f287
---
M packages/DB/common.php
1 file changed, 7 insertions(+), 2 deletions(-)

Approvals:
  Mwalker: Verified; Looks good to me, approved



diff --git a/packages/DB/common.php b/packages/DB/common.php
index bafd68f..c8a7850 100644
--- a/packages/DB/common.php
+++ b/packages/DB/common.php
@@ -1155,8 +1155,13 @@
          * Have not found a function to efficiently get uf username.
          * Not sure if query begin time is already reported by mysql, or would 
be useful.
          */
-        $uid = CRM_Utils_System::getLoggedInUfID();
-        $prefix = "/* https://civicrm.wikimedia.org/user/{$uid} */ ";
+        global $installType;
+        if ( isset( $installType ) ) {
+            $prefix = "/* Civi utils not available during installation */";
+        } else {
+            $uid = CRM_Utils_System::getLoggedInUfID();
+            $prefix = "/* https://civicrm.wikimedia.org/user/{$uid} */ ";
+        }
         $query = $prefix . $query;
 
         return $query;

-- 
To view, visit https://gerrit.wikimedia.org/r/60081
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib48076e479c6b4082932d2fb944d03fb7d82f287
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Adamw <[email protected]>
Gerrit-Reviewer: Mwalker <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to