Subversion Repositories oidplus

Rev

Rev 1439 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1439 Rev 1454
Line 267... Line 267...
267
 
267
 
268
                if (!OIDplus::baseConfig()->getValue('OBJECT_CACHING', true)) {
268
                if (!OIDplus::baseConfig()->getValue('OBJECT_CACHING', true)) {
269
                        if (!$ra) {
269
                        if (!$ra) {
270
                                $res = OIDplus::db()->query("select oChild.id as child_id, oChild.ra_email as child_mail, oParent.ra_email as parent_mail from ###objects as oChild ".
270
                                $res = OIDplus::db()->query("select oChild.id as child_id, oChild.ra_email as child_mail, oParent.ra_email as parent_mail from ###objects as oChild ".
271
                                                            "left join ###objects as oParent on oChild.parent = oParent.id");
271
                                                            "left join ###objects as oParent on oChild.parent = oParent.id");
272
                                $res->naturalSortByField('oChild.id');
272
                                $res->naturalSortByField('child_id');
273
                                while ($row = $res->fetch_array()) {
273
                                while ($row = $res->fetch_array()) {
274
                                        if (!OIDplus::authUtils()->isRaLoggedIn($row['parent_mail']) && OIDplus::authUtils()->isRaLoggedIn($row['child_mail'])) {
274
                                        if (!OIDplus::authUtils()->isRaLoggedIn($row['parent_mail']) && OIDplus::authUtils()->isRaLoggedIn($row['child_mail'])) {
275
                                                $x = self::parse($row['child_id']); // can be NULL if namespace was disabled
275
                                                $x = self::parse($row['child_id']); // can be NULL if namespace was disabled
276
                                                if ($x) $out[] = $x;
276
                                                if ($x) $out[] = $x;
277
                                        }
277
                                        }
Line 281... Line 281...
281
                                                            "left join ###objects as oParent on oChild.parent = oParent.id ".
281
                                                            "left join ###objects as oParent on oChild.parent = oParent.id ".
282
                                                            "where (".OIDplus::db()->getSlang()->isNullFunction('oParent.ra_email',"''")." <> ? and ".
282
                                                            "where (".OIDplus::db()->getSlang()->isNullFunction('oParent.ra_email',"''")." <> ? and ".
283
                                                            OIDplus::db()->getSlang()->isNullFunction('oChild.ra_email',"''")." = ?) or ".
283
                                                            OIDplus::db()->getSlang()->isNullFunction('oChild.ra_email',"''")." = ?) or ".
284
                                                            "      (oParent.ra_email is null and ".OIDplus::db()->getSlang()->isNullFunction('oChild.ra_email',"''")." = ?) ",
284
                                                            "      (oParent.ra_email is null and ".OIDplus::db()->getSlang()->isNullFunction('oChild.ra_email',"''")." = ?) ",
285
                                                            array($ra, $ra, $ra));
285
                                                            array($ra, $ra, $ra));
286
                                $res->naturalSortByField('oChild.id');
286
                                $res->naturalSortByField('child_id');
287
                                while ($row = $res->fetch_array()) {
287
                                while ($row = $res->fetch_array()) {
288
                                        $x = self::parse($row['child_id']); // can be NULL if namespace was disabled
288
                                        $x = self::parse($row['child_id']); // can be NULL if namespace was disabled
289
                                        if ($x) $out[] = $x;
289
                                        if ($x) $out[] = $x;
290
                                }
290
                                }
291
                        }
291
                        }