Advertisement
matthewpoer

SugarCRM Diagnostic Tool - Quick Pick Just the Log

Mar 7th, 2013
386
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // SugarCRM Diagnostic Tool. Sometimes you just want the log, no customdir, no
  2. // database dumps, no md5 hashes, just the damn log. So make a browser bookmarklet
  3. // with this javascript. Uncheck everything but the log and submit the form.
  4. //
  5. // Copy all of the code, prefix it with javascript: and place it as a new
  6. // bookmark. Works with Firefox.
  7. //
  8. // The actual bookmark will end up looking pretty ugly, like this
  9. //
  10. // javascript:var%20checkboxes%20=%20[%20'configphp',%20'custom_dir',%20'phpinfo',%20'mysql_dumps',%20'mysql_schema',%20'mysql_info',%20'md5',%20'md5filesmd5',%20'md5calculated',%20'beanlistbeanfiles',%20'sugarlog',%20'vardefs'%20];%20var%20form%20=%20document.forms['Diagnostic'];%20for%20(x%20in%20checkboxes){%20form.elements[checkboxes[x]].checked=false;%20}%20form.sugarlog.checked=true;%20form.submit();
  11. //
  12.  
  13. var checkboxes = [
  14.     'configphp',
  15.     'custom_dir',
  16.     'phpinfo',
  17.     'mysql_dumps',
  18.     'mysql_schema',
  19.     'mysql_info',
  20.     'md5',
  21.     'md5filesmd5',
  22.     'md5calculated',
  23.     'beanlistbeanfiles',
  24.     'sugarlog',
  25.     'vardefs'
  26. ];
  27. var form = document.forms['Diagnostic'];
  28. for (x in checkboxes){
  29.     form.elements[checkboxes[x]].checked=false;
  30. }
  31. form.sugarlog.checked=true;
  32. form.submit();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement