Subversion Repositories oidplus

Rev

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

Rev 426 Rev 433
Line 91... Line 91...
91
                                        }
91
                                        }
92
                                }
92
                                }
93
                        } else {
93
                        } else {
94
                                $res = OIDplus::db()->query("select oChild.id as id from ###objects as oChild ".
94
                                $res = OIDplus::db()->query("select oChild.id as id from ###objects as oChild ".
95
                                                            "left join ###objects as oParent on oChild.parent = oParent.id ".
95
                                                            "left join ###objects as oParent on oChild.parent = oParent.id ".
-
 
96
                                                            "where (".OIDplus::db()->getSlang()->isNullFunction('oParent.ra_email',"''")." <> ? and ".
96
                                                            "where (ifnull(oParent.ra_email,'') <> ? and ifnull(oChild.ra_email,'') = ?) or ".
97
                                                            OIDplus::db()->getSlang()->isNullFunction('oChild.ra_email',"''")." = ?) or ".
97
                                                            "      (oParent.ra_email is null and ifnull(oChild.ra_email,'') = ?) ".
98
                                                            "      (oParent.ra_email is null and ".OIDplus::db()->getSlang()->isNullFunction('oChild.ra_email',"''")." = ?) ".
98
                                                            "order by ".OIDplus::db()->natOrder('oChild.id'), array($ra_email, $ra_email, $ra_email));
99
                                                            "order by ".OIDplus::db()->natOrder('oChild.id'), array($ra_email, $ra_email, $ra_email));
99
                                while ($row = $res->fetch_array()) {
100
                                while ($row = $res->fetch_array()) {
100
                                        $x = self::parse($row['id']); // can be FALSE if namespace was disabled
101
                                        $x = self::parse($row['id']); // can be FALSE if namespace was disabled
101
                                        if ($x) $out[] = self::parse($row['id']);
102
                                        if ($x) $out[] = self::parse($row['id']);
102
                                }
103
                                }