Last login value, minor update for array to [, smarty include core

When logged in, the last loggedin time is stored in the edit_user table,
additional to the normal logging.

More array() to [] conversion in config files, etc

Javascript: add math.round

Basic Class: Fix key length array mapping to more efficiont loop run
DB/IO: some name fixes in get key function description/comments
SmartyExtended: add CORE CSS/JS file include if exists. Follows after
MAIN and BEFORE page and special
This commit is contained in:
Clemens Schwaighofer
2021-01-21 06:55:28 +09:00
parent 85f701ab2a
commit 50073479d4
11 changed files with 105 additions and 88 deletions

View File

@@ -154,8 +154,8 @@ function __(string)
* simple sprintf formater for replace
* usage: "{0} is cool, {1} is not".format("Alpha", "Beta");
* First, checks if it isn't implemented yet.
* @param {String} !String.prototype.format string with elements to be replaced
* @return {String} Formated string
* @param {String} String.prototype.format string with elements to be replaced
* @return {String} Formated string
*/
if (!String.prototype.format) {
String.prototype.format = function()
@@ -171,6 +171,18 @@ if (!String.prototype.format) {
};
}
/**
* round to digits (float)
* @param {Float} Number.prototype.round Float type number to round
* @param {Number} prec Precision to round to
* @return {Float} Rounded number
*/
if (Number.prototype.round) {
Number.prototype.round = function (prec) {
return Math.round(this * Math.pow(10, prec)) / Math.pow(10, prec);
};
}
/**
* formats flat number 123456 to 123,456
* @param {Number} x number to be formated
@@ -630,7 +642,7 @@ function showActionIndicator(loc)
/**
* hide action indicator, if it is visiable
* If the global variable GL_OB_S is > 10 then
* If the global variable GL_OB_S is > GL_OB_BASE then
* the overlayBox is not hidden but the zIndex
* is set to this value
* @param {String} loc ID string, only used for console log
@@ -954,7 +966,7 @@ function phfo(tree)
function phfa(list)
{
var content = [];
for (i = 0; i < list.length; i ++) {
for (var i = 0; i < list.length; i ++) {
content.push(phfo(list[i]));
}
return content.join('');