File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -277,7 +277,7 @@ - (void)setKeys:(NSArray *)k
277277 speciesRow.detailDataKey = @" tree.sci_name" ;
278278 }
279279
280- if ([[OTMEnvironment sharedEnvironment ] photoFieldIsWritable ]) {
280+ if ([[OTMEnvironment sharedEnvironment ] canAddTreePhoto ]) {
281281 pictureRow = [[OTMStaticClickCellRenderer alloc ]
282282 initWithName: @" Tree Picture"
283283 key: @" "
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ extern NSString * const OTMEnvironmentDateStringShort;
139139@property (nonatomic , strong ) NSDictionary * config;
140140@property (nonatomic , strong ) NSURL *instanceLogoUrl;
141141@property BOOL speciesFieldWritable;
142- @property BOOL photoFieldWritable ;
142+ @property BOOL canAddTreePhoto ;
143143@property BOOL canAddTree;
144144
145145
@@ -164,6 +164,5 @@ extern NSString * const OTMEnvironmentDateStringShort;
164164- (NSString *)absolutePhotoUrlFromPhotoUrl : (NSString *)url ;
165165
166166- (BOOL ) speciesFieldIsWritable ;
167- - (BOOL ) photoFieldIsWritable ;
168167
169168@end
Original file line number Diff line number Diff line change @@ -210,7 +210,7 @@ - (void)updateEnvironmentWithDictionary:(NSDictionary *)dict {
210210 self.config = [dict objectForKey: @" config" ];
211211 self.mapViewTitle = [dict objectForKey: @" name" ];
212212 self.canAddTree = [[[[dict objectForKey: @" meta_perms" ] objectForKey: @" can_add_tree" ] stringValue ] isEqualToString: @" 0" ] ? NO : YES ;
213- self.photoFieldWritable = [[[[self .fieldData objectForKey: @" treephoto.image " ] objectForKey: @" can_write " ] stringValue ] isEqualToString: @" 0" ] ? NO : YES ;
213+ self.canAddTreePhoto = [[[[dict objectForKey: @" meta_perms " ] objectForKey: @" can_edit_tree_photo " ] stringValue ] isEqualToString: @" 0" ] ? NO : YES ;
214214 [self setSearchRegionRadiusInMeters: [[dict objectForKey: @" extent_radius" ] doubleValue ]];
215215
216216 NSDictionary *missingAndStandardFilters = [dict objectForKey: @" search" ];
@@ -670,10 +670,6 @@ - (BOOL) speciesFieldIsWritable {
670670 return self.speciesFieldWritable ;
671671}
672672
673- - (BOOL ) photoFieldIsWritable {
674- return self.photoFieldWritable ;
675- }
676-
677673//
678674// Functions from DB5
679675// https://github.com/quartermaster/DB5/blob/7e41cef54e7ae9d3e97c2f8f23fc5cf14df72114/Source/VSTheme.m
You can’t perform that action at this time.
0 commit comments