From b3055270682ea1c7cd271fdc12d1f5b2e4211b2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C4=9F=C4=B1zhan=20Burak=20Yakar?= Date: Tue, 14 Dec 2021 20:35:18 +0300 Subject: [PATCH] Revert "Adding phpinfo to the System module" --- src/bb-library/Box/TwigExtensions.php | 19 ---- .../html_admin/mod_system_settings.phtml | 89 ++----------------- 2 files changed, 5 insertions(+), 103 deletions(-) diff --git a/src/bb-library/Box/TwigExtensions.php b/src/bb-library/Box/TwigExtensions.php index 127ea1eea..794241b4b 100644 --- a/src/bb-library/Box/TwigExtensions.php +++ b/src/bb-library/Box/TwigExtensions.php @@ -67,8 +67,6 @@ class Box_TwigExtensions extends Twig\Extension\AbstractExtension implements \Bo 'money_without_currency' => new Twig\TwigFilter('money_without_currency','twig_money_without_currency', array('needs_environment' => true, 'is_safe' => array('html'))), 'money_convert' => new Twig\TwigFilter('money_convert', 'twig_money_convert', array('needs_environment' => true, 'is_safe' => array('html'))), 'money_convert_without_currency' => new Twig\TwigFilter('money_convert_without_currency', array('needs_environment' => true, 'is_safe' => array('html'))), - - 'phpinfo' => new Twig\TwigFilter('phpinfo','twig_phpinfo'), ); } @@ -294,20 +292,3 @@ function twig_bbmd_filter(Twig\Environment $env, $value) $value = twig_markdown_filter($env, $value); return $value; } - -/** - * Returns phpinfo() without it's stylings; - * Solution from https://www.php.net/manual/en/function.phpinfo.php#87287 - */ -function twig_phpinfo() -{ - ob_start(); - phpinfo(); - $pinfo = ob_get_contents(); - ob_end_clean(); - - // the name attribute "module_Zend Optimizer" of an anker-tag is not xhtml valide, so replace it with "module_Zend_Optimizer" - $pinfo = (str_replace("module_Zend Optimizer", "module_Zend_Optimizer", preg_replace('%^.*(.*).*$%ms', '$1', $pinfo))); - - return $pinfo; -} diff --git a/src/bb-modules/System/html_admin/mod_system_settings.phtml b/src/bb-modules/System/html_admin/mod_system_settings.phtml index d8db563e0..6eee8dd86 100644 --- a/src/bb-modules/System/html_admin/mod_system_settings.phtml +++ b/src/bb-modules/System/html_admin/mod_system_settings.phtml @@ -11,79 +11,6 @@ {% endblock %} -{% block head %} - - -{{ mf.bb_editor('.bb-textarea') }} -{% endblock %} - {% block content %} {% set new_params = admin.extension_config_get({"ext":"mod_system"}) %} @@ -96,7 +23,6 @@
  • {% trans 'FTP layer' %}
  • {% trans 'Countries' %}
  • {% trans 'Cache' %}
  • -
  • {% trans 'PHP Info' %}
  • @@ -540,25 +466,20 @@ ZW=Zimbabwe

    {% trans 'Cache control' %}

    -
    -
    +
    +
    -
    - -
    - -
    -
    - {{ x|phpinfo|raw }} -
    +
    {% endblock %} + +{% block head %}{{ mf.bb_editor('.bb-textarea') }}{% endblock %}