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