X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Fclass_listing.inc;h=e0ca916ef09189fa7e64a337fc6435643e90a057;hb=4b3498ae8e78a11c7c99663d45bab6a0a14df052;hp=7d8138348388885a26eeb771b6259af2ca87dbc7;hpb=e4dcb4254ada03d975da10a99504a86147d637e3;p=gosa.git
diff --git a/gosa-core/include/class_listing.inc b/gosa-core/include/class_listing.inc
index 7d8138348..e0ca916ef 100644
--- a/gosa-core/include/class_listing.inc
+++ b/gosa-core/include/class_listing.inc
@@ -140,6 +140,9 @@ class listing {
}
$this->categories= array();
if (isset($this->xmlData['definition']['objectType'])) {
+ if(isset($this->xmlData['definition']['objectType']['label'])) {
+ $this->xmlData['definition']['objectType']= array($this->xmlData['definition']['objectType']);
+ }
foreach ($this->xmlData['definition']['objectType'] as $index => $otype) {
$this->objectTypes[]= $this->xmlData['definition']['objectType'][$index];
if (isset($this->xmlData['definition']['objectType'][$index]['category'])){
@@ -308,8 +311,8 @@ class listing {
}
// Need to fill the list if it's not full (nobody knows why this is 22 ;-))
- $emptyListStyle= (count($this->entries) + count($deps) == 0)?"border:0;":"";
- if (count($this->entries) + count($deps) < 22) {
+ $emptyListStyle= (count($this->entries) + $deps == 0)?"border:0;":"";
+ if ((count($this->entries) + $deps) < 22) {
$result.= "
";
for ($i= 0; $i<$this->numColumns; $i++) {
if ($i == 0) {
@@ -373,6 +376,9 @@ class listing {
global $config;
$ui= get_userinfo();
+ // Reset object counter
+ $this->objectTypeCount= array();
+
// Do not do anything if this is not our PID
if(isset($_REQUEST['PID']) && $_REQUEST['PID'] != $this->pid) {
return;
@@ -508,6 +514,10 @@ class listing {
// Watch out for filters and prepare to execute them
$data= $this->processElementFilter($data, $config, $row);
+ // Replace all non replaced %{...} instances because they
+ // are non resolved attributes or filters
+ $data= preg_replace('/%{[^}]+}/', ' ', $data);
+
return $data;
}
@@ -894,7 +904,7 @@ class listing {
$actions= &$this->xmlData['actionmenu']['action'];
$result= "".
"- Aktionen ";
+ "border=0 class='center' src='images/lists/sort-down.png'>";
// Build ul/li list
$result.= $this->recurseActions($actions);
@@ -919,7 +929,7 @@ class listing {
// Fill image if set
$img= "";
if (isset($action['image'])){
- $img= " ";
+ $img= " ";
}
if ($action['type'] == "separator"){
@@ -980,7 +990,7 @@ class listing {
// Every ACL has to pass
foreach ($acls as $acl) {
$module= $this->module;
- $acllist= array();
+ $aclList= array();
// Split for category and plugins if needed
// match for "[rw]" style entries
@@ -1270,9 +1280,9 @@ class listing {
// If there is a daemon registered, draw the menu entries
if(class_available("DaemonEvent")){
$events= DaemonEvent::get_event_types_by_category($this->categories);
- if(count($events['BY_CLASS'])){
+ if(isset($events['BY_CLASS']) && count($events['BY_CLASS'])){
foreach($events['BY_CLASS'] as $name => $event){
- $result.= "
- ".$event['s_Menu_Name']."
";
+ $result.= "- ".$event['MenuImage']." ".$event['s_Menu_Name']."
";
$separator= "";
}
}