- updated to the new pikotools api (child spaces were removed)

some plugins need to be fixed yet: ticket, gallery, group, menu
- added current user to default models as "user"
- renamed in User: super_user -> is_super_user, env -> admin_env, pass_hash_salted -> is_pass_hash_salted
- now Users class has a WinixModel as a base class
  some plugin calls have to be fixed yet
- added UserWrapper model with a pointer to User class
- removed from ItemContent: methods for accessing 'meta' and 'admin_meta', now ezc can iterate through Space classes
- fixed in env winix function: if there is "changeuser" parameter then we should only switch the user (not save anything)
This commit is contained in:
2021-06-27 23:31:50 +02:00
parent 472490c239
commit 1d18b7fa12
59 changed files with 1419 additions and 1607 deletions

View File

@@ -258,7 +258,7 @@ bool TimeZone::SetTzDst(pt::Space & year)
Dst dst;
int year_int = 0;
std::wstring * year_name = year.find_child_space_name();
std::wstring * year_name = year.get_wstr(L"year");
if( year_name )
year_int = Toi(*year_name);
@@ -297,7 +297,7 @@ bool TimeZone::SetTz(pt::Space & space)
bool result = true;
name.clear();
std::wstring * space_name = space.find_child_space_name();
std::wstring * space_name = space.get_wstr(L"name");
if( space_name )
name = *space_name;
@@ -309,21 +309,16 @@ bool TimeZone::SetTz(pt::Space & space)
if( offset < -h24 || offset > h24 )
result = false;
pt::Space * dst = space.find_child_space(L"dst");
pt::Space::TableType * dst = space.get_table(L"dst");
if( dst )
{
pt::Space::TableType * child_table = dst->find_child_space_table();
if( child_table )
for(pt::Space * dst_space : *dst)
{
for(pt::Space * year : *child_table)
if( !SetTzDst(*dst_space) )
{
if( !SetTzDst(*year) )
{
result = false;
break;
}
result = false;
break;
}
}
}