]> git.mxchange.org Git - friendica.git/commitdiff
display current state of PHP logging in admin panel logging informations
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Tue, 13 Sep 2016 20:52:21 +0000 (22:52 +0200)
committerTobias Diekershoff <tobias.diekershoff@gmx.net>
Tue, 13 Sep 2016 20:52:21 +0000 (22:52 +0200)
mod/admin.php
view/templates/admin_logs.tpl

index 4ae921b04830c714190eb45a713d8dda9d5fc1d3..0749fd186137c3d26b755490a7d81ba321bac574 100644 (file)
@@ -1867,6 +1867,12 @@ function admin_page_logs(&$a){
                LOGGER_DATA     => 'Data',
                LOGGER_ALL      => 'All'
        );
+       
+       if (ini_get('log_errors')) {
+               $phplogenabled = t('PHP log currently enabled.');
+       } else {
+               $phplogenabled = t('PHP log currently disabled.');
+       }
 
        $t = get_markup_template("admin_logs.tpl");
 
@@ -1887,6 +1893,7 @@ function admin_page_logs(&$a){
                '$phpheader' => t("PHP logging"),
                '$phphint' => t("To enable logging of PHP errors and warnings you can add the following to the .htconfig.php file of your installation. The filename set in the 'error_log' line is relative to the friendica top-level directory and must be writeable by the web server. The option '1' for 'log_errors' and 'display_errors' is to enable these options, set to '0' to disable them."),
                '$phplogcode' => "error_reporting(E_ERROR | E_WARNING | E_PARSE);\nini_set('error_log','php.out');\nini_set('log_errors','1');\nini_set('display_errors', '1');",
+               '$phplogenabled' => $phplogenabled,
        ));
 }
 
index e79c7d7af726ce7b52388c4ba7f4f35b2065de2d..0c052e1bba8d4b7d134adecdd7af69c74d629b01 100644 (file)
@@ -14,6 +14,7 @@
 
        <h2>{{$phpheader}}</h2>
        <div>
+               <p><strong>{{$phplogenabled}}</strong><p>
                <p>{{$phphint}}</p>
                <pre>{{$phplogcode}}</pre>
        </div>