Skip to content
GitLab
Explore
Sign in
ilias-core
ilias-archive
Compare revisions
0b376112682ab1f5702d6daf6f26a81f5a953619 to 85c5eb48602cf5ded7cbeb4c20adaf4707c99a0f
Commits on Source (3)
PHP 8: Strict Code Review `Category and Repository`
· 1c8d347e
Michael Jansen
authored
Apr 21, 2022
1c8d347e
Merge pull request #4391 from mjansenDatabay/review/8/php8-CategoryAndRepository-strict
· 5ac6bc4b
Alex Killing
authored
Apr 21, 2022
PHP 8: Strict Code Review `Category and Repository`
5ac6bc4b
type fixes
· 85c5eb48
Alexander Killing
authored
Apr 21, 2022
85c5eb48
Hide whitespace changes
Inline
Side-by-side
Modules/Category/Export/class.ilCategoryExporter.php
View file @
85c5eb48
<?php
<?php
declare
(
strict_types
=
1
);
/**
* This file is part of ILIAS, a powerful learning management system
...
...
Modules/Category/Export/class.ilCategoryImportParser.php
View file @
85c5eb48
<?php
<?php
declare
(
strict_types
=
1
);
/******************************************************************************
*
...
...
@@ -134,12 +134,12 @@ class ilCategoryImportParser extends ilSaxParser
break
;
case
"CategorySpec"
:
$is_def
=
0
;
$is_def
=
'0'
;
if
(
$this
->
cur_spec_lang
===
$this
->
default_language
)
{
$this
->
category
->
setTitle
(
$this
->
cur_title
);
$this
->
category
->
setDescription
(
$this
->
cur_description
);
$this
->
category
->
update
();
$is_def
=
1
;
$is_def
=
'1'
;
}
$this
->
category
->
addTranslation
(
$this
->
cur_title
,
...
...
Modules/Category/Export/class.ilCategoryImporter.php
View file @
85c5eb48
<?php
<?php
declare
(
strict_types
=
1
);
/**
* This file is part of ILIAS, a powerful learning management system
...
...
@@ -41,7 +41,7 @@ class ilCategoryImporter extends ilXmlImporter
$this
->
category
=
ilObjectFactory
::
getInstanceByRefId
(
end
(
$refs
),
false
);
}
// Mapping for containers without subitems
elseif
(
$new_id
=
$a_mapping
->
getMapping
(
'Services/Container'
,
'refs'
,
0
))
{
elseif
(
$new_id
=
$a_mapping
->
getMapping
(
'Services/Container'
,
'refs'
,
'0'
))
{
$this
->
category
=
ilObjectFactory
::
getInstanceByRefId
((
int
)
$new_id
,
false
);
}
elseif
(
!
$this
->
category
instanceof
ilObjCategory
)
{
$this
->
category
=
new
ilObjCategory
();
...
...
Modules/Category/Export/class.ilCategoryXmlParser.php
View file @
85c5eb48
<?php
<?php
declare
(
strict_types
=
1
);
/******************************************************************************
*
...
...
@@ -140,7 +140,7 @@ class ilCategoryXmlParser extends ilSaxParser
(
string
)
$this
->
current_translation
[
'title'
],
(
string
)
$this
->
current_translation
[
'description'
],
(
string
)
$this
->
current_translation
[
'lang'
],
(
int
)
$this
->
current_translation
[
'default'
]
(
string
)
(
(
int
)
$this
->
current_translation
[
'default'
]
)
);
break
;
...
...
Modules/Category/Export/class.ilCategoryXmlWriter.php
View file @
85c5eb48
<?php
<?php
declare
(
strict_types
=
1
);
/**
* This file is part of ILIAS, a powerful learning management system
...
...
Modules/Category/classes/class.StandardGUIRequest.php
View file @
85c5eb48
<?php
<?php
declare
(
strict_types
=
1
);
/**
* This file is part of ILIAS, a powerful learning management system
...
...
Modules/Category/classes/class.ilCategoryAssignRoleTableGUI.php
View file @
85c5eb48
<?php
<?php
declare
(
strict_types
=
1
);
/**
* This file is part of ILIAS, a powerful learning management system
...
...
Modules/Category/classes/class.ilCategoryConditionController.php
View file @
85c5eb48
<?php
<?php
declare
(
strict_types
=
1
);
/**
* This file is part of ILIAS, a powerful learning management system
...
...
Modules/Category/classes/class.ilECSCategorySettings.php
View file @
85c5eb48
<?php
<?php
declare
(
strict_types
=
1
);
/* Copyright (c) 1998-2021 ILIAS open source, GPLv3, see LICENSE */
...
...
Modules/Category/classes/class.ilObjCategory.php
View file @
85c5eb48
<?php
<?php
declare
(
strict_types
=
1
);
/**
* This file is part of ILIAS, a powerful learning management system
...
...
Modules/Category/classes/class.ilObjCategoryAccess.php
View file @
85c5eb48
<?php
<?php
declare
(
strict_types
=
1
);
/**
* This file is part of ILIAS, a powerful learning management system
...
...
Modules/Category/classes/class.ilObjCategoryGUI.php
View file @
85c5eb48
<?php
<?php
declare
(
strict_types
=
1
);
/**
* This file is part of ILIAS, a powerful learning management system
...
...
@@ -71,10 +71,10 @@ class ilObjCategoryGUI extends ilContainerGUI
parent
::
__construct
(
$a_data
,
$a_id
,
$a_call_by_reference
,
false
);
if
(
is_object
(
$this
->
object
))
{
$this
->
info_screen_enabled
=
ilContainer
::
_lookupContainerSetting
(
$this
->
info_screen_enabled
=
(
bool
)
ilContainer
::
_lookupContainerSetting
(
$this
->
object
->
getId
(),
ilObjectServiceSettingsGUI
::
INFO_TAB_VISIBILITY
,
true
'1'
);
}
$this
->
cat_request
=
$DIC
...
...
@@ -328,7 +328,7 @@ class ilObjCategoryGUI extends ilContainerGUI
if
(
ilContainer
::
_lookupContainerSetting
(
$this
->
object
->
getId
(),
ilObjectServiceSettingsGUI
::
TAXONOMIES
,
false
'0'
))
{
$md_gui
->
enableTaxonomyDefinition
(
true
);
$tax
=
$md_gui
->
getTaxonomyObjGUI
();
...
...
@@ -384,7 +384,7 @@ class ilObjCategoryGUI extends ilContainerGUI
ilContainer
::
_writeContainerSetting
(
$this
->
object
->
getId
(),
$prefix
.
$tax_id
,
1
'1'
);
}
}
...
...
@@ -452,7 +452,7 @@ class ilObjCategoryGUI extends ilContainerGUI
if
(
ilContainer
::
_lookupContainerSetting
(
$this
->
object
->
getId
(),
ilObjectServiceSettingsGUI
::
TAXONOMIES
,
false
'0'
))
{
$mdgui
->
enableTaxonomyDefinition
(
true
);
}
...
...
@@ -590,8 +590,8 @@ class ilObjCategoryGUI extends ilContainerGUI
$enable_internal_rss
=
$news_set
->
get
(
"enable_rss_for_internal"
);
if
(
$enable_internal_rss
)
{
$info
->
setBlockProperty
(
"news"
,
"settings"
,
true
);
$info
->
setBlockProperty
(
"news"
,
"public_notifications_option"
,
true
);
$info
->
setBlockProperty
(
"news"
,
"settings"
,
'1'
);
$info
->
setBlockProperty
(
"news"
,
"public_notifications_option"
,
'1'
);
}
}
...
...
@@ -683,7 +683,7 @@ class ilObjCategoryGUI extends ilContainerGUI
$news_active
=
ilContainer
::
_lookupContainerSetting
(
$this
->
object
->
getId
(),
ilObjectServiceSettingsGUI
::
NEWS_VISIBILITY
,
true
'1'
);
if
(
$news_active
)
{
...
...
@@ -847,7 +847,11 @@ class ilObjCategoryGUI extends ilContainerGUI
// block limit
if
((
int
)
$form
->
getInput
(
"block_limit"
)
>
0
)
{
ilContainer
::
_writeContainerSetting
(
$this
->
object
->
getId
(),
"block_limit"
,
(
int
)
$form
->
getInput
(
"block_limit"
));
ilContainer
::
_writeContainerSetting
(
$this
->
object
->
getId
(),
"block_limit"
,
(
string
)
((
int
)
$form
->
getInput
(
"block_limit"
))
);
}
else
{
ilContainer
::
_deleteContainerSettings
(
$this
->
object
->
getId
(),
"block_limit"
);
}
...
...
@@ -1013,7 +1017,7 @@ class ilObjCategoryGUI extends ilContainerGUI
$confirm
->
addItem
(
'user_ids[]'
,
$user
,
(
string
)
$user
,
$name
[
'lastname'
]
.
', '
.
$name
[
'firstname'
]
.
' ['
.
$name
[
'login'
]
.
']'
);
}
...
...
@@ -1053,7 +1057,7 @@ class ilObjCategoryGUI extends ilContainerGUI
$disabled
=
false
;
$f_result
[
$counter
][
'checkbox'
]
=
ilLegacyFormElementsUtil
::
formCheckbox
(
in_array
((
int
)
$role
[
'obj_id'
],
$ass_roles
,
true
)
?
1
:
0
,
in_array
((
int
)
$role
[
'obj_id'
],
$ass_roles
,
true
),
'role_ids[]'
,
$role
[
'obj_id'
],
$disabled
...
...
@@ -1181,14 +1185,14 @@ class ilObjCategoryGUI extends ilContainerGUI
$ilAccess
=
$DIC
->
access
();
$ilErr
=
$DIC
[
"ilErr"
];
$lng
=
$DIC
->
language
();
if
(
$ilAccess
->
checkAccess
(
"read"
,
""
,
$a_target
))
{
ilObjectGUI
::
_gotoRepositoryNode
(
$a_target
);
}
elseif
(
$ilAccess
->
checkAccess
(
"visible"
,
""
,
$a_target
))
{
ilObjectGUI
::
_gotoRepositoryNode
(
$a_target
,
"infoScreen"
);
if
(
$ilAccess
->
checkAccess
(
"read"
,
""
,
(
int
)
$a_target
))
{
ilObjectGUI
::
_gotoRepositoryNode
(
(
int
)
$a_target
);
}
elseif
(
$ilAccess
->
checkAccess
(
"visible"
,
""
,
(
int
)
$a_target
))
{
ilObjectGUI
::
_gotoRepositoryNode
(
(
int
)
$a_target
,
"infoScreen"
);
}
elseif
(
$ilAccess
->
checkAccess
(
"read"
,
""
,
ROOT_FOLDER_ID
))
{
$main_tpl
->
setOnScreenMessage
(
'failure'
,
sprintf
(
$lng
->
txt
(
"msg_no_perm_read_item"
),
ilObject
::
_lookupTitle
(
ilObject
::
_lookupObjId
(
$a_target
))
ilObject
::
_lookupTitle
(
ilObject
::
_lookupObjId
(
(
int
)
$a_target
))
),
true
);
ilObjectGUI
::
_gotoRepositoryRoot
();
}
...
...
Modules/Category/classes/class.ilObjCategoryListGUI.php
View file @
85c5eb48
<?php
<?php
declare
(
strict_types
=
1
);
/**
* This file is part of ILIAS, a powerful learning management system
...
...
@@ -72,7 +72,7 @@ class ilObjCategoryListGUI extends ilObjectListGUI
if
(
ilContainer
::
_lookupContainerSetting
(
$this
->
obj_id
,
ilObjectServiceSettingsGUI
::
INFO_TAB_VISIBILITY
,
true
'1'
))
{
return
$this
->
info_screen_enabled
;
}
...
...
Modules/Category/test/CatStandardGUIRequestTest.php
View file @
85c5eb48
<?php
<?php
declare
(
strict_types
=
1
);
use
PHPUnit\Framework\TestCase
;
...
...
Modules/CategoryReference/Export/class.ilCategoryReferenceExporter.php
View file @
85c5eb48
<?php
<?php
declare
(
strict_types
=
1
);
/**
* This file is part of ILIAS, a powerful learning management system
...
...
Modules/CategoryReference/Export/class.ilCategoryReferenceImporter.php
View file @
85c5eb48
<?php
<?php
declare
(
strict_types
=
1
);
/**
* This file is part of ILIAS, a powerful learning management system
...
...
Modules/CategoryReference/Export/class.ilCategoryReferenceXmlParser.php
View file @
85c5eb48
<?php
<?php
declare
(
strict_types
=
1
);
/**
* This file is part of ILIAS, a powerful learning management system
...
...
Modules/CategoryReference/Export/class.ilCategoryReferenceXmlWriter.php
View file @
85c5eb48
<?php
<?php
declare
(
strict_types
=
1
);
/**
* This file is part of ILIAS, a powerful learning management system
...
...
Modules/CategoryReference/classes/class.ilObjCategoryReference.php
View file @
85c5eb48
<?php
<?php
declare
(
strict_types
=
1
);
/**
* This file is part of ILIAS, a powerful learning management system
...
...
Modules/CategoryReference/classes/class.ilObjCategoryReferenceAccess.php
View file @
85c5eb48
<?php
<?php
declare
(
strict_types
=
1
);
/**
* This file is part of ILIAS, a powerful learning management system
...
...
Prev
1
2
3
4
5
Next