aboutsummaryrefslogtreecommitdiff
path: root/lib/classes/ContentBoxHelper.php
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2022-06-30 14:28:54 +0000
committerDavid Siegfried <david.siegfried@uni-vechta.de>2022-06-30 14:28:54 +0000
commit368cc7ec583b810e23b8c8cf0bff22a43bd9e05d (patch)
tree59e13b9050bd1467a382e75e05aa0aa91552a7cb /lib/classes/ContentBoxHelper.php
parent7e128a20d56a51be0336a0c40997c0f0f97b284e (diff)
remove dead code, fixes #1241
Closes #1241 Merge request studip/studip!756
Diffstat (limited to 'lib/classes/ContentBoxHelper.php')
-rw-r--r--lib/classes/ContentBoxHelper.php32
1 files changed, 9 insertions, 23 deletions
diff --git a/lib/classes/ContentBoxHelper.php b/lib/classes/ContentBoxHelper.php
index 62beb74..b776714 100644
--- a/lib/classes/ContentBoxHelper.php
+++ b/lib/classes/ContentBoxHelper.php
@@ -1,7 +1,7 @@
<?php
/**
* ContentBoxHelper.php
- *
+ *
* The ContentBoxHelper controls ids of contentboxes
*
* This program is free software; you can redistribute it and/or
@@ -19,33 +19,33 @@ class ContentBoxHelper {
/**
* Returns the class open if the id was clicked
- *
+ *
* @param String $id id of the content box
* @param int $chdate last change of the displayed article
- * @return String open if the contentbox is open otherwise an empty String
+ * @return String open if the contentbox is open otherwise an empty String
*/
public static function classes($id, $is_new = false) {
-
+
// Init
$classes = [];
-
+
// Check if open
if (Request::get('contentbox_open') == $id) {
$classes[] = 'open';
}
-
+
// Check if new
if ($is_new) {
$classes[] = 'new';
}
-
+
// Return classes
return join(' ', $classes);
}
/**
* Produces an html link to open a contentbox if javascript is not active
- *
+ *
* @param String $id Id of the content box
* @param Array $params other needed parameters
* @return String Url to open the contentbox
@@ -61,7 +61,7 @@ class ContentBoxHelper {
/**
* Link to the contentbox (Required when some action should take place)
- *
+ *
* @param String $id Id of the content box
* @param Array $params other needed parameters
* @return String Url to the contentbox
@@ -70,18 +70,4 @@ class ContentBoxHelper {
$params['contentbox_open'] = $id;
return URLHelper::getURL("#$id", $params);
}
-
- /**
- * Sets an object as visited
- *
- * @param String $type the type to be set in the database
- * @param Array $ids Array of ids that might be visited with the given type
- */
- public static function visitType($type, $ids) {
- $object_id = Request::get('contentbox_open');
- if ($object_id && in_array($object_id, $ids)) {
- ObjectVisit::visit($object_id, $type);
- }
- }
-
}