From: <var...@us...> - 2008-09-07 16:14:41
|
Revision: 6249 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6249&view=rev Author: vargenau Date: 2008-09-07 16:14:51 +0000 (Sun, 07 Sep 2008) Log Message: ----------- Renamed class Theme to WikiTheme to avoid Gforge name clash Modified Paths: -------------- trunk/lib/plugin/SystemInfo.php Modified: trunk/lib/plugin/SystemInfo.php =================================================================== --- trunk/lib/plugin/SystemInfo.php 2008-09-07 15:13:56 UTC (rev 6248) +++ trunk/lib/plugin/SystemInfo.php 2008-09-07 16:14:51 UTC (rev 6249) @@ -475,7 +475,7 @@ 'LC_ALL' => create_function('','return setlocale(LC_ALL, 0);'), 'current_language' => create_function('','return $GLOBALS["LANG"];'), 'system_language' => create_function('','return DEFAULT_LANGUAGE;'), - 'current_theme' => create_function('','return $GLOBALS["Theme"]->_name;'), + 'current_theme' => create_function('','return $GLOBALS["WikiTheme"]->_name;'), 'system_theme' => create_function('','return THEME;'), // more here or as method. '' => create_function('',"return 'dummy';") @@ -571,81 +571,6 @@ return (float)sqrt(mean($r, $total) * ($n / (float)($n -1))); } -// $Log: not supported by cvs2svn $ -// Revision 1.22 2004/12/26 17:10:44 rurban -// just docs or whitespace -// -// Revision 1.21 2004/11/26 18:39:02 rurban -// new regex search parser and SQL backends (90% complete, glob and pcre backends missing) -// -// Revision 1.20 2004/11/20 11:28:49 rurban -// fix a yet unused PageList customPageListColumns bug (merge class not decl to _types) -// change WantedPages to use PageList -// change WantedPages to print the list of referenced pages, not just the count. -// the old version was renamed to WantedPagesOld -// fix and add handling of most standard PageList arguments (limit, exclude, ...) -// TODO: pagename sorting, dumb/WantedPagesIter and SQL optimization -// -// Revision 1.19 2004/06/19 11:49:42 rurban -// dont print db passwords -// -// Revision 1.18 2004/06/14 11:31:39 rurban -// renamed global $Theme to $WikiTheme (gforge nameclash) -// inherit PageList default options from PageList -// default sortby=pagename -// use options in PageList_Selectable (limit, sortby, ...) -// added action revert, with button at action=diff -// added option regex to WikiAdminSearchReplace -// -// Revision 1.17 2004/05/08 14:06:13 rurban -// new support for inlined image attributes: [image.jpg size=50x30 align=right] -// minor stability and portability fixes -// -// Revision 1.16 2004/05/06 20:30:47 rurban -// revert and removed some comments -// -// Revision 1.15 2004/05/03 11:40:42 rurban -// put listAvailableLanguages() and listAvailableThemes() from SystemInfo and -// UserPreferences into Themes.php -// -// Revision 1.14 2004/04/19 23:13:04 zorloc -// Connect the rest of PhpWiki to the IniConfig system. Also the keyword regular expression is not a config setting -// -// Revision 1.13 2004/04/18 01:11:52 rurban -// more numeric pagename fixes. -// fixed action=upload with merge conflict warnings. -// charset changed from constant to global (dynamic utf-8 switching) -// -// Revision 1.12 2004/03/14 16:26:21 rurban -// copyright line -// -// Revision 1.11 2004/03/13 19:24:21 rurban -// fixed supported_languages() and supported_themes() -// -// Revision 1.10 2004/03/08 18:17:10 rurban -// added more WikiGroup::getMembersOf methods, esp. for special groups -// fixed $LDAP_SET_OPTIONS -// fixed _AuthInfo group methods -// -// Revision 1.9 2004/02/17 12:11:36 rurban -// added missing 4th basepage arg at plugin->run() to almost all plugins. This caused no harm so far, because it was silently dropped on normal usage. However on plugin internal ->run invocations it failed. (InterWikiSearch, IncludeSiteMap, ...) -// -// Revision 1.8 2003/02/24 01:36:26 dairiki -// Don't use PHPWIKI_DIR unless it's defined. -// (Also typo/bugfix in SystemInfo plugin.) -// -// Revision 1.7 2003/02/22 20:49:56 dairiki -// Fixes for "Call-time pass by reference has been deprecated" errors. -// -// Revision 1.6 2003/02/21 23:01:11 dairiki -// Fixes to support new $basepage argument of WikiPlugin::run(). -// -// Revision 1.5 2003/01/18 22:08:01 carstenklapp -// Code cleanup: -// Reformatting & tabs to spaces; -// Added copyleft, getVersion, getDescription, rcs_id. -// - // Local Variables: // mode: php // tab-width: 8 @@ -653,4 +578,4 @@ // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: -?> \ No newline at end of file +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-03-03 16:05:02
|
Revision: 6623 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6623&view=rev Author: vargenau Date: 2009-03-03 16:05:01 +0000 (Tue, 03 Mar 2009) Log Message: ----------- Let us use a th for the header Modified Paths: -------------- trunk/lib/plugin/SystemInfo.php Modified: trunk/lib/plugin/SystemInfo.php =================================================================== --- trunk/lib/plugin/SystemInfo.php 2009-03-03 14:36:08 UTC (rev 6622) +++ trunk/lib/plugin/SystemInfo.php 2009-03-03 16:05:01 UTC (rev 6623) @@ -2,6 +2,7 @@ rcs_id('$Id$'); /** Copyright (C) 1999, 2000, 2001, 2002 $ThePhpWikiProgrammingTeam + Copyright 2008-2009 Marc-Etienne Vargenau, Alcatel-Lucent This file is part of PhpWiki. @@ -512,7 +513,7 @@ continue; if (!$desc) $desc = _($arg); - $table->pushContent(HTML::tr(HTML::td(HTML::strong($desc . ':')), + $table->pushContent(HTML::tr(HTML::th(array('style' => "white-space:nowrap"), $desc), HTML::td(HTML($this->call($arg, $availableargs))))); } return $table; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-11-04 15:28:33
|
Revision: 7257 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7257&view=rev Author: vargenau Date: 2009-11-04 15:28:21 +0000 (Wed, 04 Nov 2009) Log Message: ----------- Handle comma correctly; use class "bordered" for table Modified Paths: -------------- trunk/lib/plugin/SystemInfo.php Modified: trunk/lib/plugin/SystemInfo.php =================================================================== --- trunk/lib/plugin/SystemInfo.php 2009-11-02 19:01:20 UTC (rev 7256) +++ trunk/lib/plugin/SystemInfo.php 2009-11-04 15:28:21 UTC (rev 7257) @@ -98,9 +98,9 @@ $s .= (DATABASE_TYPE == 'SQL') ? 'PearDB' : 'ADODB'; if (preg_match('/^(\w+):/', $dsn, $m)) { $backend = $m[1]; - $s .= " $backend, "; + $s .= " $backend"; } - $s .= "DATABASE_PREFIX: \"".DATABASE_PREFIX."\", "; + $s .= ", DATABASE_PREFIX: \"".DATABASE_PREFIX."\", "; break; case 'dba': $s .= "DATABASE_DBA_HANDLER: ".DATABASE_DBA_HANDLER.", "; @@ -115,7 +115,7 @@ break; } // hack: suppress error when using sql, so no timeout - @$s .= "DATABASE_TIMEOUT: " . DATABASE_TIMEOUT . ", "; + @$s .= "DATABASE_TIMEOUT: " . DATABASE_TIMEOUT; return $s; } function cachestats() { @@ -506,8 +506,7 @@ // '' => _(""), '' => "" ); - $table = HTML::table(array('border' => 1,'cellspacing' => 3, - 'cellpadding' => 3)); + $table = HTML::table(array('class' => 'bordered')); foreach ($allargs as $arg => $desc) { if (!$arg) continue; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2010-02-09 17:30:21
|
Revision: 7299 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7299&view=rev Author: vargenau Date: 2010-02-09 17:30:15 +0000 (Tue, 09 Feb 2010) Log Message: ----------- Make plugin SystemInfo work for PHP 5.3 Modified Paths: -------------- trunk/lib/plugin/SystemInfo.php Modified: trunk/lib/plugin/SystemInfo.php =================================================================== --- trunk/lib/plugin/SystemInfo.php 2010-02-08 15:59:24 UTC (rev 7298) +++ trunk/lib/plugin/SystemInfo.php 2010-02-09 17:30:15 UTC (rev 7299) @@ -456,7 +456,7 @@ if (!empty($availableargs[$arg])) return $availableargs[$arg](); elseif (method_exists($this, $arg)) // any defined SystemInfo->method() - return call_user_func_array(array(&$this, $arg), ''); + return call_user_func_array(array(&$this, $arg), array()); elseif (defined($arg) && // any defined constant !in_array($arg,array('ADMIN_PASSWD','DATABASE_DSN','DBAUTH_AUTH_DSN'))) return constant($arg); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-06-22 16:31:31
|
Revision: 10317 http://sourceforge.net/p/phpwiki/code/10317 Author: vargenau Date: 2021-06-22 16:31:24 +0000 (Tue, 22 Jun 2021) Log Message: ----------- lib/plugin/SystemInfo.php: wikicreole syntax Modified Paths: -------------- trunk/lib/plugin/SystemInfo.php Modified: trunk/lib/plugin/SystemInfo.php =================================================================== --- trunk/lib/plugin/SystemInfo.php 2021-06-22 16:28:07 UTC (rev 10316) +++ trunk/lib/plugin/SystemInfo.php 2021-06-22 16:31:24 UTC (rev 10317) @@ -88,7 +88,7 @@ $loader = new WikiPluginLoader(); return $loader->expandPI('<<SystemInfo ' . WikiPluginCached::glueArgs($argarray) // all - . ' ?>', $request, $this, $basepage); + . ' >>', $request, $this, $basepage); } protected function getImage($dbi, $argarray, $request) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2010-06-23 15:31:55
|
Revision: 7562 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7562&view=rev Author: vargenau Date: 2010-06-23 15:31:48 +0000 (Wed, 23 Jun 2010) Log Message: ----------- Remove unused function gensym Modified Paths: -------------- trunk/lib/plugin/SystemInfo.php Modified: trunk/lib/plugin/SystemInfo.php =================================================================== --- trunk/lib/plugin/SystemInfo.php 2010-06-23 15:09:13 UTC (rev 7561) +++ trunk/lib/plugin/SystemInfo.php 2010-06-23 15:31:48 UTC (rev 7562) @@ -549,12 +549,6 @@ $total = array_reduce($hits, 'rsum'); return (float) $total / ($n * 1.0); } -function gensym($prefix = "_gensym") { - $i = 0; - while (isset($GLOBALS[$prefix . $i])) - $i++; - return $prefix . $i; -} function stddev(&$hits, $total = false) { $n = count($hits); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2012-12-05 14:16:41
|
Revision: 8603 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8603&view=rev Author: vargenau Date: 2012-12-05 14:16:30 +0000 (Wed, 05 Dec 2012) Log Message: ----------- Revert wrong smart quotes Modified Paths: -------------- trunk/lib/plugin/SystemInfo.php Modified: trunk/lib/plugin/SystemInfo.php =================================================================== --- trunk/lib/plugin/SystemInfo.php 2012-12-04 18:15:38 UTC (rev 8602) +++ trunk/lib/plugin/SystemInfo.php 2012-12-05 14:16:30 UTC (rev 8603) @@ -507,7 +507,7 @@ $args['seperator'] = ' '; $availableargs = // name => callback + 0 args array('appname' => create_function('', "return 'PhpWiki';"), - 'version' => create_function('', "return sprintf(“%s”, PHPWIKI_VERSION);"), + 'version' => create_function('', "return sprintf('%s', PHPWIKI_VERSION);"), 'LANG' => create_function('', 'return $GLOBALS["LANG"];'), 'LC_ALL' => create_function('', 'return setlocale(LC_ALL, 0);'), 'current_language' => create_function('', 'return $GLOBALS["LANG"];'), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2012-12-17 13:32:23
|
Revision: 8666 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8666&view=rev Author: vargenau Date: 2012-12-17 13:32:16 +0000 (Mon, 17 Dec 2012) Log Message: ----------- Remove unused global Modified Paths: -------------- trunk/lib/plugin/SystemInfo.php Modified: trunk/lib/plugin/SystemInfo.php =================================================================== --- trunk/lib/plugin/SystemInfo.php 2012-12-17 12:52:50 UTC (rev 8665) +++ trunk/lib/plugin/SystemInfo.php 2012-12-17 13:32:16 UTC (rev 8666) @@ -92,7 +92,6 @@ function database() { - global $request; $s = "DATABASE_TYPE: " . DATABASE_TYPE . ", "; switch (DATABASE_TYPE) { case 'SQL': // pear @@ -126,7 +125,6 @@ function cachestats() { - global $request; if (!defined('USECACHE') or !USECACHE) return _("no cache used"); $dbi =& $this->_dbi; @@ -187,7 +185,6 @@ // easy. related to the view/edit rate in accessstats. function userstats() { - global $request; $dbi =& $this->_dbi; $h = 0; $page_iter = $dbi->getAllPages(true); @@ -264,7 +261,6 @@ // %d pages more than 100 hits (>90%) >90% percent of the mostpopular function hitstats() { - global $request; $dbi =& $this->_dbi; $hits = array(); $page_iter = $dbi->getAllPages(true); @@ -294,7 +290,7 @@ */ function revisionstats() { - global $request, $LANG; + global $LANG; include_once 'lib/WikiPluginCached.php'; $cache = WikiPluginCached::newCache(); @@ -390,7 +386,7 @@ // seperately with a seperate key. function discspace() { - global $DBParams, $request; + global $DBParams; include_once 'lib/WikiPluginCached.php'; $cache = WikiPluginCached::newCache(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2012-12-17 14:56:58
|
Revision: 8668 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8668&view=rev Author: vargenau Date: 2012-12-17 14:56:52 +0000 (Mon, 17 Dec 2012) Log Message: ----------- Remove treshold local variable (is parameter) Modified Paths: -------------- trunk/lib/plugin/SystemInfo.php Modified: trunk/lib/plugin/SystemInfo.php =================================================================== --- trunk/lib/plugin/SystemInfo.php 2012-12-17 14:49:06 UTC (rev 8667) +++ trunk/lib/plugin/SystemInfo.php 2012-12-17 14:56:52 UTC (rev 8668) @@ -229,7 +229,6 @@ $median = $hits[$median_i]; else $median = $hits[$median_i]; - $treshold = 10; $mintreshold = $max * $treshold / 100.0; // lower than 10% of the hits reset($hits); $nmin = $hits[0] < $mintreshold ? 1 : 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2012-12-17 15:58:35
|
Revision: 8670 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8670&view=rev Author: vargenau Date: 2012-12-17 15:58:29 +0000 (Mon, 17 Dec 2012) Log Message: ----------- Fix mean and median calculation Modified Paths: -------------- trunk/lib/plugin/SystemInfo.php Modified: trunk/lib/plugin/SystemInfo.php =================================================================== --- trunk/lib/plugin/SystemInfo.php 2012-12-17 14:58:07 UTC (rev 8669) +++ trunk/lib/plugin/SystemInfo.php 2012-12-17 15:58:29 UTC (rev 8670) @@ -224,11 +224,8 @@ $max = max($h, $max); $min = min($h, $min); } - $median_i = (int)$n / 2; - if (!($n / 2)) - $median = $hits[$median_i]; - else - $median = $hits[$median_i]; + $mean = $n ? $sum / $n : 0; + $median = $hits[ (int)($n / 2) ]; $mintreshold = $max * $treshold / 100.0; // lower than 10% of the hits reset($hits); $nmin = $hits[0] < $mintreshold ? 1 : 0; @@ -243,7 +240,7 @@ 'sum' => $sum, 'min' => $min, 'max' => $max, - 'mean' => $sum / $n, + 'mean' => $mean, 'median' => $median, 'stddev' => stddev($hits, $sum), 'treshold' => $treshold, @@ -569,7 +566,7 @@ sort($hits); reset($hits); $n = count($hits); - $median = (int)$n / 2; + $median = (int)($n / 2); if (!($n % 2)) // proper rounding on even length return ($hits[$median] + $hits[$median - 1]) * 0.5; else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-06-16 18:53:30
|
Revision: 10290 http://sourceforge.net/p/phpwiki/code/10290 Author: vargenau Date: 2021-06-16 18:53:31 +0000 (Wed, 16 Jun 2021) Log Message: ----------- lib/plugin/SystemInfo.php: fix sprintf syntax Modified Paths: -------------- trunk/lib/plugin/SystemInfo.php Modified: trunk/lib/plugin/SystemInfo.php =================================================================== --- trunk/lib/plugin/SystemInfo.php 2021-06-16 18:47:30 UTC (rev 10289) +++ trunk/lib/plugin/SystemInfo.php 2021-06-16 18:53:31 UTC (rev 10290) @@ -433,8 +433,9 @@ } $s = sprintf(_("Application size: %d KiB"), $appsize); - if ($pagesize) - $s .= ", " . sprintf(_("Pagedata size: %d KiB", $pagesize)); + if ($pagesize) { + $s .= ", " . sprintf(_("Pagedata size: %d KiB"), $pagesize); + } return $s; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-06-29 14:47:16
|
Revision: 10340 http://sourceforge.net/p/phpwiki/code/10340 Author: vargenau Date: 2021-06-29 14:47:13 +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 13:38:35 UTC (rev 10339) +++ trunk/lib/plugin/SystemInfo.php 2021-06-29 14:47:13 UTC (rev 10340) @@ -518,17 +518,28 @@ //$args = $this->getArgs($argstr, $request); $this->_dbi =& $dbi; $args['separator'] = ' '; + + $appname_function = function() { return 'PhpWiki'; }; + $version_function = function() { return sprintf('%s', PHPWIKI_VERSION); }; + $LANG_function = function() { return $GLOBALS["LANG"]; }; + $LC_ALL_function = function() { return setlocale(LC_ALL, 0); }; + $current_language_function = function() { return $GLOBALS["LANG"]; }; + $system_language_function = function() { return DEFAULT_LANGUAGE; }; + $current_theme_function = function() { return $GLOBALS["WikiTheme"]->_name; }; + $system_theme_function = function() { return THEME; }; + $dummy_function = function() { return 'dummy'; }; + $availableargs = // name => callback + 0 args - array('appname' => create_function('', "return 'PhpWiki';"), - 'version' => create_function('', "return sprintf('%s', PHPWIKI_VERSION);"), - 'LANG' => create_function('', 'return $GLOBALS["LANG"];'), - 'LC_ALL' => create_function('', 'return setlocale(LC_ALL, 0);'), - 'current_language' => create_function('', 'return $GLOBALS["LANG"];'), - 'system_language' => create_function('', 'return DEFAULT_LANGUAGE;'), - 'current_theme' => create_function('', 'return $GLOBALS["WikiTheme"]->_name;'), - 'system_theme' => create_function('', 'return THEME;'), - // more here or as method. - '' => create_function('', "return 'dummy';") + array('appname' => $appname_function, + 'version' => $version_function, + 'LANG' => $LANG_function, + 'LC_ALL' => $LC_ALL_function, + 'current_language' => $current_language_function, + 'system_language' => $system_language_function, + 'current_theme' => $current_theme_function, + 'system_theme' => $system_theme_function, + // more here or as method. + '' => $dummy_function ); // split the argument string by any number of commas or space // characters, which include " ", \r, \t, \n and \f This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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. |
From: <var...@us...> - 2021-09-20 13:23:06
|
Revision: 10595 http://sourceforge.net/p/phpwiki/code/10595 Author: vargenau Date: 2021-09-20 13:23:05 +0000 (Mon, 20 Sep 2021) Log Message: ----------- lib/plugin/SystemInfo.php: add PDO Modified Paths: -------------- trunk/lib/plugin/SystemInfo.php Modified: trunk/lib/plugin/SystemInfo.php =================================================================== --- trunk/lib/plugin/SystemInfo.php 2021-09-20 12:47:14 UTC (rev 10594) +++ trunk/lib/plugin/SystemInfo.php 2021-09-20 13:23:05 UTC (rev 10595) @@ -387,7 +387,7 @@ //TODO: windows only (no cygwin) $appsize = `du -s $dir | cut -f1`; - if (in_array($DBParams['dbtype'], array('SQL'))) { + if (in_array($DBParams['dbtype'], array('SQL', 'PDO'))) { //TODO: where is the data is actually stored? see phpMyAdmin $pagesize = 0; } elseif ($DBParams['dbtype'] == 'dba') { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-10-19 12:53:43
|
Revision: 10632 http://sourceforge.net/p/phpwiki/code/10632 Author: vargenau Date: 2021-10-19 12:53:42 +0000 (Tue, 19 Oct 2021) Log Message: ----------- lib/plugin/SystemInfo.php: remove unused functions Modified Paths: -------------- trunk/lib/plugin/SystemInfo.php Modified: trunk/lib/plugin/SystemInfo.php =================================================================== --- trunk/lib/plugin/SystemInfo.php 2021-10-13 08:14:24 UTC (rev 10631) +++ trunk/lib/plugin/SystemInfo.php 2021-10-19 12:53:42 UTC (rev 10632) @@ -499,8 +499,6 @@ $appname_function = function() { return 'PhpWiki'; }; $version_function = function() { return sprintf('%s', PHPWIKI_VERSION); }; - $LANG_function = function() { return $GLOBALS["LANG"]; }; - $LC_ALL_function = function() { return setlocale(LC_ALL, 0); }; $current_language_function = function() { return $GLOBALS["LANG"]; }; $system_language_function = function() { return DEFAULT_LANGUAGE; }; $current_theme_function = function() { return $GLOBALS["WikiTheme"]->_name; }; @@ -510,8 +508,6 @@ $availableargs = // name => callback + 0 args array('appname' => $appname_function, 'version' => $version_function, - 'LANG' => $LANG_function, - 'LC_ALL' => $LC_ALL_function, 'current_language' => $current_language_function, 'system_language' => $system_language_function, 'current_theme' => $current_theme_function, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-10-19 13:38:42
|
Revision: 10634 http://sourceforge.net/p/phpwiki/code/10634 Author: vargenau Date: 2021-10-19 13:38:39 +0000 (Tue, 19 Oct 2021) Log Message: ----------- lib/plugin/SystemInfo.php: use user preferences for current language Modified Paths: -------------- trunk/lib/plugin/SystemInfo.php Modified: trunk/lib/plugin/SystemInfo.php =================================================================== --- trunk/lib/plugin/SystemInfo.php 2021-10-19 13:21:33 UTC (rev 10633) +++ trunk/lib/plugin/SystemInfo.php 2021-10-19 13:38:39 UTC (rev 10634) @@ -449,11 +449,15 @@ $available_languages = listAvailableLanguages(); natcasesort($available_languages); + global $request; + $pref = $request->_prefs; + $lang = $pref->get('lang'); + return sprintf(_("Total of %d languages: "), count($available_languages)) . implode(', ', $available_languages) . ". " - . _("Current language") . _(": ") . $GLOBALS['LANG'] - . ((DEFAULT_LANGUAGE != $GLOBALS['LANG']) + . _("Current language") . _(": ") . $lang + . ((DEFAULT_LANGUAGE != $lang) ? ". " . _("Default language") . _(": ") . DEFAULT_LANGUAGE : ''); } @@ -499,8 +503,6 @@ $appname_function = function() { return 'PhpWiki'; }; $version_function = function() { return sprintf('%s', PHPWIKI_VERSION); }; - $current_language_function = function() { return $GLOBALS["LANG"]; }; - $system_language_function = function() { return DEFAULT_LANGUAGE; }; $current_theme_function = function() { return $GLOBALS["WikiTheme"]->_name; }; $system_theme_function = function() { return THEME; }; $dummy_function = function() { return 'dummy'; }; @@ -508,8 +510,6 @@ $availableargs = // name => callback + 0 args array('appname' => $appname_function, 'version' => $version_function, - 'current_language' => $current_language_function, - 'system_language' => $system_language_function, 'current_theme' => $current_theme_function, 'system_theme' => $system_theme_function, // more here or as method. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |