Commit 54071a0e authored by Cédric Anne's avatar Cédric Anne Committed by Johan Cwiklinski
Browse files

Deprecate unused code

parent 7cb5ac17
......@@ -9,7 +9,9 @@ The present file will list all changes made to the project; according to the
#### Deprecated
- Usage of "followups" option in `CommonITILObject::showShort()`
- `CommonITILTask::showInObjectSumnary()`
- `ITILFollowup::showShortForITILObject()`
## [9.5.5] 2021-04-13
......
......@@ -310,10 +310,14 @@ class Change_Ticket extends CommonDBRelation{
$i = 0;
foreach ($tickets as $data) {
Session::addToNavigateListItems('Ticket', $data["id"]);
Ticket::showShort($data['id'], ['followups' => false,
Ticket::showShort(
$data['id'],
[
'row_num' => $i,
'type_for_massiveaction' => __CLASS__,
'id_for_massiveaction' => $data['linkid']]);
'id_for_massiveaction' => $data['linkid']
]
);
$i++;
}
Ticket::commonListHeader(Search::HTML_OUTPUT, 'mass'.__CLASS__.$rand);
......
......@@ -6040,6 +6040,8 @@ abstract class CommonITILObject extends CommonDBTM {
* type_for_massiveaction : itemtype for massive action
* id_for_massaction : default 0 means no massive action
* followups : show followup columns
*
* @since 9.5.6 Usage of "followups" option is deprecated
*/
static function showShort($id, $options = []) {
global $DB;
......@@ -6058,6 +6060,10 @@ abstract class CommonITILObject extends CommonDBTM {
}
}
if ($p['followups']) {
Toolbox::deprecated('Usage of "followups" option is deprecated.');
}
$rand = mt_rand();
/// TODO to be cleaned. Get datas and clean display links
......
......@@ -1012,8 +1012,11 @@ JAVASCRIPT;
/**
* @param $ID integer ID of the ITILObject
* @param $itemtype string parent itemtype
*
* @deprecated 9.5.6
**/
static function showShortForITILObject($ID, $itemtype) {
Toolbox::deprecated();
global $DB, $CFG_GLPI;
......
......@@ -336,10 +336,14 @@ class Problem_Ticket extends CommonDBRelation{
$i = 0;
foreach ($tickets as $data) {
Session::addToNavigateListItems('Ticket', $data["id"]);
Ticket::showShort($data['id'], ['followups' => false,
Ticket::showShort(
$data['id'],
[
'row_num' => $i,
'type_for_massiveaction' => __CLASS__,
'id_for_massiveaction' => $data['linkid']]);
'id_for_massiveaction' => $data['linkid']
]
);
$i++;
}
Ticket::commonListHeader(Search::HTML_OUTPUT, 'mass'.__CLASS__.$rand);
......
......@@ -219,10 +219,14 @@ class ProjectTask_Ticket extends CommonDBRelation{
$i = 0;
foreach ($tickets as $data) {
Session::addToNavigateListItems('Ticket', $data["id"]);
Ticket::showShort($data['id'], ['followups' => false,
Ticket::showShort(
$data['id'],
[
'row_num' => $i,
'type_for_massiveaction' => __CLASS__,
'id_for_massiveaction' => $data['linkid']]);
'id_for_massiveaction' => $data['linkid']
]
);
$i++;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment