|
From: <var...@us...> - 2021-06-29 15:26:50
|
Revision: 10341
http://sourceforge.net/p/phpwiki/code/10341
Author: vargenau
Date: 2021-06-29 15:26:44 +0000 (Tue, 29 Jun 2021)
Log Message:
-----------
lib/plugin/SystemInfo.php: replace create_function
Modified Paths:
--------------
trunk/lib/plugin/SystemInfo.php
Modified: trunk/lib/plugin/SystemInfo.php
===================================================================
--- trunk/lib/plugin/SystemInfo.php 2021-06-29 14:47:13 UTC (rev 10340)
+++ trunk/lib/plugin/SystemInfo.php 2021-06-29 15:26:44 UTC (rev 10341)
@@ -460,10 +460,9 @@
$list = $fileset->getFiles();
natcasesort($list);
reset($list);
+ $plugin_function = function($f) { return substr($f,0,-4); };
return sprintf(_("Total %d plugins: "), count($list))
- . implode(', ', array_map(create_function('$f',
- 'return substr($f,0,-4);'),
- $list));
+ . implode(', ', array_map($plugin_function, $list));
}
function supported_languages()
@@ -623,9 +622,9 @@
{
$n = count($hits);
if (!$total) $total = array_reduce($hits, 'rsum');
+ $mean_function = function($i) { global $mean; return ($i-$mean)*($i-$mean); };
$GLOBALS['mean'] = $total / $n;
- $r = array_map(create_function('$i', 'global $mean; return ($i-$mean)*($i-$mean);'),
- $hits);
+ $r = array_map($mean_function, $hits);
unset($GLOBALS['mean']);
return (float)sqrt(mean($r, $total) * ($n / (float)($n - 1)));
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|