Skip to content

Commit efce849

Browse files
committed
Fixed personal library detection.
1 parent 1aa3c38 commit efce849

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Symfony/src/Codebender/ApiBundle/Controller/DefaultController.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,14 @@ protected function checkHeaders($files, array $personalLibs)
121121
// get library manager url
122122
$libmanager_url = $this->container->getParameter('library');
123123

124-
// TODO: improve this.
125-
$personal_lib_keys = array_keys($personalLibs);
126-
$foundPersonal = false;
127124
$libraries = $personalLibs;
125+
128126
foreach ($headers as $header) {
129127
$foundPersonal = false;
130-
foreach ($personal_lib_keys as $key){
131-
if (strpos($key, "cb_personal_lib_".$header) !== false){
132-
$foundPersonal = true;
128+
foreach ($personalLibs as $plibrary){
129+
foreach ($plibrary as $libcontent){
130+
if ($libcontent["filename"] == $header.".h")
131+
$foundPersonal = true;
133132
}
134133
}
135134
if ($foundPersonal === false) {

0 commit comments

Comments
 (0)