Procházet zdrojové kódy

* Fix bug #30174, by default allow additional properties

git-svn-id: trunk@33776 -
michael před 9 roky
rodič
revize
4d671cd49d
1 změnil soubory, kde provedl 14 přidání a 1 odebrání
  1. 14 1
      packages/googleapi/src/googlebase.pp

+ 14 - 1
packages/googleapi/src/googlebase.pp

@@ -43,7 +43,11 @@ Type
 
 Type
 
-  TGoogleBaseObject = CLass(TBaseObject);
+  { TGoogleBaseObject }
+
+  TGoogleBaseObject = CLass(TBaseObject)
+    Class Function AllowAdditionalProperties: Boolean; override;
+  end;
   TGoogleBaseObjectClass = Class of TGoogleBaseObject;
   TGoogleObjectArray =  Array of TGoogleBaseObject;
 
@@ -70,6 +74,15 @@ begin
   Result:=RestFactory;
 end;
 
+{ TGoogleBaseObject }
+
+Class Function TGoogleBaseObject.AllowAdditionalProperties: Boolean;
+begin
+  // We override this, so people don't get caught whenn google inadvertently adds properties.
+  // (see e.g. 30174)
+  Result:=True;
+end;
+
 { TGoogleBaseObjectList }
 
 function TGoogleBaseObjectList.GetO(Aindex: Integer): TGoogleBaseObject;