Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Optimization: getRepositoriesList was called inside foreach loop!
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Jul 26, 2013
1 parent 3ff9d2f commit e0c21b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/core/classes/class.ConfService.php
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,8 @@ private function invalidateLoadedRepositories(){
*/
public static function getAccessibleRepositories($userObject=null, $details=false, $labelOnly = false, $skipShared = false){
$result = array();
foreach (ConfService::getRepositoriesList("all") as $repositoryId => $repositoryObject)
$allReps = ConfService::getRepositoriesList("all");
foreach ($allReps as $repositoryId => $repositoryObject)
{
if(!ConfService::repositoryIsAccessible($repositoryId, $repositoryObject, $userObject, $details, $skipShared)){
continue;
Expand Down

0 comments on commit e0c21b1

Please sign in to comment.