Subversion Repositories oidplus

Rev

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

Rev 1240 Rev 1241
Line 286... Line 286...
286
         * @throws OIDplusConfigInitializationException
286
         * @throws OIDplusConfigInitializationException
287
         * @throws OIDplusException
287
         * @throws OIDplusException
288
         */
288
         */
289
        private function initRequireTables(array $tableNames)/*: void*/ {
289
        private function initRequireTables(array $tableNames)/*: void*/ {
290
                $msgs = array();
290
                $msgs = array();
-
 
291
 
291
                foreach ($tableNames as $tableName) {
292
                // Check for a general database error like a locked file DBMS
-
 
293
                // which would raise a false warning "Table oidplus_config missing"
-
 
294
                $this->query("select 0");
-
 
295
 
292
                        $prefix = OIDplus::baseConfig()->getValue('TABLENAME_PREFIX', '');
296
                $prefix = OIDplus::baseConfig()->getValue('TABLENAME_PREFIX', '');
-
 
297
                foreach ($tableNames as $tableName) {
293
                        if (!$this->tableExists($prefix.$tableName)) {
298
                        if (!$this->tableExists($prefix.$tableName)) {
294
                                $msgs[] = _L('Table %1 is missing!',$prefix.$tableName);
299
                                $msgs[] = _L('Table %1 is missing!',$prefix.$tableName);
295
                        }
300
                        }
296
                }
301
                }
297
                // TODO: If there is a general database error (e.g. locked database, etc.) then you will receive the false warning "Table oidplus_config missing"
-
 
298
                if (count($msgs) > 0) {
302
                if (count($msgs) > 0) {
299
                        throw new OIDplusConfigInitializationException(implode("\n\n",$msgs));
303
                        throw new OIDplusConfigInitializationException(implode("\n\n",$msgs));
300
                }
304
                }
301
        }
305
        }
302
 
306