Skip to content
Commits on Source (3)
<?php
<?php declare(strict_types=1);
/**
* This file is part of ILIAS, a powerful learning management system
......
<?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,
......
<?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();
......
<?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;
......
<?php
<?php declare(strict_types=1);
/**
* This file is part of ILIAS, a powerful learning management system
......
<?php
<?php declare(strict_types=1);
/**
* This file is part of ILIAS, a powerful learning management system
......
<?php
<?php declare(strict_types=1);
/**
* This file is part of ILIAS, a powerful learning management system
......
<?php
<?php declare(strict_types=1);
/**
* This file is part of ILIAS, a powerful learning management system
......
<?php
<?php declare(strict_types=1);
/* Copyright (c) 1998-2021 ILIAS open source, GPLv3, see LICENSE */
......
<?php
<?php declare(strict_types=1);
/**
* This file is part of ILIAS, a powerful learning management system
......
<?php
<?php declare(strict_types=1);
/**
* This file is part of ILIAS, a powerful learning management system
......
<?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();
}
......
<?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;
}
......
<?php
<?php declare(strict_types=1);
use PHPUnit\Framework\TestCase;
......
<?php
<?php declare(strict_types=1);
/**
* This file is part of ILIAS, a powerful learning management system
......
<?php
<?php declare(strict_types=1);
/**
* This file is part of ILIAS, a powerful learning management system
......
<?php
<?php declare(strict_types=1);
/**
* This file is part of ILIAS, a powerful learning management system
......
<?php
<?php declare(strict_types=1);
/**
* This file is part of ILIAS, a powerful learning management system
......
<?php
<?php declare(strict_types=1);
/**
* This file is part of ILIAS, a powerful learning management system
......
<?php
<?php declare(strict_types=1);
/**
* This file is part of ILIAS, a powerful learning management system
......