SHARE
TWEET

Untitled

a guest Oct 20th, 2011 19 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --- webgui.orig//lib/WebGUI/Operation/Style.pm  2009-05-11 08:16:31.000000000 -0430
  2. +++ webgui/lib/WebGUI/Operation/Style.pm        2011-10-20 17:13:27.000000000 -0430
  3. @@ -70,5 +70,40 @@
  4.         return "";
  5.  }
  6.  
  7. +=head2 www_useMobileStyle ( )
  8. +
  9. +Forcibly use the mobile style even if the mobile detection routines
  10. +found a non-mobile user agent. This can be used from URLs of the form
  11. +
  12. +?op=style;method=useMobileStyle
  13. +
  14. +and will work for both registered and unregistered users, since it
  15. +uses a scratch variable.
  16. +
  17. +=cut
  18. +
  19. +sub www_useMobileStyle {
  20. +       my $session = shift;
  21. +       $session->style->setMobileStyle(1);
  22. +       return "";
  23. +}
  24. +
  25. +=head2 www_clearMobileStyle ( )
  26. +
  27. +Forcibly use the non-mobile style even if the mobile detection routines
  28. +found a mobile user agent. This can be used from URLs of the form
  29. +
  30. +?op=style;method=clearMobileStyle
  31. +
  32. +and will work for both registered and unregistered users, since it
  33. +uses a scratch variable.
  34. +
  35. +=cut
  36. +
  37. +sub www_clearMobileStyle {
  38. +       my $session = shift;
  39. +       $session->style->setMobileStyle(0);
  40. +       return "";
  41. +}
  42.  
  43.  1;
  44. diff -Naur webgui.orig//lib/WebGUI/Operation.pm webgui/lib/WebGUI/Operation.pm
  45. --- webgui.orig//lib/WebGUI/Operation.pm        2011-09-06 11:20:41.000000000 -0430
  46. +++ webgui/lib/WebGUI/Operation.pm      2011-10-20 17:16:05.000000000 -0430
  47. @@ -193,9 +193,11 @@
  48.                 'enableSendWebguiStats' => 'Statistics',
  49.                 'viewStatistics' => 'Statistics',
  50.  
  51. +               'clearMobileStyle' => 'Style',
  52.                 'makePrintable' => 'Style',
  53.                 'setPersonalStyle' => 'Style',
  54.                 'unsetPersonalStyle' => 'Style',
  55. +               'useMobileStyle' => 'Style',
  56.  
  57.          'ajaxCreateUser' => 'User',
  58.          'ajaxDeleteUser' => 'User',
  59.  
  60.  
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top