Subversion Repositories oidplus

Rev

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

Rev 970 Rev 977
Line 58... Line 58...
58
                        _CheckParamExists($params, 'id');
58
                        _CheckParamExists($params, 'id');
59
                        $id = $params['id'];
59
                        $id = $params['id'];
60
                        $obj = OIDplusObject::parse($id);
60
                        $obj = OIDplusObject::parse($id);
61
                        if ($obj === null) throw new OIDplusException(_L('%1 action failed because object "%2" cannot be parsed!','DELETE',$id));
61
                        if ($obj === null) throw new OIDplusException(_L('%1 action failed because object "%2" cannot be parsed!','DELETE',$id));
62
 
62
 
63
                        if (!OIDplus::db()->query("select id from ###objects where id = ?", array($id))->any()) {
63
                        if (!OIDplusObject::exists($id)) {
64
                                throw new OIDplusException(_L('Object %1 does not exist',$id));
64
                                throw new OIDplusException(_L('Object %1 does not exist',$id));
65
                        }
65
                        }
66
 
66
 
67
                        // Check if permitted
67
                        // Check if permitted
68
                        if (!$obj->userHasParentalWriteRights()) throw new OIDplusException(_L('Authentication error. Please log in as the superior RA to delete this OID.'));
68
                        if (!$obj->userHasParentalWriteRights()) throw new OIDplusException(_L('Authentication error. Please log in as the superior RA to delete this OID.'));
Line 122... Line 122...
122
                        _CheckParamExists($params, 'id');
122
                        _CheckParamExists($params, 'id');
123
                        $id = $params['id'];
123
                        $id = $params['id'];
124
                        $obj = OIDplusObject::parse($id);
124
                        $obj = OIDplusObject::parse($id);
125
                        if ($obj === null) throw new OIDplusException(_L('%1 action failed because object "%2" cannot be parsed!','UPDATE',$id));
125
                        if ($obj === null) throw new OIDplusException(_L('%1 action failed because object "%2" cannot be parsed!','UPDATE',$id));
126
 
126
 
127
                        if (!OIDplus::db()->query("select id from ###objects where id = ?", array($id))->any()) {
127
                        if (!OIDplusObject::exists($id)) {
128
                                throw new OIDplusException(_L('Object %1 does not exist',$id));
128
                                throw new OIDplusException(_L('Object %1 does not exist',$id));
129
                        }
129
                        }
130
 
130
 
131
                        // Check if permitted
131
                        // Check if permitted
132
                        if (!$obj->userHasParentalWriteRights()) throw new OIDplusException(_L('Authentication error. Please log in as the superior RA to update this OID.'));
132
                        if (!$obj->userHasParentalWriteRights()) throw new OIDplusException(_L('Authentication error. Please log in as the superior RA to update this OID.'));
Line 166... Line 166...
166
                                if (!empty($new_ra) && !OIDplus::mailUtils()->validMailAddress($new_ra)) {
166
                                if (!empty($new_ra) && !OIDplus::mailUtils()->validMailAddress($new_ra)) {
167
                                        throw new OIDplusException(_L('Invalid RA email address'));
167
                                        throw new OIDplusException(_L('Invalid RA email address'));
168
                                }
168
                                }
169
 
169
 
170
                                // Change RA recursively
170
                                // Change RA recursively
171
                                $res = OIDplus::db()->query("select ra_email from ###objects where id = ?", array($id));
-
 
