Skip to content

Commit 6f921f3

Browse files
committed
fix isPrivateList logic
1 parent 8cc8433 commit 6f921f3

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

public_html/lists/admin/connect.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1558,21 +1558,14 @@ function Help($topic, $text = '?')
15581558
*/
15591559
function isPrivateList($listid) {
15601560

1561-
$activeVal = Sql_Query(sprintf('
1561+
$activeList = Sql_Fetch_Row_Query(sprintf('
15621562
SELECT active
15631563
FROM %s
15641564
WHERE id = %d',
15651565
$GLOBALS['tables']['list'], sql_escape($listid))
15661566
);
15671567

1568-
while ($row = Sql_Fetch_Row($activeVal)) {
1569-
$activeVal = $row[0];
1570-
}
1571-
1572-
if ($activeVal == 0) {
1573-
return true;
1574-
} else
1575-
return false;
1568+
return $activeList[0] == 0;
15761569
}
15771570

15781571
// Debugging system, needs $debug = TRUE and $verbose = TRUE or $debug_log = {path} in config.php

0 commit comments

Comments
 (0)