Commit 6d2d3d5ce2080cde26594dbec72f2dbe919329bc
1 parent
28b6e81c
PT:1808654: Server port saved to database.
Committed by: Jarrett Jordaan Reviewed by: Megan Watson
Showing
1 changed file
with
8 additions
and
2 deletions
setup/wizard/steps/database.php
| @@ -638,6 +638,9 @@ class database extends Step | @@ -638,6 +638,9 @@ class database extends Step | ||
| 638 | $this->error['con'] = "Could not populate schema "; | 638 | $this->error['con'] = "Could not populate schema "; |
| 639 | } | 639 | } |
| 640 | $this->writeBinaries(); | 640 | $this->writeBinaries(); |
| 641 | + $port = $conf['server']['port']; | ||
| 642 | + $iserverPorts = 'UPDATE config_settings SET value = "'.$port.'" where group_name = "server" and item IN("internal_server_port", "server_port");'; // Update internal server port | ||
| 643 | + $this->util->dbUtilities->query($iserverPorts); | ||
| 641 | // ensure a guid was generated and is stored | 644 | // ensure a guid was generated and is stored |
| 642 | $this->util->getSystemIdentifier(); | 645 | $this->util->getSystemIdentifier(); |
| 643 | $this->reBuildPaths(); | 646 | $this->reBuildPaths(); |
| @@ -767,10 +770,13 @@ class database extends Step | @@ -767,10 +770,13 @@ class database extends Step | ||
| 767 | $this->parse_mysql_dump($sqlFile); | 770 | $this->parse_mysql_dump($sqlFile); |
| 768 | $dropPluginHelper = "TRUNCATE plugin_helper;"; // Remove plugin helper table | 771 | $dropPluginHelper = "TRUNCATE plugin_helper;"; // Remove plugin helper table |
| 769 | $this->util->dbUtilities->query($dropPluginHelper); | 772 | $this->util->dbUtilities->query($dropPluginHelper); |
| 770 | - $this->reBuildPaths(); | ||
| 771 | - | 773 | + $conf = $this->util->getDataFromSession('configuration'); |
| 774 | + $port = $conf['server']['port']; | ||
| 775 | + $iserverPorts = 'UPDATE config_settings SET value = "'.$port.'" where group_name = "server" and item IN("internal_server_port", "server_port");'; // Update internal server port | ||
| 776 | + $this->util->dbUtilities->query($iserverPorts); | ||
| 772 | $updateExternalBinaries = 'UPDATE config_settings c SET c.value = "default" where c.group_name = "externalBinary";'; // Remove references to old paths | 777 | $updateExternalBinaries = 'UPDATE config_settings c SET c.value = "default" where c.group_name = "externalBinary";'; // Remove references to old paths |
| 773 | $this->util->dbUtilities->query($updateExternalBinaries); | 778 | $this->util->dbUtilities->query($updateExternalBinaries); |
| 779 | + $this->reBuildPaths(); | ||
| 774 | $this->writeBinaries(); // Rebuild some of the binaries | 780 | $this->writeBinaries(); // Rebuild some of the binaries |
| 775 | $this->util->getSystemIdentifier(); // ensure a guid was generated and is stored | 781 | $this->util->getSystemIdentifier(); // ensure a guid was generated and is stored |
| 776 | 782 |