Explorar el Código

fixed bug missing orders.approve_status in pro-netmedia - added support for p5:string

Piotr Labudda hace 8 años
padre
commit
7d455d7db0
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      SE/se-lib/AclQueryBuilder.php

+ 2 - 1
SE/se-lib/AclQueryBuilder.php

@@ -222,7 +222,7 @@ class AclQueryBuilder {
     return $this;
     return $this;
   }
   }
   public function isFieldAllowedToOrderBy($fieldName) {
   public function isFieldAllowedToOrderBy($fieldName) {
-    return true;
+    return true; // TODO:? only local fields in $this->from
   }
   }
   public function generateOrderBySql() {
   public function generateOrderBySql() {
     if (empty($this->orderBy)) return '';
     if (empty($this->orderBy)) return '';
@@ -406,6 +406,7 @@ class AclQueryBuilder {
           case 'price': return "{$prefix}.`{$fieldName}`";
           case 'price': return "{$prefix}.`{$fieldName}`";
           case 'enum': return "{$prefix}.`{$fieldName}`"; // TODO: check if local or remote
           case 'enum': return "{$prefix}.`{$fieldName}`"; // TODO: check if local or remote
           case 'www_link': return "{$prefix}.`{$fieldName}`"; // TODO: check if local or remote?
           case 'www_link': return "{$prefix}.`{$fieldName}`"; // TODO: check if local or remote?
+          case 'string': return "{$prefix}.`{$fieldName}`"; // TODO: check if local or remote?
           default: throw new Exception("Not implemented field type in select '{$fieldType}' (field: '{$fieldName}')");
           default: throw new Exception("Not implemented field type in select '{$fieldType}' (field: '{$fieldName}')");
         }
         }
       }
       }