commit c8bfea86d07e24e1a6d59373cb669fb5c70ed411
parent 0acd866e242a2ba938069ff0b680d25dcf0486b9
Author: Jan Dankert <devnull@localhost>
Date: Wed, 4 Jul 2018 01:10:39 +0200
Allerlei alten Kram erstmal auskommentiert.
Diffstat:
2 files changed, 75 insertions(+), 70 deletions(-)
diff --git a/modules/cms-core/action/TreeAction.class.php b/modules/cms-core/action/TreeAction.class.php
@@ -42,7 +42,7 @@ class TreeAction extends Action
{
public $security = SECURITY_USER;
- var $tree;
+ //var $tree;
public function __construct()
@@ -55,6 +55,7 @@ class TreeAction extends Action
*/
function openall()
{
+ throw new \LogicException("probably dead code reached");
$this->tree = Session::getTree();
$this->tree->all();
Session::setTree( $this->tree );
@@ -74,6 +75,7 @@ class TreeAction extends Action
*/
function open()
{
+ throw new \LogicException("probably dead code reached");
$this->tree = Session::getTree();
$this->tree->open( $this->getRequestId() );
Session::setTree( $this->tree );
@@ -85,6 +87,7 @@ class TreeAction extends Action
*/
function close()
{
+ throw new \LogicException("probably dead code reached");
$this->tree = Session::getTree();
$this->tree->close( $this->getRequestId() );
Session::setTree( $this->tree );
@@ -96,6 +99,7 @@ class TreeAction extends Action
*/
private function load()
{
+ throw new \LogicException("probably dead code reached");
global $SESS;
$project = Session::getProject();
@@ -129,7 +133,9 @@ class TreeAction extends Action
*/
function outputElement( $elId,$tiefe,$isLast )
{
- $treeElement = $this->tree->elements[$elId];
+ throw new \LogicException("probably dead code reached");
+
+ $treeElement = $this->tree->elements[$elId];
$zeilen = array();
$zeile = array();
@@ -226,37 +232,12 @@ class TreeAction extends Action
/**
- * Anzeigen des Baumes
- */
- public function treeView()
- {
- return;
- $this->load();
-
- $project = Session::getProject();
- if ( is_object($project) )
- {
- $this->setTemplateVar('projectname',$project->name);
- }
-
- $this->tree = Session::getTree();
-
- //if ( $this->getRequestVar('target')!='tree' )
- $this->tree->refresh();
-
- $var = array();
- $var['zeilen'] = $this->outputElement( 0,0,array() );
- $var['zeilen'] = array();
-
- $this->setTemplateVars( $var );
- }
-
-
- /**
* Anzeigen des Baumes fuer asynchrone Anfragen.
*/
function loadAll()
{
+ throw new \LogicException("probably dead code reached");
+
$this->tree = Session::getTree();
$this->setTemplateVar( 'lines',$this->outputElement( 0,0,array() ) );
@@ -268,7 +249,8 @@ class TreeAction extends Action
*/
public function loadEntryView()
{
- exit;
+ throw new \LogicException("probably dead code reached");
+
$this->tree = Session::getTree();
$this->setTemplateVar( 'lines',$this->outputElement( 0,0,array() ) );
@@ -282,6 +264,7 @@ class TreeAction extends Action
*/
public function loadBranchView()
{
+ /*
$project = Session::getProject();
$projectid = $project->projectid;
@@ -296,9 +279,12 @@ class TreeAction extends Action
$tree = new ProjectTree();
$tree->projectId = $projectid;
}
-
-
- $type = $this->getRequestVar('type');
+ */
+
+ $tree = new AdministrationTree();
+
+
+ $type = $this->getRequestVar('type');
$tree->tempElements = array();
@@ -322,6 +308,7 @@ class TreeAction extends Action
*/
private function content()
{
+ throw new \LogicException("probably dead code reached");
if ( $this->hasRequestVar('projectid') )
$this->load();
diff --git a/modules/util/AbstractTree.class.php b/modules/util/AbstractTree.class.php
@@ -29,28 +29,30 @@ class AbstractTree
/**
* Alle Elemente des Baumes
*/
- var $elements = array();
+
+ //var $elements = array();
var $tempElements = array();
- var $userIsAdmin = false;
-
- var $autoOpen = array(0,1);
+ var $userIsAdmin = false;
+
+ //var $autoOpen = array(0,1);
- var $opened = array();
+ //var $opened = array();
/**
* Hoechste Element-Id
* @type Integer
*/
- var $maxId;
+ //var $maxId;
// Konstruktor
- function AbstractTree()
+ function __construct()
{
// Feststellen, ob der angemeldete Benutzer ein Administrator ist
$user = Session::getUser();
$this->userIsAdmin = $user->isAdmin;
+ /*
// Wurzel-Element laden
$this->root();
$this->elements[0] = $this->tempElements[0];
@@ -59,32 +61,40 @@ class AbstractTree
foreach( $this->autoOpen as $openId )
$this->open($openId);
+ */
}
function refresh() {
-
- $this->elements = array();
-
- // Wurzel-Element laden
- $this->root();
- $this->elements[0] = $this->tempElements[0];
- $this->tempElements = array();
- $this->maxId = 0;
- $oids = $this->opened;
- $this->opened = array();
- foreach( $oids as $oid)
- {
- if ( isset($this->elements[$oid]) )
- $this->open($oid);
- }
+ throw new \LogicException("probably dead code reached");
+
+ /*
+ $this->elements = array();
+
+ // Wurzel-Element laden
+ $this->root();
+ $this->elements[0] = $this->tempElements[0];
+ $this->tempElements = array();
+ $this->maxId = 0;
+
+ $oids = $this->opened;
+ $this->opened = array();
+ foreach( $oids as $oid)
+ {
+ if ( isset($this->elements[$oid]) )
+ $this->open($oid);
+ }
+ */
}
function all() {
-
- $this->elements = array();
+
+ throw new \LogicException("probably dead code reached");
+
+ /*
+ $this->elements = array();
$this->opened = array();
// Wurzel-Element laden
@@ -97,6 +107,7 @@ class AbstractTree
{
$this->open($eid);
}
+ */
}
@@ -107,16 +118,19 @@ class AbstractTree
*/
function open( $elementId )
{
- $k = array_search($elementId,$this->opened);
+ throw new \LogicException("probably dead code reached");
+
+
+ $k = array_search($elementId,$this->opened);
if ( $k !== false )
return; // Ist schon offen. Evtl. Reload gedrückt?
-
+
$this->opened[] = $elementId;
if ( ! isset($this->elements[$elementId]) )
return;
- $funcName = $this->elements[$elementId]->type;
- if ( empty($funcName) )
- return;
+ $funcName = $this->elements[$elementId]->type;
+ if ( empty($funcName) )
+ return;
$this->$funcName( $this->elements[$elementId]->internalId );
@@ -130,13 +144,13 @@ class AbstractTree
$this->elements[$elementId]->subElementIds[] = $this->maxId;
$this->elements[$this->maxId] = $treeElement;
}
-
- if ( count($this->tempElements)==1 )
- {
- $this->tempElements = array();
- $this->open($this->maxId);
- }
-
+
+ if ( count($this->tempElements)==1 )
+ {
+ $this->tempElements = array();
+ $this->open($this->maxId);
+ }
+
$this->tempElements = array();
}
@@ -148,7 +162,11 @@ class AbstractTree
function close( $elementId )
{
- $this->elements[$elementId]->subElementIds = array();
+ throw new \LogicException("probably dead code reached");
+
+
+
+ $this->elements[$elementId]->subElementIds = array();
$k = array_search($elementId,$this->opened);
if ( $k !== false )