Subversion Repositories oidplus

Rev

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

Rev 1143 Rev 1162
Line 114... Line 114...
114
                        OIDplus::localpath().'res/security.ini'
114
                        OIDplus::localpath().'res/security.ini'
115
                );
115
                );
116
                foreach ($candidates as $ini_file) {
116
                foreach ($candidates as $ini_file) {
117
                        if (file_exists($ini_file)) {
117
                        if (file_exists($ini_file)) {
118
                                $data = @parse_ini_file($ini_file, true);
118
                                $data = @parse_ini_file($ini_file, true);
119
                                if (isset($data['Security']) && isset($data['Security'][$source])) {
119
                                if (isset($data['Security'][$source])) {
120
                                        $level = $data['Security'][$source];
120
                                        $level = $data['Security'][$source];
121
                                        if ($level == 'PUBLIC') {
121
                                        if ($level == 'PUBLIC') {
122
                                                return true;
122
                                                return true;
123
                                        } else if ($level == 'RA') {
123
                                        } else if ($level == 'RA') {
124
                                                return
124
                                                return
Line 190... Line 190...
190
                        OIDplus::localpath().'res/redirect.ini'
190
                        OIDplus::localpath().'res/redirect.ini'
191
                );
191
                );
192
                foreach ($candidates as $ini_file) {
192
                foreach ($candidates as $ini_file) {
193
                        if (file_exists($ini_file)) {
193
                        if (file_exists($ini_file)) {
194
                                $data = @parse_ini_file($ini_file, true);
194
                                $data = @parse_ini_file($ini_file, true);
195
                                if (isset($data['Redirects']) && isset($data['Redirects'][$source])) {
195
                                if (isset($data['Redirects'][$source])) {
196
                                        $target = $data['Redirects'][$source];
196
                                        $target = $data['Redirects'][$source];
197
                                        return true;
197
                                        return true;
198
                                }
198
                                }
199
                        }
199
                        }
200
                }
200
                }
Line 705... Line 705...
705
         * @throws OIDplusConfigInitializationException
705
         * @throws OIDplusConfigInitializationException
706
         * @throws OIDplusException
706
         * @throws OIDplusException
707
         */
707
         */
708
        private static function getFolderTitle(string $dir) {
708
        private static function getFolderTitle(string $dir) {
709
                $data = @parse_ini_file("$dir/folder\$".OIDplus::getCurrentLang().".ini", true);
709
                $data = @parse_ini_file("$dir/folder\$".OIDplus::getCurrentLang().".ini", true);
710
                if ($data && isset($data['Folder']) && isset($data['Folder']['Title'])) {
710
                if ($data && isset($data['Folder']['Title'])) {
711
                        return $data['Folder']['Title'];
711
                        return $data['Folder']['Title'];
712
                }
712
                }
713
 
713
 
714
                $data = @parse_ini_file("$dir/folder.ini", true);
714
                $data = @parse_ini_file("$dir/folder.ini", true);
715
                if ($data && isset($data['Folder']) && isset($data['Folder']['Title'])) {
715
                if ($data && isset($data['Folder']['Title'])) {
716
                        return $data['Folder']['Title'];
716
                        return $data['Folder']['Title'];
717
                }
717
                }
718
 
718
 
719
                return basename($dir);
719
                return basename($dir);
720
        }
720
        }