228,7 → 228,7 |
if (!$ra) { |
$res = OIDplus::db()->query("select oChild.id as id, oChild.ra_email as child_mail, oParent.ra_email as parent_mail from ###objects as oChild ". |
"left join ###objects as oParent on oChild.parent = oParent.id"); |
$res = new OIDplusNaturalSortedQueryResult($res, 'oChild.id'); |
$res->naturalSortByField('oChild.id'); |
while ($row = $res->fetch_array()) { |
if (!OIDplus::authUtils()->isRaLoggedIn($row['parent_mail']) && OIDplus::authUtils()->isRaLoggedIn($row['child_mail'])) { |
$x = self::parse($row['id']); // can be NULL if namespace was disabled |
242,7 → 242,7 |
OIDplus::db()->getSlang()->isNullFunction('oChild.ra_email',"''")." = ?) or ". |
" (oParent.ra_email is null and ".OIDplus::db()->getSlang()->isNullFunction('oChild.ra_email',"''")." = ?) ", |
array($ra, $ra, $ra)); |
$res = new OIDplusNaturalSortedQueryResult($res, 'oChild.id'); |
$res->naturalSortByField('oChild.id'); |
while ($row = $res->fetch_array()) { |
$x = self::parse($row['id']); // can be NULL if namespace was disabled |
if ($x) $out[] = $x; |
291,7 → 291,7 |
|
if (!OIDplus::baseConfig()->getValue('OBJECT_CACHING', true)) { |
$res = OIDplus::db()->query("select id from ###objects where confidential = ?", array(false)); |
$res = new OIDplusNaturalSortedQueryResult($res, 'id'); |
$res->naturalSortByField('id'); |
while ($row = $res->fetch_array()) { |
$obj = self::parse($row['id']); // will be NULL if the object type is not registered |
if ($obj && (!$obj->isConfidential())) { |