Some minor updates for test files

This commit is contained in:
Clemens Schwaighofer
2018-12-14 13:07:10 +09:00
parent 005584e2ed
commit 98e16e6143
7 changed files with 45 additions and 18 deletions

View File

@@ -32,7 +32,7 @@ ob_end_flush();
// set + check edit access id
$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 "ACCESS CHECK: ".$login->loginCheckEditAccess($edit_access_id)."<br>";
if ($login->loginCheckEditAccess($edit_access_id)) {
@@ -68,14 +68,16 @@ print "CALLER BACKTRACE: ".$basic->getCallerMethod()."<br>";
$basic->debug('SOME MARK', 'Some error output');
print "EDIT ACCESS ID: ".$basic->edit_access_id."<br>";
// print "ACL: <br>".$basic->print_ar($login->acl)."<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($result)."<br>";
// DEPRICATED CALL
// $basic->adbSetACL($login->acl);
if (isset($login)) {
// print "ACL: <br>".$basic->print_ar($login->acl)."<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($result)."<br>";
// DEPRICATED CALL
// $basic->adbSetACL($login->acl);
}
// DB client encoding
print "DB Client encoding: ".$basic->dbGetEncoding()."<br>";
@@ -210,7 +212,7 @@ print "COMPARE DATE: ".$basic->compareDate($date_1, $date_2)."<br>";
// array re
// print error messages
print $login->printErrorMsg();
// print $login->printErrorMsg();
print $basic->printErrorMsg();
print "</body></html>";

View File

@@ -10,7 +10,7 @@ if ($DEBUG_ALL) {
}
// sample config
require("config.inc");
require 'config.php';
echo "FILE: ".BASE.LIB."Error.Handling.inc<br>";
require(BASE.LIB."Error.Handling.inc");

17
www/admin/l10n_test.php Executable file
View 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__

View File

@@ -72,6 +72,11 @@ class Login extends \CoreLibs\DB\IO
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_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
// 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'] = '';
}
// pass on vars to Object vars
$this->login = $_POST["login_login"];
$this->username = $_POST["login_username"];
$this->password = $_POST["login_password"];
$this->logout = $_POST["login_logout"];
$this->login = $_POST['login_login'];
$this->username = $_POST['login_username'];
$this->password = $_POST['login_password'];
$this->logout = $_POST['login_logout'];
// password change vars
$this->change_password = $_POST["change_password"];
$this->change_password = $_POST['change_password'];
$this->pw_username = $_POST['pw_username'];
$this->pw_old_password = $_POST['pw_old_password'];
$this->pw_new_password = $_POST['pw_new_password'];

View File

@@ -2117,3 +2117,5 @@ class IO extends \CoreLibs\Basic
return $this->dbSqlEscape($value, $kbn);
}
} // end if db class
// __END__

View File

@@ -457,4 +457,4 @@ class GetTextReader
}
}
# __END__
# __END__

View File

@@ -57,7 +57,6 @@ class L10n extends \CoreLibs\Basic
} else {
$this->input = false;
}
$this->l10n = new GetTextReader($this->input);
}
@@ -114,3 +113,5 @@ class L10n extends \CoreLibs\Basic
return $this->mofile;
}
}
// __END__