Subversion Repositories oidplus

Rev

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

Rev 256 Rev 257
Line 215... Line 215...
215
 
215
 
216
                        // Check if you have write rights on the parent (to create a new object)
216
                        // Check if you have write rights on the parent (to create a new object)
217
                        $objParent = OIDplusObject::parse($_POST['parent']);
217
                        $objParent = OIDplusObject::parse($_POST['parent']);
218
                        if ($objParent === null) throw new OIDplusException("INSERT action failed because parent object '".$_POST['parent']."' cannot be parsed!");
218
                        if ($objParent === null) throw new OIDplusException("INSERT action failed because parent object '".$_POST['parent']."' cannot be parsed!");
219
 
219
 
220
                        if (OIDplus::db()->query("select id from ".OIDPLUS_TABLENAME_PREFIX."objects where id = ?", array($objParent->nodeId()))->num_rows() == 0) {
220
                        if (!$objParent::root() && (OIDplus::db()->query("select id from ".OIDPLUS_TABLENAME_PREFIX."objects where id = ?", array($objParent->nodeId()))->num_rows() == 0)) {
221
                                throw new OIDplusException("Parent object '".($objParent->nodeId())."' does not exist");
221
                                throw new OIDplusException("Parent object '".($objParent->nodeId())."' does not exist");
222
                        }
222
                        }
223
 
223
 
224
                        if (!$objParent->userHasWriteRights()) throw new OIDplusException('Authentification error. Please log in as the correct RA to insert an OID at this arc.');
224
                        if (!$objParent->userHasWriteRights()) throw new OIDplusException('Authentification error. Please log in as the correct RA to insert an OID at this arc.');
225
 
225
 
Line 310... Line 310...
310
 
310
 
311
        public function gui($id, &$out, &$handled) {
311
        public function gui($id, &$out, &$handled) {
312
                if ($id === 'oidplus:system') {
312
                if ($id === 'oidplus:system') {
313
                        $handled = true;
313
                        $handled = true;
314
 
314
 
315
                        $out['title'] = OIDplus::config()->systemTitle(); // 'Object Database of ' . $_SERVER['SERVER_NAME'];
315
                        $out['title'] = OIDplus::config()->getValue('system_title'); // 'Object Database of ' . $_SERVER['SERVER_NAME'];
316
                        $out['icon'] = OIDplus::webpath(__DIR__).'system_big.png';
316
                        $out['icon'] = OIDplus::webpath(__DIR__).'system_big.png';
317
 
317
 
318
                        if (file_exists(__DIR__ . '/welcome.local.html')) {
318
                        if (file_exists(__DIR__ . '/welcome.local.html')) {
319
                                $out['text'] = file_get_contents(__DIR__ . '/welcome.local.html');
319
                                $out['text'] = file_get_contents(__DIR__ . '/welcome.local.html');
320
                        } else if (file_exists(__DIR__ . '/welcome.html')) {
320
                        } else if (file_exists(__DIR__ . '/welcome.html')) {