SF.net SVN: phpwiki:[11074] trunk

vargenau--- via phpwiki-checkins <[email protected]> Wed, 24 Jan 2024 12:00:20 +0000
Newsgroups gmane.comp.web.wiki.phpwiki.checkins
Message-ID <[email protected]>
Revision: 11074
          http://sourceforge.net/p/phpwiki/code/11074
Author:   vargenau
Date:     2024-01-24 12:00:19 +0000 (Wed, 24 Jan 2024)
Log Message:
-----------
lib/plugin/SystemInfo.php: check for "shell_exec" before using it (patch by Christof Meerwald)

Modified Paths:
--------------
    trunk/lib/plugin/SystemInfo.php
    trunk/locale/it/pgsrc/NoteDiRilascio
    trunk/pgsrc/ReleaseNotes

Modified: trunk/lib/plugin/SystemInfo.php
===================================================================
--- trunk/lib/plugin/SystemInfo.php	2024-01-17 09:19:45 UTC (rev 11073)
+++ trunk/lib/plugin/SystemInfo.php	2024-01-24 12:00:19 UTC (rev 11074)
@@ -403,7 +403,11 @@
         if (empty($content)) {
             $dir = defined('PHPWIKI_DIR') ? PHPWIKI_DIR : '.';
             //TODO: windows only (no cygwin)
-            $appsize = `du -s $dir | cut -f1`;
+            if (function_exists('shell_exec')) {
+                $appsize = `du -s $dir | cut -f1`;
+            } else {
+                $appsize = 0;
+            }
 
             if (in_array($DBParams['dbtype'], array('SQL', 'PDO'))) {
                 //TODO: where is the data is actually stored? see phpMyAdmin
@@ -417,8 +421,12 @@
                 }
                 // if issubdirof($dbdir, $dir) $appsize -= $pagesize;
             } else { // flatfile
-                $dbdir = $DBParams['directory'];
-                $pagesize = `du -s $dbdir`;
+                if (function_exists('shell_exec')) {
+                    $dbdir = $DBParams['directory'];
+                    $pagesize = `du -s $dbdir`;
+                } else {
+                    $pagesize = 0;
+                }
                 // if issubdirof($dbdir, $dir) $appsize -= $pagesize;
             }
             $content = array('appsize' => $appsize,

Modified: trunk/locale/it/pgsrc/NoteDiRilascio
===================================================================
--- trunk/locale/it/pgsrc/NoteDiRilascio	2024-01-17 09:19:45 UTC (rev 11073)
+++ trunk/locale/it/pgsrc/NoteDiRilascio	2024-01-24 12:00:19 UTC (rev 11074)
@@ -1,4 +1,4 @@
-Date: Wed, 17 Jan 2024 10:08:28 +0000
+Date: Wed, 24 Jan 2024 12:59:32 +0000
 Mime-Version: 1.0 (Produced by PhpWiki 1.6.3)
 Content-Type: application/x-phpwiki;
   pagename=NoteDiRilascio;
@@ -11,6 +11,7 @@
 == 1.6.4 2024-XX-XX Marc-Etienne Vargenau, Christof Meerwald ==
 
 * Upgrade PEAR to relase 1.10.14, PEAR DB to release 1.12.1
+* Check for "shell_exec" before using it (Christof Meerwald)
 
 == 1.6.3 2023-11-15 Marc-Etienne Vargenau ==
 

Modified: trunk/pgsrc/ReleaseNotes
===================================================================
--- trunk/pgsrc/ReleaseNotes	2024-01-17 09:19:45 UTC (rev 11073)
+++ trunk/pgsrc/ReleaseNotes	2024-01-24 12:00:19 UTC (rev 11074)
@@ -1,4 +1,4 @@
-Date: Wed, 17 Jan 2024 10:08:28 +0000
+Date: Wed, 24 Jan 2024 12:59:32 +0000
 Mime-Version: 1.0 (Produced by PhpWiki 1.6.3)
 Content-Type: application/x-phpwiki;
   pagename=ReleaseNotes;
@@ -11,6 +11,7 @@
 == 1.6.4 2024-XX-XX Marc-Etienne Vargenau, Christof Meerwald ==
 
 * Upgrade PEAR to relase 1.10.14, PEAR DB to release 1.12.1
+* Check for "shell_exec" before using it (Christof Meerwald)
 
 == 1.6.3 2023-11-15 Marc-Etienne Vargenau ==
 

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.