includes/sessions.php
changeset 733 e5f638c216f7
parent 711 f70d764aab33
child 735 f191cb6bd0ca
--- a/includes/sessions.php	Sun Nov 02 01:42:17 2008 -0400
+++ b/includes/sessions.php	Mon Nov 03 08:56:44 2008 -0500
@@ -3405,17 +3405,20 @@
     global $db, $session, $paths, $template, $plugins; // Common objects
     
     // Setup EnanoMath and Diffie-Hellman
-    require_once(ENANO_ROOT.'/includes/math.php');
-    
     global $dh_supported;
-    $dh_supported = true;
-    try
+    if ( !function_exists('dh_gen_private') )
     {
-      require_once(ENANO_ROOT . '/includes/diffiehellman.php');
-    }
-    catch ( Exception $e )
-    {
-      $dh_supported = false;
+      require_once(ENANO_ROOT.'/includes/math.php');
+      
+      $dh_supported = true;
+      try
+      {
+        require_once(ENANO_ROOT . '/includes/diffiehellman.php');
+      }
+      catch ( Exception $e )
+      {
+        $dh_supported = false;
+      }
     }
     global $_math;