172
                                if ($row = $res->fetch_array()) {
-
 
173
                                        $current_ra = $row['ra_email'];
171
                                $current_ra = $obj->getRaMail();
174
                                        if ($new_ra != $current_ra) {
172
                                if ($new_ra != $current_ra) {
175
                                                OIDplus::logger()->log("[INFO]OID($id)+[?INFO/!OK]SUPOIDRA($id)?/[?INFO/!OK]A?", "RA of object '$id' changed from '$current_ra' to '$new_ra'");
173
                                        OIDplus::logger()->log("[INFO]OID($id)+[?INFO/!OK]SUPOIDRA($id)?/[?INFO/!OK]A?", "RA of object '$id' changed from '$current_ra' to '$new_ra'");
176
                                                OIDplus::logger()->log("[WARN]RA($current_ra)!",           "Lost ownership of object '$id' due to RA transfer of superior RA / admin.");
174
                                        OIDplus::logger()->log("[WARN]RA($current_ra)!",           "Lost ownership of object '$id' due to RA transfer of superior RA / admin.");
177
                                                OIDplus::logger()->log("[INFO]RA($new_ra)!",               "Gained ownership of object '$id' due to RA transfer of superior RA / admin.");
175
                                        OIDplus::logger()->log("[INFO]RA($new_ra)!",               "Gained ownership of object '$id' due to RA transfer of superior RA / admin.");
178
                                                if ($parentObj = $obj->getParent()) {
176
                                        if ($parentObj = $obj->getParent()) {
Line 180... Line 178...
180
                                                        OIDplus::logger()->log("[INFO]OID($parent_oid)", "RA of object '$id' changed from '$current_ra' to '$new_ra'");
178
                                                OIDplus::logger()->log("[INFO]OID($parent_oid)", "RA of object '$id' changed from '$current_ra' to '$new_ra'");
181
                                                }
179
                                        }
182
                                                $this->ra_change_rec($id, $current_ra, $new_ra); // Recursively change inherited RAs
180
                                        $this->ra_change_rec($id, $current_ra, $new_ra); // Recursively change inherited RAs
183
                                        }
181
                                }
184
                                }
182
                        }
185
                        }
-
 
186
 
183
 
187
                        // Log if confidentially flag was changed
184
                        // Log if confidentially flag was changed
188
                        OIDplus::logger()->log("[INFO]OID($id)+[?INFO/!OK]SUPOIDRA($id)?/[?INFO/!OK]A?", "Identifiers/Confidential flag of object '$id' updated"); // TODO: Check if they were ACTUALLY updated!
185
                        OIDplus::logger()->log("[INFO]OID($id)+[?INFO/!OK]SUPOIDRA($id)?/[?INFO/!OK]A?", "Identifiers/Confidential flag of object '$id' updated"); // TODO: Check if they were ACTUALLY updated!
