aboutsummaryrefslogtreecommitdiff
path: root/lib/classes
diff options
context:
space:
mode:
authorElmar Ludwig <elmar.ludwig@uni-osnabrueck.de>2023-11-02 10:51:01 +0000
committerElmar Ludwig <elmar.ludwig@uni-osnabrueck.de>2023-11-02 12:02:45 +0100
commitfaed414f355bc2f2dc2ef10f3db9915f70c35a51 (patch)
treef9e690e91817acc376fa2724b101fe9cdc2f2bbf /lib/classes
parent9430289483c0627aef9fd69a9a7e581f37aad60a (diff)
fix bugs introduced in #1118 (lonely_sem was removed in 4.2), fixes #3383
Closes #3383 Merge request studip/studip!2303
Diffstat (limited to 'lib/classes')
-rw-r--r--lib/classes/ActionMenu.php2
-rw-r--r--lib/classes/StudipSemTreeView.class.php8
-rw-r--r--lib/classes/StudipSemTreeViewAdmin.class.php24
-rw-r--r--lib/classes/searchtypes/RangeSearch.class.php11
-rw-r--r--lib/classes/searchtypes/SQLSearch.class.php1
5 files changed, 12 insertions, 34 deletions
diff --git a/lib/classes/ActionMenu.php b/lib/classes/ActionMenu.php
index 6fc016a..722f44d 100644
--- a/lib/classes/ActionMenu.php
+++ b/lib/classes/ActionMenu.php
@@ -187,7 +187,6 @@ class ActionMenu
'icon' => $icon,
'label' => $label,
'attributes' => $attributes,
- 'index' => ''
];
}
@@ -206,7 +205,6 @@ class ActionMenu
$this->actions[] = [
'type' => 'multi-person-search',
'object' => $mp,
- 'index' => ''
];
}
diff --git a/lib/classes/StudipSemTreeView.class.php b/lib/classes/StudipSemTreeView.class.php
index eef3339..3e984cc 100644
--- a/lib/classes/StudipSemTreeView.class.php
+++ b/lib/classes/StudipSemTreeView.class.php
@@ -146,7 +146,7 @@ class StudipSemTreeView extends TreeView {
$content .= "<tr><td colspan=\"2\" class=\"table_row_even\">" . sprintf(_("Alle Veranstaltungen innerhalb dieses Bereiches in der %sÜbersicht%s"),
"<a href=\"" . URLHelper::getLink($this->getSelf("cmd=show_sem_range&item_id=$item_id")) ."\">","</a>") . "</td></tr>";
$content .= "<tr><td colspan=\"2\">&nbsp;</td></tr>";
- if ($this->tree->getNumEntries($item_id) - $this->tree->tree_data[$item_id]['lonely_sem']){
+ if ($this->tree->getNumEntries($item_id)){
$content .= "<tr><td class=\"table_row_even\" align=\"left\" colspan=\"2\"><b>" . _("Einträge auf dieser Ebene:");
$content .= "</b>\n</td></tr>";
$entries = $this->tree->getSemData($item_id);
@@ -154,12 +154,6 @@ class StudipSemTreeView extends TreeView {
} else {
$content .= "\n<tr><td class=\"table_row_even\" colspan=\"2\">" . _("Keine Einträge auf dieser Ebene vorhanden!") . "</td></tr>";
}
- if ($this->tree->tree_data[$item_id]['lonely_sem']){
- $content .= "<tr><td class=\"table_row_even\" align=\"left\" colspan=\"2\"><b>" . _("Nicht zugeordnete Veranstaltungen auf dieser Ebene:");
- $content .= "</b>\n</td></tr>";
- $entries = $this->tree->getLonelySemData($item_id);
- $content .= $this->getSemDetails($entries->getGroupedResult("seminar_id"));
- }
$content .= "</table>";
return $content;
}
diff --git a/lib/classes/StudipSemTreeViewAdmin.class.php b/lib/classes/StudipSemTreeViewAdmin.class.php
index c615f98..edc65c8 100644
--- a/lib/classes/StudipSemTreeViewAdmin.class.php
+++ b/lib/classes/StudipSemTreeViewAdmin.class.php
@@ -46,8 +46,8 @@ class StudipSemTreeViewAdmin extends TreeView
var $marked_item;
var $marked_sem;
var $mode;
- var $move_item_id;
- var $edit_item_id;
+ var $move_item_id = null;
+ var $edit_item_id = null;
/**
* constructor
@@ -492,12 +492,14 @@ class StudipSemTreeViewAdmin extends TreeView
}
function getItemContent($item_id){
- if (!empty($this->edit_item_id) && ($item_id == $this->edit_item_id)) return $this->getEditItemContent();
- if(empty($GLOBALS['SEM_TREE_TYPES'][$this->tree->getValue($item_id, 'type')]['editable'])){
+ if ($item_id == $this->edit_item_id) {
+ return $this->getEditItemContent();
+ }
+ if (empty($GLOBALS['SEM_TREE_TYPES'][$this->tree->getValue($item_id, 'type')]['editable'])){
$is_not_editable = true;
$this->msg[$item_id] = "info§" . sprintf(_("Der Typ dieses Elementes verbietet eine Bearbeitung."));
}
- if (!empty($this->move_item_id) && ($item_id == $this->move_item_id)) {
+ if ($item_id == $this->move_item_id) {
$this->msg[$item_id] = "info§" . sprintf(_("Dieses Element wurde zum Verschieben / Kopieren markiert. Bitte wählen Sie ein Einfügesymbol %s aus, um das Element zu verschieben / kopieren."), Icon::create('arr_2right', 'sort', ['title' => "Einfügesymbol"])->asImg(16, ["alt" => "Einfügesymbol"]));
}
$content = "\n<table width=\"90%\" cellpadding=\"2\" cellspacing=\"2\" align=\"center\" style=\"font-size:10pt;\">";
@@ -521,7 +523,7 @@ class StudipSemTreeViewAdmin extends TreeView
URLHelper::getURL($this->getSelf('cmd=AssertDeleteItem&item_id=' . $item_id)),
['title' => _('Dieses Element löschen')]) . '&nbsp;';
- if (!empty($this->move_item_id) && ($this->move_item_id == $item_id) && ($this->mode == "MoveItem" || $this->mode == "CopyItem")){
+ if ($this->move_item_id == $item_id && ($this->mode == "MoveItem" || $this->mode == "CopyItem")){
$content .= LinkButton::create(_('Abbrechen'),
URLHelper::getURL($this->getSelf('cmd=Cancel&item_id=' . $item_id)),
['title' => _('Verschieben / Kopieren abbrechen')]) . '&nbsp;';
@@ -562,7 +564,7 @@ class StudipSemTreeViewAdmin extends TreeView
$content .= formatReady($this->tree->tree_data[$item_id]['info']) . "</td></tr>";
}
$content .= "<tr><td style=\"font-size:10pt;\"colspan=\"3\">&nbsp;</td></tr>";
- if (!empty($this->tree->tree_data[$item_id]['lonely_sem']) && ($this->tree->getNumEntries($item_id) - $this->tree->tree_data[$item_id]['lonely_sem'])) {
+ if ($this->tree->getNumEntries($item_id)) {
$content .= "<tr><td class=\"table_row_even\" style=\"font-size:10pt;\" align=\"left\" colspan=\"3\"><b>" . _("Einträge auf dieser Ebene:");
$content .= "</b>\n</td></tr>";
$entries = $this->tree->getSemData($item_id);
@@ -570,12 +572,6 @@ class StudipSemTreeViewAdmin extends TreeView
} else {
$content .= "\n<tr><td class=\"table_row_even\" style=\"font-size:10pt;\" colspan=\"3\">" . _("Keine Einträge auf dieser Ebene vorhanden!") . "</td></tr>";
}
- if (!empty($this->tree->tree_data[$item_id]['lonely_sem'])) {
- $content .= "<tr><td class=\"table_row_even\" align=\"left\" style=\"font-size:10pt;\" colspan=\"3\"><b>" . _("Nicht zugeordnete Veranstaltungen auf dieser Ebene:");
- $content .= "</b>\n</td></tr>";
- $entries = $this->tree->getLonelySemData($item_id);
- $content .= $this->getSemDetails($entries,$item_id,true);
- }
$content .= "</table>";
return $content;
}
@@ -776,7 +772,7 @@ class StudipSemTreeViewAdmin extends TreeView
if ($item_id != "root"){
$head .= " (" . $this->tree->getNumEntries($item_id,true) . ") " ;
}
- if ($item_id != $this->start_item_id && $this->isParentAdmin($item_id) && !empty($this->edit_item_id) && ($item_id != $this->edit_item_id)){
+ if ($item_id != $this->start_item_id && $this->isParentAdmin($item_id) && $item_id != $this->edit_item_id){
$head .= "</td><td nowrap align=\"right\" valign=\"bottom\" class=\"printhead\">";
if (!$this->tree->isFirstKid($item_id)){
$head .= "<a href=\"". URLHelper::getLink($this->getSelf("cmd=OrderItem&direction=up&item_id=$item_id")) .
diff --git a/lib/classes/searchtypes/RangeSearch.class.php b/lib/classes/searchtypes/RangeSearch.class.php
index b9c83ae..caefae0 100644
--- a/lib/classes/searchtypes/RangeSearch.class.php
+++ b/lib/classes/searchtypes/RangeSearch.class.php
@@ -4,17 +4,8 @@
* @license GPL2 or any later version
* @category Stud.IP
*/
-class RangeSearch extends SQLSearch
+class RangeSearch extends SearchType
{
- public $search;
-
- public function __construct()
- {
- $this->avatarLike = $this->search = '';
- $this->sql = $this->getSQL();
- }
-
-
/**
* returns the title/description of the searchfield
*
diff --git a/lib/classes/searchtypes/SQLSearch.class.php b/lib/classes/searchtypes/SQLSearch.class.php
index f69a65e..86aff6d 100644
--- a/lib/classes/searchtypes/SQLSearch.class.php
+++ b/lib/classes/searchtypes/SQLSearch.class.php
@@ -37,7 +37,6 @@ class SQLSearch extends SearchType
protected $sql;
protected $avatarLike;
protected $title;
- public $extendedLayout = false;
/**
*