@@ -288,19 +288,12 @@ public static function resultsTable($search_id, $search_results, $recherche, $lo
288288 $ temp = explode ('- ' , $ locale2 );
289289 $ locale2_short_code = $ temp [0 ];
290290
291- switch ($ current_repo ) {
292- case 'mozilla_org ' :
293- $ locale1_path = VersionControl::gitPath ($ locale1 , $ current_repo , $ key );
294- $ locale2_path = VersionControl::gitPath ($ locale2 , $ current_repo , $ key );
295- break ;
296- case 'firefox_ios ' :
297- $ locale1_path = VersionControl::svnPath ($ locale1 , $ current_repo , $ key );
298- $ locale2_path = VersionControl::svnPath ($ locale2 , $ current_repo , $ key );
299- break ;
300- default :
301- $ locale1_path = VersionControl::hgPath ($ locale1 , $ current_repo , $ key );
302- $ locale2_path = VersionControl::hgPath ($ locale2 , $ current_repo , $ key );
303- break ;
291+ if (in_array ($ current_repo , ['firefox_ios ' , 'mozilla_org ' ])) {
292+ $ locale1_path = VersionControl::gitPath ($ locale1 , $ current_repo , $ key );
293+ $ locale2_path = VersionControl::gitPath ($ locale2 , $ current_repo , $ key );
294+ } else {
295+ $ locale1_path = VersionControl::hgPath ($ locale1 , $ current_repo , $ key );
296+ $ locale2_path = VersionControl::hgPath ($ locale2 , $ current_repo , $ key );
304297 }
305298
306299 // errors
@@ -346,16 +339,10 @@ public static function resultsTable($search_id, $search_results, $recherche, $lo
346339
347340 // 3locales view
348341 if (isset ($ search_options ["extra_locale " ])) {
349- switch ($ current_repo ) {
350- case 'mozilla_org ' :
351- $ locale3_path = VersionControl::gitPath ($ locale3 , $ current_repo , $ key );
352- break ;
353- case 'firefox_ios ' :
354- $ locale3_path = VersionControl::svnPath ($ locale3 , $ current_repo , $ key );
355- break ;
356- default :
357- $ locale3_path = VersionControl::hgPath ($ locale3 , $ current_repo , $ key );
358- break ;
342+ if (in_array ($ current_repo , ['firefox_ios ' , 'mozilla_org ' ])) {
343+ $ locale3_path = VersionControl::gitPath ($ locale3 , $ current_repo , $ key );
344+ } else {
345+ $ locale3_path = VersionControl::hgPath ($ locale3 , $ current_repo , $ key );
359346 }
360347
361348 $ clipboard_target_string2 = 'clip_ ' . md5 ($ target_string2 );
0 commit comments