From a7775f3ad6e560d895fd9055d4a74dfcce5734a5 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Tue, 12 Nov 2013 22:03:27 -0600
Subject: [PATCH] Set the company name from helpdesk name on install

---
 setup/inc/class.installer.php | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/setup/inc/class.installer.php b/setup/inc/class.installer.php
index 23dbac500..23ebd7ffc 100644
--- a/setup/inc/class.installer.php
+++ b/setup/inc/class.installer.php
@@ -213,6 +213,12 @@ class Installer extends SetupWizard {
 	            if(!db_query($sql, false))
 	                $this->errors['err']='Unable to create config settings (#7)';
 			}
+
+            // Set company name
+            require_once(INCLUDE_DIR.'class.company.php');
+            $company = new Company();
+            $company->getForm()->setAnswer('name', $vars['name']);
+            $company->getForm()->save();
         }
 
         if($this->errors) return false; //Abort on internal errors.
-- 
GitLab