commit 68afc9e36881e5acd8a2fa092a4449d7e96bf066
parent cde9eca8f8996aca17188274f3638cc73b47ff15
Author: Jan Dankert <devnull@localhost>
Date: Thu, 16 Aug 2018 00:44:14 +0200
Lesen aller Ordner über das Projekt-Objekt.
Diffstat:
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/modules/cms-core/action/FolderAction.class.php b/modules/cms-core/action/FolderAction.class.php
@@ -1242,8 +1242,6 @@ class FolderAction extends ObjectAction
public function editView()
{
- global $conf_php;
-
$this->setTemplateVar('writable',$this->folder->hasRight(ACL_WRITE) );
$list = array();
@@ -1295,7 +1293,8 @@ class FolderAction extends ObjectAction
{
// Alle anderen Ordner ermitteln
$otherfolder = array();
- foreach( $this->folder->getAllFolders() as $id )
+ $project = new Project( $this->folder->projectid );
+ foreach( $project->getAllFolders() as $id )
{
$f = new Folder( $id );
if ( $f->hasRight( ACL_WRITE ) )
diff --git a/modules/cms-core/model/Project.class.php b/modules/cms-core/model/Project.class.php
@@ -989,7 +989,11 @@ SQL
}
-
+ /**
+ * Liefert die Ids aller Ordner in diesem Projekt.
+ *
+ * @return array
+ */
public function getAllFolders()
{
$db = db_connection();