From 50b7b362d5a6318176260f9183d3089a1636e09f Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Mon, 15 Jul 2019 18:53:56 +0200 Subject: [PATCH] Add enterprise mode (#2942) --- constants.php | 1 + .../install/files/acp/templates/index.tpl | 140 +++++++++--------- .../acp/templates/packageStartInstall.tpl | 62 ++++---- .../form/PackageStartInstallForm.class.php | 5 + .../files/lib/acp/page/PHPInfoPage.class.php | 5 + .../lib/acp/page/SystemCheckPage.class.php | 5 + .../lib/data/option/OptionEditor.class.php | 6 +- .../system/TemplateScriptingCore.class.php | 60 ++++++++ .../install/files/lib/system/WCF.class.php | 10 +- .../files/lib/system/WCFSetup.class.php | 1 + .../lib/system/menu/acp/ACPMenu.class.php | 28 ++++ .../lib/system/option/OptionHandler.class.php | 47 +++++- .../system/request/RequestHandler.class.php | 11 ++ .../TemplateScriptingCompiler.class.php | 107 ++++++++++++- wcfsetup/install/files/options.inc.php | 1 + 15 files changed, 381 insertions(+), 108 deletions(-) create mode 100644 wcfsetup/install/files/lib/system/TemplateScriptingCore.class.php diff --git a/constants.php b/constants.php index ee4f6be08e..25f1a9560d 100644 --- a/constants.php +++ b/constants.php @@ -262,3 +262,4 @@ define('BLACKLIST_SFS_USERNAME', '90percentile'); define('BLACKLIST_SFS_EMAIL_ADDRESS', 'moreThanOnce'); define('BLACKLIST_SFS_IP_ADDRESS', '90percentile'); define('BLACKLIST_SFS_ACTION', 'disable'); +define('ENABLE_ENTERPRISE_MODE', 0); diff --git a/wcfsetup/install/files/acp/templates/index.tpl b/wcfsetup/install/files/acp/templates/index.tpl index ba8a8d1dcb..dc50a54afd 100644 --- a/wcfsetup/install/files/acp/templates/index.tpl +++ b/wcfsetup/install/files/acp/templates/index.tpl @@ -102,78 +102,80 @@ -
-

{lang}wcf.acp.index.system.server{/lang}

- -
-
{lang}wcf.acp.index.system.os{/lang}
-
{$server[os]}
-
- -
-
{lang}wcf.acp.index.system.webserver{/lang}
-
{$server[webserver]}
-
- -
-
{lang}wcf.acp.index.system.mySQLVersion{/lang}
-
{$server[mySQLVersion]}
-
- - {if $server[load]} + {if !ENABLE_ENTERPRISE_MODE || $__wcf->getUser()->hasOwnerAccess()} +
+

{lang}wcf.acp.index.system.server{/lang}

+
-
{lang}wcf.acp.index.system.load{/lang}
-
{$server[load]}
+
{lang}wcf.acp.index.system.os{/lang}
+
{$server[os]}
- {/if} - - {event name='serverFields'} -
+ +
+
{lang}wcf.acp.index.system.webserver{/lang}
+
{$server[webserver]}
+
+ +
+
{lang}wcf.acp.index.system.mySQLVersion{/lang}
+
{$server[mySQLVersion]}
+
+ + {if $server[load]} +
+
{lang}wcf.acp.index.system.load{/lang}
+
{$server[load]}
+
+ {/if} + + {event name='serverFields'} +
-
-

{lang}wcf.acp.index.system.php{/lang}

- -
-
{lang}wcf.acp.index.system.php.version{/lang}
-
- {if $__wcf->session->getPermission('admin.configuration.package.canInstallPackage') && $__wcf->session->getPermission('admin.configuration.package.canUpdatePackage')} - {PHP_VERSION} - {else} - {PHP_VERSION} - {/if} -
-
- -
-
memory_limit
-
- {$server[memoryLimit]} -
-
- -
-
post_max_size
-
- {$server[postMaxSize]} -
-
- -
-
upload_max_filesize
-
- {$server[upload_max_filesize]} -
-
- -
-
{lang}wcf.acp.index.system.php.sslSupport{/lang}
-
- {if $server[sslSupport]}{lang}wcf.acp.index.system.php.sslSupport.available{/lang}{else}{lang}wcf.acp.index.system.php.sslSupport.notAvailable{/lang}{/if} -
-
- - {event name='phpFields'} -
+
+

{lang}wcf.acp.index.system.php{/lang}

+ +
+
{lang}wcf.acp.index.system.php.version{/lang}
+
+ {if $__wcf->session->getPermission('admin.configuration.package.canInstallPackage') && $__wcf->session->getPermission('admin.configuration.package.canUpdatePackage')} + {PHP_VERSION} + {else} + {PHP_VERSION} + {/if} +
+
+ +
+
memory_limit
+
+ {$server[memoryLimit]} +
+
+ +
+
post_max_size
+
+ {$server[postMaxSize]} +
+
+ +
+
upload_max_filesize
+
+ {$server[upload_max_filesize]} +
+
+ +
+
{lang}wcf.acp.index.system.php.sslSupport{/lang}
+
+ {if $server[sslSupport]}{lang}wcf.acp.index.system.php.sslSupport.available{/lang}{else}{lang}wcf.acp.index.system.php.sslSupport.notAvailable{/lang}{/if} +
+
+ + {event name='phpFields'} +
+ {/if} {event name='systemFieldsets'} diff --git a/wcfsetup/install/files/acp/templates/packageStartInstall.tpl b/wcfsetup/install/files/acp/templates/packageStartInstall.tpl index 5922c0af61..b98f34f2d3 100644 --- a/wcfsetup/install/files/acp/templates/packageStartInstall.tpl +++ b/wcfsetup/install/files/acp/templates/packageStartInstall.tpl @@ -27,7 +27,9 @@