plugins/yubikey/corelib.php
changeset 3 d0fe7acaf0e8
parent 0 9d2c4f04a0d0
child 4 73aecd46bb56
equal deleted inserted replaced
2:6edc6ebb3b39 3:d0fe7acaf0e8
   170 
   170 
   171 $plugins->attachHook('compile_template', 'yubikey_attach_headers($this);');
   171 $plugins->attachHook('compile_template', 'yubikey_attach_headers($this);');
   172 
   172 
   173 function yubikey_attach_headers(&$template)
   173 function yubikey_attach_headers(&$template)
   174 {
   174 {
       
   175   if ( getConfig('yubikey_enable', '1') != '1' )
       
   176     return true;
       
   177   
   175   $template->add_header('<script type="text/javascript" src="' . scriptPath . '/plugins/yubikey/yubikey.js"></script>');
   178   $template->add_header('<script type="text/javascript" src="' . scriptPath . '/plugins/yubikey/yubikey.js"></script>');
   176   $template->add_header('<link rel="stylesheet" type="text/css" href="' . scriptPath . '/plugins/yubikey/yubikey.css" />');
   179   $template->add_header('<link rel="stylesheet" type="text/css" href="' . scriptPath . '/plugins/yubikey/yubikey.css" />');
   177 }
   180 }
   178 
   181