Browse code

Login-Javascript wurde falsch geladen

Bernd Wurst authored on 27/02/2014 09:00:44
Showing 2 changed files
... ...
@@ -26,12 +26,15 @@ if (! defined('__JQUERY_INCLUDED')) {
26 26
 ');
27 27
 }
28 28
 
29
-function javascript($file = NULL) {
29
+function javascript($file = NULL, $module = NULL) {
30 30
   global $go, $prefix;
31
-  list($module, $page) = explode('/', $go, 2);
31
+  list($mod, $page) = explode('/', $go, 2);
32 32
   if (! $file) {
33 33
     $file = $page.'.js';
34 34
   }
35
+  if (! $module) {
36
+    $module = $mod;
37
+  }
35 38
   if (file_exists('modules/'.$module.'/'.$file)) {
36 39
     html_header('
37 40
 <script type="text/javascript" src="'.$prefix.'modules/'.$module.'/'.$file.'"></script>
... ...
@@ -19,7 +19,7 @@ require_once('inc/security.php');
19 19
 function do_ajax_cert_login() {
20 20
   global $prefix;
21 21
   require_once('inc/jquery.php');
22
-  javascript('certlogin.js');
22
+  javascript('certlogin.js', 'index');
23 23
 }
24 24
 
25 25
 function get_logins_by_cert($cert)