Skip to content

Commit

Permalink
phpmyadmin integration work into OpenEMR
Browse files Browse the repository at this point in the history
  • Loading branch information
bradymiller committed Jun 30, 2013
1 parent bcac748 commit 79b041a
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
37 changes: 37 additions & 0 deletions phpmyadmin/config.inc.php
@@ -0,0 +1,37 @@
<?php
/*
* Customized for OpenEMR.
*
*/

// Access control is dealt with by the ACL check
$ignoreAuth = true;
require_once("../interface/globals.php");
require_once("../library/acl.inc");
if ($GLOBALS['disable_phpmyadmin_link']) {
echo "You do not have access to this resource<br>";
exit;
}
if (! acl_check('admin', 'database')) {
echo "You do not have access to this resource<br>";
exit;
}

/* Servers configuration */
$i = 0;

/* Server localhost (config:openemr) [1] */
$i++;

/* For standard OpenEMR database access */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['host'] = $sqlconf['host'];
$cfg['Servers'][$i]['port'] = $sqlconf['port'];
$cfg['Servers'][$i]['user'] = $sqlconf['login'];
$cfg['Servers'][$i]['password'] = $sqlconf['pass'];
$cfg['Servers'][$i]['only_db'] = $sqlconf['dbase'];

/* Other mods for OpenEMR */
$cfg['ShowCreateDb'] = false;
$cfg['ShowPhpInfo'] = TRUE;
?>
2 changes: 1 addition & 1 deletion phpmyadmin/libraries/session.inc.php
Expand Up @@ -73,7 +73,7 @@
// See bug #1538132. This would block normal behavior on a cluster
//ini_set('session.save_handler', 'files');

$session_name = 'phpMyAdmin';
$session_name = 'OpenEMR';
@session_name($session_name);

if (! isset($_COOKIE[$session_name])) {
Expand Down

0 comments on commit 79b041a

Please sign in to comment.