index e05d5ca5aacb62bba570acc4dfa364a019d25661..3a4f6f9948b1a57772b1f70283a8b483784972e3 100644 (file)
}
// Move footer information
}
// Move footer information
- $this->showFooter= ($config->get_cfg_value("listSummary") == "true");
+ $this->showFooter= ($config->get_cfg_value("core","listSummary") == "true");
// Register build in filters
$this->registerElementFilter("objectType", "listing::filterObjectType");
// Register build in filters
$this->registerElementFilter("objectType", "listing::filterObjectType");
// Fill with department browser if configured this way
$departmentIterator= new departmentSortIterator($this->departments, $this->sortDirection[$this->sortColumn]);
foreach ($departmentIterator as $row => $entry){
// Fill with department browser if configured this way
$departmentIterator= new departmentSortIterator($this->departments, $this->sortDirection[$this->sortColumn]);
foreach ($departmentIterator as $row => $entry){
- $result.="<tr>";
+ $rowResult= "<tr>";
// Render multi select if needed
if ($this->multiSelect || $this->singleSelect) {
// Render multi select if needed
if ($this->multiSelect || $this->singleSelect) {
- $result.="<td style='text-align:center;padding:0;' class='list1'> </td>";
+ $rowResult.="<td style='text-align:center;padding:0;' class='list1'> </td>";
}
// Render defined department columns, fill the rest with some stuff
}
// Render defined department columns, fill the rest with some stuff
$colspan= $config['span'];
$this->useSpan= true;
}
$colspan= $config['span'];
$this->useSpan= true;
}
- $result.="<td colspan='$colspan' ".$this->colprops[$index]." class='list1'>".$this->renderCell($config['value'], $entry, $row)."</td>";
+ $rowResult.="<td colspan='$colspan' ".$this->colprops[$index]." class='list1'>".$this->renderCell($config['value'], $entry, $row)."</td>";
$rest-= $colspan;
}
// Fill remaining cols with nothing
$last= $this->numColumns - $rest;
for ($i= 0; $i<$rest; $i++){
$rest-= $colspan;
}
// Fill remaining cols with nothing
$last= $this->numColumns - $rest;
for ($i= 0; $i<$rest; $i++){
- $result.= "<td ".$this->colprops[$last+$i-1]." class='list1'> </td>";
+ $rowResult.= "<td ".$this->colprops[$last+$i-1]." class='list1'> </td>";
}
}
- $result.="</tr>";
+ $rowResult.="</tr>";
+ // Apply label to objecttype icon?
+ if (preg_match("/<objectType:([^:]+):(.*)\/>/i", $rowResult, $matches)){
+ $objectType= image($matches[1], null, LDAP::fix(base64_decode($matches[2])));
+ $rowResult= preg_replace("/<objectType[^>]+>/", $objectType, $rowResult);
+ }
+ $result.= $rowResult;
$alt++;
}
$alt++;
}
+
+
$deps= $alt;
}
$deps= $alt;
}
$entryIterator= new listingSortIterator($this->entries, $this->sortDirection[$this->sortColumn], "_sort".$this->sortColumn, $this->sortType);
foreach ($entryIterator as $row => $entry){
$entryIterator= new listingSortIterator($this->entries, $this->sortDirection[$this->sortColumn], "_sort".$this->sortColumn, $this->sortType);
foreach ($entryIterator as $row => $entry){
+ // Apply label to objecttype icon?
+ if (preg_match("/<objectType:([^:]+):(.*)\/>/i", $entry['_rendered'], $matches)){
+ if (preg_match("/<rowLabel:([a-z0-9_-]*)\/>/i", $entry['_rendered'], $m)) {
+ $objectType= image($matches[1]."[".$m[1]."]", null, LDAP::fix(base64_decode($matches[2])));
+ } else {
+ $objectType= image($matches[1], null, LDAP::fix(base64_decode($matches[2])));
+ }
+ $entry['_rendered']= preg_replace("/<objectType[^>]+>/", $objectType, $entry['_rendered']);
+ $entry['_rendered']= preg_replace("/<rowLabel[^>]+>/", '', $entry['_rendered']);
+ }
+
// Apply custom class to row?
if (preg_match("/<rowClass:([a-z0-9_-]*)\/>/i", $entry['_rendered'], $matches)) {
$result.="<tr class='".$matches[1]."'>\n";
// Apply custom class to row?
if (preg_match("/<rowClass:([a-z0-9_-]*)\/>/i", $entry['_rendered'], $matches)) {
$result.="<tr class='".$matches[1]."'>\n";
$objectType= $this->getObjectType($this->objectTypes, $classes);
if ($objectType) {
$this->objectDnMapping[$dn]= $objectType["objectClass"];
$objectType= $this->getObjectType($this->objectTypes, $classes);
if ($objectType) {
$this->objectDnMapping[$dn]= $objectType["objectClass"];
- $result= image($objectType["image"], null, LDAP::fix($dn));
+ $result= "<objectType:".$objectType["image"].":".base64_encode(LDAP::fix($dn))."/>";
if (!isset($this->objectTypeCount[$objectType['label']])) {
$this->objectTypeCount[$objectType['label']]= 0;
}
if (!isset($this->objectTypeCount[$objectType['label']])) {
$this->objectTypeCount[$objectType['label']]= 0;
}