forked from EVOgeek/Vmeda.Online
		
	MOBILE-3833 core: Fix detect 3.4 or older sites
This commit is contained in:
		
							parent
							
								
									1ba9f4ac8e
								
							
						
					
					
						commit
						15f4856f81
					
				| @ -576,9 +576,13 @@ export class CoreSite { | |||||||
| 
 | 
 | ||||||
|             // Call the WS.
 |             // Call the WS.
 | ||||||
|             try { |             try { | ||||||
|                 // Send the language to use. Do it after checking cache to prevent losing offline data when changing language.
 |                 if (method !== 'core_webservice_get_site_info') { | ||||||
|                 data.moodlewssettinglang = preSets.lang ?? await CoreLang.getCurrentLanguage(); |                     // Send the language to use. Do it after checking cache to prevent losing offline data when changing language.
 | ||||||
|                 data.moodlewssettinglang = data.moodlewssettinglang.replace('-', '_'); // Moodle uses underscore instead of dash.
 |                     // Don't send it to core_webservice_get_site_info, that WS is used to check if Moodle version is supported.
 | ||||||
|  |                     data.moodlewssettinglang = preSets.lang ?? await CoreLang.getCurrentLanguage(); | ||||||
|  |                     // Moodle uses underscore instead of dash.
 | ||||||
|  |                     data.moodlewssettinglang = data.moodlewssettinglang.replace('-', '_'); | ||||||
|  |                 } | ||||||
| 
 | 
 | ||||||
|                 const response = await this.callOrEnqueueRequest<T>(method, data, preSets, wsPreSets); |                 const response = await this.callOrEnqueueRequest<T>(method, data, preSets, wsPreSets); | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user