This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function db_exists(db_name) { | |
db = db.getSiblingDB('admin'); | |
db.runCommand('listDatabases').databases.forEach(function(db_entry){ | |
if (db_entry.name == db_name) { | |
// quit with exit code zero if we found our db | |
quit(0); | |
} | |
}); | |
// quit with exit code 1 if db was not found |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# all php files :: disallow direct access of file | |
# between <?php and ?> | |
defined('_JEXEC') or die; | |
# index.php :: define variable with application | |
# between <?php and ?> | |
$app = JFactory::getApplication(); | |
# index.php :: define variable with document | |
# between <?php and ?> |