phpmyadmin integration work into OpenEMR
authorbradymiller <bradymiller@users.sourceforge.net>
Thu, 27 Jun 2013 07:18:52 +0000 (27 00:18 -0700)
committerbradymiller <bradymiller@users.sourceforge.net>
Sun, 30 Jun 2013 23:31:24 +0000 (30 16:31 -0700)
phpmyadmin/config.inc.php [new file with mode: 0644]
phpmyadmin/libraries/session.inc.php

diff --git a/phpmyadmin/config.inc.php b/phpmyadmin/config.inc.php
new file mode 100644 (file)
index 0000000..e46a86b
--- /dev/null
@@ -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;
+?>
index b500be6..7f416ea 100644 (file)
@@ -73,7 +73,7 @@ session_cache_limiter('private');
 // 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])) {