[geeklog-hg] geeklog: Little optimization
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sun Nov 16 10:12:35 EST 2014
changeset 9556:f18fa1249442
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/f18fa1249442
user: dengen <taharaxp at gmail.com>
date: Mon Nov 17 00:12:43 2014 +0900
description:
Little optimization
diffstat:
public_html/lib-common.php | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diffs (38 lines):
diff -r 8b641299eebe -r f18fa1249442 public_html/lib-common.php
--- a/public_html/lib-common.php Mon Nov 17 00:02:06 2014 +0900
+++ b/public_html/lib-common.php Mon Nov 17 00:12:43 2014 +0900
@@ -7199,6 +7199,11 @@
function COM_getCurrentURL()
{
global $_CONF;
+ static $thisUrl;
+
+ if ($thisUrl !== null) {
+ return $thisUrl;
+ }
$thisUrl = '';
@@ -7626,6 +7631,11 @@
function COM_getLanguage()
{
global $_CONF, $_USER;
+ static $langfile;
+
+ if ($langfile !== null) {
+ return $langfile;
+ }
$langfile = '';
@@ -7645,7 +7655,9 @@
}
// if all else fails, return the default language
- return $_CONF['language'];
+ $langfile = $_CONF['language'];
+
+ return $langfile;
}
/**
More information about the geeklog-cvs
mailing list