diff --git a/gosa-core/include/class_sortableListing.inc b/gosa-core/include/class_sortableListing.inc
index d3b95ca84ce30de211ecb55dc3c2a89837a269e2..21b6672a5e7c4cac16571eb6da025855b60f6af6 100644 (file)
// Transfer information
$this->displayData= array();
$this->modes= array();
+ $this->mapping= array();
foreach ($data as $key => $value) {
$this->displayData[]= $value['data'];
if (isset($value['mode'])) {
$this->keys= array_keys($data);
// Create initial mapping
- $this->mapping= range(0, abs(count($this->keys)-1));
+ if(count($this->keys)){
+ $this->mapping= range(0, abs(count($this->keys)-1));
+ }
$this->current_mapping= $this->mapping;
// Find the number of coluns
// Do we need a header?
if ($this->header) {
$result.= " <thead>\n <tr>\n";
- $first= " style='border:0'";
+ $first= " style='border-left:0'";
for ($i= 0; $i<$this->columns; $i++) {
$link= "href='?plug=".$_GET['plug']."&PID=".$this->id."&act=SORT_$i'";
$sorter= "";
$reorderable= $this->reorderable?"":" style='cursor:default'";
if (strpos($this->acl, 'r') !== false) {
foreach ($this->mapping as $nr => $row) {
- $editable= $this->editable?" onclick='$(\"edit_".$this->id."_$nr\").click()'":"";
+ $editable= $this->editable?" onClick='$(\"edit_".$this->id."_$nr\").click()'":"";
$id= "";
if (isset($this->modes[$row])) {
$this->action = "";
if (strpos($this->acl, 'd') !== false){
foreach ($_POST as $key => $value) {
- if (preg_match('/^del_'.$this->id.'([0-9]+)$/', $key, $matches)) {
+ if (preg_match('/^del_'.$this->id.'_([0-9]+)$/', $key, $matches)) {
$this->active_index= $this->mapping[$matches[1]];
// Ignore request if mode requests it