Marius Cramer
2015-01-08 89e4329a8068e3631d3f64f6896fa3907c687cf5
interface/lib/classes/tform_base.inc.php
@@ -270,6 +270,7 @@
         unset($tmp_recordid);
         $querystring = str_replace("{AUTHSQL}", $this->getAuthSQL('r'), $querystring);
         $querystring = preg_replace_callback('@{AUTHSQL::(.+?)}@', create_function('$matches','global $app; $tmp = $app->tform->getAuthSQL("r", $matches[1]); return $tmp;'), $querystring);
         // Getting the records
         $tmp_records = $app->db->queryAllRecords($querystring);
@@ -311,7 +312,12 @@
   }
   /*
   function table_auth_sql($matches){
      return $this->getAuthSQL('r', $matches[1]);
   }
   */
   /**
    * Get the key => value array of a form filled from a datasource definitiom
    *
@@ -1366,7 +1372,7 @@
   }
   function getAuthSQL($perm, $table = '') {
      if($_SESSION["s"]["user"]["typ"] == 'admin') {
      if($_SESSION["s"]["user"]["typ"] == 'admin' || $_SESSION['s']['user']['mailuser_id'] > 0) {
         return '1';
      } else {
         if ($table != ''){