Subversion Repositories oidplus

Rev

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

Rev 1140 Rev 1143
Line 54... Line 54...
54
        }
54
        }
55
 
55
 
56
        /**
56
        /**
57
         * @param string $actionID
57
         * @param string $actionID
58
         * @param array $params
58
         * @param array $params
59
         * @return array|int[]
59
         * @return array
60
         * @throws OIDplusException
60
         * @throws OIDplusException
61
         * @throws OIDplusMailException
61
         * @throws OIDplusMailException
62
         */
62
         */
63
        public function action(string $actionID, array $params): array {
63
        public function action(string $actionID, array $params): array {
64
                if (empty(self::getFreeRootOid(false))) throw new OIDplusException(_L('FreeOID service not available. Please ask your administrator.'));
64
                if (empty(self::getFreeRootOid(false))) throw new OIDplusException(_L('FreeOID service not available. Please ask your administrator.'));
Line 373... Line 373...
373
                $highest_id = 0;
373
                $highest_id = 0;
374
                while ($row = $res->fetch_array()) {
374
                while ($row = $res->fetch_array()) {
375
                        $arc = substr_count(self::getFreeRootOid(false), '.')+1;
375
                        $arc = substr_count(self::getFreeRootOid(false), '.')+1;
376
                        $highest_id = explode('.',$row['id'])[$arc];
376
                        $highest_id = explode('.',$row['id'])[$arc];
377
                }
377
                }
378
                return $highest_id;
378
                return (int)$highest_id;
379
        }
379
        }
380
 
380
 
381
        /**
381
        /**
382
         * @param string $request
382
         * @param string $request
383
         * @return array|false
383
         * @return array|false