[mapguide-commits] r9936 - sandbox/jng/vanilla_swig/Web/src/mapadmin

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon May 23 02:46:12 PDT 2022


Author: jng
Date: 2022-05-23 02:46:10 -0700 (Mon, 23 May 2022)
New Revision: 9936

Modified:
   sandbox/jng/vanilla_swig/Web/src/mapadmin/resizablepagecomponents.php
   sandbox/jng/vanilla_swig/Web/src/mapadmin/serverdatafunctions.php
   sandbox/jng/vanilla_swig/Web/src/mapadmin/viewserverstatusbottom.php
Log:
First round of site administrator fixes for PHP8 compatibility. With these changes we can now successfully load a package:

 - Remove constants.php reference. Not required because constants are now baked into the zend extension itself.
 - Fix up all classes to use __construct instead of a function of the same name
 - Strong-type all properties of the GeneralPropsRecord class

Modified: sandbox/jng/vanilla_swig/Web/src/mapadmin/resizablepagecomponents.php
===================================================================
--- sandbox/jng/vanilla_swig/Web/src/mapadmin/resizablepagecomponents.php	2022-05-20 14:24:35 UTC (rev 9935)
+++ sandbox/jng/vanilla_swig/Web/src/mapadmin/resizablepagecomponents.php	2022-05-23 09:46:10 UTC (rev 9936)
@@ -540,7 +540,7 @@
         var $disabled;
         var $submitForm;
 
