Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marcus Eibrink-Lunzenauer
Stud.IP
Commits
368cc7ec
Commit
368cc7ec
authored
2 years ago
by
Jan-Hendrik Willms
Committed by
David Siegfried
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
remove dead code, fixes #1241
Closes #1241 Merge request
studip/studip!756
parent
7e128a20
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/classes/ContentBoxHelper.php
+9
-23
9 additions, 23 deletions
lib/classes/ContentBoxHelper.php
with
9 additions
and
23 deletions
lib/classes/ContentBoxHelper.php
+
9
−
23
View file @
368cc7ec
<?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
);
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment