Changeset 500 for trunk/bin/module_maker/_config.inc.php
- Timestamp:
- Nov 15, 2014 9:34:39 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/module_maker/_config.inc.php
r468 r500 35 35 36 36 // Make sure necessary files exist. 37 if (!file_exists(COMMON_BASE . '/global/db_auth.inc.php')) { 37 $db_auth_file = false; 38 $rii = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(COMMON_BASE)); 39 $rii->setMaxDepth(2); 40 foreach ($rii as $filename => $file) { 41 if (mb_strpos($filename, 'db_auth.inc.php') !== false) { 42 $db_auth_file = $filename; 43 break; 44 } 45 } 46 47 if (!$db_auth_file) { 38 48 die("Error: First argument directory must contain the global/db_auth.inc.php file with valid MySQL credentials.\n"); 39 49 } … … 63 73 'log_screen_priority' => LOG_DEBUG, 64 74 )); 65 require_once 'global/db_auth.inc.php';75 require_once $db_auth_file; 66 76 67 77 // Start application-based functionality: database, session, environment, ini setup, etc.
Note: See TracChangeset
for help on using the changeset viewer.