Changeset: 73c16d65dcd6 https://sourceforge.net/p/mrbs/hg-code/ci/73c16d65dcd6795728c47443ba65386e863edc9e Author: Campbell Morrison <cimorri...@hg.code.sf.net> Date: Wed Mar 15 17:57:35 2017 +0000 Log message:
Made $html a static variable so that the day names are calculated only once, instead of three times. diffstat: web/mincals.inc | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diffs (19 lines): diff -r 34421a853e7c -r 73c16d65dcd6 web/mincals.inc --- a/web/mincals.inc Wed Mar 15 17:37:21 2017 +0000 +++ b/web/mincals.inc Wed Mar 15 17:57:35 2017 +0000 @@ -304,7 +304,14 @@ private function getDayNames() { global $weekstarts, $strftime_format; - + + static $html = null; + + if (isset($html)) + { + return $html; + } + $html = ''; for ($i=$weekstarts; $i<$weekstarts+7; $i++) ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Mrbs-commits mailing list Mrbs-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mrbs-commits