ftimme
2013-01-16 08cc7f673c377bf88897743e340097e93f1e95f4
interface/lib/classes/listform_actions.inc.php
@@ -33,8 +33,9 @@
   private $id;
   public $idx_key;
   public $DataRowColor;
   public  $SQLExtWhere = '';
   public  $SQLOrderBy = '';
   public $SQLExtWhere = '';
   public $SQLOrderBy = '';
   public $SQLExtSelect = '';
   
   public function onLoad()
    {
@@ -141,7 +142,8 @@
         if($_SESSION['s']['user']['typ'] == "admin") {
            $sql_where = '';
         } else {
            $sql_where = $app->tform->getAuthSQL('r').' and';
            $sql_where = $app->tform->getAuthSQL('r', $app->listform->listDef['table']).' and';
                //$sql_where = $app->tform->getAuthSQL('r').' and';
         }
      }      
      if($this->SQLExtWhere != '') {
@@ -248,6 +250,12 @@
          $order_by_sql = "GROUP BY mailuser_id ".$order_by_sql;
        }
      }
      if($this->SQLExtSelect != '') {
         if(substr($this->SQLExtSelect,0,1) != ',') $this->SQLExtSelect = ','.$this->SQLExtSelect;
         $extselect .= $this->SQLExtSelect;
      }
      return 'SELECT '.$app->listform->listDef['table'].'.*'.$extselect.' FROM '.$app->listform->listDef['table']."$join WHERE $sql_where $order_by_sql $limit_sql";
   }