189
                        if ($parentObj = $obj->getParent()) {
186
                        if ($parentObj = $obj->getParent()) {
190
                                $parent_oid = $parentObj->nodeId();
187
                                $parent_oid = $parentObj->nodeId();
Line 254... Line 251...
254
                        _CheckParamExists($params, 'id');
251
                        _CheckParamExists($params, 'id');
255
                        $id = $params['id'];
252
                        $id = $params['id'];
256
                        $obj = OIDplusObject::parse($id);
253
                        $obj = OIDplusObject::parse($id);
257
                        if ($obj === null) throw new OIDplusException(_L('%1 action failed because object "%2" cannot be parsed!','UPDATE2',$id));
254
                        if ($obj === null) throw new OIDplusException(_L('%1 action failed because object "%2" cannot be parsed!','UPDATE2',$id));
258
 
255
 
259
                        if (!OIDplus::db()->query("select id from ###objects where id = ?", array($id))->any()) {
256
                        if (!OIDplusObject::exists($id)) {
260
                                throw new OIDplusException(_L('Object %1 does not exist',$id));
257
                                throw new OIDplusException(_L('Object %1 does not exist',$id));
261
                        }
258
                        }
262
 
259
 
263
                        // Check if allowed
260
                        // Check if allowed
264
                        if (!$obj->userHasWriteRights()) throw new OIDplusException(_L('Authentication error. Please log in as the RA to update this OID.'));
261
                        if (!$obj->userHasWriteRights()) throw new OIDplusException(_L('Authentication error. Please log in as the RA to update this OID.'));
Line 314... Line 311...
314
                        // Check if you have write rights on the parent (to create a new object)
311
                        // Check if you have write rights on the parent (to create a new object)
315
                        _CheckParamExists($params, 'parent');
312
                        _CheckParamExists($params, 'parent');
316
                        $objParent = OIDplusObject::parse($params['parent']);
313
                        $objParent = OIDplusObject::parse($params['parent']);
317
                        if ($objParent === null) throw new OIDplusException(_L('%1 action failed because parent object "%2" cannot be parsed!','INSERT',$params['parent']));
314
                        if ($objParent === null) throw new OIDplusException(_L('%1 action failed because parent object "%2" cannot be parsed!','INSERT',$params['parent']));
318
 
315
 
-
 
316
                        if (!$objParent->isRoot()) {
-
 
317
                                $idParent = $objParent->nodeId();
319
                        if (!$objParent->isRoot() && (!OIDplus::db()->query("select id from ###objects where id = ?", array($objParent->nodeId()))->any())) {
318
                                if (!OIDplusObject::exists($idParent)) {
320
                                throw new OIDplusException(_L('Parent object %1 does not exist','".($objParent->nodeId())."'));
319
                                        throw new OIDplusException(_L('Parent object %1 does not exist',$idParent));
-
 
320
                                }
321
                        }
321
                        }
322
 
322
 
323
                        if (!$objParent->userHasWriteRights()) throw new OIDplusException(_L('Authentication error. Please log in as the correct RA to insert an OID at this arc.'));
323
                        if (!$objParent->userHasWriteRights()) throw new OIDplusException(_L('Authentication error. Please log in as the correct RA to insert an OID at this arc.'));
324
 
324
 
325
                        // Check if the ID is valid
325
                        // Check if the ID is valid
Line 343... Line 343...
343
                        // Determine absolute OID name
343
                        // Determine absolute OID name
344
                        // Note: At addString() and parse(), the syntax of the ID will be checked
344
                        // Note: At addString() and parse(), the syntax of the ID will be checked
345
                        $id = $objParent->addString($params['id']);
345
                        $id = $objParent->addString($params['id']);
346
 
346
 
347
                        // Check, if the OID exists
347
                        // Check, if the OID exists
348
                        $test = OIDplus::db()->query("select id from ###objects where id = ?", array($id));
-
 
349
                        if ($test->any()) {
348
                        if (OIDplusObject::exists($id)) {
350
                                throw new OIDplusException(_L('Object %1 already exists!',$id));
349
                                throw new OIDplusException(_L('Object %1 already exists!',$id));
351
                        }
350
                        }
352
 
351
 
353
                        $obj = OIDplusObject::parse($id);
352
                        $obj = OIDplusObject::parse($id);
354
                        if ($obj === null) throw new OIDplusException(_L('%1 action failed because object "%2" cannot be parsed!','INSERT',$id));
353
                        if ($obj === null) throw new OIDplusException(_L('%1 action failed because object "%2" cannot be parsed!','INSERT',$id));
Line 467... Line 466...
467
                $row = null;
466
                $row = null;
468
                $obj = OIDplusObject::parse($id);
467
                $obj = OIDplusObject::parse($id);
469
                if (is_null($obj)) return false;
468
                if (is_null($obj)) return false;
470
                if ($obj->isRoot()) {
469
                if ($obj->isRoot()) {
471
                        $obj->getContentPage($out['title'], $out['text'], $out['icon']);
470
                        $obj->getContentPage($out['title'], $out['text'], $out['icon']);
472
                        $parent = null; // $obj->getParent();
471
                        $objParent = null; // $obj->getParent();
473
                } else {
472
                } else {
474
                        $res = OIDplus::db()->query("select * from ###objects where id = ?", array($obj->nodeId()));
473
                        $obj = OIDplusObject::findFitting($id); // this time, the object will be found, not just the object type
475
                        if (!$res->any()) {
474
                        if (!$obj) {
476
                                return false;
475
                                return false;
477
                        } else {
476
                        } else {
478
                                $row = $res->fetch_array(); // will be used further down the code
-
 
479
                                $obj->getContentPage($out['title'], $out['text'], $out['icon']);
477
                                $obj->getContentPage($out['title'], $out['text'], $out['icon']);
480
                                if (empty($out['title'])) $out['title'] = explode(':',$obj->nodeId(),2)[1];
478
                                if (empty($out['title'])) $out['title'] = explode(':',$obj->nodeId(),2)[1];
481
                                $parent = $obj->getParent();
479
                                $objParent = $obj->getParent();
482
                        }
480
                        }
483
                }
481
                }
484
                return array($id, $parent, $res, $row);
482
                return array($id, $obj, $objParent);
485
        }
483
        }
486
 
484
 
487
        public static function getAlternativesForQuery($id) {
485
        public static function getAlternativesForQuery($id) {
488
                // Attention: This is NOT an implementation of 1.3.6.1.4.1.37476.2.5.2.3.7 !
486
                // Attention: This is NOT an implementation of 1.3.6.1.4.1.37476.2.5.2.3.7 !
489
                //            This is the function that calls getAlternativesForQuery() of every plugin that implements 1.3.6.1.4.1.37476.2.5.2.3.7
487
                //            This is the function that calls getAlternativesForQuery() of every plugin that implements 1.3.6.1.4.1.37476.2.5.2.3.7
Line 565... Line 563...
565
                                        $test = $this->tryObject($alternative, $out);
563
                                        $test = $this->tryObject($alternative, $out);
566
                                        if ($test !== false) break; // found something
564
                                        if ($test !== false) break; // found something
567
                                }
565
                                }
