Compare commits
4 Commits
v9.33.0
...
426afdc1ff
| Author | SHA1 | Date | |
|---|---|---|---|
| 426afdc1ff | |||
| ffff65a76d | |||
|
|
c22e68f19a | ||
|
|
074d5bed4c |
@@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<phive xmlns="https://phar.io/phive">
|
<phive xmlns="https://phar.io/phive">
|
||||||
<phar name="phpunit" version="^10.3.5" installed="10.3.5" location="./tools/phpunit" copy="false"/>
|
<phar name="phpunit" version="^10.3.5" installed="10.5.46" location="./tools/phpunit" copy="false"/>
|
||||||
<phar name="phpcbf" version="^3.7.2" installed="3.10.3" location="./tools/phpcbf" copy="false"/>
|
<phar name="phpcbf" version="^3.7.2" installed="3.13.0" location="./tools/phpcbf" copy="false"/>
|
||||||
<phar name="phpcs" version="^3.10.3" installed="3.10.3" location="./tools/phpcs" copy="false"/>
|
<phar name="phpcs" version="^3.10.3" installed="3.13.0" location="./tools/phpcs" copy="false"/>
|
||||||
<phar name="phpstan" version="^2.0" installed="2.0.4" location="./tools/phpstan" copy="false"/>
|
<phar name="phpstan" version="^2.0" installed="2.1.16" location="./tools/phpstan" copy="false"/>
|
||||||
<phar name="phan" version="^5.4.3" installed="5.4.3" location="./tools/phan" copy="false"/>
|
<phar name="phan" version="^5.4.3" installed="5.4.3" location="./tools/phan" copy="false"/>
|
||||||
<phar name="psalm" version="^5.15.0" installed="5.24.0" location="./tools/psalm" copy="false"/>
|
<phar name="psalm" version="^5.15.0" installed="5.24.0" location="./tools/psalm" copy="false"/>
|
||||||
<phar name="phpdox" version="^0.12.0" installed="0.12.0" location="./tools/phpdox" copy="false"/>
|
<phar name="phpdox" version="^0.12.0" installed="0.12.0" location="./tools/phpdox" copy="false"/>
|
||||||
|
|||||||
@@ -60,6 +60,8 @@ echo "ARRAYSEARCHRECURSIVE(email, [array], type): "
|
|||||||
. DgS::printAr(ArrayHandler::arraySearchRecursive('email', $test_array, 'type')) . "<br>";
|
. DgS::printAr(ArrayHandler::arraySearchRecursive('email', $test_array, 'type')) . "<br>";
|
||||||
echo "ARRAYSEARCHRECURSIVE(email, [array]['input'], type): "
|
echo "ARRAYSEARCHRECURSIVE(email, [array]['input'], type): "
|
||||||
. DgS::printAr(ArrayHandler::arraySearchRecursive('email', $test_array['input'], 'type')) . "<br>";
|
. DgS::printAr(ArrayHandler::arraySearchRecursive('email', $test_array['input'], 'type')) . "<br>";
|
||||||
|
echo "ARRAYSEARCHRECURSIVE(email, [array]['input'], wrong): "
|
||||||
|
. DgS::printAr(ArrayHandler::arraySearchRecursive('email', $test_array['input'], 'wrong')) . "<br>";
|
||||||
// all return
|
// all return
|
||||||
echo "ARRAYSEARCHRECURSIVEALL(email, [array], type): "
|
echo "ARRAYSEARCHRECURSIVEALL(email, [array], type): "
|
||||||
. Dgs::printAr((array)ArrayHandler::arraySearchRecursiveAll('email', $test_array, 'type')) . "<br>";
|
. Dgs::printAr((array)ArrayHandler::arraySearchRecursiveAll('email', $test_array, 'type')) . "<br>";
|
||||||
@@ -168,6 +170,31 @@ $data = [
|
|||||||
$search = ['image', 'result_image', 'nothing', 'EMPTY'];
|
$search = ['image', 'result_image', 'nothing', 'EMPTY'];
|
||||||
$result = ArrayHandler::arraySearchKey($data, $search);
|
$result = ArrayHandler::arraySearchKey($data, $search);
|
||||||
print "ARRAYSEARCHKEY: Search: " . DgS::printAr($search) . ", Found: " . DgS::printAr($result) . "<br>";
|
print "ARRAYSEARCHKEY: Search: " . DgS::printAr($search) . ", Found: " . DgS::printAr($result) . "<br>";
|
||||||
|
$result = ArrayHandler::arraySearchKey($data, $search, true);
|
||||||
|
print "ARRAYSEARCHKEY: FLAT: Search: " . DgS::printAr($search) . ", Found: " . DgS::printAr($result) . "<br>";
|
||||||
|
$result = ArrayHandler::arraySearchKey($data, $search, true, true);
|
||||||
|
print "ARRAYSEARCHKEY: FLAT:PREFIX: Search: " . DgS::printAr($search) . ", Found: " . DgS::printAr($result) . "<br>";
|
||||||
|
$result = ArrayHandler::arraySearchKey($data, ["EMPTY"], true);
|
||||||
|
print "ARRAYSEARCHKEY: FLAT:PREFIX: Search: " . DgS::printAr(["EMPTY"]) . ", Found: " . DgS::printAr($result) . "<br>";
|
||||||
|
|
||||||
|
// $data = [
|
||||||
|
// [
|
||||||
|
// [name] => qrc_apcd,
|
||||||
|
// [value] => 5834367225,
|
||||||
|
// ],
|
||||||
|
// [
|
||||||
|
// [name] => qrc_other,
|
||||||
|
// [value] => test,
|
||||||
|
// ],
|
||||||
|
// [
|
||||||
|
// [name] => qrc_car_type,
|
||||||
|
// [value] => T33P17,
|
||||||
|
// ],
|
||||||
|
// [
|
||||||
|
// [name] => qrc_deaer_store,
|
||||||
|
// [value] => 9990:001,
|
||||||
|
// ]
|
||||||
|
// ]
|
||||||
|
|
||||||
// $test = [
|
// $test = [
|
||||||
// 'A' => [
|
// 'A' => [
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ $log = new CoreLibs\Logging\Logging([
|
|||||||
'log_per_date' => true,
|
'log_per_date' => true,
|
||||||
]);
|
]);
|
||||||
$db = new CoreLibs\DB\IO(DB_CONFIG, $log);
|
$db = new CoreLibs\DB\IO(DB_CONFIG, $log);
|
||||||
|
$log->setLogFileId('classTest-login-override');
|
||||||
$login = new CoreLibs\ACL\Login(
|
$login = new CoreLibs\ACL\Login(
|
||||||
$db,
|
$db,
|
||||||
$log,
|
$log,
|
||||||
@@ -45,6 +46,7 @@ $login = new CoreLibs\ACL\Login(
|
|||||||
'locale_path' => BASE . INCLUDES . LOCALE,
|
'locale_path' => BASE . INCLUDES . LOCALE,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
$log->setLogFileId($LOG_FILE_ID);
|
||||||
ob_end_flush();
|
ob_end_flush();
|
||||||
$login->loginMainCall();
|
$login->loginMainCall();
|
||||||
|
|
||||||
@@ -158,5 +160,6 @@ if (is_string($edit_access_cuid)) {
|
|||||||
print "EA ID: " . $edit_access_id . "<br>";
|
print "EA ID: " . $edit_access_id . "<br>";
|
||||||
print "EA CUID: " . $log->prAr($edit_access_cuid) . "<br>";
|
print "EA CUID: " . $log->prAr($edit_access_cuid) . "<br>";
|
||||||
print "REV EA CUID: " . $log->prAr($edit_access_id_rev) . "<br>";
|
print "REV EA CUID: " . $log->prAr($edit_access_id_rev) . "<br>";
|
||||||
|
$log->info('This is a test');
|
||||||
|
|
||||||
print "</body></html>";
|
print "</body></html>";
|
||||||
|
|||||||
@@ -34,6 +34,17 @@ function executeFunctionByName(functionName, context) {
|
|||||||
}
|
}
|
||||||
return context[func].apply(context, args);
|
return context[func].apply(context, args);
|
||||||
}
|
}
|
||||||
|
function runFunction(name) {
|
||||||
|
var args = Array.prototype.slice.call(arguments, 1);
|
||||||
|
runFunctionArgsArray(name, args);
|
||||||
|
}
|
||||||
|
function runFunctionArgsArray(name, args) {
|
||||||
|
var fn = window[name];
|
||||||
|
if (typeof fn !== "function") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
fn.apply(window, args);
|
||||||
|
}
|
||||||
function isObject(val) {
|
function isObject(val) {
|
||||||
if (val === null) {
|
if (val === null) {
|
||||||
return false;
|
return false;
|
||||||
@@ -659,6 +670,31 @@ function getQueryStringParam(search = "", query = "", single = false) {
|
|||||||
}
|
}
|
||||||
return param;
|
return param;
|
||||||
}
|
}
|
||||||
|
function hasUrlParameter(key) {
|
||||||
|
var urlParams = new URLSearchParams(window.location.search);
|
||||||
|
return urlParams.has(key);
|
||||||
|
}
|
||||||
|
function getUrlParameter(key) {
|
||||||
|
var urlParams = new URLSearchParams(window.location.search);
|
||||||
|
return urlParams.get(key);
|
||||||
|
}
|
||||||
|
function updateUrlParameter(key, value, reload = false) {
|
||||||
|
const url = new URL(window.location.href);
|
||||||
|
url.searchParams.set(key, value);
|
||||||
|
const newUrl = url.toString();
|
||||||
|
window.history.pushState({ path: newUrl }, "", newUrl);
|
||||||
|
if (reload) {
|
||||||
|
window.location.reload();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function removeUrlParameter(key, reload = false) {
|
||||||
|
const url = new URL(window.location.href);
|
||||||
|
url.searchParams.delete(key);
|
||||||
|
window.history.pushState({}, "", url.toString());
|
||||||
|
if (reload) {
|
||||||
|
window.location.reload();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// src/utils/LoginLogout.mjs
|
// src/utils/LoginLogout.mjs
|
||||||
function loginLogout() {
|
function loginLogout() {
|
||||||
@@ -979,7 +1015,7 @@ var ActionBox = class {
|
|||||||
$("#overlayBox").css("zIndex", this.zIndex.base);
|
$("#overlayBox").css("zIndex", this.zIndex.base);
|
||||||
}
|
}
|
||||||
$("#overlayBox").show();
|
$("#overlayBox").show();
|
||||||
if (!keyInObject(target_id, this.zIndex.boxes)) {
|
if (!objectKeyExists(this.zIndex.boxes, target_id)) {
|
||||||
this.zIndex.boxes[target_id] = this.zIndex.max;
|
this.zIndex.boxes[target_id] = this.zIndex.max;
|
||||||
this.zIndex.max += 10;
|
this.zIndex.max += 10;
|
||||||
} else if (this.zIndex.boxes[target_id] + 10 < this.zIndex.max) {
|
} else if (this.zIndex.boxes[target_id] + 10 < this.zIndex.max) {
|
||||||
@@ -1005,7 +1041,7 @@ var ActionBox = class {
|
|||||||
if (!exists(target_id)) {
|
if (!exists(target_id)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (keyInObject(target_id, this.action_box_storage) && clean === true) {
|
if (objectKeyExists(this.action_box_storage, target_id) && clean === true) {
|
||||||
this.action_box_storage[target_id] = {};
|
this.action_box_storage[target_id] = {};
|
||||||
}
|
}
|
||||||
if (clean === true) {
|
if (clean === true) {
|
||||||
@@ -1043,15 +1079,15 @@ var ActionBox = class {
|
|||||||
* @param {Object} [settings={}] Optional settings, eg style sheets
|
* @param {Object} [settings={}] Optional settings, eg style sheets
|
||||||
*/
|
*/
|
||||||
createActionBox(target_id = "actionBox", title = "", contents = {}, headers = {}, settings = {}, show_close = true) {
|
createActionBox(target_id = "actionBox", title = "", contents = {}, headers = {}, settings = {}, show_close = true) {
|
||||||
if (!keyInObject(target_id, this.action_box_storage)) {
|
if (!objectKeyExists(this.action_box_storage, target_id)) {
|
||||||
this.action_box_storage[target_id] = {};
|
this.action_box_storage[target_id] = {};
|
||||||
}
|
}
|
||||||
let header_css = [];
|
let header_css = [];
|
||||||
if (keyInObject("header_css", settings)) {
|
if (objectKeyExists(settings, "header_css")) {
|
||||||
header_css = settings.header_css;
|
header_css = settings.header_css;
|
||||||
}
|
}
|
||||||
let action_box_css = [];
|
let action_box_css = [];
|
||||||
if (keyInObject("action_box_css", settings)) {
|
if (objectKeyExists(settings, "action_box_css")) {
|
||||||
action_box_css = settings.action_box_css;
|
action_box_css = settings.action_box_css;
|
||||||
}
|
}
|
||||||
let elements = [];
|
let elements = [];
|
||||||
@@ -1082,14 +1118,14 @@ var ActionBox = class {
|
|||||||
)
|
)
|
||||||
));
|
));
|
||||||
if (getObjectCount(headers) > 0) {
|
if (getObjectCount(headers) > 0) {
|
||||||
if (keyInObject("raw_string", headers)) {
|
if (objectKeyExists(headers, "raw_string")) {
|
||||||
elements.push(headers.raw_string);
|
elements.push(headers.raw_string);
|
||||||
} else {
|
} else {
|
||||||
elements.push(this.hec.phfo(headers));
|
elements.push(this.hec.phfo(headers));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (getObjectCount(contents) > 0) {
|
if (getObjectCount(contents) > 0) {
|
||||||
if (keyInObject("raw_string", contents)) {
|
if (objectKeyExists(contents, "raw_string")) {
|
||||||
elements.push(contents.raw_string);
|
elements.push(contents.raw_string);
|
||||||
} else {
|
} else {
|
||||||
elements.push(this.hec.phfo(contents));
|
elements.push(this.hec.phfo(contents));
|
||||||
@@ -1517,12 +1553,24 @@ function html_options_block2(name, data, selected = "", multiple = 0, options_on
|
|||||||
function html_options_refill2(name, data, sort = "") {
|
function html_options_refill2(name, data, sort = "") {
|
||||||
html_options_refill(name, data, sort);
|
html_options_refill(name, data, sort);
|
||||||
}
|
}
|
||||||
function parseQueryString2(query = "", return_key = "") {
|
function parseQueryString2(query = "", return_key = "", single = false) {
|
||||||
return parseQueryString(query, return_key);
|
return parseQueryString(query, return_key, single);
|
||||||
}
|
}
|
||||||
function getQueryStringParam2(search = "", query = "", single = false) {
|
function getQueryStringParam2(search = "", query = "", single = false) {
|
||||||
return getQueryStringParam(search, query, single);
|
return getQueryStringParam(search, query, single);
|
||||||
}
|
}
|
||||||
|
function updateUrlParameter2(key, value, reload = false) {
|
||||||
|
return updateUrlParameter(key, value, reload);
|
||||||
|
}
|
||||||
|
function removeUrlParameter2(key, reload = false) {
|
||||||
|
return removeUrlParameter(key, reload);
|
||||||
|
}
|
||||||
|
function hasUrlParameter2(key) {
|
||||||
|
return hasUrlParameter(key);
|
||||||
|
}
|
||||||
|
function getUrlParameter2(key) {
|
||||||
|
return getUrlParameter(key);
|
||||||
|
}
|
||||||
function loginLogout2() {
|
function loginLogout2() {
|
||||||
loginLogout();
|
loginLogout();
|
||||||
}
|
}
|
||||||
|
|||||||
4
www/admin/layout/javascript/utils.min.js
vendored
4
www/admin/layout/javascript/utils.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user