Some minor updates for test files
This commit is contained in:
@@ -32,7 +32,7 @@ ob_end_flush();
|
|||||||
|
|
||||||
// set + check edit access id
|
// set + check edit access id
|
||||||
$edit_access_id = 3;
|
$edit_access_id = 3;
|
||||||
if (array_key_exists('unit', $login->acl)) {
|
if (isset($login) && is_object($login) && isset($login->acl['unit'])) {
|
||||||
print "ACL UNIT: ".print_r(array_keys($login->acl['unit']), 1)."<br>";
|
print "ACL UNIT: ".print_r(array_keys($login->acl['unit']), 1)."<br>";
|
||||||
print "ACCESS CHECK: ".$login->loginCheckEditAccess($edit_access_id)."<br>";
|
print "ACCESS CHECK: ".$login->loginCheckEditAccess($edit_access_id)."<br>";
|
||||||
if ($login->loginCheckEditAccess($edit_access_id)) {
|
if ($login->loginCheckEditAccess($edit_access_id)) {
|
||||||
@@ -68,14 +68,16 @@ print "CALLER BACKTRACE: ".$basic->getCallerMethod()."<br>";
|
|||||||
$basic->debug('SOME MARK', 'Some error output');
|
$basic->debug('SOME MARK', 'Some error output');
|
||||||
|
|
||||||
print "EDIT ACCESS ID: ".$basic->edit_access_id."<br>";
|
print "EDIT ACCESS ID: ".$basic->edit_access_id."<br>";
|
||||||
// print "ACL: <br>".$basic->print_ar($login->acl)."<br>";
|
if (isset($login)) {
|
||||||
$basic->debug('ACL', "ACL: ".$basic->printAr($login->acl));
|
// print "ACL: <br>".$basic->print_ar($login->acl)."<br>";
|
||||||
// print "DEFAULT ACL: <br>".$basic->print_ar($login->default_acl_list)."<br>";
|
$basic->debug('ACL', "ACL: ".$basic->printAr($login->acl));
|
||||||
// print "DEFAULT ACL: <br>".$basic->print_ar($login->default_acl_list)."<br>";
|
// print "DEFAULT ACL: <br>".$basic->print_ar($login->default_acl_list)."<br>";
|
||||||
// $result = array_flip(array_filter(array_flip($login->default_acl_list), function ($key) { if (is_numeric($key)) return $key; }));
|
// print "DEFAULT ACL: <br>".$basic->print_ar($login->default_acl_list)."<br>";
|
||||||
// print "DEFAULT ACL: <br>".$basic->print_ar($result)."<br>";
|
// $result = array_flip(array_filter(array_flip($login->default_acl_list), function ($key) { if (is_numeric($key)) return $key; }));
|
||||||
// DEPRICATED CALL
|
// print "DEFAULT ACL: <br>".$basic->print_ar($result)."<br>";
|
||||||
// $basic->adbSetACL($login->acl);
|
// DEPRICATED CALL
|
||||||
|
// $basic->adbSetACL($login->acl);
|
||||||
|
}
|
||||||
|
|
||||||
// DB client encoding
|
// DB client encoding
|
||||||
print "DB Client encoding: ".$basic->dbGetEncoding()."<br>";
|
print "DB Client encoding: ".$basic->dbGetEncoding()."<br>";
|
||||||
@@ -210,7 +212,7 @@ print "COMPARE DATE: ".$basic->compareDate($date_1, $date_2)."<br>";
|
|||||||
// array re
|
// array re
|
||||||
|
|
||||||
// print error messages
|
// print error messages
|
||||||
print $login->printErrorMsg();
|
// print $login->printErrorMsg();
|
||||||
print $basic->printErrorMsg();
|
print $basic->printErrorMsg();
|
||||||
|
|
||||||
print "</body></html>";
|
print "</body></html>";
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ if ($DEBUG_ALL) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// sample config
|
// sample config
|
||||||
require("config.inc");
|
require 'config.php';
|
||||||
echo "FILE: ".BASE.LIB."Error.Handling.inc<br>";
|
echo "FILE: ".BASE.LIB."Error.Handling.inc<br>";
|
||||||
require(BASE.LIB."Error.Handling.inc");
|
require(BASE.LIB."Error.Handling.inc");
|
||||||
|
|
||||||
|
|||||||
17
www/admin/l10n_test.php
Executable file
17
www/admin/l10n_test.php
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// debug for L10n issues in php 7.3
|
||||||
|
|
||||||
|
// namespace test
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
$lang = 'en_utf8';
|
||||||
|
|
||||||
|
// admin class tests
|
||||||
|
require 'config.php';
|
||||||
|
$l = new CoreLibs\Language\L10n($lang);
|
||||||
|
|
||||||
|
echo "OK<br>";
|
||||||
|
|
||||||
|
ob_end_flush();
|
||||||
|
// __END__
|
||||||
@@ -72,6 +72,11 @@ class Login extends \CoreLibs\DB\IO
|
|||||||
private $password_change_ok = false; // password change was successful
|
private $password_change_ok = false; // password change was successful
|
||||||
private $password_forgot = false; // can we reset password and mail to user with new password set screen
|
private $password_forgot = false; // can we reset password and mail to user with new password set screen
|
||||||
private $password_forgot_ok = false; // password forgot mail send ok
|
private $password_forgot_ok = false; // password forgot mail send ok
|
||||||
|
private $change_password;
|
||||||
|
private $pw_username;
|
||||||
|
private $pw_old_password;
|
||||||
|
private $pw_new_password;
|
||||||
|
private $pw_new_password_confirm;
|
||||||
private $pw_change_deny_users = array (); // array of users for which the password change is forbidden
|
private $pw_change_deny_users = array (); // array of users for which the password change is forbidden
|
||||||
|
|
||||||
// if we have password change we need to define some rules
|
// if we have password change we need to define some rules
|
||||||
@@ -179,12 +184,12 @@ class Login extends \CoreLibs\DB\IO
|
|||||||
$_POST['pw_new_password_confirm'] = '';
|
$_POST['pw_new_password_confirm'] = '';
|
||||||
}
|
}
|
||||||
// pass on vars to Object vars
|
// pass on vars to Object vars
|
||||||
$this->login = $_POST["login_login"];
|
$this->login = $_POST['login_login'];
|
||||||
$this->username = $_POST["login_username"];
|
$this->username = $_POST['login_username'];
|
||||||
$this->password = $_POST["login_password"];
|
$this->password = $_POST['login_password'];
|
||||||
$this->logout = $_POST["login_logout"];
|
$this->logout = $_POST['login_logout'];
|
||||||
// password change vars
|
// password change vars
|
||||||
$this->change_password = $_POST["change_password"];
|
$this->change_password = $_POST['change_password'];
|
||||||
$this->pw_username = $_POST['pw_username'];
|
$this->pw_username = $_POST['pw_username'];
|
||||||
$this->pw_old_password = $_POST['pw_old_password'];
|
$this->pw_old_password = $_POST['pw_old_password'];
|
||||||
$this->pw_new_password = $_POST['pw_new_password'];
|
$this->pw_new_password = $_POST['pw_new_password'];
|
||||||
|
|||||||
@@ -2117,3 +2117,5 @@ class IO extends \CoreLibs\Basic
|
|||||||
return $this->dbSqlEscape($value, $kbn);
|
return $this->dbSqlEscape($value, $kbn);
|
||||||
}
|
}
|
||||||
} // end if db class
|
} // end if db class
|
||||||
|
|
||||||
|
// __END__
|
||||||
|
|||||||
@@ -457,4 +457,4 @@ class GetTextReader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# __END__
|
# __END__
|
||||||
|
|||||||
@@ -57,7 +57,6 @@ class L10n extends \CoreLibs\Basic
|
|||||||
} else {
|
} else {
|
||||||
$this->input = false;
|
$this->input = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->l10n = new GetTextReader($this->input);
|
$this->l10n = new GetTextReader($this->input);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,3 +113,5 @@ class L10n extends \CoreLibs\Basic
|
|||||||
return $this->mofile;
|
return $this->mofile;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// __END__
|
||||||
|
|||||||
Reference in New Issue
Block a user