568
                        }
566
                        }
569
                        if ($test !== false) {
567
                        if ($test !== false) {
570
                                list($id, $parent, $res, $row) = $test;
568
                                list($id, $obj, $objParent) = $test;
571
                        }
569
                        }
572
 
570
 
573
                        // --- If the object type is disabled or not an object at all (e.g. "oidplus:"), then $handled=false
571
                        // --- If the object type is disabled or not an object at all (e.g. "oidplus:"), then $handled=false
574
                        //     If the object type is enabled but object not found, $handled=true
572
                        //     If the object type is enabled but object not found, $handled=true
575
 
573
 
Line 609... Line 607...
609
                                return;
607
                                return;
610
                        }
608
                        }
611
 
609
 
612
                        // ---
610
                        // ---
613
 
611
 
614
                        if ($parent) {
612
                        if ($objParent) {
615
                                if ($parent->isRoot()) {
613
                                if ($objParent->isRoot()) {
616
 
-
 
617
                                        $parent_link_text = $parent->objectTypeTitle();
614
                                        $parent_link_text = $objParent->objectTypeTitle();
618
                                        $out['text'] = '<p><a '.OIDplus::gui()->link($parent->root()).'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Parent node: %1',htmlentities($parent_link_text)).'</a></p>' . $out['text'];
615
                                        $out['text'] = '<p><a '.OIDplus::gui()->link($objParent->root()).'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Parent node: %1',htmlentities($parent_link_text)).'</a></p>' . $out['text'];
619
 
-
 
620
                                } else {
616
                                } else {
621
                                        $res_ = OIDplus::db()->query("select * from ###objects where id = ?", array($parent->nodeId()));
-
 
622
                                        if ($res_->any()) {
-
 
623
                                                $row_ = $res_->fetch_array();
-
 
624
 
-
 
625
                                                $parent_title = $row_['title'];
617
                                        $parent_title = $objParent->getTitle();
626
                                                if (empty($parent_title) && ($parent->ns() == 'oid')) {
618
                                        if (empty($parent_title) && ($objParent->ns() == 'oid')) {
627
                                                        // If not title is available, then use an ASN.1 identifier
619
                                                // If not title is available, then use an ASN.1 identifier
628
                                                        $res_ = OIDplus::db()->query("select name from ###asn1id where oid = ?", array($parent->nodeId()));
620
                                                $res_asn = OIDplus::db()->query("select name from ###asn1id where oid = ?", array($objParent->nodeId()));
629
                                                        if ($res_->any()) {
621
                                                if ($res_asn->any()) {
630
                                                                $row_ = $res_->fetch_array();
622
                                                        $row_asn = $res_asn->fetch_array();
631
                                                                $parent_title = $row_['name']; // TODO: multiple ASN1 ids?
623
                                                        $parent_title = $row_asn['name']; // TODO: multiple ASN1 ids?
632
                                                        }
624
                                                }
633
                                                }
625
                                        }
634
 
626
 
635
                                                $parent_link_text = empty($parent_title) ? explode(':',$parent->nodeId())[1] : $parent_title.' ('.explode(':',$parent->nodeId())[1].')';
627
                                        $parent_link_text = empty($parent_title) ? explode(':',$objParent->nodeId())[1] : $parent_title.' ('.explode(':',$objParent->nodeId())[1].')';
636
 
628
 
637
                                                $out['text'] = '<p><a '.OIDplus::gui()->link($parent->nodeId()).'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Parent node: %1',htmlentities($parent_link_text)).'</a></p>' . $out['text'];
629
                                        $out['text'] = '<p><a '.OIDplus::gui()->link($objParent->nodeId()).'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '._L('Parent node: %1',htmlentities($parent_link_text)).'</a></p>' . $out['text'];
638
                                        } else {
-
 
639
                                                $out['text'] = '';
-
 
640
                                        }
-
 
641
                                }
630
                                }