-        function ToolbarButtonRecord()
+        function __construct()
         {
             $this->id = "";
             $this->label = "";
@@ -669,7 +669,7 @@
         var $col1Vals;
         var $col3Vals;
 
-        function AddRemoveControlRecord()
+        function __construct()
         {
             $this->enabled = false;
             $this->size = 10;
@@ -815,7 +815,7 @@
         var $tileOn;
         var $enabled;
 
-        function ServiceSelectorRecord()
+        function __construct()
         {
             $this->serverAddress = "";
             $this->drawingOnID = "drawingServiceOn";

Modified: sandbox/jng/vanilla_swig/Web/src/mapadmin/serverdatafunctions.php
===================================================================
--- sandbox/jng/vanilla_swig/Web/src/mapadmin/serverdatafunctions.php	2022-05-20 14:24:35 UTC (rev 9935)
+++ sandbox/jng/vanilla_swig/Web/src/mapadmin/serverdatafunctions.php	2022-05-23 09:46:10 UTC (rev 9936)
@@ -18,7 +18,6 @@
 //
 
     require_once 'xmlparser.php';
-    require_once 'constants.php';
 
     ////// Utility functions //////
     function CopyArray( $sourceArray, &$destArray )
@@ -123,7 +122,7 @@
         var $description;
         var $groups;
 
-        function UserTableRecord( $name, $description )
+        function __construct( $name, $description )
         {
             $this->name = $name;
             $this->description = $description;
@@ -289,7 +288,7 @@
         var $users;
 
         // Print contents
-        function GroupTableRecord( $description )
+        function __construct( $description )
         {
             $this->description = $description;
             $this->users = array();
@@ -606,7 +605,7 @@
         var $online;
         var $services;
 
-        function ServerTableRecord( $name, $description )
+        function __construct( $name, $description )
         {
             $this->name = $name;
             $this->description = $description;
@@ -946,28 +945,28 @@
 
     class GeneralPropsRecord
     {
-        var $displayName;
-        var $displayNamePropStr;
-        var $locale;
-        var $localePropStr;
-        var $defaultMessageLocale;
-        var $defaultMessageLocalePropStr;
-        var $localizationResourcesPath;
-        var $localizationResourcesPathPropStr;
-        var $tcpIpMtu;
-        var $tcpIpMtuPropStr;
-        var $tempPath;
-        var $tempPathPropStr;
-        var $fdoPath;
-        var $fdoPathPropStr;
-        var $email;
-        var $emailPropStr;
-        var $connectionTimeOut;
-        var $connectionTimeOutPropStr;
-        var $connectionTimerInt;
-        var $connectionTimerIntPropStr;
+        public string $displayName;
+        public string $displayNamePropStr;
+        public string $locale;
+        public string $localePropStr;
+        public string $defaultMessageLocale;
+        public string $defaultMessageLocalePropStr;
+        public string $localizationResourcesPath;
+        public string $localizationResourcesPathPropStr;
+        public string $tcpIpMtu;
+        public string $tcpIpMtuPropStr;
+        public string $tempPath;
+        public string $tempPathPropStr;
+        public string $fdoPath;
+        public string $fdoPathPropStr;
+        public string $email;
+        public string $emailPropStr;
+        public int $connectionTimeOut;
+        public string $connectionTimeOutPropStr;
+        public int $connectionTimerInt;
+        public string $connectionTimerIntPropStr;
 
-        function GeneralPropsRecord()
+        function __construct()
         {
             $this->displayName = "";
             $this->displayNamePropStr = MgConfigProperties::GeneralPropertyDisplayName;
@@ -1110,7 +1109,7 @@
          var $threadPoolSize;
          var $threadPoolSizePropStr;
 
-        function ConnectionPropsRecord( $connStr, $propSectionStr, $maxConnsPropStr, $portPropStr, $queueSizePropStr, $threadPoolSizePropStr )
+        function __construct( $connStr, $propSectionStr, $maxConnsPropStr, $portPropStr, $queueSizePropStr, $threadPoolSizePropStr )
         {
             $this->connStr = $connStr;
             $this->propSectionStr = $propSectionStr;
@@ -1189,7 +1188,7 @@
         var $dataCacheSize;
         var $dataCacheSizePropStr;
 
-        function FeatureServicePropsRecord()
+        function __construct()
         {
             $this->enabled = true;
             $this->enabledID = "featureServiceEnabled";
@@ -1294,7 +1293,7 @@
         var $packagesPathPropStr;
 
 
-        function ResourceServicePropsRecord()
+        function __construct()
         {
             $this->enabled = true;
             $this->dataFileTrashFolder = "";
@@ -1436,7 +1435,7 @@
         var $tileCachePath;
         var $tileCachePathPropStr;
 
-        function TileServicePropsRecord()
+        function __construct()
         {
             $this->enabled = true;
             $this->tileCachePath = "";
@@ -1481,7 +1480,7 @@
         var $sessionTimerInt;
         var $sessionTimerIntPropStr;
 
-        function SiteServicePropsRecord()
+        function __construct()
         {
             $this->enabled = true;
             $this->sessionTimeout = 0;
@@ -1646,7 +1645,7 @@
         var $filenamePropStr;
         var $parmsPropStr;
 
-         function LogPropsRecord( $propSectionStr, $enabledPropStr, $filenamePropStr, $parmsPropStr, $allPossibleParms )
+        function __construct( $propSectionStr, $enabledPropStr, $filenamePropStr, $parmsPropStr, $allPossibleParms )
         {
             $this->propSectionStr = $propSectionStr;
             $this->enabledPropStr = $enabledPropStr;
@@ -1733,7 +1732,7 @@
         var $type;
         var $status;
 
-        function LogFileRecord( $type, $status )
+        function __construct( $type, $status )
         {
             $this->type = $type;
             $this->status = $status;
@@ -1857,9 +1856,10 @@
     // Package Table record type
     class PackageTableRecord
     {
-        var $status;
+        public string $status;
+        public int $size;
 
-        function PackageTableRecord( $serverAdmin, $packageName )
+        function __construct( $serverAdmin, $packageName )
         {
             global $errCannotGetPackageStatus;
 
@@ -2026,7 +2026,7 @@
         var $serviceMetadata;
         var $keywords;
 
-        function WMSPropsRecord()
+        function __construct()
         {
             global $wmsServiceMetadataItems;
 
@@ -2184,7 +2184,7 @@
         var $serviceMetadata;
         var $keywords;
 
-        function WFSPropsRecord()
+        function __construct()
         {
             global $wfsServiceMetadataItems;
 

Modified: sandbox/jng/vanilla_swig/Web/src/mapadmin/viewserverstatusbottom.php
===================================================================
--- sandbox/jng/vanilla_swig/Web/src/mapadmin/viewserverstatusbottom.php	2022-05-20 14:24:35 UTC (rev 9935)
+++ sandbox/jng/vanilla_swig/Web/src/mapadmin/viewserverstatusbottom.php	2022-05-23 09:46:10 UTC (rev 9936)
@@ -36,7 +36,7 @@
             var $divisor;
             var $nextUnit;
 
-            function TimeUnitFormattingData( $divisor, $nextUnit )
+            function __construct( $divisor, $nextUnit )
             {
                 $this->divisor = $divisor;
                 $this->nextUnit = $nextUnit;
@@ -85,7 +85,7 @@
             var $totalVirtualMemory;
             var $virtualMemoryUsed;
 
-            function ServerHealthPageRecord()
+            function __construct()
             {
                 $this->timeStamp = 0;
                 $this->cpuUtilization = 0;



More information about the mapguide-commits mailing list