642
                        } else {
631
                        } else {
643
                                $parent_link_text = _L('Go back to front page');
632
                                $parent_link_text = _L('Go back to front page');
644
                                $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '.htmlentities($parent_link_text).'</a></p>' . $out['text'];
633
                                $out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '.htmlentities($parent_link_text).'</a></p>' . $out['text'];
645
                        }
634
                        }
646
 
635
 
647
                        // ---
636
                        // ---
648
 
637
 
-
 
638
                        if ($obj) {
649
                        // DM 16.03.2022 commented out isset() because Oracle does not set 'description' if it is NULL?!
639
                                $title = $obj->getTitle();
650
                        if (!is_null($row)/* && isset($row['description'])*/) {
640
                                $description = $obj->getDescription();
651
                                if (empty($row['description'])) {
641
                                if (empty($description)) {
652
                                        if (empty($row['title'])) {
642
                                        if (empty($title)) {
653
                                                $desc = '<p><i>'._L('No description for this object available').'</i></p>';
643
                                                $desc = '<p><i>'._L('No description for this object available').'</i></p>';
654
                                        } else {
644
                                        } else {
655
                                                $desc = $row['title'];
645
                                                $desc = $title;
656
                                        }
646
                                        }
657
                                } else {
647
                                } else {
658
                                        $desc = self::objDescription($row['description']);
648
                                        $desc = self::objDescription($description);
659
                                }
649
                                }
660
 
650
 
661
                                if ($obj->userHasWriteRights()) {
651
                                if ($obj->userHasWriteRights()) {
662
                                        $rand = ++self::$crudCounter;
652
                                        $rand = ++self::$crudCounter;
663
                                        $desc = '<noscript><p><b>'._L('You need to enable JavaScript to edit title or description of this object.').'</b></p>'.$desc.'</noscript>';
653
                                        $desc = '<noscript><p><b>'._L('You need to enable JavaScript to edit title or description of this object.').'</b></p>'.$desc.'</noscript>';
664
                                        $desc .= '<div class="container box" style="display:none" id="descbox_'.$rand.'">';
654
                                        $desc .= '<div class="container box" style="display:none" id="descbox_'.$rand.'">';
665
                                        $desc .= _L('Title').': <input type="text" name="title" id="titleedit" value="'.htmlentities($row['title']).'"><br><br>'._L('Description').':<br>';
655
                                        $desc .= _L('Title').': <input type="text" name="title" id="titleedit" value="'.htmlentities($title).'"><br><br>'._L('Description').':<br>';
666
                                        $desc .= self::showMCE('description', $row['description']);
656
                                        $desc .= self::showMCE('description', $description);
667
                                        $desc .= '<button type="button" name="update_desc" id="update_desc" class="btn btn-success btn-xs update" onclick="OIDplusPagePublicObjects.updateDesc()">'._L('Update description').'</button>';
657
                                        $desc .= '<button type="button" name="update_desc" id="update_desc" class="btn btn-success btn-xs update" onclick="OIDplusPagePublicObjects.updateDesc()">'._L('Update description').'</button>';
668
                                        $desc .= '</div>';
658
                                        $desc .= '</div>';
669
                                        $desc .= '<script>$("#descbox_'.$rand.'")[0].style.display = "block";</script>';
659
                                        $desc .= '<script>$("#descbox_'.$rand.'")[0].style.display = "block";</script>';
670
                                }
660
                                }
671
                        } else {
661
                        } else {
Line 677... Line 667...
677
                        if (strpos($out['text'], '%%DESC%%') !== false)
667
                        if (strpos($out['text'], '%%DESC%%') !== false)
678
                                $out['text'] = str_replace('%%DESC%%',    $desc,                              $out['text']);
668
                                $out['text'] = str_replace('%%DESC%%',    $desc,                              $out['text']);
679
                        if (strpos($out['text'], '%%CRUD%%') !== false)
669
                        if (strpos($out['text'], '%%CRUD%%') !== false)
680
                                $out['text'] = str_replace('%%CRUD%%',    self::showCrud($obj->nodeId()),     $out['text']);
670
                                $out['text'] = str_replace('%%CRUD%%',    self::showCrud($obj->nodeId()),     $out['text']);
681
                        if (strpos($out['text'], '%%RA_INFO%%') !== false)
671
                        if (strpos($out['text'], '%%RA_INFO%%') !== false)
682
                                $out['text'] = str_replace('%%RA_INFO%%', OIDplusPagePublicRaInfo::showRaInfo($row['ra_email']), $out['text']);
672
                                $out['text'] = str_replace('%%RA_INFO%%', OIDplusPagePublicRaInfo::showRaInfo($obj->getRaMail()), $out['text']);
683
 
673
 
684
                        $alt_ids = $obj->getAltIds();
674
                        $alt_ids = $obj->getAltIds();
685
                        if (count($alt_ids) > 0) {
675
                        if (count($alt_ids) > 0) {
686
                                $out['text'] .= '<h2>'._L('Alternative Identifiers').'</h2>';
676
                                $out['text'] .= '<h2>'._L('Alternative Identifiers').'</h2>';
687
                                foreach ($alt_ids as $alt_id) {
677
                                foreach ($alt_ids as $alt_id) {
Line 724... Line 714...
724
                                'id' => 'oidplus:system',
714
                                'id' => 'oidplus:system',
725
                                'icon' => OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/main_icon16.png',
715
                                'icon' => OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/main_icon16.png',
726
                                'text' => _L('System')
716
                                'text' => _L('System')
727
                        );
717
                        );
728
 
718
 
729
                        $parent = '';
-
 
730
                        $res = OIDplus::db()->query("select parent from ###objects where id = ?", array($req_goto));
719
                        $objGoto = OIDplusObject::findFitting($req_goto);
731
                        while ($row = $res->fetch_object()) {
720
                        $objGotoParent = $objGoto->getParent();
732
                                $parent = $row->parent;
721
                        $parent = $objGotoParent ? $objGotoParent->nodeId() : '';
733
                        }
-
 
734
 
722
 
735
                        $objTypesChildren = array();
723
                        $objTypesChildren = array();
736
                        foreach (OIDplus::getEnabledObjectTypes() as $ot) {
724
                        foreach (OIDplus::getEnabledObjectTypes() as $ot) {
737
                                $icon = $this->get_treeicon_root($ot);
725
                                $icon = $this->get_treeicon_root($ot);
738
 
726
 
Line 793... Line 781...
793
                        } else if (isset($req_goto)) {
781
                        } else if (isset($req_goto)) {
794
                                $goto = $req_goto;
782
                                $goto = $req_goto;
795
                                $path = array();
783
                                $path = array();
796
                                while (true) {
784
                                while (true) {
797
                                        $path[] = $goto;
785
                                        $path[] = $goto;
798
                                        $res = OIDplus::db()->query("select parent from ###objects where id = ?", array($goto));
786
                                        $objGoto = OIDplusObject::findFitting($goto);
799
                                        if (!$res->any()) break;
787
                                        if (!$objGoto) break;
800
                                        $row = $res->fetch_array();
788
                                        $objGotoParent = $objGoto->getParent();
801
                                        $goto = $row['parent'];
789
                                        $goto = $objGotoParent ? $objGotoParent->nodeId() : '';
802
                                        if ($goto == '') continue;
790
                                        if ($goto == '') continue;
803
                                }
791
                                }
804
 
792
 
805
                                $goto_path = array_reverse($path);
793
                                $goto_path = array_reverse($path);
806
                        } else {
794
                        } else {
Line 1003... Line 991...
1003
                                $output .= '     <td>'.$date_updated.'</td>';
991
                                $output .= '     <td>'.$date_updated.'</td>';
1004
                        }
992
                        }
1005
                        $output .= '</tr>';
993
                        $output .= '</tr>';
1006
                }
994
                }
1007
 
995
 
1008
                $result = OIDplus::db()->query("select * from ###objects where id = ?", array($parent));
-
 
1009
                $parent_ra_email = $result->any() ? $result->fetch_object()->ra_email : '';
996
                $parent_ra_email = $objParent ? $objParent->getRaMail() : '';
1010
 
997
 
1011
                // "Create OID" row
998
                // "Create OID" row
1012
                if ($objParent->userHasWriteRights()) {
999
                if ($objParent->userHasWriteRights()) {
1013
                        $output .= '<tr>';
1000
                        $output .= '<tr>';
1014
                        $prefix = is_null($objParent) ? '' : $objParent->crudInsertPrefix();
1001
                        $prefix = is_null($objParent) ? '' : $objParent->crudInsertPrefix();